(function (root, factory) { if (typeof define === 'function' && define.amd) define(['exports', 'kotlin', 'door-door-runtime-js-legacy', 'kotlinx-coroutines-core', 'Napier-napier-js-legacy', 'UstadMobile-lib-util', 'kotlinx-serialization-kotlinx-serialization-core-js-legacy'], factory); else if (typeof exports === 'object') factory(module.exports, require('kotlin'), require('door-door-runtime-js-legacy'), require('kotlinx-coroutines-core'), require('Napier-napier-js-legacy'), require('UstadMobile-lib-util'), require('kotlinx-serialization-kotlinx-serialization-core-js-legacy')); else { if (typeof kotlin === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'UstadMobile-lib-database'."); } if (typeof this['door-door-runtime-js-legacy'] === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database'. Its dependency 'door-door-runtime-js-legacy' was not found. Please, check whether 'door-door-runtime-js-legacy' is loaded prior to 'UstadMobile-lib-database'."); } if (typeof this['kotlinx-coroutines-core'] === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'UstadMobile-lib-database'."); } if (typeof this['Napier-napier-js-legacy'] === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database'. Its dependency 'Napier-napier-js-legacy' was not found. Please, check whether 'Napier-napier-js-legacy' is loaded prior to 'UstadMobile-lib-database'."); } if (typeof this['UstadMobile-lib-util'] === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database'. Its dependency 'UstadMobile-lib-util' was not found. Please, check whether 'UstadMobile-lib-util' is loaded prior to 'UstadMobile-lib-database'."); } if (typeof this['kotlinx-serialization-kotlinx-serialization-core-js-legacy'] === 'undefined') { throw new Error("Error loading module 'UstadMobile-lib-database'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core-js-legacy' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core-js-legacy' is loaded prior to 'UstadMobile-lib-database'."); } root['UstadMobile-lib-database'] = factory(typeof this['UstadMobile-lib-database'] === 'undefined' ? {} : this['UstadMobile-lib-database'], kotlin, this['door-door-runtime-js-legacy'], this['kotlinx-coroutines-core'], this['Napier-napier-js-legacy'], this['UstadMobile-lib-util'], this['kotlinx-serialization-kotlinx-serialization-core-js-legacy']); } }(this, function (_, Kotlin, $module$door_door_runtime_js_legacy, $module$kotlinx_coroutines_core, $module$Napier_napier_js_legacy, $module$UstadMobile_lib_util, $module$kotlinx_serialization_kotlinx_serialization_core_js_legacy) { 'use strict'; var RoomDatabase = $module$door_door_runtime_js_legacy.com.ustadmobile.door.room.RoomDatabase; var Kind_CLASS = Kotlin.Kind.CLASS; var DoorJsImplClasses = $module$door_door_runtime_js_legacy.com.ustadmobile.door.util.DoorJsImplClasses; var getKClass = Kotlin.getKClass; var Kind_OBJECT = Kotlin.Kind.OBJECT; var DoorDatabaseMetadata = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.DoorDatabaseMetadata; var listOf = Kotlin.kotlin.collections.listOf_i5x0yv$; var LazyThreadSafetyMode = Kotlin.kotlin.LazyThreadSafetyMode; var ReplicationFieldMetaData = $module$door_door_runtime_js_legacy.com.ustadmobile.door.replication.ReplicationFieldMetaData; var ReplicationEntityMetaData = $module$door_door_runtime_js_legacy.com.ustadmobile.door.replication.ReplicationEntityMetaData; var to = Kotlin.kotlin.to_ujzrz7$; var mapOf = Kotlin.kotlin.collections.mapOf_qfcya0$; var lazy = Kotlin.kotlin.lazy_kls4a0$; var emptyMap = Kotlin.kotlin.collections.emptyMap_q3lmfv$; var mutableLinkedListOf = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.mutableLinkedListOf_i5x0yv$; var trimMargin = Kotlin.kotlin.text.trimMargin_rjktp$; var IllegalStateException_init = Kotlin.kotlin.IllegalStateException_init_pdl1vj$; var COROUTINE_SUSPENDED = Kotlin.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED; var CoroutineImpl = Kotlin.kotlin.coroutines.CoroutineImpl; var doorDatabaseMetadata = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.doorDatabaseMetadata_wddka1$; var InvalidationTracker = $module$door_door_runtime_js_legacy.com.ustadmobile.door.room.InvalidationTracker; var RoomDatabaseJdbcImplHelper = $module$door_door_runtime_js_legacy.com.ustadmobile.door.room.RoomDatabaseJdbcImplHelper; var get_rootDatabase = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.get_rootDatabase_jv9r7q$; var equals = Kotlin.equals; var coroutines = $module$kotlinx_coroutines_core.kotlinx.coroutines; var ReplicationNotificationDispatcher = $module$door_door_runtime_js_legacy.com.ustadmobile.door.replication.ReplicationNotificationDispatcher; var get_replicationNotificationDispatcher = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.get_replicationNotificationDispatcher_jv9r7q$; var lazy_0 = Kotlin.kotlin.lazy_klfg04$; var DeleteZombieAttachmentsListener = $module$door_door_runtime_js_legacy.com.ustadmobile.door.util.DeleteZombieAttachmentsListener; var IncomingReplicationListenerHelper = $module$door_door_runtime_js_legacy.com.ustadmobile.door.IncomingReplicationListenerHelper; var NodeIdAuthCache = $module$door_door_runtime_js_legacy.com.ustadmobile.door.util.NodeIdAuthCache; var get_nodeIdAuthCache = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.get_nodeIdAuthCache_jv9r7q$; var DoorPrimaryKeyManager = $module$door_door_runtime_js_legacy.com.ustadmobile.door.DoorPrimaryKeyManager; var DoorDatabaseJdbc = $module$door_door_runtime_js_legacy.com.ustadmobile.door.DoorDatabaseJdbc; var RoomJdbcImpl = $module$door_door_runtime_js_legacy.com.ustadmobile.door.room.RoomJdbcImpl; var copyToArray = Kotlin.kotlin.collections.copyToArray; var ArrayList_init = Kotlin.kotlin.collections.ArrayList_init_287e2$; var DoorDatabaseReplicateWrapper = $module$door_door_runtime_js_legacy.com.ustadmobile.door.DoorDatabaseReplicateWrapper; var deleteFromChangeLog = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.deleteFromChangeLog_gv7c8$; var setOf = Kotlin.kotlin.collections.setOf_mh5how$; var Unit = Kotlin.kotlin.Unit; var withDoorTransactionAsync = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.withDoorTransactionAsync_743ax9$; var L0 = Kotlin.Long.ZERO; var systemTimeInMillis = $module$door_door_runtime_js_legacy.com.ustadmobile.door.util.systemTimeInMillis; var napier = $module$Napier_napier_js_legacy.io.github.aakira.napier; var toString = Kotlin.toString; var setOf_0 = Kotlin.kotlin.collections.setOf_i5x0yv$; var ReplicationRunOnChangeRunner = $module$door_door_runtime_js_legacy.com.ustadmobile.door.replication.ReplicationRunOnChangeRunner; var LinkedHashSet_init = Kotlin.kotlin.collections.LinkedHashSet_init_287e2$; var makeNewSubscriptionManager = $module$door_door_runtime_js_legacy.com.ustadmobile.door.replication.makeNewSubscriptionManager_34ban0$; var RepositoryHelper = $module$door_door_runtime_js_legacy.com.ustadmobile.door.RepositoryHelper; var DoorDatabaseRepository = $module$door_door_runtime_js_legacy.com.ustadmobile.door.DoorDatabaseRepository; var prepareAndUseStatement = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.prepareAndUseStatement_m8en3l$; var PreparedStatementConfig = $module$door_door_runtime_js_legacy.com.ustadmobile.door.PreparedStatementConfig; var executeUpdateAsyncKmp = $module$door_door_runtime_js_legacy.com.ustadmobile.door.jdbc.ext.executeUpdateAsyncKmp_o9f2ds$; var prepareAndUseStatementAsync = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.prepareAndUseStatementAsync_2py00n$; var mapNextRow = $module$door_door_runtime_js_legacy.com.ustadmobile.door.jdbc.ext.mapNextRow_mkwwgd$; var useResults = $module$door_door_runtime_js_legacy.com.ustadmobile.door.jdbc.ext.useResults_vtdvuh$; var prepareAndUseStatement_0 = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.prepareAndUseStatement_kor20f$; var executeQueryAsyncKmp = $module$door_door_runtime_js_legacy.com.ustadmobile.door.jdbc.ext.executeQueryAsyncKmp_o9f2ds$; var EntityInsertionAdapter = $module$door_door_runtime_js_legacy.com.ustadmobile.door.EntityInsertionAdapter; var get_doorPrimaryKeyManager = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.get_doorPrimaryKeyManager_jv9r7q$; var mapRows = $module$door_door_runtime_js_legacy.com.ustadmobile.door.jdbc.ext.mapRows_vtdvuh$; var LiveDataImpl = $module$door_door_runtime_js_legacy.com.ustadmobile.door.LiveDataImpl; var DataSourceFactory = $module$door_door_runtime_js_legacy.com.ustadmobile.door.paging.DataSourceFactory; var prepareAndUseStatementAsync_0 = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.prepareAndUseStatementAsync_1gpljt$; var listOf_0 = Kotlin.kotlin.collections.listOf_mh5how$; var createArrayOrProxyArrayOf = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.createArrayOrProxyArrayOf_ewkpb9$; var storeAttachment = $module$door_door_runtime_js_legacy.com.ustadmobile.door.attachments.storeAttachment_jk99zw$; var hasListOrArrayParams = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.hasListOrArrayParams_oflprf$; var copyWithExtraParams = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.copyWithExtraParams_ab1y0s$; var copy = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.copy_bzgsjb$; var EntityWithAttachment = $module$door_door_runtime_js_legacy.com.ustadmobile.door.attachments.EntityWithAttachment; var defineInlineFunction = Kotlin.defineInlineFunction; var wrapFunction = Kotlin.wrapFunction; var dbType = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.dbType_omobsc$; var toList = Kotlin.kotlin.collections.toList_us0mfu$; var println = Kotlin.kotlin.io.println_s8jyv4$; var minifySql = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.minifySql_pdl1vz$; var joinToString = Kotlin.kotlin.collections.joinToString_cgipc5$; var DoorDatabaseCallbackStatementList = $module$door_door_runtime_js_legacy.com.ustadmobile.door.DoorDatabaseCallbackStatementList; var emptyList = Kotlin.kotlin.collections.emptyList_287e2$; var execSqlBatch = $module$door_door_runtime_js_legacy.com.ustadmobile.door.ext.execSqlBatch_3112hw$; var DoorMigrationSync = $module$door_door_runtime_js_legacy.com.ustadmobile.door.migration.DoorMigrationSync; var Kind_INTERFACE = Kotlin.Kind.INTERFACE; var launch = $module$kotlinx_coroutines_core.kotlinx.coroutines.launch_s496o7$; var Observer = $module$door_door_runtime_js_legacy.com.ustadmobile.door.lifecycle.Observer; var doorMainDispatcher = $module$door_door_runtime_js_legacy.com.ustadmobile.door.doorMainDispatcher; var getCallableRef = Kotlin.getCallableRef; var toList_0 = Kotlin.kotlin.collections.toList_7wnvza$; var collectionSizeOrDefault = Kotlin.kotlin.collections.collectionSizeOrDefault_ba2ldo$; var ArrayList_init_0 = Kotlin.kotlin.collections.ArrayList_init_ww73n8$; var addAll = Kotlin.kotlin.collections.addAll_ipc267$; var LinkedHashMap_init = Kotlin.kotlin.collections.LinkedHashMap_init_q3lmfv$; var encryptPassword = $module$UstadMobile_lib_util.com.ustadmobile.lib.util.encryptPassword_61zpoe$; var L2419200000 = new Kotlin.Long(-1875767296, 0); var SimpleDoorQuery = $module$door_door_runtime_js_legacy.com.ustadmobile.door.SimpleDoorQuery; var DoorMigrationStatementList = $module$door_door_runtime_js_legacy.com.ustadmobile.door.migration.DoorMigrationStatementList; var fixTincan = $module$UstadMobile_lib_util.com.ustadmobile.lib.util.ext.fixTincan_omobsc$; var plus = Kotlin.kotlin.collections.plus_mydzjv$; var NullableSerializer = $module$kotlinx_serialization_kotlinx_serialization_core_js_legacy.kotlinx.serialization.internal.NullableSerializer; var PluginGeneratedSerialDescriptor = $module$kotlinx_serialization_kotlinx_serialization_core_js_legacy.kotlinx.serialization.internal.PluginGeneratedSerialDescriptor; var internal = $module$kotlinx_serialization_kotlinx_serialization_core_js_legacy.kotlinx.serialization.internal; var UnknownFieldException = $module$kotlinx_serialization_kotlinx_serialization_core_js_legacy.kotlinx.serialization.UnknownFieldException; var GeneratedSerializer = $module$kotlinx_serialization_kotlinx_serialization_core_js_legacy.kotlinx.serialization.internal.GeneratedSerializer; var Long$Companion$MAX_VALUE = Kotlin.Long.MAX_VALUE; var throwCCE = Kotlin.throwCCE; var hashCode = Kotlin.hashCode; var L1 = Kotlin.Long.ONE; var L4 = Kotlin.Long.fromInt(4); var L8 = Kotlin.Long.fromInt(8); var L25966 = Kotlin.Long.fromInt(25966); var L13 = Kotlin.Long.fromInt(13); var ArrayListSerializer = $module$kotlinx_serialization_kotlinx_serialization_core_js_legacy.kotlinx.serialization.internal.ArrayListSerializer; var MissingFieldException_init = $module$kotlinx_serialization_kotlinx_serialization_core_js_legacy.kotlinx.serialization.MissingFieldException_init_61zpoe$; var LinkedHashMapSerializer = $module$kotlinx_serialization_kotlinx_serialization_core_js_legacy.kotlinx.serialization.internal.LinkedHashMapSerializer; var ensureNotNull = Kotlin.ensureNotNull; var L10000 = Kotlin.Long.fromInt(10000); var L10001 = Kotlin.Long.fromInt(10001); var L10002 = Kotlin.Long.fromInt(10002); var L10003 = Kotlin.Long.fromInt(10003); var L10004 = Kotlin.Long.fromInt(10004); var L10005 = Kotlin.Long.fromInt(10005); var L10006 = Kotlin.Long.fromInt(10006); var L10007 = Kotlin.Long.fromInt(10007); var L10008 = Kotlin.Long.fromInt(10008); var L10009 = Kotlin.Long.fromInt(10009); var L100000 = Kotlin.Long.fromInt(100000); var L100001 = Kotlin.Long.fromInt(100001); var L100002 = Kotlin.Long.fromInt(100002); var L100003 = Kotlin.Long.fromInt(100003); var L100004 = Kotlin.Long.fromInt(100004); var L100005 = Kotlin.Long.fromInt(100005); var trimIndent = Kotlin.kotlin.text.trimIndent_pdl1vz$; var L2 = Kotlin.Long.fromInt(2); var L16 = Kotlin.Long.fromInt(16); var L32 = Kotlin.Long.fromInt(32); var L64 = Kotlin.Long.fromInt(64); var L128 = Kotlin.Long.fromInt(128); var L256 = Kotlin.Long.fromInt(256); var L512 = Kotlin.Long.fromInt(512); var L1024 = Kotlin.Long.fromInt(1024); var L2048 = Kotlin.Long.fromInt(2048); var L4096 = Kotlin.Long.fromInt(4096); var L8192 = Kotlin.Long.fromInt(8192); var L16384 = Kotlin.Long.fromInt(16384); var L32768 = Kotlin.Long.fromInt(32768); var L65536 = Kotlin.Long.fromInt(65536); var L131072 = Kotlin.Long.fromInt(131072); var L262144 = Kotlin.Long.fromInt(262144); var L524288 = Kotlin.Long.fromInt(524288); var L1048576 = Kotlin.Long.fromInt(1048576); var L2097152 = Kotlin.Long.fromInt(2097152); var L4194304 = Kotlin.Long.fromInt(4194304); var L8388608 = Kotlin.Long.fromInt(8388608); var L16777216 = Kotlin.Long.fromInt(16777216); var L33554432 = Kotlin.Long.fromInt(33554432); var L67108864 = Kotlin.Long.fromInt(67108864); var L134217728 = Kotlin.Long.fromInt(134217728); var L268435456 = Kotlin.Long.fromInt(268435456); var L536870912 = Kotlin.Long.fromInt(536870912); var L1073741824 = Kotlin.Long.fromInt(1073741824); var L2147483648 = new Kotlin.Long(-2147483648, 0); var L4294967296 = new Kotlin.Long(0, 1); var L8589934592 = new Kotlin.Long(0, 2); var L17179869184 = new Kotlin.Long(0, 4); var L34359738368 = new Kotlin.Long(0, 8); var L68719476736 = new Kotlin.Long(0, 16); var L137438953472 = new Kotlin.Long(0, 32); var L274877906944 = new Kotlin.Long(0, 64); var L549755813888 = new Kotlin.Long(0, 128); var L1099511627776 = new Kotlin.Long(0, 256); var L2199023255552 = new Kotlin.Long(0, 512); var L4398046511104 = new Kotlin.Long(0, 1024); var L8796093022208 = new Kotlin.Long(0, 2048); var L17592186044416 = new Kotlin.Long(0, 4096); var L35184372088832 = new Kotlin.Long(0, 8192); var L70368744177664 = new Kotlin.Long(0, 16384); var L140737488355328 = new Kotlin.Long(0, 32768); var L281474976710656 = new Kotlin.Long(0, 65536); var L562949953421312 = new Kotlin.Long(0, 131072); var L1125899906842624 = new Kotlin.Long(0, 262144); var L17051045363166 = new Kotlin.Long(25198046, 3970); var L4406644834370 = new Kotlin.Long(8388674, 1026); var L284013120966 = new Kotlin.Long(545279430, 66); var L549722259454 = new Kotlin.Long(-33554434, 127); var L88579406561344 = new Kotlin.Long(1048640, 20624); var L8598323266 = new Kotlin.Long(8388674, 2); var L_2 = Kotlin.Long.fromInt(-2); var toByte = Kotlin.toByte; var SyncNodeIdCallback = $module$door_door_runtime_js_legacy.com.ustadmobile.door.SyncNodeIdCallback; var CompletableDeferred = $module$kotlinx_coroutines_core.kotlinx.coroutines.CompletableDeferred_xptg6w$; UmAppDatabase.prototype = Object.create(RoomDatabase.prototype); UmAppDatabase.prototype.constructor = UmAppDatabase; UmAppDatabaseJsImplementations.prototype = Object.create(DoorJsImplClasses.prototype); UmAppDatabaseJsImplementations.prototype.constructor = UmAppDatabaseJsImplementations; UmAppDatabase_DoorMetadata.prototype = Object.create(DoorDatabaseMetadata.prototype); UmAppDatabase_DoorMetadata.prototype.constructor = UmAppDatabase_DoorMetadata; UmAppDatabase_JdbcKt.prototype = Object.create(UmAppDatabase.prototype); UmAppDatabase_JdbcKt.prototype.constructor = UmAppDatabase_JdbcKt; UmAppDatabase_ReplicateWrapper.prototype = Object.create(UmAppDatabase.prototype); UmAppDatabase_ReplicateWrapper.prototype.constructor = UmAppDatabase_ReplicateWrapper; UmAppDatabase_Repo.prototype = Object.create(UmAppDatabase.prototype); UmAppDatabase_Repo.prototype.constructor = UmAppDatabase_Repo; AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral.prototype.constructor = AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral; AgentDao_JdbcKt.prototype = Object.create(AgentDao.prototype); AgentDao_JdbcKt.prototype.constructor = AgentDao_JdbcKt; AgentDao_ReplicateWrapper.prototype = Object.create(AgentDao.prototype); AgentDao_ReplicateWrapper.prototype.constructor = AgentDao_ReplicateWrapper; AgentDao_Repo.prototype = Object.create(AgentDao.prototype); AgentDao_Repo.prototype.constructor = AgentDao_Repo; ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral.prototype.constructor = ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral; ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral.prototype.constructor = ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral; ChatDao_JdbcKt.prototype = Object.create(ChatDao.prototype); ChatDao_JdbcKt.prototype.constructor = ChatDao_JdbcKt; ChatDao_ReplicateWrapper.prototype = Object.create(ChatDao.prototype); ChatDao_ReplicateWrapper.prototype.constructor = ChatDao_ReplicateWrapper; ChatDao_Repo.prototype = Object.create(ChatDao.prototype); ChatDao_Repo.prototype.constructor = ChatDao_Repo; ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral.prototype.constructor = ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral; ChatMemberDao_JdbcKt.prototype = Object.create(ChatMemberDao.prototype); ChatMemberDao_JdbcKt.prototype.constructor = ChatMemberDao_JdbcKt; ChatMemberDao_ReplicateWrapper.prototype = Object.create(ChatMemberDao.prototype); ChatMemberDao_ReplicateWrapper.prototype.constructor = ChatMemberDao_ReplicateWrapper; ChatMemberDao_Repo.prototype = Object.create(ChatMemberDao.prototype); ChatMemberDao_Repo.prototype.constructor = ChatMemberDao_Repo; ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral.prototype.constructor = ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral; ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral.prototype.constructor = ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral; ClazzAssignmentContentJoinDao_JdbcKt.prototype = Object.create(ClazzAssignmentContentJoinDao.prototype); ClazzAssignmentContentJoinDao_JdbcKt.prototype.constructor = ClazzAssignmentContentJoinDao_JdbcKt; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype = Object.create(ClazzAssignmentContentJoinDao.prototype); ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.constructor = ClazzAssignmentContentJoinDao_ReplicateWrapper; ClazzAssignmentContentJoinDao_Repo.prototype = Object.create(ClazzAssignmentContentJoinDao.prototype); ClazzAssignmentContentJoinDao_Repo.prototype.constructor = ClazzAssignmentContentJoinDao_Repo; ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral.prototype.constructor = ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral; ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral.prototype.constructor = ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral; ClazzAssignmentDao_JdbcKt.prototype = Object.create(ClazzAssignmentDao.prototype); ClazzAssignmentDao_JdbcKt.prototype.constructor = ClazzAssignmentDao_JdbcKt; ClazzAssignmentDao_ReplicateWrapper.prototype = Object.create(ClazzAssignmentDao.prototype); ClazzAssignmentDao_ReplicateWrapper.prototype.constructor = ClazzAssignmentDao_ReplicateWrapper; ClazzAssignmentDao_Repo.prototype = Object.create(ClazzAssignmentDao.prototype); ClazzAssignmentDao_Repo.prototype.constructor = ClazzAssignmentDao_Repo; ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral.prototype.constructor = ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral; ClazzAssignmentRollUpDao_JdbcKt.prototype = Object.create(ClazzAssignmentRollUpDao.prototype); ClazzAssignmentRollUpDao_JdbcKt.prototype.constructor = ClazzAssignmentRollUpDao_JdbcKt; ClazzAssignmentRollUpDao_Repo.prototype = Object.create(ClazzAssignmentRollUpDao.prototype); ClazzAssignmentRollUpDao_Repo.prototype.constructor = ClazzAssignmentRollUpDao_Repo; ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral.prototype.constructor = ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral; ClazzContentJoinDao_JdbcKt.prototype = Object.create(ClazzContentJoinDao.prototype); ClazzContentJoinDao_JdbcKt.prototype.constructor = ClazzContentJoinDao_JdbcKt; ClazzContentJoinDao_ReplicateWrapper.prototype = Object.create(ClazzContentJoinDao.prototype); ClazzContentJoinDao_ReplicateWrapper.prototype.constructor = ClazzContentJoinDao_ReplicateWrapper; ClazzContentJoinDao_Repo.prototype = Object.create(ClazzContentJoinDao.prototype); ClazzContentJoinDao_Repo.prototype.constructor = ClazzContentJoinDao_Repo; ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral.prototype.constructor = ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral; ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral.prototype.constructor = ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral; ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral.prototype.constructor = ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral; ClazzDao_JdbcKt.prototype = Object.create(ClazzDao.prototype); ClazzDao_JdbcKt.prototype.constructor = ClazzDao_JdbcKt; ClazzDao_ReplicateWrapper.prototype = Object.create(ClazzDao.prototype); ClazzDao_ReplicateWrapper.prototype.constructor = ClazzDao_ReplicateWrapper; ClazzDao_Repo.prototype = Object.create(ClazzDao.prototype); ClazzDao_Repo.prototype.constructor = ClazzDao_Repo; ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral.prototype.constructor = ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral; ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral.prototype.constructor = ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral; ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral.prototype.constructor = ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral; ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral.prototype.constructor = ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral; ClazzEnrolmentDao_JdbcKt.prototype = Object.create(ClazzEnrolmentDao.prototype); ClazzEnrolmentDao_JdbcKt.prototype.constructor = ClazzEnrolmentDao_JdbcKt; ClazzEnrolmentDao_ReplicateWrapper.prototype = Object.create(ClazzEnrolmentDao.prototype); ClazzEnrolmentDao_ReplicateWrapper.prototype.constructor = ClazzEnrolmentDao_ReplicateWrapper; ClazzEnrolmentDao_Repo.prototype = Object.create(ClazzEnrolmentDao.prototype); ClazzEnrolmentDao_Repo.prototype.constructor = ClazzEnrolmentDao_Repo; ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral.prototype.constructor = ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral; ClazzLogAttendanceRecordDao_JdbcKt.prototype = Object.create(ClazzLogAttendanceRecordDao.prototype); ClazzLogAttendanceRecordDao_JdbcKt.prototype.constructor = ClazzLogAttendanceRecordDao_JdbcKt; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype = Object.create(ClazzLogAttendanceRecordDao.prototype); ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.constructor = ClazzLogAttendanceRecordDao_ReplicateWrapper; ClazzLogAttendanceRecordDao_Repo.prototype = Object.create(ClazzLogAttendanceRecordDao.prototype); ClazzLogAttendanceRecordDao_Repo.prototype.constructor = ClazzLogAttendanceRecordDao_Repo; ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral.prototype.constructor = ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral; ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral.prototype.constructor = ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral; ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral.prototype.constructor = ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral; ClazzLogDao_JdbcKt.prototype = Object.create(ClazzLogDao.prototype); ClazzLogDao_JdbcKt.prototype.constructor = ClazzLogDao_JdbcKt; ClazzLogDao_ReplicateWrapper.prototype = Object.create(ClazzLogDao.prototype); ClazzLogDao_ReplicateWrapper.prototype.constructor = ClazzLogDao_ReplicateWrapper; ClazzLogDao_Repo.prototype = Object.create(ClazzLogDao.prototype); ClazzLogDao_Repo.prototype.constructor = ClazzLogDao_Repo; CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral.prototype.constructor = CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral; CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral.prototype.constructor = CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral; CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral.prototype.constructor = CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral; CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral.prototype.constructor = CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral; CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral.prototype.constructor = CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral; CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral.prototype.constructor = CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral; CommentsDao_JdbcKt.prototype = Object.create(CommentsDao.prototype); CommentsDao_JdbcKt.prototype.constructor = CommentsDao_JdbcKt; CommentsDao_ReplicateWrapper.prototype = Object.create(CommentsDao.prototype); CommentsDao_ReplicateWrapper.prototype.constructor = CommentsDao_ReplicateWrapper; CommentsDao_Repo.prototype = Object.create(CommentsDao.prototype); CommentsDao_Repo.prototype.constructor = CommentsDao_Repo; ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral.prototype.constructor = ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral; ConnectivityStatusDao_JdbcKt.prototype = Object.create(ConnectivityStatusDao.prototype); ConnectivityStatusDao_JdbcKt.prototype.constructor = ConnectivityStatusDao_JdbcKt; ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral.prototype.constructor = ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral; ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral.prototype.constructor = ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral; ContainerDao_JdbcKt.prototype = Object.create(ContainerDao.prototype); ContainerDao_JdbcKt.prototype.constructor = ContainerDao_JdbcKt; ContainerDao_ReplicateWrapper.prototype = Object.create(ContainerDao.prototype); ContainerDao_ReplicateWrapper.prototype.constructor = ContainerDao_ReplicateWrapper; ContainerDao_Repo.prototype = Object.create(ContainerDao.prototype); ContainerDao_Repo.prototype.constructor = ContainerDao_Repo; ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral.prototype.constructor = ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral; ContainerETagDao_JdbcKt.prototype = Object.create(ContainerETagDao.prototype); ContainerETagDao_JdbcKt.prototype.constructor = ContainerETagDao_JdbcKt; ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral.prototype.constructor = ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral; ContainerEntryDao_JdbcKt.prototype = Object.create(ContainerEntryDao.prototype); ContainerEntryDao_JdbcKt.prototype.constructor = ContainerEntryDao_JdbcKt; ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral.prototype.constructor = ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral; ContainerEntryFileDao_JdbcKt.prototype = Object.create(ContainerEntryFileDao.prototype); ContainerEntryFileDao_JdbcKt.prototype.constructor = ContainerEntryFileDao_JdbcKt; ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral.prototype.constructor = ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral; ContainerImportJobDao_JdbcKt.prototype = Object.create(ContainerImportJobDao.prototype); ContainerImportJobDao_JdbcKt.prototype.constructor = ContainerImportJobDao_JdbcKt; ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral.prototype.constructor = ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral; ContentCategoryDao_JdbcKt.prototype = Object.create(ContentCategoryDao.prototype); ContentCategoryDao_JdbcKt.prototype.constructor = ContentCategoryDao_JdbcKt; ContentCategoryDao_ReplicateWrapper.prototype = Object.create(ContentCategoryDao.prototype); ContentCategoryDao_ReplicateWrapper.prototype.constructor = ContentCategoryDao_ReplicateWrapper; ContentCategoryDao_Repo.prototype = Object.create(ContentCategoryDao.prototype); ContentCategoryDao_Repo.prototype.constructor = ContentCategoryDao_Repo; ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral.prototype.constructor = ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral; ContentCategorySchemaDao_JdbcKt.prototype = Object.create(ContentCategorySchemaDao.prototype); ContentCategorySchemaDao_JdbcKt.prototype.constructor = ContentCategorySchemaDao_JdbcKt; ContentCategorySchemaDao_ReplicateWrapper.prototype = Object.create(ContentCategorySchemaDao.prototype); ContentCategorySchemaDao_ReplicateWrapper.prototype.constructor = ContentCategorySchemaDao_ReplicateWrapper; ContentCategorySchemaDao_Repo.prototype = Object.create(ContentCategorySchemaDao.prototype); ContentCategorySchemaDao_Repo.prototype.constructor = ContentCategorySchemaDao_Repo; ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral.prototype.constructor = ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral; ContentEntryContentCategoryJoinDao_JdbcKt.prototype = Object.create(ContentEntryContentCategoryJoinDao.prototype); ContentEntryContentCategoryJoinDao_JdbcKt.prototype.constructor = ContentEntryContentCategoryJoinDao_JdbcKt; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype = Object.create(ContentEntryContentCategoryJoinDao.prototype); ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.constructor = ContentEntryContentCategoryJoinDao_ReplicateWrapper; ContentEntryContentCategoryJoinDao_Repo.prototype = Object.create(ContentEntryContentCategoryJoinDao.prototype); ContentEntryContentCategoryJoinDao_Repo.prototype.constructor = ContentEntryContentCategoryJoinDao_Repo; ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral; ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral; ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral; ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral; ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral; ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral; ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral.prototype.constructor = ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral; ContentEntryDao_JdbcKt.prototype = Object.create(ContentEntryDao.prototype); ContentEntryDao_JdbcKt.prototype.constructor = ContentEntryDao_JdbcKt; ContentEntryDao_ReplicateWrapper.prototype = Object.create(ContentEntryDao.prototype); ContentEntryDao_ReplicateWrapper.prototype.constructor = ContentEntryDao_ReplicateWrapper; ContentEntryDao_Repo.prototype = Object.create(ContentEntryDao.prototype); ContentEntryDao_Repo.prototype.constructor = ContentEntryDao_Repo; ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral.prototype.constructor = ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral; ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral.prototype.constructor = ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral; ContentEntryParentChildJoinDao_JdbcKt.prototype = Object.create(ContentEntryParentChildJoinDao.prototype); ContentEntryParentChildJoinDao_JdbcKt.prototype.constructor = ContentEntryParentChildJoinDao_JdbcKt; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype = Object.create(ContentEntryParentChildJoinDao.prototype); ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.constructor = ContentEntryParentChildJoinDao_ReplicateWrapper; ContentEntryParentChildJoinDao_Repo.prototype = Object.create(ContentEntryParentChildJoinDao.prototype); ContentEntryParentChildJoinDao_Repo.prototype.constructor = ContentEntryParentChildJoinDao_Repo; ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral.prototype.constructor = ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral; ContentEntryPictureDao_JdbcKt.prototype = Object.create(ContentEntryPictureDao.prototype); ContentEntryPictureDao_JdbcKt.prototype.constructor = ContentEntryPictureDao_JdbcKt; ContentEntryPictureDao_ReplicateWrapper.prototype = Object.create(ContentEntryPictureDao.prototype); ContentEntryPictureDao_ReplicateWrapper.prototype.constructor = ContentEntryPictureDao_ReplicateWrapper; ContentEntryPictureDao_Repo.prototype = Object.create(ContentEntryPictureDao.prototype); ContentEntryPictureDao_Repo.prototype.constructor = ContentEntryPictureDao_Repo; ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral.prototype.constructor = ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral; ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral.prototype.constructor = ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype = Object.create(ContentEntryRelatedEntryJoinDao.prototype); ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.constructor = ContentEntryRelatedEntryJoinDao_JdbcKt; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype = Object.create(ContentEntryRelatedEntryJoinDao.prototype); ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.constructor = ContentEntryRelatedEntryJoinDao_ReplicateWrapper; ContentEntryRelatedEntryJoinDao_Repo.prototype = Object.create(ContentEntryRelatedEntryJoinDao.prototype); ContentEntryRelatedEntryJoinDao_Repo.prototype.constructor = ContentEntryRelatedEntryJoinDao_Repo; ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral.prototype.constructor = ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral; ContentJobDao_JdbcKt.prototype = Object.create(ContentJobDao.prototype); ContentJobDao_JdbcKt.prototype.constructor = ContentJobDao_JdbcKt; ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral.prototype.constructor = ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral; ContentJobItemDao_JdbcKt.prototype = Object.create(ContentJobItemDao.prototype); ContentJobItemDao_JdbcKt.prototype.constructor = ContentJobItemDao_JdbcKt; ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral.prototype.constructor = ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral; ContextXObjectStatementJoinDao_JdbcKt.prototype = Object.create(ContextXObjectStatementJoinDao.prototype); ContextXObjectStatementJoinDao_JdbcKt.prototype.constructor = ContextXObjectStatementJoinDao_JdbcKt; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype = Object.create(ContextXObjectStatementJoinDao.prototype); ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.constructor = ContextXObjectStatementJoinDao_ReplicateWrapper; ContextXObjectStatementJoinDao_Repo.prototype = Object.create(ContextXObjectStatementJoinDao.prototype); ContextXObjectStatementJoinDao_Repo.prototype.constructor = ContextXObjectStatementJoinDao_Repo; CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral.prototype.constructor = CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral; CourseAssignmentMarkDao_JdbcKt.prototype = Object.create(CourseAssignmentMarkDao.prototype); CourseAssignmentMarkDao_JdbcKt.prototype.constructor = CourseAssignmentMarkDao_JdbcKt; CourseAssignmentMarkDao_ReplicateWrapper.prototype = Object.create(CourseAssignmentMarkDao.prototype); CourseAssignmentMarkDao_ReplicateWrapper.prototype.constructor = CourseAssignmentMarkDao_ReplicateWrapper; CourseAssignmentMarkDao_Repo.prototype = Object.create(CourseAssignmentMarkDao.prototype); CourseAssignmentMarkDao_Repo.prototype.constructor = CourseAssignmentMarkDao_Repo; CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral.prototype.constructor = CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype = Object.create(CourseAssignmentSubmissionAttachmentDao.prototype); CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.constructor = CourseAssignmentSubmissionAttachmentDao_JdbcKt; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype = Object.create(CourseAssignmentSubmissionAttachmentDao.prototype); CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.constructor = CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper; CourseAssignmentSubmissionAttachmentDao_Repo.prototype = Object.create(CourseAssignmentSubmissionAttachmentDao.prototype); CourseAssignmentSubmissionAttachmentDao_Repo.prototype.constructor = CourseAssignmentSubmissionAttachmentDao_Repo; CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral.prototype.constructor = CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral; CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral.prototype.constructor = CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral; CourseAssignmentSubmissionDao_JdbcKt.prototype = Object.create(CourseAssignmentSubmissionDao.prototype); CourseAssignmentSubmissionDao_JdbcKt.prototype.constructor = CourseAssignmentSubmissionDao_JdbcKt; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype = Object.create(CourseAssignmentSubmissionDao.prototype); CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.constructor = CourseAssignmentSubmissionDao_ReplicateWrapper; CourseAssignmentSubmissionDao_Repo.prototype = Object.create(CourseAssignmentSubmissionDao.prototype); CourseAssignmentSubmissionDao_Repo.prototype.constructor = CourseAssignmentSubmissionDao_Repo; CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral.prototype.constructor = CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral; CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral.prototype.constructor = CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral; CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral.prototype.constructor = CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral; CourseBlockDao_JdbcKt.prototype = Object.create(CourseBlockDao.prototype); CourseBlockDao_JdbcKt.prototype.constructor = CourseBlockDao_JdbcKt; CourseBlockDao_ReplicateWrapper.prototype = Object.create(CourseBlockDao.prototype); CourseBlockDao_ReplicateWrapper.prototype.constructor = CourseBlockDao_ReplicateWrapper; CourseBlockDao_Repo.prototype = Object.create(CourseBlockDao.prototype); CourseBlockDao_Repo.prototype.constructor = CourseBlockDao_Repo; CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral.prototype.constructor = CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral; CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral.prototype.constructor = CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral; CourseDiscussionDao_JdbcKt.prototype = Object.create(CourseDiscussionDao.prototype); CourseDiscussionDao_JdbcKt.prototype.constructor = CourseDiscussionDao_JdbcKt; CourseDiscussionDao_ReplicateWrapper.prototype = Object.create(CourseDiscussionDao.prototype); CourseDiscussionDao_ReplicateWrapper.prototype.constructor = CourseDiscussionDao_ReplicateWrapper; CourseDiscussionDao_Repo.prototype = Object.create(CourseDiscussionDao.prototype); CourseDiscussionDao_Repo.prototype.constructor = CourseDiscussionDao_Repo; CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral.prototype.constructor = CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral; CourseGroupMemberDao_JdbcKt.prototype = Object.create(CourseGroupMemberDao.prototype); CourseGroupMemberDao_JdbcKt.prototype.constructor = CourseGroupMemberDao_JdbcKt; CourseGroupMemberDao_ReplicateWrapper.prototype = Object.create(CourseGroupMemberDao.prototype); CourseGroupMemberDao_ReplicateWrapper.prototype.constructor = CourseGroupMemberDao_ReplicateWrapper; CourseGroupMemberDao_Repo.prototype = Object.create(CourseGroupMemberDao.prototype); CourseGroupMemberDao_Repo.prototype.constructor = CourseGroupMemberDao_Repo; CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral.prototype.constructor = CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral; CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral.prototype.constructor = CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral; CourseGroupSetDao_JdbcKt.prototype = Object.create(CourseGroupSetDao.prototype); CourseGroupSetDao_JdbcKt.prototype.constructor = CourseGroupSetDao_JdbcKt; CourseGroupSetDao_ReplicateWrapper.prototype = Object.create(CourseGroupSetDao.prototype); CourseGroupSetDao_ReplicateWrapper.prototype.constructor = CourseGroupSetDao_ReplicateWrapper; CourseGroupSetDao_Repo.prototype = Object.create(CourseGroupSetDao.prototype); CourseGroupSetDao_Repo.prototype.constructor = CourseGroupSetDao_Repo; CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral.prototype.constructor = CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral; CoursePictureDao_JdbcKt.prototype = Object.create(CoursePictureDao.prototype); CoursePictureDao_JdbcKt.prototype.constructor = CoursePictureDao_JdbcKt; CoursePictureDao_ReplicateWrapper.prototype = Object.create(CoursePictureDao.prototype); CoursePictureDao_ReplicateWrapper.prototype.constructor = CoursePictureDao_ReplicateWrapper; CoursePictureDao_Repo.prototype = Object.create(CoursePictureDao.prototype); CoursePictureDao_Repo.prototype.constructor = CoursePictureDao_Repo; CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral.prototype.constructor = CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral; CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral.prototype.constructor = CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral; CourseTerminologyDao_JdbcKt.prototype = Object.create(CourseTerminologyDao.prototype); CourseTerminologyDao_JdbcKt.prototype.constructor = CourseTerminologyDao_JdbcKt; CourseTerminologyDao_ReplicateWrapper.prototype = Object.create(CourseTerminologyDao.prototype); CourseTerminologyDao_ReplicateWrapper.prototype.constructor = CourseTerminologyDao_ReplicateWrapper; CourseTerminologyDao_Repo.prototype = Object.create(CourseTerminologyDao.prototype); CourseTerminologyDao_Repo.prototype.constructor = CourseTerminologyDao_Repo; DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral.prototype.constructor = DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral; DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral.prototype.constructor = DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral; DiscussionPostDao_JdbcKt.prototype = Object.create(DiscussionPostDao.prototype); DiscussionPostDao_JdbcKt.prototype.constructor = DiscussionPostDao_JdbcKt; DiscussionPostDao_ReplicateWrapper.prototype = Object.create(DiscussionPostDao.prototype); DiscussionPostDao_ReplicateWrapper.prototype.constructor = DiscussionPostDao_ReplicateWrapper; DiscussionPostDao_Repo.prototype = Object.create(DiscussionPostDao.prototype); DiscussionPostDao_Repo.prototype.constructor = DiscussionPostDao_Repo; DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral.prototype.constructor = DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral; DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral.prototype.constructor = DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral; DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral.prototype.constructor = DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral; DiscussionTopicDao_JdbcKt.prototype = Object.create(DiscussionTopicDao.prototype); DiscussionTopicDao_JdbcKt.prototype.constructor = DiscussionTopicDao_JdbcKt; DiscussionTopicDao_ReplicateWrapper.prototype = Object.create(DiscussionTopicDao.prototype); DiscussionTopicDao_ReplicateWrapper.prototype.constructor = DiscussionTopicDao_ReplicateWrapper; DiscussionTopicDao_Repo.prototype = Object.create(DiscussionTopicDao.prototype); DiscussionTopicDao_Repo.prototype.constructor = DiscussionTopicDao_Repo; EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral.prototype.constructor = EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral; EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral.prototype.constructor = EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral; EntityRoleDao_JdbcKt.prototype = Object.create(EntityRoleDao.prototype); EntityRoleDao_JdbcKt.prototype.constructor = EntityRoleDao_JdbcKt; EntityRoleDao_Repo.prototype = Object.create(EntityRoleDao.prototype); EntityRoleDao_Repo.prototype.constructor = EntityRoleDao_Repo; ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral.prototype.constructor = ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral; ErrorReportDao_JdbcKt.prototype = Object.create(ErrorReportDao.prototype); ErrorReportDao_JdbcKt.prototype.constructor = ErrorReportDao_JdbcKt; ErrorReportDao_ReplicateWrapper.prototype = Object.create(ErrorReportDao.prototype); ErrorReportDao_ReplicateWrapper.prototype.constructor = ErrorReportDao_ReplicateWrapper; ErrorReportDao_Repo.prototype = Object.create(ErrorReportDao.prototype); ErrorReportDao_Repo.prototype.constructor = ErrorReportDao_Repo; GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral.prototype.constructor = GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral; GroupLearningSessionDao_JdbcKt.prototype = Object.create(GroupLearningSessionDao.prototype); GroupLearningSessionDao_JdbcKt.prototype.constructor = GroupLearningSessionDao_JdbcKt; GroupLearningSessionDao_ReplicateWrapper.prototype = Object.create(GroupLearningSessionDao.prototype); GroupLearningSessionDao_ReplicateWrapper.prototype.constructor = GroupLearningSessionDao_ReplicateWrapper; GroupLearningSessionDao_Repo.prototype = Object.create(GroupLearningSessionDao.prototype); GroupLearningSessionDao_Repo.prototype.constructor = GroupLearningSessionDao_Repo; HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral.prototype.constructor = HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral; HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral.prototype.constructor = HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral; HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral.prototype.constructor = HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral; HolidayCalendarDao_JdbcKt.prototype = Object.create(HolidayCalendarDao.prototype); HolidayCalendarDao_JdbcKt.prototype.constructor = HolidayCalendarDao_JdbcKt; HolidayCalendarDao_ReplicateWrapper.prototype = Object.create(HolidayCalendarDao.prototype); HolidayCalendarDao_ReplicateWrapper.prototype.constructor = HolidayCalendarDao_ReplicateWrapper; HolidayCalendarDao_Repo.prototype = Object.create(HolidayCalendarDao.prototype); HolidayCalendarDao_Repo.prototype.constructor = HolidayCalendarDao_Repo; HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral.prototype.constructor = HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral; HolidayDao_JdbcKt.prototype = Object.create(HolidayDao.prototype); HolidayDao_JdbcKt.prototype.constructor = HolidayDao_JdbcKt; HolidayDao_ReplicateWrapper.prototype = Object.create(HolidayDao.prototype); HolidayDao_ReplicateWrapper.prototype.constructor = HolidayDao_ReplicateWrapper; HolidayDao_Repo.prototype = Object.create(HolidayDao.prototype); HolidayDao_Repo.prototype.constructor = HolidayDao_Repo; LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral.prototype.constructor = LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral; LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral.prototype.constructor = LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral; LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral.prototype.constructor = LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral; LanguageDao_JdbcKt.prototype = Object.create(LanguageDao.prototype); LanguageDao_JdbcKt.prototype.constructor = LanguageDao_JdbcKt; LanguageDao_ReplicateWrapper.prototype = Object.create(LanguageDao.prototype); LanguageDao_ReplicateWrapper.prototype.constructor = LanguageDao_ReplicateWrapper; LanguageDao_Repo.prototype = Object.create(LanguageDao.prototype); LanguageDao_Repo.prototype.constructor = LanguageDao_Repo; LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral.prototype.constructor = LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral; LanguageVariantDao_JdbcKt.prototype = Object.create(LanguageVariantDao.prototype); LanguageVariantDao_JdbcKt.prototype.constructor = LanguageVariantDao_JdbcKt; LanguageVariantDao_ReplicateWrapper.prototype = Object.create(LanguageVariantDao.prototype); LanguageVariantDao_ReplicateWrapper.prototype.constructor = LanguageVariantDao_ReplicateWrapper; LanguageVariantDao_Repo.prototype = Object.create(LanguageVariantDao.prototype); LanguageVariantDao_Repo.prototype.constructor = LanguageVariantDao_Repo; LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral.prototype.constructor = LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral; LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral.prototype.constructor = LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral; LearnerGroupDao_JdbcKt.prototype = Object.create(LearnerGroupDao.prototype); LearnerGroupDao_JdbcKt.prototype.constructor = LearnerGroupDao_JdbcKt; LearnerGroupDao_ReplicateWrapper.prototype = Object.create(LearnerGroupDao.prototype); LearnerGroupDao_ReplicateWrapper.prototype.constructor = LearnerGroupDao_ReplicateWrapper; LearnerGroupDao_Repo.prototype = Object.create(LearnerGroupDao.prototype); LearnerGroupDao_Repo.prototype.constructor = LearnerGroupDao_Repo; LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral.prototype.constructor = LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral; LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral.prototype.constructor = LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral; LearnerGroupMemberDao_JdbcKt.prototype = Object.create(LearnerGroupMemberDao.prototype); LearnerGroupMemberDao_JdbcKt.prototype.constructor = LearnerGroupMemberDao_JdbcKt; LearnerGroupMemberDao_ReplicateWrapper.prototype = Object.create(LearnerGroupMemberDao.prototype); LearnerGroupMemberDao_ReplicateWrapper.prototype.constructor = LearnerGroupMemberDao_ReplicateWrapper; LearnerGroupMemberDao_Repo.prototype = Object.create(LearnerGroupMemberDao.prototype); LearnerGroupMemberDao_Repo.prototype.constructor = LearnerGroupMemberDao_Repo; LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral.prototype.constructor = LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral; LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral.prototype.constructor = LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral; LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral.prototype.constructor = LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral; LeavingReasonDao_JdbcKt.prototype = Object.create(LeavingReasonDao.prototype); LeavingReasonDao_JdbcKt.prototype.constructor = LeavingReasonDao_JdbcKt; LeavingReasonDao_ReplicateWrapper.prototype = Object.create(LeavingReasonDao.prototype); LeavingReasonDao_ReplicateWrapper.prototype.constructor = LeavingReasonDao_ReplicateWrapper; LeavingReasonDao_Repo.prototype = Object.create(LeavingReasonDao.prototype); LeavingReasonDao_Repo.prototype.constructor = LeavingReasonDao_Repo; LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral.prototype.constructor = LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral; LocallyAvailableContainerDao_JdbcKt.prototype = Object.create(LocallyAvailableContainerDao.prototype); LocallyAvailableContainerDao_JdbcKt.prototype.constructor = LocallyAvailableContainerDao_JdbcKt; MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral.prototype.constructor = MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral; MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral.prototype.constructor = MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral; MessageDao_JdbcKt.prototype = Object.create(MessageDao.prototype); MessageDao_JdbcKt.prototype.constructor = MessageDao_JdbcKt; MessageDao_ReplicateWrapper.prototype = Object.create(MessageDao.prototype); MessageDao_ReplicateWrapper.prototype.constructor = MessageDao_ReplicateWrapper; MessageDao_Repo.prototype = Object.create(MessageDao.prototype); MessageDao_Repo.prototype.constructor = MessageDao_Repo; MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral.prototype.constructor = MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral; MessageReadDao_JdbcKt.prototype = Object.create(MessageReadDao.prototype); MessageReadDao_JdbcKt.prototype.constructor = MessageReadDao_JdbcKt; MessageReadDao_ReplicateWrapper.prototype = Object.create(MessageReadDao.prototype); MessageReadDao_ReplicateWrapper.prototype.constructor = MessageReadDao_ReplicateWrapper; MessageReadDao_Repo.prototype = Object.create(MessageReadDao.prototype); MessageReadDao_Repo.prototype.constructor = MessageReadDao_Repo; NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral.prototype.constructor = NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral; NetworkNodeDao_JdbcKt.prototype = Object.create(NetworkNodeDao.prototype); NetworkNodeDao_JdbcKt.prototype.constructor = NetworkNodeDao_JdbcKt; PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral.prototype.constructor = PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral; PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral.prototype.constructor = PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral; PersonAuth2Dao_JdbcKt.prototype = Object.create(PersonAuth2Dao.prototype); PersonAuth2Dao_JdbcKt.prototype.constructor = PersonAuth2Dao_JdbcKt; PersonAuth2Dao_ReplicateWrapper.prototype = Object.create(PersonAuth2Dao.prototype); PersonAuth2Dao_ReplicateWrapper.prototype.constructor = PersonAuth2Dao_ReplicateWrapper; PersonAuth2Dao_Repo.prototype = Object.create(PersonAuth2Dao.prototype); PersonAuth2Dao_Repo.prototype.constructor = PersonAuth2Dao_Repo; PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype.constructor = PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral; PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype.constructor = PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral; PersonAuthDao_JdbcKt.prototype = Object.create(PersonAuthDao.prototype); PersonAuthDao_JdbcKt.prototype.constructor = PersonAuthDao_JdbcKt; PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral; PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral.prototype.constructor = PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral; PersonDao_JdbcKt.prototype = Object.create(PersonDao.prototype); PersonDao_JdbcKt.prototype.constructor = PersonDao_JdbcKt; PersonDao_ReplicateWrapper.prototype = Object.create(PersonDao.prototype); PersonDao_ReplicateWrapper.prototype.constructor = PersonDao_ReplicateWrapper; PersonDao_Repo.prototype = Object.create(PersonDao.prototype); PersonDao_Repo.prototype.constructor = PersonDao_Repo; PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype.constructor = PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral; PersonGroupDao_JdbcKt.prototype = Object.create(PersonGroupDao.prototype); PersonGroupDao_JdbcKt.prototype.constructor = PersonGroupDao_JdbcKt; PersonGroupDao_ReplicateWrapper.prototype = Object.create(PersonGroupDao.prototype); PersonGroupDao_ReplicateWrapper.prototype.constructor = PersonGroupDao_ReplicateWrapper; PersonGroupDao_Repo.prototype = Object.create(PersonGroupDao.prototype); PersonGroupDao_Repo.prototype.constructor = PersonGroupDao_Repo; PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype.constructor = PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral; PersonGroupMemberDao_JdbcKt.prototype = Object.create(PersonGroupMemberDao.prototype); PersonGroupMemberDao_JdbcKt.prototype.constructor = PersonGroupMemberDao_JdbcKt; PersonGroupMemberDao_ReplicateWrapper.prototype = Object.create(PersonGroupMemberDao.prototype); PersonGroupMemberDao_ReplicateWrapper.prototype.constructor = PersonGroupMemberDao_ReplicateWrapper; PersonGroupMemberDao_Repo.prototype = Object.create(PersonGroupMemberDao.prototype); PersonGroupMemberDao_Repo.prototype.constructor = PersonGroupMemberDao_Repo; PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral.prototype.constructor = PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral; PersonParentJoinDao_JdbcKt.prototype = Object.create(PersonParentJoinDao.prototype); PersonParentJoinDao_JdbcKt.prototype.constructor = PersonParentJoinDao_JdbcKt; PersonParentJoinDao_ReplicateWrapper.prototype = Object.create(PersonParentJoinDao.prototype); PersonParentJoinDao_ReplicateWrapper.prototype.constructor = PersonParentJoinDao_ReplicateWrapper; PersonParentJoinDao_Repo.prototype = Object.create(PersonParentJoinDao.prototype); PersonParentJoinDao_Repo.prototype.constructor = PersonParentJoinDao_Repo; PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral.prototype.constructor = PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral; PersonPictureDao_JdbcKt.prototype = Object.create(PersonPictureDao.prototype); PersonPictureDao_JdbcKt.prototype.constructor = PersonPictureDao_JdbcKt; PersonPictureDao_ReplicateWrapper.prototype = Object.create(PersonPictureDao.prototype); PersonPictureDao_ReplicateWrapper.prototype.constructor = PersonPictureDao_ReplicateWrapper; PersonPictureDao_Repo.prototype = Object.create(PersonPictureDao.prototype); PersonPictureDao_Repo.prototype.constructor = PersonPictureDao_Repo; ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral.prototype.constructor = ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral; ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral.prototype.constructor = ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral; ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral.prototype.constructor = ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral; ReportDao_JdbcKt.prototype = Object.create(ReportDao.prototype); ReportDao_JdbcKt.prototype.constructor = ReportDao_JdbcKt; ReportDao_ReplicateWrapper.prototype = Object.create(ReportDao.prototype); ReportDao_ReplicateWrapper.prototype.constructor = ReportDao_ReplicateWrapper; ReportDao_Repo.prototype = Object.create(ReportDao.prototype); ReportDao_Repo.prototype.constructor = ReportDao_Repo; ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral.prototype.constructor = ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral; ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral.prototype.constructor = ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral; ScheduleDao_JdbcKt.prototype = Object.create(ScheduleDao.prototype); ScheduleDao_JdbcKt.prototype.constructor = ScheduleDao_JdbcKt; ScheduleDao_ReplicateWrapper.prototype = Object.create(ScheduleDao.prototype); ScheduleDao_ReplicateWrapper.prototype.constructor = ScheduleDao_ReplicateWrapper; ScheduleDao_Repo.prototype = Object.create(ScheduleDao.prototype); ScheduleDao_Repo.prototype.constructor = ScheduleDao_Repo; SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral.prototype.constructor = SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral; SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral.prototype.constructor = SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral; SchoolDao_JdbcKt.prototype = Object.create(SchoolDao.prototype); SchoolDao_JdbcKt.prototype.constructor = SchoolDao_JdbcKt; SchoolDao_ReplicateWrapper.prototype = Object.create(SchoolDao.prototype); SchoolDao_ReplicateWrapper.prototype.constructor = SchoolDao_ReplicateWrapper; SchoolDao_Repo.prototype = Object.create(SchoolDao.prototype); SchoolDao_Repo.prototype.constructor = SchoolDao_Repo; SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral.prototype.constructor = SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral; SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral.prototype.constructor = SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral; SchoolMemberDao_JdbcKt.prototype = Object.create(SchoolMemberDao.prototype); SchoolMemberDao_JdbcKt.prototype.constructor = SchoolMemberDao_JdbcKt; SchoolMemberDao_ReplicateWrapper.prototype = Object.create(SchoolMemberDao.prototype); SchoolMemberDao_ReplicateWrapper.prototype.constructor = SchoolMemberDao_ReplicateWrapper; SchoolMemberDao_Repo.prototype = Object.create(SchoolMemberDao.prototype); SchoolMemberDao_Repo.prototype.constructor = SchoolMemberDao_Repo; ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral.prototype.constructor = ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral; ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral.prototype.constructor = ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral; ScopedGrantDao_JdbcKt.prototype = Object.create(ScopedGrantDao.prototype); ScopedGrantDao_JdbcKt.prototype.constructor = ScopedGrantDao_JdbcKt; ScopedGrantDao_ReplicateWrapper.prototype = Object.create(ScopedGrantDao.prototype); ScopedGrantDao_ReplicateWrapper.prototype.constructor = ScopedGrantDao_ReplicateWrapper; ScopedGrantDao_Repo.prototype = Object.create(ScopedGrantDao.prototype); ScopedGrantDao_Repo.prototype.constructor = ScopedGrantDao_Repo; ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral.prototype.constructor = ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral; ScrapeQueueItemDao_JdbcKt.prototype = Object.create(ScrapeQueueItemDao.prototype); ScrapeQueueItemDao_JdbcKt.prototype.constructor = ScrapeQueueItemDao_JdbcKt; SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral.prototype.constructor = SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral; SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral.prototype.constructor = SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral; SiteDao_JdbcKt.prototype = Object.create(SiteDao.prototype); SiteDao_JdbcKt.prototype.constructor = SiteDao_JdbcKt; SiteDao_ReplicateWrapper.prototype = Object.create(SiteDao.prototype); SiteDao_ReplicateWrapper.prototype.constructor = SiteDao_ReplicateWrapper; SiteDao_Repo.prototype = Object.create(SiteDao.prototype); SiteDao_Repo.prototype.constructor = SiteDao_Repo; SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral.prototype.constructor = SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral; SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral.prototype.constructor = SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral; SiteTermsDao_JdbcKt.prototype = Object.create(SiteTermsDao.prototype); SiteTermsDao_JdbcKt.prototype.constructor = SiteTermsDao_JdbcKt; SiteTermsDao_ReplicateWrapper.prototype = Object.create(SiteTermsDao.prototype); SiteTermsDao_ReplicateWrapper.prototype.constructor = SiteTermsDao_ReplicateWrapper; SiteTermsDao_Repo.prototype = Object.create(SiteTermsDao.prototype); SiteTermsDao_Repo.prototype.constructor = SiteTermsDao_Repo; StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral.prototype.constructor = StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral; StateContentDao_JdbcKt.prototype = Object.create(StateContentDao.prototype); StateContentDao_JdbcKt.prototype.constructor = StateContentDao_JdbcKt; StateContentDao_ReplicateWrapper.prototype = Object.create(StateContentDao.prototype); StateContentDao_ReplicateWrapper.prototype.constructor = StateContentDao_ReplicateWrapper; StateContentDao_Repo.prototype = Object.create(StateContentDao.prototype); StateContentDao_Repo.prototype.constructor = StateContentDao_Repo; StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral.prototype.constructor = StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral; StateDao_JdbcKt.prototype = Object.create(StateDao.prototype); StateDao_JdbcKt.prototype.constructor = StateDao_JdbcKt; StateDao_ReplicateWrapper.prototype = Object.create(StateDao.prototype); StateDao_ReplicateWrapper.prototype.constructor = StateDao_ReplicateWrapper; StateDao_Repo.prototype = Object.create(StateDao.prototype); StateDao_Repo.prototype.constructor = StateDao_Repo; StatementDao_JdbcKt$getListResults$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); StatementDao_JdbcKt$getListResults$ObjectLiteral.prototype.constructor = StatementDao_JdbcKt$getListResults$ObjectLiteral; StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral.prototype.constructor = StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral; StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral.prototype.constructor = StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral; StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral.prototype.constructor = StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral; StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral.prototype.constructor = StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral; StatementDao_JdbcKt.prototype = Object.create(StatementDao.prototype); StatementDao_JdbcKt.prototype.constructor = StatementDao_JdbcKt; StatementDao_ReplicateWrapper.prototype = Object.create(StatementDao.prototype); StatementDao_ReplicateWrapper.prototype.constructor = StatementDao_ReplicateWrapper; StatementDao_Repo.prototype = Object.create(StatementDao.prototype); StatementDao_Repo.prototype.constructor = StatementDao_Repo; SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral.prototype.constructor = SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral; SyncNodeDao_JdbcKt.prototype = Object.create(SyncNodeDao.prototype); SyncNodeDao_JdbcKt.prototype.constructor = SyncNodeDao_JdbcKt; UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral.prototype.constructor = UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral; UserSessionDao_JdbcKt.prototype = Object.create(UserSessionDao.prototype); UserSessionDao_JdbcKt.prototype.constructor = UserSessionDao_JdbcKt; UserSessionDao_ReplicateWrapper.prototype = Object.create(UserSessionDao.prototype); UserSessionDao_ReplicateWrapper.prototype.constructor = UserSessionDao_ReplicateWrapper; UserSessionDao_Repo.prototype = Object.create(UserSessionDao.prototype); UserSessionDao_Repo.prototype.constructor = UserSessionDao_Repo; VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral.prototype.constructor = VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral; VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral.prototype = Object.create(DataSourceFactory.prototype); VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral.prototype.constructor = VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral; VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral.prototype.constructor = VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral; VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral.prototype.constructor = VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral; VerbDao_JdbcKt.prototype = Object.create(VerbDao.prototype); VerbDao_JdbcKt.prototype.constructor = VerbDao_JdbcKt; VerbDao_ReplicateWrapper.prototype = Object.create(VerbDao.prototype); VerbDao_ReplicateWrapper.prototype.constructor = VerbDao_ReplicateWrapper; VerbDao_Repo.prototype = Object.create(VerbDao.prototype); VerbDao_Repo.prototype.constructor = VerbDao_Repo; XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral.prototype.constructor = XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral; XLangMapEntryDao_JdbcKt.prototype = Object.create(XLangMapEntryDao.prototype); XLangMapEntryDao_JdbcKt.prototype.constructor = XLangMapEntryDao_JdbcKt; XLangMapEntryDao_ReplicateWrapper.prototype = Object.create(XLangMapEntryDao.prototype); XLangMapEntryDao_ReplicateWrapper.prototype.constructor = XLangMapEntryDao_ReplicateWrapper; XLangMapEntryDao_Repo.prototype = Object.create(XLangMapEntryDao.prototype); XLangMapEntryDao_Repo.prototype.constructor = XLangMapEntryDao_Repo; XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral.prototype = Object.create(EntityInsertionAdapter.prototype); XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral.prototype.constructor = XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral; XObjectDao_JdbcKt.prototype = Object.create(XObjectDao.prototype); XObjectDao_JdbcKt.prototype.constructor = XObjectDao_JdbcKt; XObjectDao_ReplicateWrapper.prototype = Object.create(XObjectDao.prototype); XObjectDao_ReplicateWrapper.prototype.constructor = XObjectDao_ReplicateWrapper; XObjectDao_Repo.prototype = Object.create(XObjectDao.prototype); XObjectDao_Repo.prototype.constructor = XObjectDao_Repo; ChatWithLatestMessageAndCount.prototype = Object.create(Chat.prototype); ChatWithLatestMessageAndCount.prototype.constructor = ChatWithLatestMessageAndCount; ClazzAssignmentWithCourseBlock.prototype = Object.create(ClazzAssignment.prototype); ClazzAssignmentWithCourseBlock.prototype.constructor = ClazzAssignmentWithCourseBlock; ClazzAssignmentWithMetrics.prototype = Object.create(ClazzAssignment.prototype); ClazzAssignmentWithMetrics.prototype.constructor = ClazzAssignmentWithMetrics; ClazzEnrolmentWithClazz.prototype = Object.create(ClazzEnrolment.prototype); ClazzEnrolmentWithClazz.prototype.constructor = ClazzEnrolmentWithClazz; ClazzEnrolmentWithClazzAndAttendance.prototype = Object.create(ClazzEnrolmentWithClazz.prototype); ClazzEnrolmentWithClazzAndAttendance.prototype.constructor = ClazzEnrolmentWithClazzAndAttendance; ClazzEnrolmentWithLeavingReason.prototype = Object.create(ClazzEnrolment.prototype); ClazzEnrolmentWithLeavingReason.prototype.constructor = ClazzEnrolmentWithLeavingReason; ClazzEnrolmentWithPerson.prototype = Object.create(ClazzEnrolment.prototype); ClazzEnrolmentWithPerson.prototype.constructor = ClazzEnrolmentWithPerson; ClazzLogAttendanceRecordWithPerson.prototype = Object.create(ClazzLogAttendanceRecord.prototype); ClazzLogAttendanceRecordWithPerson.prototype.constructor = ClazzLogAttendanceRecordWithPerson; ClazzWithDisplayDetails.prototype = Object.create(Clazz.prototype); ClazzWithDisplayDetails.prototype.constructor = ClazzWithDisplayDetails; ClazzWithHolidayCalendarAndSchoolAndTerminology.prototype = Object.create(Clazz.prototype); ClazzWithHolidayCalendarAndSchoolAndTerminology.prototype.constructor = ClazzWithHolidayCalendarAndSchoolAndTerminology; ClazzWithListDisplayDetails.prototype = Object.create(Clazz.prototype); ClazzWithListDisplayDetails.prototype.constructor = ClazzWithListDisplayDetails; ClazzWithSchool.prototype = Object.create(Clazz.prototype); ClazzWithSchool.prototype.constructor = ClazzWithSchool; CommentsWithPerson.prototype = Object.create(Comments.prototype); CommentsWithPerson.prototype.constructor = CommentsWithPerson; ContainerEntryWithContainerEntryFile.prototype = Object.create(ContainerEntry.prototype); ContainerEntryWithContainerEntryFile.prototype.constructor = ContainerEntryWithContainerEntryFile; ContainerEntryWithMd5.prototype = Object.create(ContainerEntry.prototype); ContainerEntryWithMd5.prototype.constructor = ContainerEntryWithMd5; ContainerWithContentEntry.prototype = Object.create(Container.prototype); ContainerWithContentEntry.prototype.constructor = ContainerWithContentEntry; ContentEntryRelatedEntryJoinWithLanguage.prototype = Object.create(ContentEntryRelatedEntryJoin.prototype); ContentEntryRelatedEntryJoinWithLanguage.prototype.constructor = ContentEntryRelatedEntryJoinWithLanguage; ContentEntryWithBlockAndLanguage.prototype = Object.create(ContentEntry.prototype); ContentEntryWithBlockAndLanguage.prototype.constructor = ContentEntryWithBlockAndLanguage; ContentEntryWithLanguage.prototype = Object.create(ContentEntry.prototype); ContentEntryWithLanguage.prototype.constructor = ContentEntryWithLanguage; ContentEntryWithMostRecentContainer.prototype = Object.create(ContentEntry.prototype); ContentEntryWithMostRecentContainer.prototype.constructor = ContentEntryWithMostRecentContainer; ContentEntryWithParentChildJoinAndMostRecentContainer.prototype = Object.create(ContentEntry.prototype); ContentEntryWithParentChildJoinAndMostRecentContainer.prototype.constructor = ContentEntryWithParentChildJoinAndMostRecentContainer; ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer.prototype = Object.create(ContentEntry.prototype); ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer.prototype.constructor = ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer; CourseAssignmentSubmissionWithAttachment.prototype = Object.create(CourseAssignmentSubmission.prototype); CourseAssignmentSubmissionWithAttachment.prototype.constructor = CourseAssignmentSubmissionWithAttachment; CourseBlockWithCompleteEntity.prototype = Object.create(CourseBlock.prototype); CourseBlockWithCompleteEntity.prototype.constructor = CourseBlockWithCompleteEntity; CourseBlockWithEntityDb.prototype = Object.create(CourseBlock.prototype); CourseBlockWithEntityDb.prototype.constructor = CourseBlockWithEntityDb; CourseBlockWithEntity.prototype = Object.create(CourseBlockWithEntityDb.prototype); CourseBlockWithEntity.prototype.constructor = CourseBlockWithEntity; CourseGroupMemberPerson.prototype = Object.create(Person.prototype); CourseGroupMemberPerson.prototype.constructor = CourseGroupMemberPerson; DiscussionPostWithDetails.prototype = Object.create(DiscussionPost.prototype); DiscussionPostWithDetails.prototype.constructor = DiscussionPostWithDetails; DiscussionTopicListDetail.prototype = Object.create(DiscussionTopic.prototype); DiscussionTopicListDetail.prototype.constructor = DiscussionTopicListDetail; EntityRoleWithNameAndRole.prototype = Object.create(EntityRole.prototype); EntityRoleWithNameAndRole.prototype.constructor = EntityRoleWithNameAndRole; HolidayCalendarWithNumEntries.prototype = Object.create(HolidayCalendar.prototype); HolidayCalendarWithNumEntries.prototype.constructor = HolidayCalendarWithNumEntries; LearnerGroupMemberWithPerson.prototype = Object.create(LearnerGroupMember.prototype); LearnerGroupMemberWithPerson.prototype.constructor = LearnerGroupMemberWithPerson; MessageWithPerson.prototype = Object.create(Message.prototype); MessageWithPerson.prototype.constructor = MessageWithPerson; PersonParentJoinWithMinorPerson.prototype = Object.create(PersonParentJoin.prototype); PersonParentJoinWithMinorPerson.prototype.constructor = PersonParentJoinWithMinorPerson; PersonWithAccount.prototype = Object.create(Person.prototype); PersonWithAccount.prototype.constructor = PersonWithAccount; PersonWithClazzEnrolmentDetails.prototype = Object.create(Person.prototype); PersonWithClazzEnrolmentDetails.prototype.constructor = PersonWithClazzEnrolmentDetails; PersonWithDisplayDetails.prototype = Object.create(Person.prototype); PersonWithDisplayDetails.prototype.constructor = PersonWithDisplayDetails; PersonWithPersonParentJoin.prototype = Object.create(Person.prototype); PersonWithPersonParentJoin.prototype.constructor = PersonWithPersonParentJoin; ReportWithSeriesWithFilters.prototype = Object.create(Report.prototype); ReportWithSeriesWithFilters.prototype.constructor = ReportWithSeriesWithFilters; SchoolMemberWithPerson.prototype = Object.create(SchoolMember.prototype); SchoolMemberWithPerson.prototype.constructor = SchoolMemberWithPerson; SchoolWithHolidayCalendar.prototype = Object.create(School.prototype); SchoolWithHolidayCalendar.prototype.constructor = SchoolWithHolidayCalendar; SchoolWithMemberCountAndLocation.prototype = Object.create(School.prototype); SchoolWithMemberCountAndLocation.prototype.constructor = SchoolWithMemberCountAndLocation; ScopedGrantWithName.prototype = Object.create(ScopedGrant.prototype); ScopedGrantWithName.prototype.constructor = ScopedGrantWithName; ScrapeQueueItemWithScrapeRun.prototype = Object.create(ScrapeQueueItem.prototype); ScrapeQueueItemWithScrapeRun.prototype.constructor = ScrapeQueueItemWithScrapeRun; SiteTermsWithLanguage.prototype = Object.create(SiteTerms.prototype); SiteTermsWithLanguage.prototype.constructor = SiteTermsWithLanguage; StatementEntityWithDisplayDetails.prototype = Object.create(StatementEntity.prototype); StatementEntityWithDisplayDetails.prototype.constructor = StatementEntityWithDisplayDetails; StatementWithSessionDetailDisplay.prototype = Object.create(StatementEntity.prototype); StatementWithSessionDetailDisplay.prototype.constructor = StatementWithSessionDetailDisplay; function UmAppDatabase() { RoomDatabase.call(this); } UmAppDatabase.$metadata$ = {kind: Kind_CLASS, simpleName: 'UmAppDatabase', interfaces: [RoomDatabase]}; function UmAppDatabaseJsImplementations() { UmAppDatabaseJsImplementations_instance = this; DoorJsImplClasses.call(this); this.dbKClass_1or59m$_0 = getKClass(UmAppDatabase); this.dbImplKClass_mtoxqu$_0 = getKClass(UmAppDatabase_JdbcKt); this.replicateWrapperImplClass_gokwcl$_0 = getKClass(UmAppDatabase_ReplicateWrapper); this.repositoryImplClass_cqcl2d$_0 = getKClass(UmAppDatabase_Repo); this.metadata_5fnphu$_0 = new UmAppDatabase_DoorMetadata(); } Object.defineProperty(UmAppDatabaseJsImplementations.prototype, 'dbKClass', {configurable: true, get: function () { return this.dbKClass_1or59m$_0; }}); Object.defineProperty(UmAppDatabaseJsImplementations.prototype, 'dbImplKClass', {configurable: true, get: function () { return this.dbImplKClass_mtoxqu$_0; }}); Object.defineProperty(UmAppDatabaseJsImplementations.prototype, 'replicateWrapperImplClass', {configurable: true, get: function () { return this.replicateWrapperImplClass_gokwcl$_0; }}); Object.defineProperty(UmAppDatabaseJsImplementations.prototype, 'repositoryImplClass', {configurable: true, get: function () { return this.repositoryImplClass_cqcl2d$_0; }}); Object.defineProperty(UmAppDatabaseJsImplementations.prototype, 'metadata', {configurable: true, get: function () { return this.metadata_5fnphu$_0; }}); UmAppDatabaseJsImplementations.$metadata$ = {kind: Kind_OBJECT, simpleName: 'UmAppDatabaseJsImplementations', interfaces: [DoorJsImplClasses]}; var UmAppDatabaseJsImplementations_instance = null; function UmAppDatabaseJsImplementations_getInstance() { if (UmAppDatabaseJsImplementations_instance === null) { new UmAppDatabaseJsImplementations(); } return UmAppDatabaseJsImplementations_instance; } function UmAppDatabase_DoorMetadata() { UmAppDatabase_DoorMetadata$Companion_getInstance(); DoorDatabaseMetadata.call(this); this.allTables_gkz47r$_0 = listOf(['NetworkNode', 'ClazzLog', 'ClazzLogAttendanceRecord', 'Schedule', 'DateRange', 'HolidayCalendar', 'Holiday', 'ScheduledCheck', 'AuditLog', 'CustomField', 'CustomFieldValue', 'CustomFieldValueOption', 'Person', 'Clazz', 'ClazzEnrolment', 'LeavingReason', 'ContentEntry', 'ContentEntryContentCategoryJoin', 'ContentEntryParentChildJoin', 'ContentEntryRelatedEntryJoin', 'ContentCategorySchema', 'ContentCategory', 'Language', 'LanguageVariant', 'AccessToken', 'PersonAuth', 'Role', 'EntityRole', 'PersonGroup', 'PersonGroupMember', 'PersonPicture', 'ScrapeQueueItem', 'ScrapeRun', 'ConnectivityStatus', 'Container', 'ContainerEntry', 'ContainerEntryFile', 'VerbEntity', 'XObjectEntity', 'StatementEntity', 'ContextXObjectStatementJoin', 'AgentEntity', 'StateEntity', 'StateContentEntity', 'XLangMapEntry', 'SyncNode', 'LocallyAvailableContainer', 'ContainerETag', 'School', 'SchoolMember', 'Comments', 'Report', 'Site', 'ContainerImportJob', 'LearnerGroup', 'LearnerGroupMember', 'GroupLearningSession', 'SiteTerms', 'ClazzContentJoin', 'PersonParentJoin', 'ScopedGrant', 'ErrorReport', 'ClazzAssignment', 'ClazzAssignmentContentJoin', 'CourseAssignmentSubmission', 'CourseAssignmentSubmissionAttachment', 'CourseAssignmentMark', 'ClazzAssignmentRollUp', 'PersonAuth2', 'UserSession', 'ContentJob', 'ContentJobItem', 'CourseBlock', 'CourseTerminology', 'CourseGroupSet', 'CourseGroupMember', 'ChangeLog', 'ZombieAttachmentData', 'DoorNode', 'ReplicationStatus', 'ClazzLogReplicate', 'ClazzLogAttendanceRecordReplicate', 'CourseAssignmentSubmissionReplicate', 'CourseAssignmentSubmissionAttachmentReplicate', 'CourseAssignmentMarkReplicate', 'CourseBlockReplicate', 'CourseTerminologyReplicate', 'CourseGroupSetReplicate', 'CourseGroupMemberReplicate', 'ScheduleReplicate', 'HolidayCalendarReplicate', 'HolidayReplicate', 'PersonReplicate', 'ClazzReplicate', 'ClazzEnrolmentReplicate', 'LeavingReasonReplicate', 'ContentEntryReplicate', 'ContentEntryContentCategoryJoinReplicate', 'ContentEntryParentChildJoinReplicate', 'ContentEntryRelatedEntryJoinReplicate', 'ContentCategorySchemaReplicate', 'ContentCategoryReplicate', 'LanguageReplicate', 'LanguageVariantReplicate', 'PersonGroupReplicate', 'PersonGroupMemberReplicate', 'PersonPictureReplicate', 'ContainerReplicate', 'VerbEntityReplicate', 'XObjectEntityReplicate', 'StatementEntityReplicate', 'ContextXObjectStatementJoinReplicate', 'AgentEntityReplicate', 'StateEntityReplicate', 'StateContentEntityReplicate', 'XLangMapEntryReplicate', 'SchoolReplicate', 'SchoolMemberReplicate', 'CommentsReplicate', 'ReportReplicate', 'SiteReplicate', 'LearnerGroupReplicate', 'LearnerGroupMemberReplicate', 'GroupLearningSessionReplicate', 'SiteTermsReplicate', 'ClazzContentJoinReplicate', 'PersonParentJoinReplicate', 'ScopedGrantReplicate', 'ErrorReportReplicate', 'ClazzAssignmentReplicate', 'ClazzAssignmentContentJoinReplicate', 'PersonAuth2Replicate', 'UserSessionReplicate', 'CoursePicture', 'CoursePictureReplicate', 'ContentEntryPicture', 'ContentEntryPictureReplicate', 'Chat', 'ChatMember', 'Message', 'MessageReplicate', 'ChatReplicate', 'ChatMemberReplicate', 'MessageRead', 'MessageReadReplicate', 'CourseDiscussion', 'CourseDiscussionReplicate', 'DiscussionTopic', 'DiscussionTopicReplicate', 'DiscussionPost', 'DiscussionPostReplicate']); this.replicateEntities_i11jcr$_0 = lazy(LazyThreadSafetyMode.NONE, UmAppDatabase_DoorMetadata$replicateEntities$lambda); } Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'dbClass', {configurable: true, get: function () { return getKClass(UmAppDatabase); }}); Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'hasReadOnlyWrapper', {configurable: true, get: function () { return true; }}); Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'hasAttachments', {configurable: true, get: function () { return true; }}); Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'syncableTableIdMap', {configurable: true, get: function () { return UmAppDatabase_DoorMetadata$Companion_getInstance().TABLE_ID_MAP; }}); Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'version', {configurable: true, get: function () { return 107; }}); Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'allTables', {configurable: true, get: function () { return this.allTables_gkz47r$_0; }}); Object.defineProperty(UmAppDatabase_DoorMetadata.prototype, 'replicateEntities', {configurable: true, get: function () { return this.replicateEntities_i11jcr$_0.value; }}); function UmAppDatabase_DoorMetadata$Companion() { UmAppDatabase_DoorMetadata$Companion_instance = this; this.TABLE_ID_MAP = emptyMap(); } UmAppDatabase_DoorMetadata$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var UmAppDatabase_DoorMetadata$Companion_instance = null; function UmAppDatabase_DoorMetadata$Companion_getInstance() { if (UmAppDatabase_DoorMetadata$Companion_instance === null) { new UmAppDatabase_DoorMetadata$Companion(); } return UmAppDatabase_DoorMetadata$Companion_instance; } function UmAppDatabase_DoorMetadata$replicateEntities$lambda() { return mapOf([to(14, new ReplicationEntityMetaData(14, 100, 'ClazzLog', 'ClazzLogReplicate', 'ClazzLog_ReceiveView', 'clazzLogUid', 'clazzLogLastChangedTime', 'clPk', 'clDestination', 'clVersionId', 'clPending', listOf([new ReplicationFieldMetaData('clazzLogClazzUid', -5), new ReplicationFieldMetaData('logDate', -5), new ReplicationFieldMetaData('timeRecorded', -5), new ReplicationFieldMetaData('clazzLogDone', 16), new ReplicationFieldMetaData('cancellationNote', -1), new ReplicationFieldMetaData('clazzLogCancelled', 16), new ReplicationFieldMetaData('clazzLogNumPresent', 4), new ReplicationFieldMetaData('clazzLogNumAbsent', 4), new ReplicationFieldMetaData('clazzLogNumPartial', 4), new ReplicationFieldMetaData('clazzLogScheduleUid', -5), new ReplicationFieldMetaData('clazzLogStatusFlag', 4), new ReplicationFieldMetaData('clazzLogMSQN', -5), new ReplicationFieldMetaData('clazzLogLCSN', -5), new ReplicationFieldMetaData('clazzLogLCB', 4), new ReplicationFieldMetaData('clazzLogLastChangedTime', -5), new ReplicationFieldMetaData('clazzLogUid', -5)]), listOf([new ReplicationFieldMetaData('clPk', -5), new ReplicationFieldMetaData('clVersionId', -5), new ReplicationFieldMetaData('clDestination', -5), new ReplicationFieldMetaData('clPending', 16)]), null, null, null, 1000)), to(15, new ReplicationEntityMetaData(15, 100, 'ClazzLogAttendanceRecord', 'ClazzLogAttendanceRecordReplicate', 'ClazzLogAttendanceRecord_ReceiveView', 'clazzLogAttendanceRecordUid', 'clazzLogAttendanceRecordLastChangedTime', 'clarPk', 'clarDestination', 'clarVersionId', 'clarPending', listOf([new ReplicationFieldMetaData('clazzLogAttendanceRecordClazzLogUid', -5), new ReplicationFieldMetaData('clazzLogAttendanceRecordPersonUid', -5), new ReplicationFieldMetaData('attendanceStatus', 4), new ReplicationFieldMetaData('clazzLogAttendanceRecordMasterChangeSeqNum', -5), new ReplicationFieldMetaData('clazzLogAttendanceRecordLocalChangeSeqNum', -5), new ReplicationFieldMetaData('clazzLogAttendanceRecordLastChangedBy', 4), new ReplicationFieldMetaData('clazzLogAttendanceRecordLastChangedTime', -5), new ReplicationFieldMetaData('clazzLogAttendanceRecordUid', -5)]), listOf([new ReplicationFieldMetaData('clarPk', -5), new ReplicationFieldMetaData('clarVersionId', -5), new ReplicationFieldMetaData('clarDestination', -5), new ReplicationFieldMetaData('clarPending', 16)]), null, null, null, 1000)), to(21, new ReplicationEntityMetaData(21, 100, 'Schedule', 'ScheduleReplicate', 'Schedule_ReceiveView', 'scheduleUid', 'scheduleLastChangedTime', 'schedulePk', 'scheduleDestination', 'scheduleVersionId', 'schedulePending', listOf([new ReplicationFieldMetaData('sceduleStartTime', -5), new ReplicationFieldMetaData('scheduleEndTime', -5), new ReplicationFieldMetaData('scheduleDay', 4), new ReplicationFieldMetaData('scheduleMonth', 4), new ReplicationFieldMetaData('scheduleFrequency', 4), new ReplicationFieldMetaData('umCalendarUid', -5), new ReplicationFieldMetaData('scheduleClazzUid', -5), new ReplicationFieldMetaData('scheduleMasterChangeSeqNum', -5), new ReplicationFieldMetaData('scheduleLocalChangeSeqNum', -5), new ReplicationFieldMetaData('scheduleLastChangedBy', 4), new ReplicationFieldMetaData('scheduleLastChangedTime', -5), new ReplicationFieldMetaData('scheduleActive', 16), new ReplicationFieldMetaData('scheduleUid', -5)]), listOf([new ReplicationFieldMetaData('schedulePk', -5), new ReplicationFieldMetaData('scheduleVersionId', -5), new ReplicationFieldMetaData('scheduleDestination', -5), new ReplicationFieldMetaData('schedulePending', 16)]), null, null, null, 1000)), to(28, new ReplicationEntityMetaData(28, 100, 'HolidayCalendar', 'HolidayCalendarReplicate', 'HolidayCalendar_ReceiveView', 'umCalendarUid', 'umCalendarLct', 'hcPk', 'hcDestination', 'hcVersionId', 'hcPending', listOf([new ReplicationFieldMetaData('umCalendarName', -1), new ReplicationFieldMetaData('umCalendarCategory', 4), new ReplicationFieldMetaData('umCalendarActive', 16), new ReplicationFieldMetaData('umCalendarMasterChangeSeqNum', -5), new ReplicationFieldMetaData('umCalendarLocalChangeSeqNum', -5), new ReplicationFieldMetaData('umCalendarLastChangedBy', 4), new ReplicationFieldMetaData('umCalendarLct', -5), new ReplicationFieldMetaData('umCalendarUid', -5)]), listOf([new ReplicationFieldMetaData('hcPk', -5), new ReplicationFieldMetaData('hcVersionId', -5), new ReplicationFieldMetaData('hcDestination', -5), new ReplicationFieldMetaData('hcPending', 16)]), null, null, null, 1000)), to(99, new ReplicationEntityMetaData(99, 100, 'Holiday', 'HolidayReplicate', 'Holiday_ReceiveView', 'holUid', 'holLct', 'holidayPk', 'holidayDestination', 'holidayVersionId', 'holidayPending', listOf([new ReplicationFieldMetaData('holMasterCsn', -5), new ReplicationFieldMetaData('holLocalCsn', -5), new ReplicationFieldMetaData('holLastModBy', 4), new ReplicationFieldMetaData('holLct', -5), new ReplicationFieldMetaData('holActive', 16), new ReplicationFieldMetaData('holHolidayCalendarUid', -5), new ReplicationFieldMetaData('holStartTime', -5), new ReplicationFieldMetaData('holEndTime', -5), new ReplicationFieldMetaData('holName', -1), new ReplicationFieldMetaData('holUid', -5)]), listOf([new ReplicationFieldMetaData('holidayPk', -5), new ReplicationFieldMetaData('holidayVersionId', -5), new ReplicationFieldMetaData('holidayDestination', -5), new ReplicationFieldMetaData('holidayPending', 16)]), null, null, null, 1000)), to(9, new ReplicationEntityMetaData(9, 100, 'Person', 'PersonReplicate', 'Person_ReceiveView', 'personUid', 'personLct', 'personPk', 'personDestination', 'personVersionId', 'personPending', listOf([new ReplicationFieldMetaData('username', -1), new ReplicationFieldMetaData('firstNames', -1), new ReplicationFieldMetaData('lastName', -1), new ReplicationFieldMetaData('emailAddr', -1), new ReplicationFieldMetaData('phoneNum', -1), new ReplicationFieldMetaData('gender', 4), new ReplicationFieldMetaData('active', 16), new ReplicationFieldMetaData('admin', 16), new ReplicationFieldMetaData('personNotes', -1), new ReplicationFieldMetaData('fatherName', -1), new ReplicationFieldMetaData('fatherNumber', -1), new ReplicationFieldMetaData('motherName', -1), new ReplicationFieldMetaData('motherNum', -1), new ReplicationFieldMetaData('dateOfBirth', -5), new ReplicationFieldMetaData('personAddress', -1), new ReplicationFieldMetaData('personOrgId', -1), new ReplicationFieldMetaData('personGroupUid', -5), new ReplicationFieldMetaData('personMasterChangeSeqNum', -5), new ReplicationFieldMetaData('personLocalChangeSeqNum', -5), new ReplicationFieldMetaData('personLastChangedBy', 4), new ReplicationFieldMetaData('personLct', -5), new ReplicationFieldMetaData('personCountry', -1), new ReplicationFieldMetaData('personType', 4), new ReplicationFieldMetaData('personUid', -5)]), listOf([new ReplicationFieldMetaData('personPk', -5), new ReplicationFieldMetaData('personVersionId', -5), new ReplicationFieldMetaData('personDestination', -5), new ReplicationFieldMetaData('personPending', 16)]), null, null, null, 1000)), to(6, new ReplicationEntityMetaData(6, 0, 'Clazz', 'ClazzReplicate', 'Clazz_ReceiveView', 'clazzUid', 'clazzLct', 'clazzPk', 'clazzDestination', 'clazzVersionId', 'clazzPending', listOf([new ReplicationFieldMetaData('clazzName', -1), new ReplicationFieldMetaData('clazzDesc', -1), new ReplicationFieldMetaData('attendanceAverage', 6), new ReplicationFieldMetaData('clazzHolidayUMCalendarUid', -5), new ReplicationFieldMetaData('clazzScheuleUMCalendarUid', -5), new ReplicationFieldMetaData('isClazzActive', 16), new ReplicationFieldMetaData('clazzLocationUid', -5), new ReplicationFieldMetaData('clazzStartTime', -5), new ReplicationFieldMetaData('clazzEndTime', -5), new ReplicationFieldMetaData('clazzFeatures', -5), new ReplicationFieldMetaData('clazzSchoolUid', -5), new ReplicationFieldMetaData('clazzEnrolmentPolicy', 4), new ReplicationFieldMetaData('clazzTerminologyUid', -5), new ReplicationFieldMetaData('clazzMasterChangeSeqNum', -5), new ReplicationFieldMetaData('clazzLocalChangeSeqNum', -5), new ReplicationFieldMetaData('clazzLastChangedBy', 4), new ReplicationFieldMetaData('clazzLct', -5), new ReplicationFieldMetaData('clazzTimeZone', -1), new ReplicationFieldMetaData('clazzStudentsPersonGroupUid', -5), new ReplicationFieldMetaData('clazzTeachersPersonGroupUid', -5), new ReplicationFieldMetaData('clazzPendingStudentsPersonGroupUid', -5), new ReplicationFieldMetaData('clazzParentsPersonGroupUid', -5), new ReplicationFieldMetaData('clazzCode', -1), new ReplicationFieldMetaData('clazzUid', -5)]), listOf([new ReplicationFieldMetaData('clazzPk', -5), new ReplicationFieldMetaData('clazzVersionId', -5), new ReplicationFieldMetaData('clazzDestination', -5), new ReplicationFieldMetaData('clazzPending', 16)]), null, null, null, 1000)), to(65, new ReplicationEntityMetaData(65, 1, 'ClazzEnrolment', 'ClazzEnrolmentReplicate', 'ClazzEnrolment_ReceiveView', 'clazzEnrolmentUid', 'clazzEnrolmentLct', 'cePk', 'ceDestination', 'ceVersionId', 'cePending', listOf([new ReplicationFieldMetaData('clazzEnrolmentPersonUid', -5), new ReplicationFieldMetaData('clazzEnrolmentClazzUid', -5), new ReplicationFieldMetaData('clazzEnrolmentDateJoined', -5), new ReplicationFieldMetaData('clazzEnrolmentDateLeft', -5), new ReplicationFieldMetaData('clazzEnrolmentRole', 4), new ReplicationFieldMetaData('clazzEnrolmentAttendancePercentage', 6), new ReplicationFieldMetaData('clazzEnrolmentActive', 16), new ReplicationFieldMetaData('clazzEnrolmentLeavingReasonUid', -5), new ReplicationFieldMetaData('clazzEnrolmentOutcome', 4), new ReplicationFieldMetaData('clazzEnrolmentLocalChangeSeqNum', -5), new ReplicationFieldMetaData('clazzEnrolmentMasterChangeSeqNum', -5), new ReplicationFieldMetaData('clazzEnrolmentLastChangedBy', 4), new ReplicationFieldMetaData('clazzEnrolmentLct', -5), new ReplicationFieldMetaData('clazzEnrolmentUid', -5)]), listOf([new ReplicationFieldMetaData('cePk', -5), new ReplicationFieldMetaData('ceVersionId', -5), new ReplicationFieldMetaData('ceDestination', -5), new ReplicationFieldMetaData('cePending', 16)]), null, null, null, 1000)), to(410, new ReplicationEntityMetaData(410, 100, 'LeavingReason', 'LeavingReasonReplicate', 'LeavingReason_ReceiveView', 'leavingReasonUid', 'leavingReasonLct', 'lrPk', 'lrDestination', 'lrVersionId', 'lrPending', listOf([new ReplicationFieldMetaData('leavingReasonTitle', -1), new ReplicationFieldMetaData('leavingReasonMCSN', -5), new ReplicationFieldMetaData('leavingReasonCSN', -5), new ReplicationFieldMetaData('leavingReasonLCB', 4), new ReplicationFieldMetaData('leavingReasonLct', -5), new ReplicationFieldMetaData('leavingReasonUid', -5)]), listOf([new ReplicationFieldMetaData('lrPk', -5), new ReplicationFieldMetaData('lrVersionId', -5), new ReplicationFieldMetaData('lrDestination', -5), new ReplicationFieldMetaData('lrPending', 16)]), null, null, null, 1000)), to(42, new ReplicationEntityMetaData(42, 100, 'ContentEntry', 'ContentEntryReplicate', 'ContentEntry_ReceiveView', 'contentEntryUid', 'contentEntryLct', 'cePk', 'ceDestination', 'ceVersionId', 'cePending', listOf([new ReplicationFieldMetaData('title', -1), new ReplicationFieldMetaData('description', -1), new ReplicationFieldMetaData('entryId', -1), new ReplicationFieldMetaData('author', -1), new ReplicationFieldMetaData('publisher', -1), new ReplicationFieldMetaData('licenseType', 4), new ReplicationFieldMetaData('licenseName', -1), new ReplicationFieldMetaData('licenseUrl', -1), new ReplicationFieldMetaData('sourceUrl', -1), new ReplicationFieldMetaData('thumbnailUrl', -1), new ReplicationFieldMetaData('lastModified', -5), new ReplicationFieldMetaData('primaryLanguageUid', -5), new ReplicationFieldMetaData('languageVariantUid', -5), new ReplicationFieldMetaData('contentFlags', 4), new ReplicationFieldMetaData('leaf', 16), new ReplicationFieldMetaData('publik', 16), new ReplicationFieldMetaData('ceInactive', 16), new ReplicationFieldMetaData('completionCriteria', 4), new ReplicationFieldMetaData('minScore', 4), new ReplicationFieldMetaData('contentTypeFlag', 4), new ReplicationFieldMetaData('contentOwner', -5), new ReplicationFieldMetaData('contentEntryLocalChangeSeqNum', -5), new ReplicationFieldMetaData('contentEntryMasterChangeSeqNum', -5), new ReplicationFieldMetaData('contentEntryLastChangedBy', 4), new ReplicationFieldMetaData('contentEntryLct', -5), new ReplicationFieldMetaData('contentEntryUid', -5)]), listOf([new ReplicationFieldMetaData('cePk', -5), new ReplicationFieldMetaData('ceVersionId', -5), new ReplicationFieldMetaData('ceDestination', -5), new ReplicationFieldMetaData('cePending', 16)]), null, null, null, 1000)), to(3, new ReplicationEntityMetaData(3, 100, 'ContentEntryContentCategoryJoin', 'ContentEntryContentCategoryJoinReplicate', 'ContentEntryContentCategoryJoin_ReceiveView', 'ceccjUid', 'ceccjLct', 'ceccjPk', 'ceccjDestination', 'ceccjVersionId', 'ceccjPending', listOf([new ReplicationFieldMetaData('ceccjContentEntryUid', -5), new ReplicationFieldMetaData('ceccjContentCategoryUid', -5), new ReplicationFieldMetaData('ceccjLocalChangeSeqNum', -5), new ReplicationFieldMetaData('ceccjMasterChangeSeqNum', -5), new ReplicationFieldMetaData('ceccjLastChangedBy', 4), new ReplicationFieldMetaData('ceccjLct', -5), new ReplicationFieldMetaData('ceccjUid', -5)]), listOf([new ReplicationFieldMetaData('ceccjPk', -5), new ReplicationFieldMetaData('ceccjVersionId', -5), new ReplicationFieldMetaData('ceccjDestination', -5), new ReplicationFieldMetaData('ceccjPending', 16)]), null, null, null, 1000)), to(7, new ReplicationEntityMetaData(7, 100, 'ContentEntryParentChildJoin', 'ContentEntryParentChildJoinReplicate', 'ContentEntryParentChildJoin_ReceiveView', 'cepcjUid', 'cepcjLct', 'cepcjPk', 'cepcjDestination', 'cepcjVersionId', 'cepcjPending', listOf([new ReplicationFieldMetaData('cepcjLocalChangeSeqNum', -5), new ReplicationFieldMetaData('cepcjMasterChangeSeqNum', -5), new ReplicationFieldMetaData('cepcjLastChangedBy', 4), new ReplicationFieldMetaData('cepcjLct', -5), new ReplicationFieldMetaData('cepcjParentContentEntryUid', -5), new ReplicationFieldMetaData('cepcjChildContentEntryUid', -5), new ReplicationFieldMetaData('childIndex', 4), new ReplicationFieldMetaData('cepcjUid', -5)]), listOf([new ReplicationFieldMetaData('cepcjPk', -5), new ReplicationFieldMetaData('cepcjVersionId', -5), new ReplicationFieldMetaData('cepcjDestination', -5), new ReplicationFieldMetaData('cepcjPending', 16)]), null, null, null, 1000)), to(8, new ReplicationEntityMetaData(8, 100, 'ContentEntryRelatedEntryJoin', 'ContentEntryRelatedEntryJoinReplicate', 'ContentEntryRelatedEntryJoin_ReceiveView', 'cerejUid', 'cerejLct', 'cerejPk', 'cerejDestination', 'cerejVersionId', 'cerejPending', listOf([new ReplicationFieldMetaData('cerejContentEntryUid', -5), new ReplicationFieldMetaData('cerejRelatedEntryUid', -5), new ReplicationFieldMetaData('cerejLastChangedBy', 4), new ReplicationFieldMetaData('relType', 4), new ReplicationFieldMetaData('comment', -1), new ReplicationFieldMetaData('cerejRelLanguageUid', -5), new ReplicationFieldMetaData('cerejLocalChangeSeqNum', -5), new ReplicationFieldMetaData('cerejMasterChangeSeqNum', -5), new ReplicationFieldMetaData('cerejLct', -5), new ReplicationFieldMetaData('cerejUid', -5)]), listOf([new ReplicationFieldMetaData('cerejPk', -5), new ReplicationFieldMetaData('cerejVersionId', -5), new ReplicationFieldMetaData('cerejDestination', -5), new ReplicationFieldMetaData('cerejPending', 16)]), null, null, null, 1000)), to(2, new ReplicationEntityMetaData(2, 100, 'ContentCategorySchema', 'ContentCategorySchemaReplicate', 'ContentCategorySchema_ReceiveView', 'contentCategorySchemaUid', 'contentCategorySchemaLct', 'ccsPk', 'ccsDestination', 'ccsVersionId', 'ccsPending', listOf([new ReplicationFieldMetaData('schemaName', -1), new ReplicationFieldMetaData('schemaUrl', -1), new ReplicationFieldMetaData('contentCategorySchemaLocalChangeSeqNum', -5), new ReplicationFieldMetaData('contentCategorySchemaMasterChangeSeqNum', -5), new ReplicationFieldMetaData('contentCategorySchemaLastChangedBy', 4), new ReplicationFieldMetaData('contentCategorySchemaLct', -5), new ReplicationFieldMetaData('contentCategorySchemaUid', -5)]), listOf([new ReplicationFieldMetaData('ccsPk', -5), new ReplicationFieldMetaData('ccsVersionId', -5), new ReplicationFieldMetaData('ccsDestination', -5), new ReplicationFieldMetaData('ccsPending', 16)]), null, null, null, 1000)), to(1, new ReplicationEntityMetaData(1, 100, 'ContentCategory', 'ContentCategoryReplicate', 'ContentCategory_ReceiveView', 'contentCategoryUid', 'contentCategoryLct', 'ccPk', 'ccDestination', 'ccVersionId', 'ccPending', listOf([new ReplicationFieldMetaData('ctnCatContentCategorySchemaUid', -5), new ReplicationFieldMetaData('name', -1), new ReplicationFieldMetaData('contentCategoryLocalChangeSeqNum', -5), new ReplicationFieldMetaData('contentCategoryMasterChangeSeqNum', -5), new ReplicationFieldMetaData('contentCategoryLastChangedBy', 4), new ReplicationFieldMetaData('contentCategoryLct', -5), new ReplicationFieldMetaData('contentCategoryUid', -5)]), listOf([new ReplicationFieldMetaData('ccPk', -5), new ReplicationFieldMetaData('ccVersionId', -5), new ReplicationFieldMetaData('ccDestination', -5), new ReplicationFieldMetaData('ccPending', 16)]), null, null, null, 1000)), to(13, new ReplicationEntityMetaData(13, 100, 'Language', 'LanguageReplicate', 'Language_ReceiveView', 'langUid', 'langLct', 'languagePk', 'languageDestination', 'languageVersionId', 'languagePending', listOf([new ReplicationFieldMetaData('name', -1), new ReplicationFieldMetaData('iso_639_1_standard', -1), new ReplicationFieldMetaData('iso_639_2_standard', -1), new ReplicationFieldMetaData('iso_639_3_standard', -1), new ReplicationFieldMetaData('Language_Type', -1), new ReplicationFieldMetaData('languageActive', 16), new ReplicationFieldMetaData('langLocalChangeSeqNum', -5), new ReplicationFieldMetaData('langMasterChangeSeqNum', -5), new ReplicationFieldMetaData('langLastChangedBy', 4), new ReplicationFieldMetaData('langLct', -5), new ReplicationFieldMetaData('langUid', -5)]), listOf([new ReplicationFieldMetaData('languagePk', -5), new ReplicationFieldMetaData('languageVersionId', -5), new ReplicationFieldMetaData('languageDestination', -5), new ReplicationFieldMetaData('languagePending', 16)]), null, null, null, 1000)), to(10, new ReplicationEntityMetaData(10, 100, 'LanguageVariant', 'LanguageVariantReplicate', 'LanguageVariant_ReceiveView', 'langVariantUid', 'langVariantLct', 'lvPk', 'lvDestination', 'lvVersionId', 'lvPending', listOf([new ReplicationFieldMetaData('langUid', -5), new ReplicationFieldMetaData('countryCode', -1), new ReplicationFieldMetaData('name', -1), new ReplicationFieldMetaData('langVariantLocalChangeSeqNum', -5), new ReplicationFieldMetaData('langVariantMasterChangeSeqNum', -5), new ReplicationFieldMetaData('langVariantLastChangedBy', 4), new ReplicationFieldMetaData('langVariantLct', -5), new ReplicationFieldMetaData('langVariantUid', -5)]), listOf([new ReplicationFieldMetaData('lvPk', -5), new ReplicationFieldMetaData('lvVersionId', -5), new ReplicationFieldMetaData('lvDestination', -5), new ReplicationFieldMetaData('lvPending', 16)]), null, null, null, 1000)), to(43, new ReplicationEntityMetaData(43, 100, 'PersonGroup', 'PersonGroupReplicate', 'PersonGroup_ReceiveView', 'groupUid', 'groupLct', 'pgPk', 'pgDestination', 'pgVersionId', 'pgPending', listOf([new ReplicationFieldMetaData('groupMasterCsn', -5), new ReplicationFieldMetaData('groupLocalCsn', -5), new ReplicationFieldMetaData('groupLastChangedBy', 4), new ReplicationFieldMetaData('groupLct', -5), new ReplicationFieldMetaData('groupName', -1), new ReplicationFieldMetaData('groupActive', 16), new ReplicationFieldMetaData('personGroupFlag', 4), new ReplicationFieldMetaData('groupUid', -5)]), listOf([new ReplicationFieldMetaData('pgPk', -5), new ReplicationFieldMetaData('pgVersionId', -5), new ReplicationFieldMetaData('pgDestination', -5), new ReplicationFieldMetaData('pgPending', 16)]), null, null, null, 1000)), to(44, new ReplicationEntityMetaData(44, 0, 'PersonGroupMember', 'PersonGroupMemberReplicate', 'PersonGroupMember_ReceiveView', 'groupMemberUid', 'groupMemberLct', 'pgmPk', 'pgmDestination', 'pgmVersionId', 'pgmPending', listOf([new ReplicationFieldMetaData('groupMemberActive', 16), new ReplicationFieldMetaData('groupMemberPersonUid', -5), new ReplicationFieldMetaData('groupMemberGroupUid', -5), new ReplicationFieldMetaData('groupMemberMasterCsn', -5), new ReplicationFieldMetaData('groupMemberLocalCsn', -5), new ReplicationFieldMetaData('groupMemberLastChangedBy', 4), new ReplicationFieldMetaData('groupMemberLct', -5), new ReplicationFieldMetaData('groupMemberUid', -5)]), listOf([new ReplicationFieldMetaData('pgmPk', -5), new ReplicationFieldMetaData('pgmVersionId', -5), new ReplicationFieldMetaData('pgmDestination', -5), new ReplicationFieldMetaData('pgmPending', 16)]), null, null, null, 1000)), to(50, new ReplicationEntityMetaData(50, 100, 'PersonPicture', 'PersonPictureReplicate', 'PersonPicture_ReceiveView', 'personPictureUid', 'personPictureLct', 'ppPk', 'ppDestination', 'ppVersionId', 'ppPending', listOf([new ReplicationFieldMetaData('personPicturePersonUid', -5), new ReplicationFieldMetaData('personPictureMasterCsn', -5), new ReplicationFieldMetaData('personPictureLocalCsn', -5), new ReplicationFieldMetaData('personPictureLastChangedBy', 4), new ReplicationFieldMetaData('personPictureLct', -5), new ReplicationFieldMetaData('personPictureUri', -1), new ReplicationFieldMetaData('personPictureMd5', -1), new ReplicationFieldMetaData('fileSize', 4), new ReplicationFieldMetaData('picTimestamp', -5), new ReplicationFieldMetaData('mimeType', -1), new ReplicationFieldMetaData('personPictureActive', 16), new ReplicationFieldMetaData('personPictureUid', -5)]), listOf([new ReplicationFieldMetaData('ppPk', -5), new ReplicationFieldMetaData('ppVersionId', -5), new ReplicationFieldMetaData('ppDestination', -5), new ReplicationFieldMetaData('ppPending', 16)]), 'personPictureUri', 'personPictureMd5', 'fileSize', 1000)), to(51, new ReplicationEntityMetaData(51, 100, 'Container', 'ContainerReplicate', 'Container_ReceiveView', 'containerUid', 'cntLct', 'containerPk', 'containerDestination', 'containerVersionId', 'containerPending', listOf([new ReplicationFieldMetaData('cntLocalCsn', -5), new ReplicationFieldMetaData('cntMasterCsn', -5), new ReplicationFieldMetaData('cntLastModBy', 4), new ReplicationFieldMetaData('cntLct', -5), new ReplicationFieldMetaData('fileSize', -5), new ReplicationFieldMetaData('containerContentEntryUid', -5), new ReplicationFieldMetaData('cntLastModified', -5), new ReplicationFieldMetaData('mimeType', -1), new ReplicationFieldMetaData('remarks', -1), new ReplicationFieldMetaData('mobileOptimized', 16), new ReplicationFieldMetaData('cntNumEntries', 4), new ReplicationFieldMetaData('containerUid', -5)]), listOf([new ReplicationFieldMetaData('containerPk', -5), new ReplicationFieldMetaData('containerVersionId', -5), new ReplicationFieldMetaData('containerDestination', -5), new ReplicationFieldMetaData('containerPending', 16)]), null, null, null, 1000)), to(62, new ReplicationEntityMetaData(62, 100, 'VerbEntity', 'VerbEntityReplicate', 'VerbEntity_ReceiveView', 'verbUid', 'verbLct', 'vePk', 'veDestination', 'veVersionId', 'vePending', listOf([new ReplicationFieldMetaData('urlId', -1), new ReplicationFieldMetaData('verbInActive', 16), new ReplicationFieldMetaData('verbMasterChangeSeqNum', -5), new ReplicationFieldMetaData('verbLocalChangeSeqNum', -5), new ReplicationFieldMetaData('verbLastChangedBy', 4), new ReplicationFieldMetaData('verbLct', -5), new ReplicationFieldMetaData('verbUid', -5)]), listOf([new ReplicationFieldMetaData('vePk', -5), new ReplicationFieldMetaData('veVersionId', -5), new ReplicationFieldMetaData('veDestination', -5), new ReplicationFieldMetaData('vePending', 16)]), null, null, null, 1000)), to(64, new ReplicationEntityMetaData(64, 100, 'XObjectEntity', 'XObjectEntityReplicate', 'XObjectEntity_ReceiveView', 'xObjectUid', 'xObjectLct', 'xoePk', 'xoeDestination', 'xoeVersionId', 'xoePending', listOf([new ReplicationFieldMetaData('objectType', -1), new ReplicationFieldMetaData('objectId', -1), new ReplicationFieldMetaData('definitionType', -1), new ReplicationFieldMetaData('interactionType', -1), new ReplicationFieldMetaData('correctResponsePattern', -1), new ReplicationFieldMetaData('objectContentEntryUid', -5), new ReplicationFieldMetaData('objectStatementRefUid', -5), new ReplicationFieldMetaData('xObjectMasterChangeSeqNum', -5), new ReplicationFieldMetaData('xObjectocalChangeSeqNum', -5), new ReplicationFieldMetaData('xObjectLastChangedBy', 4), new ReplicationFieldMetaData('xObjectLct', -5), new ReplicationFieldMetaData('xObjectUid', -5)]), listOf([new ReplicationFieldMetaData('xoePk', -5), new ReplicationFieldMetaData('xoeVersionId', -5), new ReplicationFieldMetaData('xoeDestination', -5), new ReplicationFieldMetaData('xoePending', 16)]), null, null, null, 1000)), to(60, new ReplicationEntityMetaData(60, 1, 'StatementEntity', 'StatementEntityReplicate', 'StatementEntity_ReceiveView', 'statementUid', 'statementLct', 'sePk', 'seDestination', 'seVersionId', 'sePending', listOf([new ReplicationFieldMetaData('statementId', -1), new ReplicationFieldMetaData('statementPersonUid', -5), new ReplicationFieldMetaData('statementVerbUid', -5), new ReplicationFieldMetaData('xObjectUid', -5), new ReplicationFieldMetaData('subStatementActorUid', -5), new ReplicationFieldMetaData('substatementVerbUid', -5), new ReplicationFieldMetaData('subStatementObjectUid', -5), new ReplicationFieldMetaData('agentUid', -5), new ReplicationFieldMetaData('instructorUid', -5), new ReplicationFieldMetaData('authorityUid', -5), new ReplicationFieldMetaData('teamUid', -5), new ReplicationFieldMetaData('resultCompletion', 16), new ReplicationFieldMetaData('resultSuccess', 5), new ReplicationFieldMetaData('resultScoreScaled', 6), new ReplicationFieldMetaData('resultScoreRaw', -5), new ReplicationFieldMetaData('resultScoreMin', -5), new ReplicationFieldMetaData('resultScoreMax', -5), new ReplicationFieldMetaData('resultDuration', -5), new ReplicationFieldMetaData('resultResponse', -1), new ReplicationFieldMetaData('timestamp', -5), new ReplicationFieldMetaData('stored', -5), new ReplicationFieldMetaData('contextRegistration', -1), new ReplicationFieldMetaData('contextPlatform', -1), new ReplicationFieldMetaData('contextStatementId', -1), new ReplicationFieldMetaData('fullStatement', -1), new ReplicationFieldMetaData('statementMasterChangeSeqNum', -5), new ReplicationFieldMetaData('statementLocalChangeSeqNum', -5), new ReplicationFieldMetaData('statementLastChangedBy', 4), new ReplicationFieldMetaData('statementLct', -5), new ReplicationFieldMetaData('extensionProgress', 4), new ReplicationFieldMetaData('contentEntryRoot', 16), new ReplicationFieldMetaData('statementContentEntryUid', -5), new ReplicationFieldMetaData('statementLearnerGroupUid', -5), new ReplicationFieldMetaData('statementClazzUid', -5), new ReplicationFieldMetaData('statementUid', -5)]), listOf([new ReplicationFieldMetaData('sePk', -5), new ReplicationFieldMetaData('seVersionId', -5), new ReplicationFieldMetaData('seDestination', -5), new ReplicationFieldMetaData('sePending', 16)]), null, null, null, 1000)), to(66, new ReplicationEntityMetaData(66, 100, 'ContextXObjectStatementJoin', 'ContextXObjectStatementJoinReplicate', 'ContextXObjectStatementJoin_ReceiveView', 'contextXObjectStatementJoinUid', 'contextXObjectLct', 'cxosjPk', 'cxosjDestination', 'cxosjVersionId', 'cxosjPending', listOf([new ReplicationFieldMetaData('contextActivityFlag', 4), new ReplicationFieldMetaData('contextStatementUid', -5), new ReplicationFieldMetaData('contextXObjectUid', -5), new ReplicationFieldMetaData('verbMasterChangeSeqNum', -5), new ReplicationFieldMetaData('verbLocalChangeSeqNum', -5), new ReplicationFieldMetaData('verbLastChangedBy', 4), new ReplicationFieldMetaData('contextXObjectLct', -5), new ReplicationFieldMetaData('contextXObjectStatementJoinUid', -5)]), listOf([new ReplicationFieldMetaData('cxosjPk', -5), new ReplicationFieldMetaData('cxosjVersionId', -5), new ReplicationFieldMetaData('cxosjDestination', -5), new ReplicationFieldMetaData('cxosjPending', 16)]), null, null, null, 1000)), to(68, new ReplicationEntityMetaData(68, 100, 'AgentEntity', 'AgentEntityReplicate', 'AgentEntity_ReceiveView', 'agentUid', 'agentLct', 'aePk', 'aeDestination', 'aeVersionId', 'aePending', listOf([new ReplicationFieldMetaData('agentMbox', -1), new ReplicationFieldMetaData('agentMbox_sha1sum', -1), new ReplicationFieldMetaData('agentOpenid', -1), new ReplicationFieldMetaData('agentAccountName', -1), new ReplicationFieldMetaData('agentHomePage', -1), new ReplicationFieldMetaData('agentPersonUid', -5), new ReplicationFieldMetaData('statementMasterChangeSeqNum', -5), new ReplicationFieldMetaData('statementLocalChangeSeqNum', -5), new ReplicationFieldMetaData('statementLastChangedBy', 4), new ReplicationFieldMetaData('agentLct', -5), new ReplicationFieldMetaData('agentUid', -5)]), listOf([new ReplicationFieldMetaData('aePk', -5), new ReplicationFieldMetaData('aeVersionId', -5), new ReplicationFieldMetaData('aeDestination', -5), new ReplicationFieldMetaData('aePending', 16)]), null, null, null, 1000)), to(70, new ReplicationEntityMetaData(70, 100, 'StateEntity', 'StateEntityReplicate', 'StateEntity_ReceiveView', 'stateUid', 'stateLct', 'sePk', 'seDestination', 'seVersionId', 'sePending', listOf([new ReplicationFieldMetaData('stateId', -1), new ReplicationFieldMetaData('agentUid', -5), new ReplicationFieldMetaData('activityId', -1), new ReplicationFieldMetaData('registration', -1), new ReplicationFieldMetaData('isIsactive', 16), new ReplicationFieldMetaData('timestamp', -5), new ReplicationFieldMetaData('stateMasterChangeSeqNum', -5), new ReplicationFieldMetaData('stateLocalChangeSeqNum', -5), new ReplicationFieldMetaData('stateLastChangedBy', 4), new ReplicationFieldMetaData('stateLct', -5), new ReplicationFieldMetaData('stateUid', -5)]), listOf([new ReplicationFieldMetaData('sePk', -5), new ReplicationFieldMetaData('seVersionId', -5), new ReplicationFieldMetaData('seDestination', -5), new ReplicationFieldMetaData('sePending', 16)]), null, null, null, 1000)), to(72, new ReplicationEntityMetaData(72, 100, 'StateContentEntity', 'StateContentEntityReplicate', 'StateContentEntity_ReceiveView', 'stateContentUid', 'stateContentLct', 'scePk', 'sceDestination', 'sceVersionId', 'scePending', listOf([new ReplicationFieldMetaData('stateContentStateUid', -5), new ReplicationFieldMetaData('stateContentKey', -1), new ReplicationFieldMetaData('stateContentValue', -1), new ReplicationFieldMetaData('isIsactive', 16), new ReplicationFieldMetaData('stateContentMasterChangeSeqNum', -5), new ReplicationFieldMetaData('stateContentLocalChangeSeqNum', -5), new ReplicationFieldMetaData('stateContentLastChangedBy', 4), new ReplicationFieldMetaData('stateContentLct', -5), new ReplicationFieldMetaData('stateContentUid', -5)]), listOf([new ReplicationFieldMetaData('scePk', -5), new ReplicationFieldMetaData('sceVersionId', -5), new ReplicationFieldMetaData('sceDestination', -5), new ReplicationFieldMetaData('scePending', 16)]), null, null, null, 1000)), to(74, new ReplicationEntityMetaData(74, 100, 'XLangMapEntry', 'XLangMapEntryReplicate', 'XLangMapEntry_ReceiveView', 'statementLangMapUid', 'statementLangMapLct', 'xlmePk', 'xlmeDestination', 'xlmeVersionId', 'xlmePending', listOf([new ReplicationFieldMetaData('verbLangMapUid', -5), new ReplicationFieldMetaData('objectLangMapUid', -5), new ReplicationFieldMetaData('languageLangMapUid', -5), new ReplicationFieldMetaData('languageVariantLangMapUid', -5), new ReplicationFieldMetaData('valueLangMap', -1), new ReplicationFieldMetaData('statementLangMapMasterCsn', 4), new ReplicationFieldMetaData('statementLangMapLocalCsn', 4), new ReplicationFieldMetaData('statementLangMapLcb', 4), new ReplicationFieldMetaData('statementLangMapLct', -5), new ReplicationFieldMetaData('statementLangMapUid', -5)]), listOf([new ReplicationFieldMetaData('xlmePk', -5), new ReplicationFieldMetaData('xlmeVersionId', -5), new ReplicationFieldMetaData('xlmeDestination', -5), new ReplicationFieldMetaData('xlmePending', 16)]), null, null, null, 1000)), to(164, new ReplicationEntityMetaData(164, 100, 'School', 'SchoolReplicate', 'School_ReceiveView', 'schoolUid', 'schoolLct', 'schoolPk', 'schoolDestination', 'schoolVersionId', 'schoolPending', listOf([new ReplicationFieldMetaData('schoolName', -1), new ReplicationFieldMetaData('schoolDesc', -1), new ReplicationFieldMetaData('schoolAddress', -1), new ReplicationFieldMetaData('schoolActive', 16), new ReplicationFieldMetaData('schoolPhoneNumber', -1), new ReplicationFieldMetaData('schoolGender', 4), new ReplicationFieldMetaData('schoolHolidayCalendarUid', -5), new ReplicationFieldMetaData('schoolFeatures', -5), new ReplicationFieldMetaData('schoolLocationLong', 8), new ReplicationFieldMetaData('schoolLocationLatt', 8), new ReplicationFieldMetaData('schoolEmailAddress', -1), new ReplicationFieldMetaData('schoolTeachersPersonGroupUid', -5), new ReplicationFieldMetaData('schoolStudentsPersonGroupUid', -5), new ReplicationFieldMetaData('schoolPendingStudentsPersonGroupUid', -5), new ReplicationFieldMetaData('schoolCode', -1), new ReplicationFieldMetaData('schoolMasterChangeSeqNum', -5), new ReplicationFieldMetaData('schoolLocalChangeSeqNum', -5), new ReplicationFieldMetaData('schoolLastChangedBy', 4), new ReplicationFieldMetaData('schoolLct', -5), new ReplicationFieldMetaData('schoolTimeZone', -1), new ReplicationFieldMetaData('schoolUid', -5)]), listOf([new ReplicationFieldMetaData('schoolPk', -5), new ReplicationFieldMetaData('schoolVersionId', -5), new ReplicationFieldMetaData('schoolDestination', -5), new ReplicationFieldMetaData('schoolPending', 16)]), null, null, null, 1000)), to(200, new ReplicationEntityMetaData(200, 1, 'SchoolMember', 'SchoolMemberReplicate', 'SchoolMember_ReceiveView', 'schoolMemberUid', 'schoolMemberLct', 'smPk', 'smDestination', 'smVersionId', 'smPending', listOf([new ReplicationFieldMetaData('schoolMemberPersonUid', -5), new ReplicationFieldMetaData('schoolMemberSchoolUid', -5), new ReplicationFieldMetaData('schoolMemberJoinDate', -5), new ReplicationFieldMetaData('schoolMemberLeftDate', -5), new ReplicationFieldMetaData('schoolMemberRole', 4), new ReplicationFieldMetaData('schoolMemberActive', 16), new ReplicationFieldMetaData('schoolMemberLocalChangeSeqNum', -5), new ReplicationFieldMetaData('schoolMemberMasterChangeSeqNum', -5), new ReplicationFieldMetaData('schoolMemberLastChangedBy', 4), new ReplicationFieldMetaData('schoolMemberLct', -5), new ReplicationFieldMetaData('schoolMemberUid', -5)]), listOf([new ReplicationFieldMetaData('smPk', -5), new ReplicationFieldMetaData('smVersionId', -5), new ReplicationFieldMetaData('smDestination', -5), new ReplicationFieldMetaData('smPending', 16)]), null, null, null, 1000)), to(208, new ReplicationEntityMetaData(208, 100, 'Comments', 'CommentsReplicate', 'Comments_ReceiveView', 'commentsUid', 'commentsLct', 'commentsPk', 'commentsDestination', 'commentsVersionId', 'commentsPending', listOf([new ReplicationFieldMetaData('commentsText', -1), new ReplicationFieldMetaData('commentsEntityType', 4), new ReplicationFieldMetaData('commentsEntityUid', -5), new ReplicationFieldMetaData('commentsPublic', 16), new ReplicationFieldMetaData('commentsStatus', 4), new ReplicationFieldMetaData('commentsPersonUid', -5), new ReplicationFieldMetaData('commentsToPersonUid', -5), new ReplicationFieldMetaData('commentSubmitterUid', -5), new ReplicationFieldMetaData('commentsFlagged', 16), new ReplicationFieldMetaData('commentsInActive', 16), new ReplicationFieldMetaData('commentsDateTimeAdded', -5), new ReplicationFieldMetaData('commentsDateTimeUpdated', -5), new ReplicationFieldMetaData('commentsMCSN', -5), new ReplicationFieldMetaData('commentsLCSN', -5), new ReplicationFieldMetaData('commentsLCB', 4), new ReplicationFieldMetaData('commentsLct', -5), new ReplicationFieldMetaData('commentsUid', -5)]), listOf([new ReplicationFieldMetaData('commentsPk', -5), new ReplicationFieldMetaData('commentsVersionId', -5), new ReplicationFieldMetaData('commentsDestination', -5), new ReplicationFieldMetaData('commentsPending', 16)]), null, null, null, 1000)), to(101, new ReplicationEntityMetaData(101, 100, 'Report', 'ReportReplicate', 'Report_ReceiveView', 'reportUid', 'reportLct', 'reportPk', 'reportDestination', 'reportVersionId', 'reportPending', listOf([new ReplicationFieldMetaData('reportOwnerUid', -5), new ReplicationFieldMetaData('xAxis', 4), new ReplicationFieldMetaData('reportDateRangeSelection', 4), new ReplicationFieldMetaData('fromDate', -5), new ReplicationFieldMetaData('fromRelTo', 4), new ReplicationFieldMetaData('fromRelOffSet', 4), new ReplicationFieldMetaData('fromRelUnit', 4), new ReplicationFieldMetaData('toDate', -5), new ReplicationFieldMetaData('toRelTo', 4), new ReplicationFieldMetaData('toRelOffSet', 4), new ReplicationFieldMetaData('toRelUnit', 4), new ReplicationFieldMetaData('reportTitle', -1), new ReplicationFieldMetaData('reportDescription', -1), new ReplicationFieldMetaData('reportSeries', -1), new ReplicationFieldMetaData('reportInactive', 16), new ReplicationFieldMetaData('isTemplate', 16), new ReplicationFieldMetaData('priority', 4), new ReplicationFieldMetaData('reportTitleId', 4), new ReplicationFieldMetaData('reportDescId', 4), new ReplicationFieldMetaData('reportMasterChangeSeqNum', -5), new ReplicationFieldMetaData('reportLocalChangeSeqNum', -5), new ReplicationFieldMetaData('reportLastChangedBy', 4), new ReplicationFieldMetaData('reportLct', -5), new ReplicationFieldMetaData('reportUid', -5)]), listOf([new ReplicationFieldMetaData('reportPk', -5), new ReplicationFieldMetaData('reportVersionId', -5), new ReplicationFieldMetaData('reportDestination', -5), new ReplicationFieldMetaData('reportPending', 16)]), null, null, null, 1000)), to(189, new ReplicationEntityMetaData(189, 100, 'Site', 'SiteReplicate', 'Site_ReceiveView', 'siteUid', 'siteLct', 'sitePk', 'siteDestination', 'siteVersionId', 'sitePending', listOf([new ReplicationFieldMetaData('sitePcsn', -5), new ReplicationFieldMetaData('siteLcsn', -5), new ReplicationFieldMetaData('siteLcb', 4), new ReplicationFieldMetaData('siteLct', -5), new ReplicationFieldMetaData('siteName', -1), new ReplicationFieldMetaData('guestLogin', 16), new ReplicationFieldMetaData('registrationAllowed', 16), new ReplicationFieldMetaData('authSalt', -1), new ReplicationFieldMetaData('siteUid', -5)]), listOf([new ReplicationFieldMetaData('sitePk', -5), new ReplicationFieldMetaData('siteVersionId', -5), new ReplicationFieldMetaData('siteDestination', -5), new ReplicationFieldMetaData('sitePending', 16)]), null, null, null, 1000)), to(301, new ReplicationEntityMetaData(301, 100, 'LearnerGroup', 'LearnerGroupReplicate', 'LearnerGroup_ReceiveView', 'learnerGroupUid', 'learnerGroupLct', 'lgPk', 'lgDestination', 'lgVersionId', 'lgPending', listOf([new ReplicationFieldMetaData('learnerGroupName', -1), new ReplicationFieldMetaData('learnerGroupDescription', -1), new ReplicationFieldMetaData('learnerGroupActive', 16), new ReplicationFieldMetaData('learnerGroupMCSN', -5), new ReplicationFieldMetaData('learnerGroupCSN', -5), new ReplicationFieldMetaData('learnerGroupLCB', 4), new ReplicationFieldMetaData('learnerGroupLct', -5), new ReplicationFieldMetaData('learnerGroupUid', -5)]), listOf([new ReplicationFieldMetaData('lgPk', -5), new ReplicationFieldMetaData('lgVersionId', -5), new ReplicationFieldMetaData('lgDestination', -5), new ReplicationFieldMetaData('lgPending', 16)]), null, null, null, 1000)), to(300, new ReplicationEntityMetaData(300, 100, 'LearnerGroupMember', 'LearnerGroupMemberReplicate', 'LearnerGroupMember_ReceiveView', 'learnerGroupMemberUid', 'learnerGroupMemberLct', 'lgmPk', 'lgmDestination', 'lgmVersionId', 'lgmPending', listOf([new ReplicationFieldMetaData('learnerGroupMemberPersonUid', -5), new ReplicationFieldMetaData('learnerGroupMemberLgUid', -5), new ReplicationFieldMetaData('learnerGroupMemberRole', 4), new ReplicationFieldMetaData('learnerGroupMemberActive', 16), new ReplicationFieldMetaData('learnerGroupMemberMCSN', -5), new ReplicationFieldMetaData('learnerGroupMemberCSN', -5), new ReplicationFieldMetaData('learnerGroupMemberLCB', 4), new ReplicationFieldMetaData('learnerGroupMemberLct', -5), new ReplicationFieldMetaData('learnerGroupMemberUid', -5)]), listOf([new ReplicationFieldMetaData('lgmPk', -5), new ReplicationFieldMetaData('lgmVersionId', -5), new ReplicationFieldMetaData('lgmDestination', -5), new ReplicationFieldMetaData('lgmPending', 16)]), null, null, null, 1000)), to(302, new ReplicationEntityMetaData(302, 100, 'GroupLearningSession', 'GroupLearningSessionReplicate', 'GroupLearningSession_ReceiveView', 'groupLearningSessionUid', 'groupLearningSessionLct', 'glsPk', 'glsDestination', 'glsVersionId', 'glsPending', listOf([new ReplicationFieldMetaData('groupLearningSessionContentUid', -5), new ReplicationFieldMetaData('groupLearningSessionLearnerGroupUid', -5), new ReplicationFieldMetaData('groupLearningSessionInactive', 16), new ReplicationFieldMetaData('groupLearningSessionMCSN', -5), new ReplicationFieldMetaData('groupLearningSessionCSN', -5), new ReplicationFieldMetaData('groupLearningSessionLCB', 4), new ReplicationFieldMetaData('groupLearningSessionLct', -5), new ReplicationFieldMetaData('groupLearningSessionUid', -5)]), listOf([new ReplicationFieldMetaData('glsPk', -5), new ReplicationFieldMetaData('glsVersionId', -5), new ReplicationFieldMetaData('glsDestination', -5), new ReplicationFieldMetaData('glsPending', 16)]), null, null, null, 1000)), to(272, new ReplicationEntityMetaData(272, 100, 'SiteTerms', 'SiteTermsReplicate', 'SiteTerms_ReceiveView', 'sTermsUid', 'sTermsLct', 'stPk', 'stDestination', 'stVersionId', 'stPending', listOf([new ReplicationFieldMetaData('termsHtml', -1), new ReplicationFieldMetaData('sTermsLang', -1), new ReplicationFieldMetaData('sTermsLangUid', -5), new ReplicationFieldMetaData('sTermsActive', 16), new ReplicationFieldMetaData('sTermsLastChangedBy', 4), new ReplicationFieldMetaData('sTermsPrimaryCsn', -5), new ReplicationFieldMetaData('sTermsLocalCsn', -5), new ReplicationFieldMetaData('sTermsLct', -5), new ReplicationFieldMetaData('sTermsUid', -5)]), listOf([new ReplicationFieldMetaData('stPk', -5), new ReplicationFieldMetaData('stVersionId', -5), new ReplicationFieldMetaData('stDestination', -5), new ReplicationFieldMetaData('stPending', 16)]), null, null, null, 1000)), to(134, new ReplicationEntityMetaData(134, 100, 'ClazzContentJoin', 'ClazzContentJoinReplicate', 'ClazzContentJoin_ReceiveView', 'ccjUid', 'ccjLct', 'ccjPk', 'ccjDestination', 'ccjVersionId', 'ccjPending', listOf([new ReplicationFieldMetaData('ccjContentEntryUid', -5), new ReplicationFieldMetaData('ccjClazzUid', -5), new ReplicationFieldMetaData('ccjActive', 16), new ReplicationFieldMetaData('ccjLocalChangeSeqNum', -5), new ReplicationFieldMetaData('ccjMasterChangeSeqNum', -5), new ReplicationFieldMetaData('ccjLastChangedBy', 4), new ReplicationFieldMetaData('ccjLct', -5), new ReplicationFieldMetaData('ccjUid', -5)]), listOf([new ReplicationFieldMetaData('ccjPk', -5), new ReplicationFieldMetaData('ccjVersionId', -5), new ReplicationFieldMetaData('ccjDestination', -5), new ReplicationFieldMetaData('ccjPending', 16)]), null, null, null, 1000)), to(512, new ReplicationEntityMetaData(512, 100, 'PersonParentJoin', 'PersonParentJoinReplicate', 'PersonParentJoin_ReceiveView', 'ppjUid', 'ppjLct', 'ppjPk', 'ppjDestination', 'ppjVersionId', 'ppjPending', listOf([new ReplicationFieldMetaData('ppjPcsn', -5), new ReplicationFieldMetaData('ppjLcsn', -5), new ReplicationFieldMetaData('ppjLcb', 4), new ReplicationFieldMetaData('ppjLct', -5), new ReplicationFieldMetaData('ppjParentPersonUid', -5), new ReplicationFieldMetaData('ppjMinorPersonUid', -5), new ReplicationFieldMetaData('ppjRelationship', 4), new ReplicationFieldMetaData('ppjEmail', -1), new ReplicationFieldMetaData('ppjPhone', -1), new ReplicationFieldMetaData('ppjInactive', 16), new ReplicationFieldMetaData('ppjStatus', 4), new ReplicationFieldMetaData('ppjApprovalTiemstamp', -5), new ReplicationFieldMetaData('ppjApprovalIpAddr', -1), new ReplicationFieldMetaData('ppjUid', -5)]), listOf([new ReplicationFieldMetaData('ppjPk', -5), new ReplicationFieldMetaData('ppjVersionId', -5), new ReplicationFieldMetaData('ppjDestination', -5), new ReplicationFieldMetaData('ppjPending', 16)]), null, null, null, 1000)), to(48, new ReplicationEntityMetaData(48, 0, 'ScopedGrant', 'ScopedGrantReplicate', 'ScopedGrant_ReceiveView', 'sgUid', 'sgLct', 'sgPk', 'sgDestination', 'sgVersionId', 'sgPending', listOf([new ReplicationFieldMetaData('sgPcsn', -5), new ReplicationFieldMetaData('sgLcsn', -5), new ReplicationFieldMetaData('sgLcb', 4), new ReplicationFieldMetaData('sgLct', -5), new ReplicationFieldMetaData('sgTableId', 4), new ReplicationFieldMetaData('sgEntityUid', -5), new ReplicationFieldMetaData('sgPermissions', -5), new ReplicationFieldMetaData('sgGroupUid', -5), new ReplicationFieldMetaData('sgIndex', 4), new ReplicationFieldMetaData('sgFlags', 4), new ReplicationFieldMetaData('sgUid', -5)]), listOf([new ReplicationFieldMetaData('sgPk', -5), new ReplicationFieldMetaData('sgVersionId', -5), new ReplicationFieldMetaData('sgDestination', -5), new ReplicationFieldMetaData('sgPending', 16)]), null, null, null, 1000)), to(419, new ReplicationEntityMetaData(419, 100, 'ErrorReport', 'ErrorReportReplicate', 'ErrorReport_ReceiveView', 'errUid', 'errLct', 'erPk', 'erDestination', 'erVersionId', 'erPending', listOf([new ReplicationFieldMetaData('errPcsn', -5), new ReplicationFieldMetaData('errLcsn', -5), new ReplicationFieldMetaData('errLcb', 4), new ReplicationFieldMetaData('errLct', -5), new ReplicationFieldMetaData('severity', 4), new ReplicationFieldMetaData('timestamp', -5), new ReplicationFieldMetaData('presenterUri', -1), new ReplicationFieldMetaData('appVersion', -1), new ReplicationFieldMetaData('versionCode', 4), new ReplicationFieldMetaData('errorCode', 4), new ReplicationFieldMetaData('operatingSys', -1), new ReplicationFieldMetaData('osVersion', -1), new ReplicationFieldMetaData('stackTrace', -1), new ReplicationFieldMetaData('message', -1), new ReplicationFieldMetaData('errUid', -5)]), listOf([new ReplicationFieldMetaData('erPk', -5), new ReplicationFieldMetaData('erVersionId', -5), new ReplicationFieldMetaData('erDestination', -5), new ReplicationFieldMetaData('erPending', 16)]), null, null, null, 1000)), to(520, new ReplicationEntityMetaData(520, 100, 'ClazzAssignment', 'ClazzAssignmentReplicate', 'ClazzAssignment_ReceiveView', 'caUid', 'caLct', 'caPk', 'caDestination', 'caVersionId', 'caPending', listOf([new ReplicationFieldMetaData('caTitle', -1), new ReplicationFieldMetaData('caDescription', -1), new ReplicationFieldMetaData('caGroupUid', -5), new ReplicationFieldMetaData('caActive', 16), new ReplicationFieldMetaData('caClassCommentEnabled', 16), new ReplicationFieldMetaData('caPrivateCommentsEnabled', 16), new ReplicationFieldMetaData('caCompletionCriteria', 4), new ReplicationFieldMetaData('caRequireFileSubmission', 16), new ReplicationFieldMetaData('caFileType', 4), new ReplicationFieldMetaData('caSizeLimit', 4), new ReplicationFieldMetaData('caNumberOfFiles', 4), new ReplicationFieldMetaData('caSubmissionPolicy', 4), new ReplicationFieldMetaData('caMarkingType', 4), new ReplicationFieldMetaData('caRequireTextSubmission', 16), new ReplicationFieldMetaData('caTextLimitType', 4), new ReplicationFieldMetaData('caTextLimit', 4), new ReplicationFieldMetaData('caXObjectUid', -5), new ReplicationFieldMetaData('caClazzUid', -5), new ReplicationFieldMetaData('caLocalChangeSeqNum', -5), new ReplicationFieldMetaData('caMasterChangeSeqNum', -5), new ReplicationFieldMetaData('caLastChangedBy', 4), new ReplicationFieldMetaData('caLct', -5), new ReplicationFieldMetaData('caUid', -5)]), listOf([new ReplicationFieldMetaData('caPk', -5), new ReplicationFieldMetaData('caVersionId', -5), new ReplicationFieldMetaData('caDestination', -5), new ReplicationFieldMetaData('caPending', 16)]), null, null, null, 1000)), to(521, new ReplicationEntityMetaData(521, 100, 'ClazzAssignmentContentJoin', 'ClazzAssignmentContentJoinReplicate', 'ClazzAssignmentContentJoin_ReceiveView', 'cacjUid', 'cacjLct', 'cacjPk', 'cacjDestination', 'cacjVersionId', 'cacjPending', listOf([new ReplicationFieldMetaData('cacjContentUid', -5), new ReplicationFieldMetaData('cacjAssignmentUid', -5), new ReplicationFieldMetaData('cacjActive', 16), new ReplicationFieldMetaData('cacjWeight', 4), new ReplicationFieldMetaData('cacjMCSN', -5), new ReplicationFieldMetaData('cacjLCSN', -5), new ReplicationFieldMetaData('cacjLCB', 4), new ReplicationFieldMetaData('cacjLct', -5), new ReplicationFieldMetaData('cacjUid', -5)]), listOf([new ReplicationFieldMetaData('cacjPk', -5), new ReplicationFieldMetaData('cacjVersionId', -5), new ReplicationFieldMetaData('cacjDestination', -5), new ReplicationFieldMetaData('cacjPending', 16)]), null, null, null, 1000)), to(522, new ReplicationEntityMetaData(522, 100, 'CourseAssignmentSubmission', 'CourseAssignmentSubmissionReplicate', 'CourseAssignmentSubmission_ReceiveView', 'casUid', 'casTimestamp', 'casPk', 'casDestination', 'casVersionId', 'casPending', listOf([new ReplicationFieldMetaData('casAssignmentUid', -5), new ReplicationFieldMetaData('casSubmitterUid', -5), new ReplicationFieldMetaData('casSubmitterPersonUid', -5), new ReplicationFieldMetaData('casText', -1), new ReplicationFieldMetaData('casType', 4), new ReplicationFieldMetaData('casTimestamp', -5), new ReplicationFieldMetaData('casUid', -5)]), listOf([new ReplicationFieldMetaData('casPk', -5), new ReplicationFieldMetaData('casVersionId', -5), new ReplicationFieldMetaData('casDestination', -5), new ReplicationFieldMetaData('casPending', 16)]), null, null, null, 1000)), to(90, new ReplicationEntityMetaData(90, 100, 'CourseAssignmentSubmissionAttachment', 'CourseAssignmentSubmissionAttachmentReplicate', 'CourseAssignmentSubmissionAttachment_ReceiveView', 'casaUid', 'casaTimestamp', 'casaPk', 'casaDestination', 'casaVersionId', 'casaPending', listOf([new ReplicationFieldMetaData('casaSubmissionUid', -5), new ReplicationFieldMetaData('casaMimeType', -1), new ReplicationFieldMetaData('casaFileName', -1), new ReplicationFieldMetaData('casaUri', -1), new ReplicationFieldMetaData('casaMd5', -1), new ReplicationFieldMetaData('casaSize', 4), new ReplicationFieldMetaData('casaTimestamp', -5), new ReplicationFieldMetaData('casaUid', -5)]), listOf([new ReplicationFieldMetaData('casaPk', -5), new ReplicationFieldMetaData('casaVersionId', -5), new ReplicationFieldMetaData('casaDestination', -5), new ReplicationFieldMetaData('casaPending', 16)]), 'casaUri', 'casaMd5', 'casaSize', 1000)), to(523, new ReplicationEntityMetaData(523, 100, 'CourseAssignmentMark', 'CourseAssignmentMarkReplicate', 'CourseAssignmentMark_ReceiveView', 'camUid', 'camLct', 'camPk', 'camDestination', 'camVersionId', 'camPending', listOf([new ReplicationFieldMetaData('camAssignmentUid', -5), new ReplicationFieldMetaData('camSubmitterUid', -5), new ReplicationFieldMetaData('camMark', 6), new ReplicationFieldMetaData('camPenalty', 4), new ReplicationFieldMetaData('camLct', -5), new ReplicationFieldMetaData('camUid', -5)]), listOf([new ReplicationFieldMetaData('camPk', -5), new ReplicationFieldMetaData('camVersionId', -5), new ReplicationFieldMetaData('camDestination', -5), new ReplicationFieldMetaData('camPending', 16)]), null, null, null, 1000)), to(678, new ReplicationEntityMetaData(678, 100, 'PersonAuth2', 'PersonAuth2Replicate', 'PersonAuth2_ReceiveView', 'pauthUid', 'pauthLct', 'paPk', 'paDestination', 'paVersionId', 'paPending', listOf([new ReplicationFieldMetaData('pauthUid', -5), new ReplicationFieldMetaData('pauthMechanism', -1), new ReplicationFieldMetaData('pauthAuth', -1), new ReplicationFieldMetaData('pauthLcsn', -5), new ReplicationFieldMetaData('pauthPcsn', -5), new ReplicationFieldMetaData('pauthLcb', -5), new ReplicationFieldMetaData('pauthLct', -5)]), listOf([new ReplicationFieldMetaData('paPk', -5), new ReplicationFieldMetaData('paVersionId', -5), new ReplicationFieldMetaData('paDestination', -5), new ReplicationFieldMetaData('paPending', 16)]), null, null, null, 1000)), to(679, new ReplicationEntityMetaData(679, 0, 'UserSession', 'UserSessionReplicate', 'UserSession_ReceiveView', 'usUid', 'usLct', 'usPk', 'usDestination', 'usVersionId', 'usPending', listOf([new ReplicationFieldMetaData('usPcsn', -5), new ReplicationFieldMetaData('usLcsn', -5), new ReplicationFieldMetaData('usLcb', 4), new ReplicationFieldMetaData('usLct', -5), new ReplicationFieldMetaData('usPersonUid', -5), new ReplicationFieldMetaData('usClientNodeId', -5), new ReplicationFieldMetaData('usStartTime', -5), new ReplicationFieldMetaData('usEndTime', -5), new ReplicationFieldMetaData('usStatus', 4), new ReplicationFieldMetaData('usReason', 4), new ReplicationFieldMetaData('usAuth', -1), new ReplicationFieldMetaData('usSessionType', 4), new ReplicationFieldMetaData('usUid', -5)]), listOf([new ReplicationFieldMetaData('usPk', -5), new ReplicationFieldMetaData('usVersionId', -5), new ReplicationFieldMetaData('usDestination', -5), new ReplicationFieldMetaData('usPending', 16)]), null, null, null, 1000)), to(124, new ReplicationEntityMetaData(124, 100, 'CourseBlock', 'CourseBlockReplicate', 'CourseBlock_ReceiveView', 'cbUid', 'cbLct', 'cbPk', 'cbDestination', 'cbVersionId', 'cbPending', listOf([new ReplicationFieldMetaData('cbType', 4), new ReplicationFieldMetaData('cbIndentLevel', 4), new ReplicationFieldMetaData('cbModuleParentBlockUid', -5), new ReplicationFieldMetaData('cbTitle', -1), new ReplicationFieldMetaData('cbDescription', -1), new ReplicationFieldMetaData('cbCompletionCriteria', 4), new ReplicationFieldMetaData('cbHideUntilDate', -5), new ReplicationFieldMetaData('cbDeadlineDate', -5), new ReplicationFieldMetaData('cbLateSubmissionPenalty', 4), new ReplicationFieldMetaData('cbGracePeriodDate', -5), new ReplicationFieldMetaData('cbMaxPoints', 4), new ReplicationFieldMetaData('cbMinPoints', 4), new ReplicationFieldMetaData('cbIndex', 4), new ReplicationFieldMetaData('cbClazzUid', -5), new ReplicationFieldMetaData('cbActive', 16), new ReplicationFieldMetaData('cbHidden', 16), new ReplicationFieldMetaData('cbEntityUid', -5), new ReplicationFieldMetaData('cbLct', -5), new ReplicationFieldMetaData('cbUid', -5)]), listOf([new ReplicationFieldMetaData('cbPk', -5), new ReplicationFieldMetaData('cbVersionId', -5), new ReplicationFieldMetaData('cbDestination', -5), new ReplicationFieldMetaData('cbPending', 16)]), null, null, null, 1000)), to(450, new ReplicationEntityMetaData(450, 100, 'CourseTerminology', 'CourseTerminologyReplicate', 'CourseTerminology_ReceiveView', 'ctUid', 'ctLct', 'ctPk', 'ctDestination', 'ctVersionId', 'ctPending', listOf([new ReplicationFieldMetaData('ctTitle', -1), new ReplicationFieldMetaData('ctTerminology', -1), new ReplicationFieldMetaData('ctLct', -5), new ReplicationFieldMetaData('ctUid', -5)]), listOf([new ReplicationFieldMetaData('ctPk', -5), new ReplicationFieldMetaData('ctVersionId', -5), new ReplicationFieldMetaData('ctDestination', -5), new ReplicationFieldMetaData('ctPending', 16)]), null, null, null, 1000)), to(242, new ReplicationEntityMetaData(242, 100, 'CourseGroupSet', 'CourseGroupSetReplicate', 'CourseGroupSet_ReceiveView', 'cgsUid', 'cgsLct', 'cgsPk', 'cgsDestination', 'cgsVersionId', 'cgsPending', listOf([new ReplicationFieldMetaData('cgsName', -1), new ReplicationFieldMetaData('cgsTotalGroups', 4), new ReplicationFieldMetaData('cgsActive', 16), new ReplicationFieldMetaData('cgsClazzUid', -5), new ReplicationFieldMetaData('cgsLct', -5), new ReplicationFieldMetaData('cgsUid', -5)]), listOf([new ReplicationFieldMetaData('cgsPk', -5), new ReplicationFieldMetaData('cgsVersionId', -5), new ReplicationFieldMetaData('cgsDestination', -5), new ReplicationFieldMetaData('cgsPending', 16)]), null, null, null, 1000)), to(243, new ReplicationEntityMetaData(243, 100, 'CourseGroupMember', 'CourseGroupMemberReplicate', 'CourseGroupMember_ReceiveView', 'cgmUid', 'cgmLct', 'cgmPk', 'cgmDestination', 'cgmVersionId', 'cgmPending', listOf([new ReplicationFieldMetaData('cgmSetUid', -5), new ReplicationFieldMetaData('cgmGroupNumber', 4), new ReplicationFieldMetaData('cgmPersonUid', -5), new ReplicationFieldMetaData('cgmLct', -5), new ReplicationFieldMetaData('cgmUid', -5)]), listOf([new ReplicationFieldMetaData('cgmPk', -5), new ReplicationFieldMetaData('cgmVersionId', -5), new ReplicationFieldMetaData('cgmDestination', -5), new ReplicationFieldMetaData('cgmPending', 16)]), null, null, null, 1000)), to(125, new ReplicationEntityMetaData(125, 100, 'CoursePicture', 'CoursePictureReplicate', 'CoursePicture_ReceiveView', 'coursePictureUid', 'coursePictureLct', 'cpPk', 'cpDestination', 'cpVersionId', 'cpPending', listOf([new ReplicationFieldMetaData('coursePictureClazzUid', -5), new ReplicationFieldMetaData('coursePictureMasterCsn', -5), new ReplicationFieldMetaData('coursePictureLocalCsn', -5), new ReplicationFieldMetaData('coursePictureLastChangedBy', 4), new ReplicationFieldMetaData('coursePictureLct', -5), new ReplicationFieldMetaData('coursePictureUri', -1), new ReplicationFieldMetaData('coursePictureMd5', -1), new ReplicationFieldMetaData('coursePictureFileSize', 4), new ReplicationFieldMetaData('coursePictureTimestamp', -5), new ReplicationFieldMetaData('coursePictureMimeType', -1), new ReplicationFieldMetaData('coursePictureActive', 16), new ReplicationFieldMetaData('coursePictureUid', -5)]), listOf([new ReplicationFieldMetaData('cpPk', -5), new ReplicationFieldMetaData('cpVersionId', -5), new ReplicationFieldMetaData('cpDestination', -5), new ReplicationFieldMetaData('cpPending', 16)]), 'coursePictureUri', 'coursePictureMd5', 'coursePictureFileSize', 1000)), to(138, new ReplicationEntityMetaData(138, 100, 'ContentEntryPicture', 'ContentEntryPictureReplicate', 'ContentEntryPicture_ReceiveView', 'cepUid', 'cepTimestamp', 'cepPk', 'cepDestination', 'cepVersionId', 'cepPending', listOf([new ReplicationFieldMetaData('cepContentEntryUid', -5), new ReplicationFieldMetaData('cepUri', -1), new ReplicationFieldMetaData('cepMd5', -1), new ReplicationFieldMetaData('cepFileSize', 4), new ReplicationFieldMetaData('cepTimestamp', -5), new ReplicationFieldMetaData('cepMimeType', -1), new ReplicationFieldMetaData('cepActive', 16), new ReplicationFieldMetaData('cepUid', -5)]), listOf([new ReplicationFieldMetaData('cepPk', -5), new ReplicationFieldMetaData('cepVersionId', -5), new ReplicationFieldMetaData('cepDestination', -5), new ReplicationFieldMetaData('cepPending', 16)]), 'cepUri', 'cepMd5', 'cepFileSize', 1000)), to(127, new ReplicationEntityMetaData(127, 0, 'Chat', 'ChatReplicate', 'Chat_ReceiveView', 'chatUid', 'chatLct', 'chatPk', 'chatDestination', 'chatVersionId', 'chatPending', listOf([new ReplicationFieldMetaData('chatStartDate', -5), new ReplicationFieldMetaData('chatTitle', -1), new ReplicationFieldMetaData('chatGroup', 16), new ReplicationFieldMetaData('chatLct', -5), new ReplicationFieldMetaData('chatUid', -5)]), listOf([new ReplicationFieldMetaData('chatPk', -5), new ReplicationFieldMetaData('chatVersionId', -5), new ReplicationFieldMetaData('chatDestination', -5), new ReplicationFieldMetaData('chatPending', 16)]), null, null, null, 1000)), to(128, new ReplicationEntityMetaData(128, 0, 'ChatMember', 'ChatMemberReplicate', 'ChatMember_ReceiveView', 'chatMemberUid', 'chatMemberLct', 'chatMemberPk', 'chatMemberDestination', 'chatMemberVersionId', 'chatMemberPending', listOf([new ReplicationFieldMetaData('chatMemberChatUid', -5), new ReplicationFieldMetaData('chatMemberPersonUid', -5), new ReplicationFieldMetaData('chatMemberJoinedDate', -5), new ReplicationFieldMetaData('chatMemberLeftDate', -5), new ReplicationFieldMetaData('chatMemberLct', -5), new ReplicationFieldMetaData('chatMemberUid', -5)]), listOf([new ReplicationFieldMetaData('chatMemberPk', -5), new ReplicationFieldMetaData('chatMemberVersionId', -5), new ReplicationFieldMetaData('chatMemberDestination', -5), new ReplicationFieldMetaData('chatMemberPending', 16)]), null, null, null, 1000)), to(126, new ReplicationEntityMetaData(126, 100, 'Message', 'MessageReplicate', 'Message_ReceiveView', 'messageUid', 'messageLct', 'messagePk', 'messageDestination', 'messageVersionId', 'messagePending', listOf([new ReplicationFieldMetaData('messageSenderPersonUid', -5), new ReplicationFieldMetaData('messageTableId', 4), new ReplicationFieldMetaData('messageEntityUid', -5), new ReplicationFieldMetaData('messageText', -1), new ReplicationFieldMetaData('messageTimestamp', -5), new ReplicationFieldMetaData('messageClazzUid', -5), new ReplicationFieldMetaData('messageLct', -5), new ReplicationFieldMetaData('messageUid', -5)]), listOf([new ReplicationFieldMetaData('messagePk', -5), new ReplicationFieldMetaData('messageVersionId', -5), new ReplicationFieldMetaData('messageDestination', -5), new ReplicationFieldMetaData('messagePending', 16)]), null, null, null, 1000)), to(129, new ReplicationEntityMetaData(129, 100, 'MessageRead', 'MessageReadReplicate', 'MessageRead_ReceiveView', 'messageReadUid', 'messageReadLct', 'messageReadPk', 'messageReadDestination', 'messageReadVersionId', 'messageReadPending', listOf([new ReplicationFieldMetaData('messageReadPersonUid', -5), new ReplicationFieldMetaData('messageReadMessageUid', -5), new ReplicationFieldMetaData('messageReadEntityUid', -5), new ReplicationFieldMetaData('messageReadLct', -5), new ReplicationFieldMetaData('messageReadUid', -5)]), listOf([new ReplicationFieldMetaData('messageReadPk', -5), new ReplicationFieldMetaData('messageReadVersionId', -5), new ReplicationFieldMetaData('messageReadDestination', -5), new ReplicationFieldMetaData('messageReadPending', 16)]), null, null, null, 1000)), to(130, new ReplicationEntityMetaData(130, 100, 'CourseDiscussion', 'CourseDiscussionReplicate', 'CourseDiscussion_ReceiveView', 'courseDiscussionUid', 'courseDiscussionLct', 'courseDiscussionPk', 'courseDiscussionDestination', 'courseDiscussionVersionId', 'courseDiscussionPending', listOf([new ReplicationFieldMetaData('courseDiscussionTitle', -1), new ReplicationFieldMetaData('courseDiscussionDesc', -1), new ReplicationFieldMetaData('courseDiscussionClazzUid', -5), new ReplicationFieldMetaData('courseDiscussionActive', 16), new ReplicationFieldMetaData('courseDiscussionLct', -5), new ReplicationFieldMetaData('courseDiscussionUid', -5)]), listOf([new ReplicationFieldMetaData('courseDiscussionPk', -5), new ReplicationFieldMetaData('courseDiscussionVersionId', -5), new ReplicationFieldMetaData('courseDiscussionDestination', -5), new ReplicationFieldMetaData('courseDiscussionPending', 16)]), null, null, null, 1000)), to(131, new ReplicationEntityMetaData(131, 100, 'DiscussionTopic', 'DiscussionTopicReplicate', 'DiscussionTopic_ReceiveView', 'discussionTopicUid', 'discussionTopicLct', 'discussionTopicPk', 'discussionTopicDestination', 'discussionTopicVersionId', 'discussionTopicPending', listOf([new ReplicationFieldMetaData('discussionTopicTitle', -1), new ReplicationFieldMetaData('discussionTopicDesc', -1), new ReplicationFieldMetaData('discussionTopicStartDate', -5), new ReplicationFieldMetaData('discussionTopicCourseDiscussionUid', -5), new ReplicationFieldMetaData('discussionTopicVisible', 16), new ReplicationFieldMetaData('discussionTopicArchive', 16), new ReplicationFieldMetaData('discussionTopicIndex', 4), new ReplicationFieldMetaData('discussionTopicClazzUid', -5), new ReplicationFieldMetaData('discussionTopicLct', -5), new ReplicationFieldMetaData('discussionTopicUid', -5)]), listOf([new ReplicationFieldMetaData('discussionTopicPk', -5), new ReplicationFieldMetaData('discussionTopicVersionId', -5), new ReplicationFieldMetaData('discussionTopicDestination', -5), new ReplicationFieldMetaData('discussionTopicPending', 16)]), null, null, null, 1000)), to(132, new ReplicationEntityMetaData(132, 100, 'DiscussionPost', 'DiscussionPostReplicate', 'DiscussionPost_ReceiveView', 'discussionPostUid', 'discussionPostLct', 'discussionPostPk', 'discussionPostDestination', 'discussionPostVersionId', 'discussionPostPending', listOf([new ReplicationFieldMetaData('discussionPostTitle', -1), new ReplicationFieldMetaData('discussionPostMessage', -1), new ReplicationFieldMetaData('discussionPostStartDate', -5), new ReplicationFieldMetaData('discussionPostDiscussionTopicUid', -5), new ReplicationFieldMetaData('discussionPostVisible', 16), new ReplicationFieldMetaData('discussionPostArchive', 16), new ReplicationFieldMetaData('discussionPostStartedPersonUid', -5), new ReplicationFieldMetaData('discussionPostClazzUid', -5), new ReplicationFieldMetaData('discussionPostLct', -5), new ReplicationFieldMetaData('discussionPostUid', -5)]), listOf([new ReplicationFieldMetaData('discussionPostPk', -5), new ReplicationFieldMetaData('discussionPostVersionId', -5), new ReplicationFieldMetaData('discussionPostDestination', -5), new ReplicationFieldMetaData('discussionPostPending', 16)]), null, null, null, 1000))]); } UmAppDatabase_DoorMetadata.$metadata$ = {kind: Kind_CLASS, simpleName: 'UmAppDatabase_DoorMetadata', interfaces: [DoorDatabaseMetadata]}; function UmAppDatabase_JdbcKt(doorJdbcSourceDatabase, dataSource, dbName, realAttachmentFilters, jdbcQueryTimeout, jdbcDbType) { UmAppDatabase.call(this); this.doorJdbcSourceDatabase_bt2m6l$_0 = doorJdbcSourceDatabase; this.dataSource_sv708p$_0 = dataSource; this.dbName_gan2df$_0 = dbName; this.realAttachmentFilters_2an2a6$_0 = realAttachmentFilters; this.jdbcQueryTimeout_8tsw54$_0 = jdbcQueryTimeout; this.jdbcImplHelper_hbcd5v$_0 = new RoomDatabaseJdbcImplHelper(this.dataSource, this, doorDatabaseMetadata(Kotlin.getKClassFromExpression(this)).allTables, new InvalidationTracker(copyToArray(doorDatabaseMetadata(Kotlin.getKClassFromExpression(this)).allTables).slice()), jdbcDbType); this.realAttachmentStorageUri_9ktfae$_0 = null; this.realReplicationNotificationDispatcher_205h14$_0 = lazy_0(UmAppDatabase_JdbcKt$realReplicationNotificationDispatcher$lambda(this)); var tmp$; if (equals(this, get_rootDatabase(this))) { tmp$ = new DeleteZombieAttachmentsListener(this); } else { tmp$ = null; } this._deleteZombieAttachmentsListener_0 = tmp$; this.realIncomingReplicationListenerHelper_iyxd1e$_0 = new IncomingReplicationListenerHelper(); this.realNodeIdAuthCache_xrrr9l$_0 = lazy_0(UmAppDatabase_JdbcKt$realNodeIdAuthCache$lambda(this)); this.realPrimaryKeyManager_iue8ui$_0 = lazy_0(UmAppDatabase_JdbcKt$realPrimaryKeyManager$lambda); this._NetworkNodeDao_3oxnq1$_0 = lazy_0(UmAppDatabase_JdbcKt$_NetworkNodeDao$lambda(this)); this._PersonDao_k7x8oe$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonDao$lambda(this)); this._ClazzDao_3jk0dr$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzDao$lambda(this)); this._CourseBlockDao_2gjouh$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseBlockDao$lambda(this)); this._CourseTerminologyDao_45h00h$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseTerminologyDao$lambda(this)); this._CourseGroupSetDao_d461hl$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseGroupSetDao$lambda(this)); this._CourseGroupMemberDao_f2mrkb$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseGroupMemberDao$lambda(this)); this._ClazzEnrolmentDao_4bba63$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzEnrolmentDao$lambda(this)); this._LeavingReasonDao_dar3v5$_0 = lazy_0(UmAppDatabase_JdbcKt$_LeavingReasonDao$lambda(this)); this._ContentEntryDao_9nbtke$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentEntryDao$lambda(this)); this._ContentEntryContentCategoryJoinDao_2aqtq9$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentEntryContentCategoryJoinDao$lambda(this)); this._ContentEntryParentChildJoinDao_tr06be$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentEntryParentChildJoinDao$lambda(this)); this._ContentEntryRelatedEntryJoinDao_hyl14z$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentEntryRelatedEntryJoinDao$lambda(this)); this._ClazzContentJoinDao_tcg5t0$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzContentJoinDao$lambda(this)); this._ContentCategorySchemaDao_a6b1ap$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentCategorySchemaDao$lambda(this)); this._ContentCategoryDao_605o8e$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentCategoryDao$lambda(this)); this._LanguageDao_nmss4x$_0 = lazy_0(UmAppDatabase_JdbcKt$_LanguageDao$lambda(this)); this._LanguageVariantDao_44u5pg$_0 = lazy_0(UmAppDatabase_JdbcKt$_LanguageVariantDao$lambda(this)); this._ScrapeQueueItemDao_7pv1vr$_0 = lazy_0(UmAppDatabase_JdbcKt$_ScrapeQueueItemDao$lambda(this)); this._PersonAuthDao_7soik6$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonAuthDao$lambda(this)); this._PersonGroupDao_jo1o5b$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonGroupDao$lambda(this)); this._PersonGroupMemberDao_swianv$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonGroupMemberDao$lambda(this)); this._EntityRoleDao_flwn1q$_0 = lazy_0(UmAppDatabase_JdbcKt$_EntityRoleDao$lambda(this)); this._PersonPictureDao_wwh6o0$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonPictureDao$lambda(this)); this._ConnectivityStatusDao_kxoa8y$_0 = lazy_0(UmAppDatabase_JdbcKt$_ConnectivityStatusDao$lambda(this)); this._ContainerDao_8y171k$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContainerDao$lambda(this)); this._ContainerEntryDao_2k8qly$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContainerEntryDao$lambda(this)); this._ContainerEntryFileDao_j7lyp2$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContainerEntryFileDao$lambda(this)); this._ContainerETagDao_aj6yxf$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContainerETagDao$lambda(this)); this._VerbDao_ut1ars$_0 = lazy_0(UmAppDatabase_JdbcKt$_VerbDao$lambda(this)); this._XObjectDao_uyivji$_0 = lazy_0(UmAppDatabase_JdbcKt$_XObjectDao$lambda(this)); this._ReportDao_u3d377$_0 = lazy_0(UmAppDatabase_JdbcKt$_ReportDao$lambda(this)); this._ContainerImportJobDao_87ws0$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContainerImportJobDao$lambda(this)); this._StatementDao_yqx14q$_0 = lazy_0(UmAppDatabase_JdbcKt$_StatementDao$lambda(this)); this._ContextXObjectStatementJoinDao_mwkbi0$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContextXObjectStatementJoinDao$lambda(this)); this._StateDao_y7psns$_0 = lazy_0(UmAppDatabase_JdbcKt$_StateDao$lambda(this)); this._StateContentDao_y2yl6n$_0 = lazy_0(UmAppDatabase_JdbcKt$_StateContentDao$lambda(this)); this._AgentDao_ruleqs$_0 = lazy_0(UmAppDatabase_JdbcKt$_AgentDao$lambda(this)); this._LearnerGroupDao_b0g40p$_0 = lazy_0(UmAppDatabase_JdbcKt$_LearnerGroupDao$lambda(this)); this._LearnerGroupMemberDao_mag2e9$_0 = lazy_0(UmAppDatabase_JdbcKt$_LearnerGroupMemberDao$lambda(this)); this._GroupLearningSessionDao_m33w7i$_0 = lazy_0(UmAppDatabase_JdbcKt$_GroupLearningSessionDao$lambda(this)); this._ClazzLogAttendanceRecordDao_ap5hnj$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzLogAttendanceRecordDao$lambda(this)); this._ClazzLogDao_e1mhp7$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzLogDao$lambda(this)); this._ScheduleDao_6f1hrk$_0 = lazy_0(UmAppDatabase_JdbcKt$_ScheduleDao$lambda(this)); this._HolidayCalendarDao_uwm5jh$_0 = lazy_0(UmAppDatabase_JdbcKt$_HolidayCalendarDao$lambda(this)); this._HolidayDao_bvaw29$_0 = lazy_0(UmAppDatabase_JdbcKt$_HolidayDao$lambda(this)); this._SchoolDao_7eo53h$_0 = lazy_0(UmAppDatabase_JdbcKt$_SchoolDao$lambda(this)); this._XLangMapEntryDao_h0gfv1$_0 = lazy_0(UmAppDatabase_JdbcKt$_XLangMapEntryDao$lambda(this)); this._LocallyAvailableContainerDao_7wf02v$_0 = lazy_0(UmAppDatabase_JdbcKt$_LocallyAvailableContainerDao$lambda(this)); this._SchoolMemberDao_2tq407$_0 = lazy_0(UmAppDatabase_JdbcKt$_SchoolMemberDao$lambda(this)); this._ClazzAssignmentDao_3ggsx0$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzAssignmentDao$lambda(this)); this._ClazzAssignmentContentJoinDao_u85dhz$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzAssignmentContentJoinDao$lambda(this)); this._ClazzAssignmentRollUpDao_idjn7w$_0 = lazy_0(UmAppDatabase_JdbcKt$_ClazzAssignmentRollUpDao$lambda(this)); this._CourseAssignmentSubmissionDao_lzd959$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseAssignmentSubmissionDao$lambda(this)); this._CourseAssignmentSubmissionAttachmentDao_kk6as0$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseAssignmentSubmissionAttachmentDao$lambda(this)); this._CourseAssignmentMarkDao_bcqoqa$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseAssignmentMarkDao$lambda(this)); this._CommentsDao_n8pvx$_0 = lazy_0(UmAppDatabase_JdbcKt$_CommentsDao$lambda(this)); this._SyncNodeDao_gj1sd2$_0 = lazy_0(UmAppDatabase_JdbcKt$_SyncNodeDao$lambda(this)); this._SiteDao_dgj3hc$_0 = lazy_0(UmAppDatabase_JdbcKt$_SiteDao$lambda(this)); this._SiteTermsDao_z71e95$_0 = lazy_0(UmAppDatabase_JdbcKt$_SiteTermsDao$lambda(this)); this._PersonParentJoinDao_jpqxfm$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonParentJoinDao$lambda(this)); this._ScopedGrantDao_c5bgvx$_0 = lazy_0(UmAppDatabase_JdbcKt$_ScopedGrantDao$lambda(this)); this._ErrorReportDao_fhjgp9$_0 = lazy_0(UmAppDatabase_JdbcKt$_ErrorReportDao$lambda(this)); this._PersonAuth2Dao_sbcr2k$_0 = lazy_0(UmAppDatabase_JdbcKt$_PersonAuth2Dao$lambda(this)); this._UserSessionDao_u3lyxu$_0 = lazy_0(UmAppDatabase_JdbcKt$_UserSessionDao$lambda(this)); this._ContentJobItemDao_wk14ls$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentJobItemDao$lambda(this)); this._ContentJobDao_otp6eb$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentJobDao$lambda(this)); this._CoursePictureDao_8lofba$_0 = lazy_0(UmAppDatabase_JdbcKt$_CoursePictureDao$lambda(this)); this._ContentEntryPictureDao_h75b18$_0 = lazy_0(UmAppDatabase_JdbcKt$_ContentEntryPictureDao$lambda(this)); this._ChatDao_q2bpip$_0 = lazy_0(UmAppDatabase_JdbcKt$_ChatDao$lambda(this)); this._ChatMemberDao_msanf9$_0 = lazy_0(UmAppDatabase_JdbcKt$_ChatMemberDao$lambda(this)); this._MessageDao_jfy3z6$_0 = lazy_0(UmAppDatabase_JdbcKt$_MessageDao$lambda(this)); this._MessageReadDao_2blgx8$_0 = lazy_0(UmAppDatabase_JdbcKt$_MessageReadDao$lambda(this)); this._CourseDiscussionDao_cb20xo$_0 = lazy_0(UmAppDatabase_JdbcKt$_CourseDiscussionDao$lambda(this)); this._DiscussionTopicDao_5a2pfi$_0 = lazy_0(UmAppDatabase_JdbcKt$_DiscussionTopicDao$lambda(this)); this._DiscussionPostDao_siiczl$_0 = lazy_0(UmAppDatabase_JdbcKt$_DiscussionPostDao$lambda(this)); } Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'doorJdbcSourceDatabase', {get: function () { return this.doorJdbcSourceDatabase_bt2m6l$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'dataSource', {get: function () { return this.dataSource_sv708p$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'dbName', {get: function () { return this.dbName_gan2df$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'realAttachmentFilters', {get: function () { return this.realAttachmentFilters_2an2a6$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'jdbcQueryTimeout', {get: function () { return this.jdbcQueryTimeout_8tsw54$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'dbVersion', {configurable: true, get: function () { return 107; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'jdbcImplHelper', {configurable: true, get: function () { return this.jdbcImplHelper_hbcd5v$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'realAttachmentStorageUri', {configurable: true, get: function () { return this.realAttachmentStorageUri_9ktfae$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'realReplicationNotificationDispatcher', {configurable: true, get: function () { return this.realReplicationNotificationDispatcher_205h14$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'realIncomingReplicationListenerHelper', {configurable: true, get: function () { return this.realIncomingReplicationListenerHelper_iyxd1e$_0; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'realNodeIdAuthCache', {configurable: true, get: function () { return this.realNodeIdAuthCache_xrrr9l$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'realPrimaryKeyManager', {configurable: true, get: function () { return this.realPrimaryKeyManager_iue8ui$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_NetworkNodeDao', {configurable: true, get: function () { return this._NetworkNodeDao_3oxnq1$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'networkNodeDao', {configurable: true, get: function () { return this._NetworkNodeDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonDao', {configurable: true, get: function () { return this._PersonDao_k7x8oe$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personDao', {configurable: true, get: function () { return this._PersonDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzDao', {configurable: true, get: function () { return this._ClazzDao_3jk0dr$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzDao', {configurable: true, get: function () { return this._ClazzDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseBlockDao', {configurable: true, get: function () { return this._CourseBlockDao_2gjouh$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseBlockDao', {configurable: true, get: function () { return this._CourseBlockDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseTerminologyDao', {configurable: true, get: function () { return this._CourseTerminologyDao_45h00h$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseTerminologyDao', {configurable: true, get: function () { return this._CourseTerminologyDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseGroupSetDao', {configurable: true, get: function () { return this._CourseGroupSetDao_d461hl$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseGroupSetDao', {configurable: true, get: function () { return this._CourseGroupSetDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseGroupMemberDao', {configurable: true, get: function () { return this._CourseGroupMemberDao_f2mrkb$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseGroupMemberDao', {configurable: true, get: function () { return this._CourseGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzEnrolmentDao', {configurable: true, get: function () { return this._ClazzEnrolmentDao_4bba63$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzEnrolmentDao', {configurable: true, get: function () { return this._ClazzEnrolmentDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_LeavingReasonDao', {configurable: true, get: function () { return this._LeavingReasonDao_dar3v5$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'leavingReasonDao', {configurable: true, get: function () { return this._LeavingReasonDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentEntryDao', {configurable: true, get: function () { return this._ContentEntryDao_9nbtke$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentEntryDao', {configurable: true, get: function () { return this._ContentEntryDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentEntryContentCategoryJoinDao', {configurable: true, get: function () { return this._ContentEntryContentCategoryJoinDao_2aqtq9$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentEntryContentCategoryJoinDao', {configurable: true, get: function () { return this._ContentEntryContentCategoryJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentEntryParentChildJoinDao', {configurable: true, get: function () { return this._ContentEntryParentChildJoinDao_tr06be$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentEntryParentChildJoinDao', {configurable: true, get: function () { return this._ContentEntryParentChildJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentEntryRelatedEntryJoinDao', {configurable: true, get: function () { return this._ContentEntryRelatedEntryJoinDao_hyl14z$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentEntryRelatedEntryJoinDao', {configurable: true, get: function () { return this._ContentEntryRelatedEntryJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzContentJoinDao', {configurable: true, get: function () { return this._ClazzContentJoinDao_tcg5t0$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzContentJoinDao', {configurable: true, get: function () { return this._ClazzContentJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentCategorySchemaDao', {configurable: true, get: function () { return this._ContentCategorySchemaDao_a6b1ap$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentCategorySchemaDao', {configurable: true, get: function () { return this._ContentCategorySchemaDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentCategoryDao', {configurable: true, get: function () { return this._ContentCategoryDao_605o8e$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentCategoryDao', {configurable: true, get: function () { return this._ContentCategoryDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_LanguageDao', {configurable: true, get: function () { return this._LanguageDao_nmss4x$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'languageDao', {configurable: true, get: function () { return this._LanguageDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_LanguageVariantDao', {configurable: true, get: function () { return this._LanguageVariantDao_44u5pg$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'languageVariantDao', {configurable: true, get: function () { return this._LanguageVariantDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ScrapeQueueItemDao', {configurable: true, get: function () { return this._ScrapeQueueItemDao_7pv1vr$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'scrapeQueueItemDao', {configurable: true, get: function () { return this._ScrapeQueueItemDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonAuthDao', {configurable: true, get: function () { return this._PersonAuthDao_7soik6$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personAuthDao', {configurable: true, get: function () { return this._PersonAuthDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonGroupDao', {configurable: true, get: function () { return this._PersonGroupDao_jo1o5b$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personGroupDao', {configurable: true, get: function () { return this._PersonGroupDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonGroupMemberDao', {configurable: true, get: function () { return this._PersonGroupMemberDao_swianv$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personGroupMemberDao', {configurable: true, get: function () { return this._PersonGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_EntityRoleDao', {configurable: true, get: function () { return this._EntityRoleDao_flwn1q$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'entityRoleDao', {configurable: true, get: function () { return this._EntityRoleDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonPictureDao', {configurable: true, get: function () { return this._PersonPictureDao_wwh6o0$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personPictureDao', {configurable: true, get: function () { return this._PersonPictureDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ConnectivityStatusDao', {configurable: true, get: function () { return this._ConnectivityStatusDao_kxoa8y$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'connectivityStatusDao', {configurable: true, get: function () { return this._ConnectivityStatusDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContainerDao', {configurable: true, get: function () { return this._ContainerDao_8y171k$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'containerDao', {configurable: true, get: function () { return this._ContainerDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContainerEntryDao', {configurable: true, get: function () { return this._ContainerEntryDao_2k8qly$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'containerEntryDao', {configurable: true, get: function () { return this._ContainerEntryDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContainerEntryFileDao', {configurable: true, get: function () { return this._ContainerEntryFileDao_j7lyp2$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'containerEntryFileDao', {configurable: true, get: function () { return this._ContainerEntryFileDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContainerETagDao', {configurable: true, get: function () { return this._ContainerETagDao_aj6yxf$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'containerETagDao', {configurable: true, get: function () { return this._ContainerETagDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_VerbDao', {configurable: true, get: function () { return this._VerbDao_ut1ars$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'verbDao', {configurable: true, get: function () { return this._VerbDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_XObjectDao', {configurable: true, get: function () { return this._XObjectDao_uyivji$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'xObjectDao', {configurable: true, get: function () { return this._XObjectDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ReportDao', {configurable: true, get: function () { return this._ReportDao_u3d377$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'reportDao', {configurable: true, get: function () { return this._ReportDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContainerImportJobDao', {configurable: true, get: function () { return this._ContainerImportJobDao_87ws0$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'containerImportJobDao', {configurable: true, get: function () { return this._ContainerImportJobDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_StatementDao', {configurable: true, get: function () { return this._StatementDao_yqx14q$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'statementDao', {configurable: true, get: function () { return this._StatementDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContextXObjectStatementJoinDao', {configurable: true, get: function () { return this._ContextXObjectStatementJoinDao_mwkbi0$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contextXObjectStatementJoinDao', {configurable: true, get: function () { return this._ContextXObjectStatementJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_StateDao', {configurable: true, get: function () { return this._StateDao_y7psns$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'stateDao', {configurable: true, get: function () { return this._StateDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_StateContentDao', {configurable: true, get: function () { return this._StateContentDao_y2yl6n$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'stateContentDao', {configurable: true, get: function () { return this._StateContentDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_AgentDao', {configurable: true, get: function () { return this._AgentDao_ruleqs$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'agentDao', {configurable: true, get: function () { return this._AgentDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_LearnerGroupDao', {configurable: true, get: function () { return this._LearnerGroupDao_b0g40p$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'learnerGroupDao', {configurable: true, get: function () { return this._LearnerGroupDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_LearnerGroupMemberDao', {configurable: true, get: function () { return this._LearnerGroupMemberDao_mag2e9$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'learnerGroupMemberDao', {configurable: true, get: function () { return this._LearnerGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_GroupLearningSessionDao', {configurable: true, get: function () { return this._GroupLearningSessionDao_m33w7i$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'groupLearningSessionDao', {configurable: true, get: function () { return this._GroupLearningSessionDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzLogAttendanceRecordDao', {configurable: true, get: function () { return this._ClazzLogAttendanceRecordDao_ap5hnj$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzLogAttendanceRecordDao', {configurable: true, get: function () { return this._ClazzLogAttendanceRecordDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzLogDao', {configurable: true, get: function () { return this._ClazzLogDao_e1mhp7$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzLogDao', {configurable: true, get: function () { return this._ClazzLogDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ScheduleDao', {configurable: true, get: function () { return this._ScheduleDao_6f1hrk$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'scheduleDao', {configurable: true, get: function () { return this._ScheduleDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_HolidayCalendarDao', {configurable: true, get: function () { return this._HolidayCalendarDao_uwm5jh$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'holidayCalendarDao', {configurable: true, get: function () { return this._HolidayCalendarDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_HolidayDao', {configurable: true, get: function () { return this._HolidayDao_bvaw29$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'holidayDao', {configurable: true, get: function () { return this._HolidayDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_SchoolDao', {configurable: true, get: function () { return this._SchoolDao_7eo53h$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'schoolDao', {configurable: true, get: function () { return this._SchoolDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_XLangMapEntryDao', {configurable: true, get: function () { return this._XLangMapEntryDao_h0gfv1$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'xLangMapEntryDao', {configurable: true, get: function () { return this._XLangMapEntryDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_LocallyAvailableContainerDao', {configurable: true, get: function () { return this._LocallyAvailableContainerDao_7wf02v$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'locallyAvailableContainerDao', {configurable: true, get: function () { return this._LocallyAvailableContainerDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_SchoolMemberDao', {configurable: true, get: function () { return this._SchoolMemberDao_2tq407$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'schoolMemberDao', {configurable: true, get: function () { return this._SchoolMemberDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzAssignmentDao', {configurable: true, get: function () { return this._ClazzAssignmentDao_3ggsx0$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzAssignmentDao', {configurable: true, get: function () { return this._ClazzAssignmentDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzAssignmentContentJoinDao', {configurable: true, get: function () { return this._ClazzAssignmentContentJoinDao_u85dhz$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzAssignmentContentJoinDao', {configurable: true, get: function () { return this._ClazzAssignmentContentJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ClazzAssignmentRollUpDao', {configurable: true, get: function () { return this._ClazzAssignmentRollUpDao_idjn7w$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'clazzAssignmentRollUpDao', {configurable: true, get: function () { return this._ClazzAssignmentRollUpDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseAssignmentSubmissionDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionDao_lzd959$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseAssignmentSubmissionDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseAssignmentSubmissionAttachmentDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionAttachmentDao_kk6as0$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseAssignmentSubmissionAttachmentDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionAttachmentDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseAssignmentMarkDao', {configurable: true, get: function () { return this._CourseAssignmentMarkDao_bcqoqa$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseAssignmentMarkDao', {configurable: true, get: function () { return this._CourseAssignmentMarkDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CommentsDao', {configurable: true, get: function () { return this._CommentsDao_n8pvx$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'commentsDao', {configurable: true, get: function () { return this._CommentsDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_SyncNodeDao', {configurable: true, get: function () { return this._SyncNodeDao_gj1sd2$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'syncNodeDao', {configurable: true, get: function () { return this._SyncNodeDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_SiteDao', {configurable: true, get: function () { return this._SiteDao_dgj3hc$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'siteDao', {configurable: true, get: function () { return this._SiteDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_SiteTermsDao', {configurable: true, get: function () { return this._SiteTermsDao_z71e95$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'siteTermsDao', {configurable: true, get: function () { return this._SiteTermsDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonParentJoinDao', {configurable: true, get: function () { return this._PersonParentJoinDao_jpqxfm$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personParentJoinDao', {configurable: true, get: function () { return this._PersonParentJoinDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ScopedGrantDao', {configurable: true, get: function () { return this._ScopedGrantDao_c5bgvx$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'scopedGrantDao', {configurable: true, get: function () { return this._ScopedGrantDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ErrorReportDao', {configurable: true, get: function () { return this._ErrorReportDao_fhjgp9$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'errorReportDao', {configurable: true, get: function () { return this._ErrorReportDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_PersonAuth2Dao', {configurable: true, get: function () { return this._PersonAuth2Dao_sbcr2k$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'personAuth2Dao', {configurable: true, get: function () { return this._PersonAuth2Dao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_UserSessionDao', {configurable: true, get: function () { return this._UserSessionDao_u3lyxu$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'userSessionDao', {configurable: true, get: function () { return this._UserSessionDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentJobItemDao', {configurable: true, get: function () { return this._ContentJobItemDao_wk14ls$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentJobItemDao', {configurable: true, get: function () { return this._ContentJobItemDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentJobDao', {configurable: true, get: function () { return this._ContentJobDao_otp6eb$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentJobDao', {configurable: true, get: function () { return this._ContentJobDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CoursePictureDao', {configurable: true, get: function () { return this._CoursePictureDao_8lofba$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'coursePictureDao', {configurable: true, get: function () { return this._CoursePictureDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ContentEntryPictureDao', {configurable: true, get: function () { return this._ContentEntryPictureDao_h75b18$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'contentEntryPictureDao', {configurable: true, get: function () { return this._ContentEntryPictureDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ChatDao', {configurable: true, get: function () { return this._ChatDao_q2bpip$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'chatDao', {configurable: true, get: function () { return this._ChatDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_ChatMemberDao', {configurable: true, get: function () { return this._ChatMemberDao_msanf9$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'chatMemberDao', {configurable: true, get: function () { return this._ChatMemberDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_MessageDao', {configurable: true, get: function () { return this._MessageDao_jfy3z6$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'messageDao', {configurable: true, get: function () { return this._MessageDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_MessageReadDao', {configurable: true, get: function () { return this._MessageReadDao_2blgx8$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'messageReadDao', {configurable: true, get: function () { return this._MessageReadDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_CourseDiscussionDao', {configurable: true, get: function () { return this._CourseDiscussionDao_cb20xo$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'courseDiscussionDao', {configurable: true, get: function () { return this._CourseDiscussionDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_DiscussionTopicDao', {configurable: true, get: function () { return this._DiscussionTopicDao_5a2pfi$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'discussionTopicDao', {configurable: true, get: function () { return this._DiscussionTopicDao; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, '_DiscussionPostDao', {configurable: true, get: function () { return this._DiscussionPostDao_siiczl$_0.value; }}); Object.defineProperty(UmAppDatabase_JdbcKt.prototype, 'discussionPostDao', {configurable: true, get: function () { return this._DiscussionPostDao; }}); UmAppDatabase_JdbcKt.prototype.createAllTables = function () { var _stmtList = mutableLinkedListOf([]); switch (this.jdbcImplHelper.dbType) { case 1: var element = 'CREATE TABLE IF NOT EXISTS _doorwayinfo (dbVersion int primary key, dbHash varchar(255))'; _stmtList.add_11rb$(element); var element_0 = "INSERT INTO _doorwayinfo VALUES (107, '')"; _stmtList.add_11rb$(element_0); var element_1 = 'CREATE TABLE IF NOT EXISTS NetworkNode ( bluetoothMacAddress TEXT , ipAddress TEXT , wifiDirectMacAddress TEXT , deviceWifiDirectName TEXT , endpointUrl TEXT , lastUpdateTimeStamp INTEGER NOT NULL , networkServiceLastUpdated INTEGER NOT NULL , nsdServiceName TEXT , port INTEGER NOT NULL , numFailureCount INTEGER NOT NULL , wifiDirectDeviceStatus INTEGER NOT NULL , groupSsid TEXT , nodeId INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_1); var element_2 = 'CREATE TABLE IF NOT EXISTS ClazzLog ( clazzLogClazzUid INTEGER NOT NULL , logDate INTEGER NOT NULL , timeRecorded INTEGER NOT NULL , clazzLogDone INTEGER NOT NULL , cancellationNote TEXT , clazzLogCancelled INTEGER NOT NULL , clazzLogNumPresent INTEGER NOT NULL , clazzLogNumAbsent INTEGER NOT NULL , clazzLogNumPartial INTEGER NOT NULL , clazzLogScheduleUid INTEGER NOT NULL , clazzLogStatusFlag INTEGER NOT NULL , clazzLogMSQN INTEGER NOT NULL , clazzLogLCSN INTEGER NOT NULL , clazzLogLCB INTEGER NOT NULL , clazzLogLastChangedTime INTEGER NOT NULL , clazzLogUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_2); var element_3 = 'CREATE TABLE IF NOT EXISTS ClazzLogAttendanceRecord ( clazzLogAttendanceRecordClazzLogUid INTEGER NOT NULL , clazzLogAttendanceRecordPersonUid INTEGER NOT NULL , attendanceStatus INTEGER NOT NULL , clazzLogAttendanceRecordMasterChangeSeqNum INTEGER NOT NULL , clazzLogAttendanceRecordLocalChangeSeqNum INTEGER NOT NULL , clazzLogAttendanceRecordLastChangedBy INTEGER NOT NULL , clazzLogAttendanceRecordLastChangedTime INTEGER NOT NULL , clazzLogAttendanceRecordUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_3); var element_4 = 'CREATE TABLE IF NOT EXISTS Schedule ( sceduleStartTime INTEGER NOT NULL , scheduleEndTime INTEGER NOT NULL , scheduleDay INTEGER NOT NULL , scheduleMonth INTEGER NOT NULL , scheduleFrequency INTEGER NOT NULL , umCalendarUid INTEGER NOT NULL , scheduleClazzUid INTEGER NOT NULL , scheduleMasterChangeSeqNum INTEGER NOT NULL , scheduleLocalChangeSeqNum INTEGER NOT NULL , scheduleLastChangedBy INTEGER NOT NULL , scheduleLastChangedTime INTEGER NOT NULL , scheduleActive INTEGER NOT NULL , scheduleUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_4); var element_5 = 'CREATE TABLE IF NOT EXISTS DateRange ( dateRangeLocalChangeSeqNum INTEGER NOT NULL , dateRangeMasterChangeSeqNum INTEGER NOT NULL , dateRangLastChangedBy INTEGER NOT NULL , dateRangeLct INTEGER NOT NULL , dateRangeFromDate INTEGER NOT NULL , dateRangeToDate INTEGER NOT NULL , dateRangeUMCalendarUid INTEGER NOT NULL , dateRangeName TEXT , dateRangeDesc TEXT , dateRangeActive INTEGER NOT NULL , dateRangeUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_5); var element_6 = 'CREATE TABLE IF NOT EXISTS HolidayCalendar ( umCalendarName TEXT , umCalendarCategory INTEGER NOT NULL , umCalendarActive INTEGER NOT NULL , umCalendarMasterChangeSeqNum INTEGER NOT NULL , umCalendarLocalChangeSeqNum INTEGER NOT NULL , umCalendarLastChangedBy INTEGER NOT NULL , umCalendarLct INTEGER NOT NULL , umCalendarUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_6); var element_7 = 'CREATE TABLE IF NOT EXISTS Holiday ( holMasterCsn INTEGER NOT NULL , holLocalCsn INTEGER NOT NULL , holLastModBy INTEGER NOT NULL , holLct INTEGER NOT NULL , holActive INTEGER NOT NULL , holHolidayCalendarUid INTEGER NOT NULL , holStartTime INTEGER NOT NULL , holEndTime INTEGER NOT NULL , holName TEXT , holUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_7); var element_8 = 'CREATE TABLE IF NOT EXISTS ScheduledCheck ( checkTime INTEGER NOT NULL , checkType INTEGER NOT NULL , checkUuid TEXT , checkParameters TEXT , scClazzLogUid INTEGER NOT NULL , scheduledCheckMasterCsn INTEGER NOT NULL , scheduledCheckLocalCsn INTEGER NOT NULL , scheduledCheckLastChangedBy INTEGER NOT NULL , scheduledCheckLct INTEGER NOT NULL , scheduledCheckUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_8); var element_9 = 'CREATE TABLE IF NOT EXISTS AuditLog ( auditLogMasterChangeSeqNum INTEGER NOT NULL , auditLogLocalChangeSeqNum INTEGER NOT NULL , auditLogLastChangedBy INTEGER NOT NULL , auditLogLct INTEGER NOT NULL , auditLogActorPersonUid INTEGER NOT NULL , auditLogTableUid INTEGER NOT NULL , auditLogEntityUid INTEGER NOT NULL , auditLogDate INTEGER NOT NULL , notes TEXT , auditLogUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_9); var element_10 = 'CREATE TABLE IF NOT EXISTS CustomField ( customFieldName TEXT , customFieldNameAlt TEXT , customFieldLabelMessageID INTEGER NOT NULL , customFieldIcon TEXT , customFieldIconId INTEGER NOT NULL , actionOnClick TEXT , customFieldType INTEGER NOT NULL , customFieldEntityType INTEGER NOT NULL , customFieldActive INTEGER NOT NULL , customFieldDefaultValue TEXT , customFieldMCSN INTEGER NOT NULL , customFieldLCSN INTEGER NOT NULL , customFieldLCB INTEGER NOT NULL , customFieldLct INTEGER NOT NULL , customFieldInputType INTEGER NOT NULL , customFieldUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_10); var element_11 = 'CREATE TABLE IF NOT EXISTS CustomFieldValue ( customFieldValueFieldUid INTEGER NOT NULL , customFieldValueEntityUid INTEGER NOT NULL , customFieldValueValue TEXT , customFieldValueCustomFieldValueOptionUid INTEGER NOT NULL , customFieldValueMCSN INTEGER NOT NULL , customFieldValueLCSN INTEGER NOT NULL , customFieldValueLCB INTEGER NOT NULL , customFieldLct INTEGER NOT NULL , customFieldValueUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_11); var element_12 = 'CREATE TABLE IF NOT EXISTS CustomFieldValueOption ( customFieldValueOptionName TEXT , customFieldValueOptionFieldUid INTEGER NOT NULL , customFieldValueOptionIcon TEXT , customFieldValueOptionMessageId INTEGER NOT NULL , customFieldValueOptionActive INTEGER NOT NULL , customFieldValueOptionMCSN INTEGER NOT NULL , customFieldValueOptionLCSN INTEGER NOT NULL , customFieldValueOptionLCB INTEGER NOT NULL , customFieldValueLct INTEGER NOT NULL , customFieldValueOptionUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_12); var element_13 = 'CREATE TABLE IF NOT EXISTS Person ( username TEXT , firstNames TEXT , lastName TEXT , emailAddr TEXT , phoneNum TEXT , gender INTEGER NOT NULL , active INTEGER NOT NULL , admin INTEGER NOT NULL , personNotes TEXT , fatherName TEXT , fatherNumber TEXT , motherName TEXT , motherNum TEXT , dateOfBirth INTEGER NOT NULL , personAddress TEXT , personOrgId TEXT , personGroupUid INTEGER NOT NULL , personMasterChangeSeqNum INTEGER NOT NULL , personLocalChangeSeqNum INTEGER NOT NULL , personLastChangedBy INTEGER NOT NULL , personLct INTEGER NOT NULL , personCountry TEXT , personType INTEGER NOT NULL DEFAULT 0 , personUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_13); var element_14 = 'CREATE TABLE IF NOT EXISTS Clazz ( clazzName TEXT , clazzDesc TEXT , attendanceAverage REAl NOT NULL , clazzHolidayUMCalendarUid INTEGER NOT NULL , clazzScheuleUMCalendarUid INTEGER NOT NULL , isClazzActive INTEGER NOT NULL , clazzLocationUid INTEGER NOT NULL , clazzStartTime INTEGER NOT NULL , clazzEndTime INTEGER NOT NULL , clazzFeatures INTEGER NOT NULL , clazzSchoolUid INTEGER NOT NULL , clazzEnrolmentPolicy INTEGER NOT NULL DEFAULT 102 , clazzTerminologyUid INTEGER NOT NULL DEFAULT 25966 , clazzMasterChangeSeqNum INTEGER NOT NULL , clazzLocalChangeSeqNum INTEGER NOT NULL , clazzLastChangedBy INTEGER NOT NULL , clazzLct INTEGER NOT NULL , clazzTimeZone TEXT , clazzStudentsPersonGroupUid INTEGER NOT NULL , clazzTeachersPersonGroupUid INTEGER NOT NULL , clazzPendingStudentsPersonGroupUid INTEGER NOT NULL , clazzParentsPersonGroupUid INTEGER NOT NULL , clazzCode TEXT , clazzUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_14); var element_15 = 'CREATE TABLE IF NOT EXISTS ClazzEnrolment ( clazzEnrolmentPersonUid INTEGER NOT NULL , clazzEnrolmentClazzUid INTEGER NOT NULL , clazzEnrolmentDateJoined INTEGER NOT NULL , clazzEnrolmentDateLeft INTEGER NOT NULL , clazzEnrolmentRole INTEGER NOT NULL , clazzEnrolmentAttendancePercentage REAl NOT NULL , clazzEnrolmentActive INTEGER NOT NULL , clazzEnrolmentLeavingReasonUid INTEGER NOT NULL , clazzEnrolmentOutcome INTEGER NOT NULL , clazzEnrolmentLocalChangeSeqNum INTEGER NOT NULL , clazzEnrolmentMasterChangeSeqNum INTEGER NOT NULL , clazzEnrolmentLastChangedBy INTEGER NOT NULL , clazzEnrolmentLct INTEGER NOT NULL , clazzEnrolmentUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_15); var element_16 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentPersonUid_clazzEnrolmentClazzUid ON ClazzEnrolment (clazzEnrolmentPersonUid, clazzEnrolmentClazzUid)'; _stmtList.add_11rb$(element_16); var element_17 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentClazzUid_clazzEnrolmentPersonUid ON ClazzEnrolment (clazzEnrolmentClazzUid, clazzEnrolmentPersonUid)'; _stmtList.add_11rb$(element_17); var element_18 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentClazzUid_clazzEnrolmentRole ON ClazzEnrolment (clazzEnrolmentClazzUid, clazzEnrolmentRole)'; _stmtList.add_11rb$(element_18); var element_19 = 'CREATE TABLE IF NOT EXISTS LeavingReason ( leavingReasonTitle TEXT , leavingReasonMCSN INTEGER NOT NULL , leavingReasonCSN INTEGER NOT NULL , leavingReasonLCB INTEGER NOT NULL , leavingReasonLct INTEGER NOT NULL , leavingReasonUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_19); var element_20 = 'CREATE TABLE IF NOT EXISTS ContentEntry ( title TEXT , description TEXT , entryId TEXT , author TEXT , publisher TEXT , licenseType INTEGER NOT NULL , licenseName TEXT , licenseUrl TEXT , sourceUrl TEXT , thumbnailUrl TEXT , lastModified INTEGER NOT NULL , primaryLanguageUid INTEGER NOT NULL , languageVariantUid INTEGER NOT NULL , contentFlags INTEGER NOT NULL , leaf INTEGER NOT NULL , publik INTEGER NOT NULL , ceInactive INTEGER NOT NULL , completionCriteria INTEGER NOT NULL , minScore INTEGER NOT NULL , contentTypeFlag INTEGER NOT NULL , contentOwner INTEGER NOT NULL , contentEntryLocalChangeSeqNum INTEGER NOT NULL , contentEntryMasterChangeSeqNum INTEGER NOT NULL , contentEntryLastChangedBy INTEGER NOT NULL , contentEntryLct INTEGER NOT NULL , contentEntryUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_20); var element_21 = 'CREATE TABLE IF NOT EXISTS ContentEntryContentCategoryJoin ( ceccjContentEntryUid INTEGER NOT NULL , ceccjContentCategoryUid INTEGER NOT NULL , ceccjLocalChangeSeqNum INTEGER NOT NULL , ceccjMasterChangeSeqNum INTEGER NOT NULL , ceccjLastChangedBy INTEGER NOT NULL , ceccjLct INTEGER NOT NULL , ceccjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_21); var element_22 = 'CREATE TABLE IF NOT EXISTS ContentEntryParentChildJoin ( cepcjLocalChangeSeqNum INTEGER NOT NULL , cepcjMasterChangeSeqNum INTEGER NOT NULL , cepcjLastChangedBy INTEGER NOT NULL , cepcjLct INTEGER NOT NULL , cepcjParentContentEntryUid INTEGER NOT NULL , cepcjChildContentEntryUid INTEGER NOT NULL , childIndex INTEGER NOT NULL , cepcjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_22); var element_23 = 'CREATE INDEX parent_child ON ContentEntryParentChildJoin (cepcjChildContentEntryUid, cepcjParentContentEntryUid)'; _stmtList.add_11rb$(element_23); var element_24 = 'CREATE TABLE IF NOT EXISTS ContentEntryRelatedEntryJoin ( cerejContentEntryUid INTEGER NOT NULL , cerejRelatedEntryUid INTEGER NOT NULL , cerejLastChangedBy INTEGER NOT NULL , relType INTEGER NOT NULL , comment TEXT , cerejRelLanguageUid INTEGER NOT NULL , cerejLocalChangeSeqNum INTEGER NOT NULL , cerejMasterChangeSeqNum INTEGER NOT NULL , cerejLct INTEGER NOT NULL , cerejUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_24); var element_25 = 'CREATE TABLE IF NOT EXISTS ContentCategorySchema ( schemaName TEXT , schemaUrl TEXT , contentCategorySchemaLocalChangeSeqNum INTEGER NOT NULL , contentCategorySchemaMasterChangeSeqNum INTEGER NOT NULL , contentCategorySchemaLastChangedBy INTEGER NOT NULL , contentCategorySchemaLct INTEGER NOT NULL , contentCategorySchemaUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_25); var element_26 = 'CREATE TABLE IF NOT EXISTS ContentCategory ( ctnCatContentCategorySchemaUid INTEGER NOT NULL , name TEXT , contentCategoryLocalChangeSeqNum INTEGER NOT NULL , contentCategoryMasterChangeSeqNum INTEGER NOT NULL , contentCategoryLastChangedBy INTEGER NOT NULL , contentCategoryLct INTEGER NOT NULL , contentCategoryUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_26); var element_27 = 'CREATE TABLE IF NOT EXISTS Language ( name TEXT , iso_639_1_standard TEXT , iso_639_2_standard TEXT , iso_639_3_standard TEXT , Language_Type TEXT , languageActive INTEGER NOT NULL , langLocalChangeSeqNum INTEGER NOT NULL , langMasterChangeSeqNum INTEGER NOT NULL , langLastChangedBy INTEGER NOT NULL , langLct INTEGER NOT NULL , langUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_27); var element_28 = 'CREATE TABLE IF NOT EXISTS LanguageVariant ( langUid INTEGER NOT NULL , countryCode TEXT , name TEXT , langVariantLocalChangeSeqNum INTEGER NOT NULL , langVariantMasterChangeSeqNum INTEGER NOT NULL , langVariantLastChangedBy INTEGER NOT NULL , langVariantLct INTEGER NOT NULL , langVariantUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_28); var element_29 = 'CREATE TABLE IF NOT EXISTS AccessToken ( token TEXT PRIMARY KEY NOT NULL , accessTokenPersonUid INTEGER NOT NULL , expires INTEGER NOT NULL )'; _stmtList.add_11rb$(element_29); var element_30 = 'CREATE TABLE IF NOT EXISTS PersonAuth ( passwordHash TEXT , personAuthStatus INTEGER NOT NULL , personAuthUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_30); var element_31 = 'CREATE TABLE IF NOT EXISTS Role ( roleName TEXT , roleActive INTEGER NOT NULL , roleMasterCsn INTEGER NOT NULL , roleLocalCsn INTEGER NOT NULL , roleLastChangedBy INTEGER NOT NULL , roleLct INTEGER NOT NULL , rolePermissions INTEGER NOT NULL , roleUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_31); var element_32 = 'CREATE INDEX index_Role_rolePermissions ON Role (rolePermissions)'; _stmtList.add_11rb$(element_32); var element_33 = 'CREATE TABLE IF NOT EXISTS EntityRole ( erMasterCsn INTEGER NOT NULL , erLocalCsn INTEGER NOT NULL , erLastChangedBy INTEGER NOT NULL , erLct INTEGER NOT NULL , erTableId INTEGER NOT NULL , erEntityUid INTEGER NOT NULL , erGroupUid INTEGER NOT NULL , erRoleUid INTEGER NOT NULL , erActive INTEGER NOT NULL , erUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_33); var element_34 = 'CREATE INDEX index_EntityRole_erGroupUid_erRoleUid_erTableId ON EntityRole (erGroupUid, erRoleUid, erTableId)'; _stmtList.add_11rb$(element_34); var element_35 = 'CREATE TABLE IF NOT EXISTS PersonGroup ( groupMasterCsn INTEGER NOT NULL , groupLocalCsn INTEGER NOT NULL , groupLastChangedBy INTEGER NOT NULL , groupLct INTEGER NOT NULL , groupName TEXT , groupActive INTEGER NOT NULL , personGroupFlag INTEGER NOT NULL , groupUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_35); var element_36 = 'CREATE TABLE IF NOT EXISTS PersonGroupMember ( groupMemberActive INTEGER NOT NULL , groupMemberPersonUid INTEGER NOT NULL , groupMemberGroupUid INTEGER NOT NULL , groupMemberMasterCsn INTEGER NOT NULL , groupMemberLocalCsn INTEGER NOT NULL , groupMemberLastChangedBy INTEGER NOT NULL , groupMemberLct INTEGER NOT NULL , groupMemberUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_36); var element_37 = 'CREATE TABLE IF NOT EXISTS PersonPicture ( personPicturePersonUid INTEGER NOT NULL , personPictureMasterCsn INTEGER NOT NULL , personPictureLocalCsn INTEGER NOT NULL , personPictureLastChangedBy INTEGER NOT NULL , personPictureLct INTEGER NOT NULL , personPictureUri TEXT , personPictureMd5 TEXT , fileSize INTEGER NOT NULL , picTimestamp INTEGER NOT NULL , mimeType TEXT , personPictureActive INTEGER NOT NULL , personPictureUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_37); var element_38 = 'CREATE TABLE IF NOT EXISTS ScrapeQueueItem ( sqiContentEntryParentUid INTEGER NOT NULL , sqiContentEntryUid INTEGER NOT NULL , destDir TEXT , scrapeUrl TEXT , status INTEGER NOT NULL , runId INTEGER NOT NULL , itemType INTEGER NOT NULL , errorCode INTEGER NOT NULL , contentType TEXT , timeAdded INTEGER NOT NULL , timeStarted INTEGER NOT NULL , timeFinished INTEGER NOT NULL , priority INTEGER NOT NULL , overrideEntry INTEGER NOT NULL , sqiUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_38); var element_39 = 'CREATE INDEX index_ScrapeQueueItem_status_itemType ON ScrapeQueueItem (status, itemType)'; _stmtList.add_11rb$(element_39); var element_40 = 'CREATE TABLE IF NOT EXISTS ScrapeRun ( scrapeType TEXT , scrapeRunStatus INTEGER NOT NULL , conversionParams TEXT , scrapeRunUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_40); var element_41 = 'CREATE TABLE IF NOT EXISTS ConnectivityStatus ( csUid INTEGER PRIMARY KEY NOT NULL , connectivityState INTEGER NOT NULL , wifiSsid TEXT , connectedOrConnecting INTEGER NOT NULL )'; _stmtList.add_11rb$(element_41); var element_42 = 'CREATE TABLE IF NOT EXISTS Container ( cntLocalCsn INTEGER NOT NULL , cntMasterCsn INTEGER NOT NULL , cntLastModBy INTEGER NOT NULL , cntLct INTEGER NOT NULL , fileSize INTEGER NOT NULL , containerContentEntryUid INTEGER NOT NULL , cntLastModified INTEGER NOT NULL , mimeType TEXT , remarks TEXT , mobileOptimized INTEGER NOT NULL , cntNumEntries INTEGER NOT NULL , containerUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_42); var element_43 = 'CREATE INDEX cnt_uid_to_most_recent ON Container (containerContentEntryUid, cntLastModified)'; _stmtList.add_11rb$(element_43); var element_44 = 'CREATE TABLE IF NOT EXISTS ContainerEntry ( ceContainerUid INTEGER NOT NULL , cePath TEXT , ceCefUid INTEGER NOT NULL , ceUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_44); var element_45 = 'CREATE TABLE IF NOT EXISTS ContainerEntryFile ( cefMd5 TEXT , cefPath TEXT , ceTotalSize INTEGER NOT NULL , ceCompressedSize INTEGER NOT NULL , compression INTEGER NOT NULL , lastModified INTEGER NOT NULL , cefUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_45); var element_46 = 'CREATE TABLE IF NOT EXISTS VerbEntity ( urlId TEXT , verbInActive INTEGER NOT NULL , verbMasterChangeSeqNum INTEGER NOT NULL , verbLocalChangeSeqNum INTEGER NOT NULL , verbLastChangedBy INTEGER NOT NULL , verbLct INTEGER NOT NULL , verbUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_46); var element_47 = 'CREATE TABLE IF NOT EXISTS XObjectEntity ( objectType TEXT , objectId TEXT , definitionType TEXT , interactionType TEXT , correctResponsePattern TEXT , objectContentEntryUid INTEGER NOT NULL , objectStatementRefUid INTEGER NOT NULL DEFAULT 0 , xObjectMasterChangeSeqNum INTEGER NOT NULL , xObjectocalChangeSeqNum INTEGER NOT NULL , xObjectLastChangedBy INTEGER NOT NULL , xObjectLct INTEGER NOT NULL , xObjectUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_47); var element_48 = 'CREATE TABLE IF NOT EXISTS StatementEntity ( statementId TEXT , statementPersonUid INTEGER NOT NULL , statementVerbUid INTEGER NOT NULL , xObjectUid INTEGER NOT NULL , subStatementActorUid INTEGER NOT NULL , substatementVerbUid INTEGER NOT NULL , subStatementObjectUid INTEGER NOT NULL , agentUid INTEGER NOT NULL , instructorUid INTEGER NOT NULL , authorityUid INTEGER NOT NULL , teamUid INTEGER NOT NULL , resultCompletion INTEGER NOT NULL , resultSuccess INTEGER NOT NULL , resultScoreScaled REAl NOT NULL , resultScoreRaw INTEGER NOT NULL , resultScoreMin INTEGER NOT NULL , resultScoreMax INTEGER NOT NULL , resultDuration INTEGER NOT NULL , resultResponse TEXT , timestamp INTEGER NOT NULL , stored INTEGER NOT NULL , contextRegistration TEXT , contextPlatform TEXT , contextStatementId TEXT , fullStatement TEXT , statementMasterChangeSeqNum INTEGER NOT NULL , statementLocalChangeSeqNum INTEGER NOT NULL , statementLastChangedBy INTEGER NOT NULL , statementLct INTEGER NOT NULL , extensionProgress INTEGER NOT NULL , contentEntryRoot INTEGER NOT NULL , statementContentEntryUid INTEGER NOT NULL , statementLearnerGroupUid INTEGER NOT NULL , statementClazzUid INTEGER NOT NULL , statementUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_48); var element_49 = 'CREATE INDEX index_StatementEntity_statementContentEntryUid_statementPersonUid_contentEntryRoot_timestamp_statementLocalChangeSeqNum ON StatementEntity (statementContentEntryUid, statementPersonUid, contentEntryRoot, timestamp, statementLocalChangeSeqNum)'; _stmtList.add_11rb$(element_49); var element_50 = 'CREATE TABLE IF NOT EXISTS ContextXObjectStatementJoin ( contextActivityFlag INTEGER NOT NULL , contextStatementUid INTEGER NOT NULL , contextXObjectUid INTEGER NOT NULL , verbMasterChangeSeqNum INTEGER NOT NULL , verbLocalChangeSeqNum INTEGER NOT NULL , verbLastChangedBy INTEGER NOT NULL , contextXObjectLct INTEGER NOT NULL , contextXObjectStatementJoinUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_50); var element_51 = 'CREATE TABLE IF NOT EXISTS AgentEntity ( agentMbox TEXT , agentMbox_sha1sum TEXT , agentOpenid TEXT , agentAccountName TEXT , agentHomePage TEXT , agentPersonUid INTEGER NOT NULL , statementMasterChangeSeqNum INTEGER NOT NULL , statementLocalChangeSeqNum INTEGER NOT NULL , statementLastChangedBy INTEGER NOT NULL , agentLct INTEGER NOT NULL , agentUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_51); var element_52 = 'CREATE TABLE IF NOT EXISTS StateEntity ( stateId TEXT , agentUid INTEGER NOT NULL , activityId TEXT , registration TEXT , isIsactive INTEGER NOT NULL , timestamp INTEGER NOT NULL , stateMasterChangeSeqNum INTEGER NOT NULL , stateLocalChangeSeqNum INTEGER NOT NULL , stateLastChangedBy INTEGER NOT NULL , stateLct INTEGER NOT NULL , stateUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_52); var element_53 = 'CREATE TABLE IF NOT EXISTS StateContentEntity ( stateContentStateUid INTEGER NOT NULL , stateContentKey TEXT , stateContentValue TEXT , isIsactive INTEGER NOT NULL , stateContentMasterChangeSeqNum INTEGER NOT NULL , stateContentLocalChangeSeqNum INTEGER NOT NULL , stateContentLastChangedBy INTEGER NOT NULL , stateContentLct INTEGER NOT NULL , stateContentUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_53); var element_54 = 'CREATE TABLE IF NOT EXISTS XLangMapEntry ( verbLangMapUid INTEGER NOT NULL , objectLangMapUid INTEGER NOT NULL , languageLangMapUid INTEGER NOT NULL , languageVariantLangMapUid INTEGER NOT NULL , valueLangMap TEXT , statementLangMapMasterCsn INTEGER NOT NULL , statementLangMapLocalCsn INTEGER NOT NULL , statementLangMapLcb INTEGER NOT NULL , statementLangMapLct INTEGER NOT NULL , statementLangMapUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_54); var element_55 = 'CREATE TABLE IF NOT EXISTS SyncNode ( nodeClientId INTEGER NOT NULL , PRIMARY KEY (nodeClientId) )'; _stmtList.add_11rb$(element_55); var element_56 = 'CREATE TABLE IF NOT EXISTS LocallyAvailableContainer ( laContainerUid INTEGER PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_56); var element_57 = 'CREATE TABLE IF NOT EXISTS ContainerETag ( ceContainerUid INTEGER PRIMARY KEY NOT NULL , cetag TEXT )'; _stmtList.add_11rb$(element_57); var element_58 = 'CREATE TABLE IF NOT EXISTS School ( schoolName TEXT , schoolDesc TEXT , schoolAddress TEXT , schoolActive INTEGER NOT NULL , schoolPhoneNumber TEXT , schoolGender INTEGER NOT NULL , schoolHolidayCalendarUid INTEGER NOT NULL , schoolFeatures INTEGER NOT NULL , schoolLocationLong REAl NOT NULL , schoolLocationLatt REAl NOT NULL , schoolEmailAddress TEXT , schoolTeachersPersonGroupUid INTEGER NOT NULL , schoolStudentsPersonGroupUid INTEGER NOT NULL , schoolPendingStudentsPersonGroupUid INTEGER NOT NULL , schoolCode TEXT , schoolMasterChangeSeqNum INTEGER NOT NULL , schoolLocalChangeSeqNum INTEGER NOT NULL , schoolLastChangedBy INTEGER NOT NULL , schoolLct INTEGER NOT NULL , schoolTimeZone TEXT , schoolUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_58); var element_59 = 'CREATE TABLE IF NOT EXISTS SchoolMember ( schoolMemberPersonUid INTEGER NOT NULL , schoolMemberSchoolUid INTEGER NOT NULL , schoolMemberJoinDate INTEGER NOT NULL , schoolMemberLeftDate INTEGER NOT NULL , schoolMemberRole INTEGER NOT NULL , schoolMemberActive INTEGER NOT NULL , schoolMemberLocalChangeSeqNum INTEGER NOT NULL , schoolMemberMasterChangeSeqNum INTEGER NOT NULL , schoolMemberLastChangedBy INTEGER NOT NULL , schoolMemberLct INTEGER NOT NULL , schoolMemberUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_59); var element_60 = 'CREATE INDEX index_SchoolMember_schoolMemberSchoolUid_schoolMemberActive_schoolMemberRole ON SchoolMember (schoolMemberSchoolUid, schoolMemberActive, schoolMemberRole)'; _stmtList.add_11rb$(element_60); var element_61 = 'CREATE TABLE IF NOT EXISTS Comments ( commentsText TEXT , commentsEntityType INTEGER NOT NULL , commentsEntityUid INTEGER NOT NULL , commentsPublic INTEGER NOT NULL , commentsStatus INTEGER NOT NULL , commentsPersonUid INTEGER NOT NULL , commentsToPersonUid INTEGER NOT NULL , commentSubmitterUid INTEGER NOT NULL , commentsFlagged INTEGER NOT NULL , commentsInActive INTEGER NOT NULL , commentsDateTimeAdded INTEGER NOT NULL , commentsDateTimeUpdated INTEGER NOT NULL , commentsMCSN INTEGER NOT NULL , commentsLCSN INTEGER NOT NULL , commentsLCB INTEGER NOT NULL , commentsLct INTEGER NOT NULL , commentsUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_61); var element_62 = 'CREATE TABLE IF NOT EXISTS Report ( reportOwnerUid INTEGER NOT NULL , xAxis INTEGER NOT NULL , reportDateRangeSelection INTEGER NOT NULL , fromDate INTEGER NOT NULL , fromRelTo INTEGER NOT NULL , fromRelOffSet INTEGER NOT NULL , fromRelUnit INTEGER NOT NULL , toDate INTEGER NOT NULL , toRelTo INTEGER NOT NULL , toRelOffSet INTEGER NOT NULL , toRelUnit INTEGER NOT NULL , reportTitle TEXT , reportDescription TEXT , reportSeries TEXT , reportInactive INTEGER NOT NULL , isTemplate INTEGER NOT NULL , priority INTEGER NOT NULL , reportTitleId INTEGER NOT NULL , reportDescId INTEGER NOT NULL , reportMasterChangeSeqNum INTEGER NOT NULL , reportLocalChangeSeqNum INTEGER NOT NULL , reportLastChangedBy INTEGER NOT NULL , reportLct INTEGER NOT NULL , reportUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_62); var element_63 = 'CREATE TABLE IF NOT EXISTS Site ( sitePcsn INTEGER NOT NULL , siteLcsn INTEGER NOT NULL , siteLcb INTEGER NOT NULL , siteLct INTEGER NOT NULL , siteName TEXT , guestLogin INTEGER NOT NULL , registrationAllowed INTEGER NOT NULL , authSalt TEXT , siteUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_63); var element_64 = 'CREATE TABLE IF NOT EXISTS ContainerImportJob ( cijContainerUid INTEGER NOT NULL , cijUri TEXT , cijImportMode INTEGER NOT NULL , cijContainerBaseDir TEXT , cijContentEntryUid INTEGER NOT NULL , cijMimeType TEXT , cijSessionId TEXT , cijJobStatus INTEGER NOT NULL , cijBytesSoFar INTEGER NOT NULL , cijImportCompleted INTEGER NOT NULL , cijContentLength INTEGER NOT NULL , cijContainerEntryFileUids TEXT , cijConversionParams TEXT , cijUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_64); var element_65 = 'CREATE TABLE IF NOT EXISTS LearnerGroup ( learnerGroupName TEXT , learnerGroupDescription TEXT , learnerGroupActive INTEGER NOT NULL , learnerGroupMCSN INTEGER NOT NULL , learnerGroupCSN INTEGER NOT NULL , learnerGroupLCB INTEGER NOT NULL , learnerGroupLct INTEGER NOT NULL , learnerGroupUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_65); var element_66 = 'CREATE TABLE IF NOT EXISTS LearnerGroupMember ( learnerGroupMemberPersonUid INTEGER NOT NULL , learnerGroupMemberLgUid INTEGER NOT NULL , learnerGroupMemberRole INTEGER NOT NULL , learnerGroupMemberActive INTEGER NOT NULL , learnerGroupMemberMCSN INTEGER NOT NULL , learnerGroupMemberCSN INTEGER NOT NULL , learnerGroupMemberLCB INTEGER NOT NULL , learnerGroupMemberLct INTEGER NOT NULL , learnerGroupMemberUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_66); var element_67 = 'CREATE TABLE IF NOT EXISTS GroupLearningSession ( groupLearningSessionContentUid INTEGER NOT NULL , groupLearningSessionLearnerGroupUid INTEGER NOT NULL , groupLearningSessionInactive INTEGER NOT NULL , groupLearningSessionMCSN INTEGER NOT NULL , groupLearningSessionCSN INTEGER NOT NULL , groupLearningSessionLCB INTEGER NOT NULL , groupLearningSessionLct INTEGER NOT NULL , groupLearningSessionUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_67); var element_68 = 'CREATE TABLE IF NOT EXISTS SiteTerms ( termsHtml TEXT , sTermsLang TEXT , sTermsLangUid INTEGER NOT NULL , sTermsActive INTEGER NOT NULL , sTermsLastChangedBy INTEGER NOT NULL , sTermsPrimaryCsn INTEGER NOT NULL , sTermsLocalCsn INTEGER NOT NULL , sTermsLct INTEGER NOT NULL , sTermsUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_68); var element_69 = 'CREATE TABLE IF NOT EXISTS ClazzContentJoin ( ccjContentEntryUid INTEGER NOT NULL , ccjClazzUid INTEGER NOT NULL , ccjActive INTEGER NOT NULL , ccjLocalChangeSeqNum INTEGER NOT NULL , ccjMasterChangeSeqNum INTEGER NOT NULL , ccjLastChangedBy INTEGER NOT NULL , ccjLct INTEGER NOT NULL , ccjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_69); var element_70 = 'CREATE TABLE IF NOT EXISTS PersonParentJoin ( ppjPcsn INTEGER NOT NULL , ppjLcsn INTEGER NOT NULL , ppjLcb INTEGER NOT NULL , ppjLct INTEGER NOT NULL , ppjParentPersonUid INTEGER NOT NULL , ppjMinorPersonUid INTEGER NOT NULL , ppjRelationship INTEGER NOT NULL , ppjEmail TEXT , ppjPhone TEXT , ppjInactive INTEGER NOT NULL , ppjStatus INTEGER NOT NULL , ppjApprovalTiemstamp INTEGER NOT NULL , ppjApprovalIpAddr TEXT , ppjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_70); var element_71 = 'CREATE TABLE IF NOT EXISTS ScopedGrant ( sgPcsn INTEGER NOT NULL , sgLcsn INTEGER NOT NULL , sgLcb INTEGER NOT NULL , sgLct INTEGER NOT NULL , sgTableId INTEGER NOT NULL , sgEntityUid INTEGER NOT NULL , sgPermissions INTEGER NOT NULL , sgGroupUid INTEGER NOT NULL , sgIndex INTEGER NOT NULL , sgFlags INTEGER NOT NULL , sgUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_71); var element_72 = 'CREATE INDEX idx_group_to_entity ON ScopedGrant (sgGroupUid, sgPermissions, sgTableId, sgEntityUid)'; _stmtList.add_11rb$(element_72); var element_73 = 'CREATE INDEX idx_entity_to_group ON ScopedGrant (sgTableId, sgEntityUid, sgPermissions, sgGroupUid)'; _stmtList.add_11rb$(element_73); var element_74 = 'CREATE TABLE IF NOT EXISTS ErrorReport ( errPcsn INTEGER NOT NULL , errLcsn INTEGER NOT NULL , errLcb INTEGER NOT NULL , errLct INTEGER NOT NULL , severity INTEGER NOT NULL , timestamp INTEGER NOT NULL , presenterUri TEXT , appVersion TEXT , versionCode INTEGER NOT NULL , errorCode INTEGER NOT NULL , operatingSys TEXT , osVersion TEXT , stackTrace TEXT , message TEXT , errUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_74); var element_75 = 'CREATE TABLE IF NOT EXISTS ClazzAssignment ( caTitle TEXT , caDescription TEXT , caGroupUid INTEGER NOT NULL DEFAULT 0 , caActive INTEGER NOT NULL , caClassCommentEnabled INTEGER NOT NULL , caPrivateCommentsEnabled INTEGER NOT NULL DEFAULT 1 , caCompletionCriteria INTEGER NOT NULL DEFAULT 100 , caRequireFileSubmission INTEGER NOT NULL DEFAULT 1 , caFileType INTEGER NOT NULL DEFAULT 0 , caSizeLimit INTEGER NOT NULL DEFAULT 50 , caNumberOfFiles INTEGER NOT NULL DEFAULT 1 , caSubmissionPolicy INTEGER NOT NULL DEFAULT 1 , caMarkingType INTEGER NOT NULL DEFAULT 1 , caRequireTextSubmission INTEGER NOT NULL DEFAULT 1 , caTextLimitType INTEGER NOT NULL DEFAULT 1 , caTextLimit INTEGER NOT NULL DEFAULT 500 , caXObjectUid INTEGER NOT NULL DEFAULT 0 , caClazzUid INTEGER NOT NULL , caLocalChangeSeqNum INTEGER NOT NULL , caMasterChangeSeqNum INTEGER NOT NULL , caLastChangedBy INTEGER NOT NULL , caLct INTEGER NOT NULL , caUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_75); var element_76 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoin ( cacjContentUid INTEGER NOT NULL , cacjAssignmentUid INTEGER NOT NULL , cacjActive INTEGER NOT NULL , cacjWeight INTEGER NOT NULL DEFAULT 0 , cacjMCSN INTEGER NOT NULL , cacjLCSN INTEGER NOT NULL , cacjLCB INTEGER NOT NULL , cacjLct INTEGER NOT NULL , cacjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_76); var element_77 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmission ( casAssignmentUid INTEGER NOT NULL , casSubmitterUid INTEGER NOT NULL , casSubmitterPersonUid INTEGER NOT NULL , casText TEXT , casType INTEGER NOT NULL , casTimestamp INTEGER NOT NULL , casUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_77); var element_78 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachment ( casaSubmissionUid INTEGER NOT NULL , casaMimeType TEXT , casaFileName TEXT , casaUri TEXT , casaMd5 TEXT , casaSize INTEGER NOT NULL , casaTimestamp INTEGER NOT NULL , casaUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_78); var element_79 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentMark ( camAssignmentUid INTEGER NOT NULL , camSubmitterUid INTEGER NOT NULL , camMark REAl NOT NULL , camPenalty INTEGER NOT NULL , camLct INTEGER NOT NULL , camUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_79); var element_80 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentRollUp ( cachePersonUid INTEGER NOT NULL , cacheContentEntryUid INTEGER NOT NULL , cacheClazzAssignmentUid INTEGER NOT NULL , cacheStudentScore INTEGER NOT NULL , cacheMaxScore INTEGER NOT NULL , cacheFinalWeightScoreWithPenalty REAl NOT NULL DEFAULT 0 , cacheWeight INTEGER NOT NULL DEFAULT 0 , cacheProgress INTEGER NOT NULL , cacheContentComplete INTEGER NOT NULL , cacheSuccess INTEGER NOT NULL , cachePenalty INTEGER NOT NULL , lastCsnChecked INTEGER NOT NULL , cacheUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_80); var element_81 = 'CREATE UNIQUE INDEX index_ClazzAssignmentRollUp_cachePersonUid_cacheContentEntryUid_cacheClazzAssignmentUid ON ClazzAssignmentRollUp (cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid)'; _stmtList.add_11rb$(element_81); var element_82 = 'CREATE TABLE IF NOT EXISTS PersonAuth2 ( pauthUid INTEGER PRIMARY KEY NOT NULL , pauthMechanism TEXT , pauthAuth TEXT , pauthLcsn INTEGER NOT NULL , pauthPcsn INTEGER NOT NULL , pauthLcb INTEGER NOT NULL , pauthLct INTEGER NOT NULL )'; _stmtList.add_11rb$(element_82); var element_83 = 'CREATE TABLE IF NOT EXISTS UserSession ( usPcsn INTEGER NOT NULL , usLcsn INTEGER NOT NULL , usLcb INTEGER NOT NULL , usLct INTEGER NOT NULL , usPersonUid INTEGER NOT NULL , usClientNodeId INTEGER NOT NULL , usStartTime INTEGER NOT NULL , usEndTime INTEGER NOT NULL , usStatus INTEGER NOT NULL , usReason INTEGER NOT NULL , usAuth TEXT , usSessionType INTEGER NOT NULL , usUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_83); var element_84 = 'CREATE INDEX person_status_node_idx ON UserSession (usPersonUid, usStatus, usClientNodeId)'; _stmtList.add_11rb$(element_84); var element_85 = 'CREATE INDEX node_status_person_idx ON UserSession (usClientNodeId, usStatus, usPersonUid)'; _stmtList.add_11rb$(element_85); var element_86 = 'CREATE TABLE IF NOT EXISTS ContentJob ( toUri TEXT , cjProgress INTEGER NOT NULL , cjTotal INTEGER NOT NULL , cjNotificationTitle TEXT , cjIsMeteredAllowed INTEGER NOT NULL , params TEXT , cjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_86); var element_87 = 'CREATE TABLE IF NOT EXISTS ContentJobItem ( cjiJobUid INTEGER NOT NULL , sourceUri TEXT , cjiIsLeaf INTEGER NOT NULL , cjiContentEntryUid INTEGER NOT NULL , cjiParentContentEntryUid INTEGER NOT NULL , cjiContainerUid INTEGER NOT NULL , cjiItemProgress INTEGER NOT NULL , cjiItemTotal INTEGER NOT NULL , cjiRecursiveProgress INTEGER NOT NULL , cjiRecursiveTotal INTEGER NOT NULL , cjiStatus INTEGER NOT NULL , cjiRecursiveStatus INTEGER NOT NULL , cjiConnectivityNeeded INTEGER NOT NULL , cjiPluginId INTEGER NOT NULL , cjiAttemptCount INTEGER NOT NULL , cjiParentCjiUid INTEGER NOT NULL , cjiServerJobId INTEGER NOT NULL , cjiStartTime INTEGER NOT NULL , cjiFinishTime INTEGER NOT NULL , cjiUploadSessionUid TEXT , cjiContentDeletedOnCancellation INTEGER NOT NULL , cjiContainerProcessed INTEGER NOT NULL , cjiUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_87); var element_88 = 'CREATE INDEX index_ContentJobItem_cjiContentEntryUid_cjiFinishTime ON ContentJobItem (cjiContentEntryUid, cjiFinishTime)'; _stmtList.add_11rb$(element_88); var element_89 = 'CREATE TABLE IF NOT EXISTS CourseBlock ( cbType INTEGER NOT NULL , cbIndentLevel INTEGER NOT NULL , cbModuleParentBlockUid INTEGER NOT NULL , cbTitle TEXT , cbDescription TEXT , cbCompletionCriteria INTEGER NOT NULL , cbHideUntilDate INTEGER NOT NULL , cbDeadlineDate INTEGER NOT NULL , cbLateSubmissionPenalty INTEGER NOT NULL , cbGracePeriodDate INTEGER NOT NULL , cbMaxPoints INTEGER NOT NULL , cbMinPoints INTEGER NOT NULL , cbIndex INTEGER NOT NULL , cbClazzUid INTEGER NOT NULL , cbActive INTEGER NOT NULL , cbHidden INTEGER NOT NULL , cbEntityUid INTEGER NOT NULL , cbLct INTEGER NOT NULL , cbUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_89); var element_90 = 'CREATE TABLE IF NOT EXISTS CourseTerminology ( ctTitle TEXT , ctTerminology TEXT , ctLct INTEGER NOT NULL , ctUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_90); var element_91 = 'CREATE TABLE IF NOT EXISTS CourseGroupSet ( cgsName TEXT , cgsTotalGroups INTEGER NOT NULL , cgsActive INTEGER NOT NULL , cgsClazzUid INTEGER NOT NULL , cgsLct INTEGER NOT NULL , cgsUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_91); var element_92 = 'CREATE TABLE IF NOT EXISTS CourseGroupMember ( cgmSetUid INTEGER NOT NULL , cgmGroupNumber INTEGER NOT NULL , cgmPersonUid INTEGER NOT NULL , cgmLct INTEGER NOT NULL , cgmUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_92); var element_93 = 'CREATE TABLE IF NOT EXISTS ChangeLog ( chEntityPk INTEGER NOT NULL , chTableId INTEGER NOT NULL , chType INTEGER NOT NULL , PRIMARY KEY (chTableId, chEntityPk) )'; _stmtList.add_11rb$(element_93); var element_94 = 'CREATE TABLE IF NOT EXISTS ZombieAttachmentData ( zaUri TEXT , zaUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_94); var element_95 = 'CREATE TABLE IF NOT EXISTS DoorNode ( auth TEXT , nodeId INTEGER NOT NULL , rel INTEGER NOT NULL , PRIMARY KEY (nodeId) )'; _stmtList.add_11rb$(element_95); var element_96 = 'CREATE TABLE IF NOT EXISTS ReplicationStatus ( lastFetchReplicationCompleteTime INTEGER NOT NULL , lastLocalChangeTime INTEGER NOT NULL , lastRemoteChangeTime INTEGER NOT NULL , lastSendReplicationCompleteTime INTEGER NOT NULL , nodeId INTEGER NOT NULL , priority INTEGER NOT NULL , tableId INTEGER NOT NULL , repStatusId INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_96); var element_97 = 'CREATE UNIQUE INDEX table_node_idx ON ReplicationStatus (tableId, nodeId)'; _stmtList.add_11rb$(element_97); var element_98 = 'CREATE TABLE IF NOT EXISTS ClazzLogReplicate ( clPk INTEGER NOT NULL , clVersionId INTEGER NOT NULL DEFAULT 0 , clDestination INTEGER NOT NULL , clPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (clPk, clDestination) )'; _stmtList.add_11rb$(element_98); var element_99 = 'CREATE INDEX index_ClazzLogReplicate_clPk_clDestination_clVersionId ON ClazzLogReplicate (clPk, clDestination, clVersionId)'; _stmtList.add_11rb$(element_99); var element_100 = 'CREATE INDEX index_ClazzLogReplicate_clDestination_clPending ON ClazzLogReplicate (clDestination, clPending)'; _stmtList.add_11rb$(element_100); var element_101 = 'CREATE TABLE IF NOT EXISTS ClazzLogAttendanceRecordReplicate ( clarPk INTEGER NOT NULL , clarVersionId INTEGER NOT NULL DEFAULT 0 , clarDestination INTEGER NOT NULL , clarPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (clarPk, clarDestination) )'; _stmtList.add_11rb$(element_101); var element_102 = 'CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarPk_clarDestination_clarVersionId ON ClazzLogAttendanceRecordReplicate (clarPk, clarDestination, clarVersionId)'; _stmtList.add_11rb$(element_102); var element_103 = 'CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarDestination_clarPending ON ClazzLogAttendanceRecordReplicate (clarDestination, clarPending)'; _stmtList.add_11rb$(element_103); var element_104 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionReplicate ( casPk INTEGER NOT NULL , casVersionId INTEGER NOT NULL DEFAULT 0 , casDestination INTEGER NOT NULL , casPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (casPk, casDestination) )'; _stmtList.add_11rb$(element_104); var element_105 = 'CREATE INDEX index_CourseAssignmentSubmissionReplicate_casPk_casDestination_casVersionId ON CourseAssignmentSubmissionReplicate (casPk, casDestination, casVersionId)'; _stmtList.add_11rb$(element_105); var element_106 = 'CREATE INDEX index_CourseAssignmentSubmissionReplicate_casDestination_casPending ON CourseAssignmentSubmissionReplicate (casDestination, casPending)'; _stmtList.add_11rb$(element_106); var element_107 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachmentReplicate ( casaPk INTEGER NOT NULL , casaVersionId INTEGER NOT NULL DEFAULT 0 , casaDestination INTEGER NOT NULL , casaPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (casaPk, casaDestination) )'; _stmtList.add_11rb$(element_107); var element_108 = 'CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaPk_casaDestination_casaVersionId ON CourseAssignmentSubmissionAttachmentReplicate (casaPk, casaDestination, casaVersionId)'; _stmtList.add_11rb$(element_108); var element_109 = 'CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaDestination_casaPending ON CourseAssignmentSubmissionAttachmentReplicate (casaDestination, casaPending)'; _stmtList.add_11rb$(element_109); var element_110 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentMarkReplicate ( camPk INTEGER NOT NULL , camVersionId INTEGER NOT NULL DEFAULT 0 , camDestination INTEGER NOT NULL , camPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (camPk, camDestination) )'; _stmtList.add_11rb$(element_110); var element_111 = 'CREATE INDEX index_CourseAssignmentMarkReplicate_camPk_camDestination_camVersionId ON CourseAssignmentMarkReplicate (camPk, camDestination, camVersionId)'; _stmtList.add_11rb$(element_111); var element_112 = 'CREATE INDEX index_CourseAssignmentMarkReplicate_camDestination_camPending ON CourseAssignmentMarkReplicate (camDestination, camPending)'; _stmtList.add_11rb$(element_112); var element_113 = 'CREATE TABLE IF NOT EXISTS CourseBlockReplicate ( cbPk INTEGER NOT NULL , cbVersionId INTEGER NOT NULL DEFAULT 0 , cbDestination INTEGER NOT NULL , cbPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cbPk, cbDestination) )'; _stmtList.add_11rb$(element_113); var element_114 = 'CREATE INDEX index_CourseBlockReplicate_cbPk_cbDestination_cbVersionId ON CourseBlockReplicate (cbPk, cbDestination, cbVersionId)'; _stmtList.add_11rb$(element_114); var element_115 = 'CREATE INDEX index_CourseBlockReplicate_cbDestination_cbPending ON CourseBlockReplicate (cbDestination, cbPending)'; _stmtList.add_11rb$(element_115); var element_116 = 'CREATE TABLE IF NOT EXISTS CourseTerminologyReplicate ( ctPk INTEGER NOT NULL , ctVersionId INTEGER NOT NULL DEFAULT 0 , ctDestination INTEGER NOT NULL , ctPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ctPk, ctDestination) )'; _stmtList.add_11rb$(element_116); var element_117 = 'CREATE INDEX index_CourseTerminologyReplicate_ctPk_ctDestination_ctVersionId ON CourseTerminologyReplicate (ctPk, ctDestination, ctVersionId)'; _stmtList.add_11rb$(element_117); var element_118 = 'CREATE INDEX index_CourseTerminologyReplicate_ctDestination_ctPending ON CourseTerminologyReplicate (ctDestination, ctPending)'; _stmtList.add_11rb$(element_118); var element_119 = 'CREATE TABLE IF NOT EXISTS CourseGroupSetReplicate ( cgsPk INTEGER NOT NULL , cgsVersionId INTEGER NOT NULL DEFAULT 0 , cgsDestination INTEGER NOT NULL , cgsPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cgsPk, cgsDestination) )'; _stmtList.add_11rb$(element_119); var element_120 = 'CREATE INDEX index_CourseGroupSetReplicate_cgsPk_cgsDestination_cgsVersionId ON CourseGroupSetReplicate (cgsPk, cgsDestination, cgsVersionId)'; _stmtList.add_11rb$(element_120); var element_121 = 'CREATE INDEX index_CourseGroupSetReplicate_cgsDestination_cgsPending ON CourseGroupSetReplicate (cgsDestination, cgsPending)'; _stmtList.add_11rb$(element_121); var element_122 = 'CREATE TABLE IF NOT EXISTS CourseGroupMemberReplicate ( cgmPk INTEGER NOT NULL , cgmVersionId INTEGER NOT NULL DEFAULT 0 , cgmDestination INTEGER NOT NULL , cgmPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cgmPk, cgmDestination) )'; _stmtList.add_11rb$(element_122); var element_123 = 'CREATE INDEX index_CourseGroupMemberReplicate_cgmPk_cgmDestination_cgmVersionId ON CourseGroupMemberReplicate (cgmPk, cgmDestination, cgmVersionId)'; _stmtList.add_11rb$(element_123); var element_124 = 'CREATE INDEX index_CourseGroupMemberReplicate_cgmDestination_cgmPending ON CourseGroupMemberReplicate (cgmDestination, cgmPending)'; _stmtList.add_11rb$(element_124); var element_125 = 'CREATE TABLE IF NOT EXISTS ScheduleReplicate ( schedulePk INTEGER NOT NULL , scheduleVersionId INTEGER NOT NULL DEFAULT 0 , scheduleDestination INTEGER NOT NULL , schedulePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (schedulePk, scheduleDestination) )'; _stmtList.add_11rb$(element_125); var element_126 = 'CREATE INDEX index_ScheduleReplicate_schedulePk_scheduleDestination_scheduleVersionId ON ScheduleReplicate (schedulePk, scheduleDestination, scheduleVersionId)'; _stmtList.add_11rb$(element_126); var element_127 = 'CREATE INDEX index_ScheduleReplicate_scheduleDestination_schedulePending ON ScheduleReplicate (scheduleDestination, schedulePending)'; _stmtList.add_11rb$(element_127); var element_128 = 'CREATE TABLE IF NOT EXISTS HolidayCalendarReplicate ( hcPk INTEGER NOT NULL , hcVersionId INTEGER NOT NULL DEFAULT 0 , hcDestination INTEGER NOT NULL , hcPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (hcPk, hcDestination) )'; _stmtList.add_11rb$(element_128); var element_129 = 'CREATE INDEX index_HolidayCalendarReplicate_hcPk_hcDestination_hcVersionId ON HolidayCalendarReplicate (hcPk, hcDestination, hcVersionId)'; _stmtList.add_11rb$(element_129); var element_130 = 'CREATE INDEX index_HolidayCalendarReplicate_hcDestination_hcPending ON HolidayCalendarReplicate (hcDestination, hcPending)'; _stmtList.add_11rb$(element_130); var element_131 = 'CREATE TABLE IF NOT EXISTS HolidayReplicate ( holidayPk INTEGER NOT NULL , holidayVersionId INTEGER NOT NULL DEFAULT 0 , holidayDestination INTEGER NOT NULL , holidayPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (holidayPk, holidayDestination) )'; _stmtList.add_11rb$(element_131); var element_132 = 'CREATE INDEX index_HolidayReplicate_holidayPk_holidayDestination_holidayVersionId ON HolidayReplicate (holidayPk, holidayDestination, holidayVersionId)'; _stmtList.add_11rb$(element_132); var element_133 = 'CREATE INDEX index_HolidayReplicate_holidayDestination_holidayPending ON HolidayReplicate (holidayDestination, holidayPending)'; _stmtList.add_11rb$(element_133); var element_134 = 'CREATE TABLE IF NOT EXISTS PersonReplicate ( personPk INTEGER NOT NULL , personVersionId INTEGER NOT NULL DEFAULT 0 , personDestination INTEGER NOT NULL , personPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (personPk, personDestination) )'; _stmtList.add_11rb$(element_134); var element_135 = 'CREATE INDEX index_PersonReplicate_personPk_personDestination_personVersionId ON PersonReplicate (personPk, personDestination, personVersionId)'; _stmtList.add_11rb$(element_135); var element_136 = 'CREATE INDEX index_PersonReplicate_personDestination_personPending ON PersonReplicate (personDestination, personPending)'; _stmtList.add_11rb$(element_136); var element_137 = 'CREATE TABLE IF NOT EXISTS ClazzReplicate ( clazzPk INTEGER NOT NULL , clazzVersionId INTEGER NOT NULL DEFAULT 0 , clazzDestination INTEGER NOT NULL , clazzPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (clazzPk, clazzDestination) )'; _stmtList.add_11rb$(element_137); var element_138 = 'CREATE INDEX index_ClazzReplicate_clazzPk_clazzDestination_clazzVersionId ON ClazzReplicate (clazzPk, clazzDestination, clazzVersionId)'; _stmtList.add_11rb$(element_138); var element_139 = 'CREATE INDEX index_ClazzReplicate_clazzDestination_clazzPending ON ClazzReplicate (clazzDestination, clazzPending)'; _stmtList.add_11rb$(element_139); var element_140 = 'CREATE TABLE IF NOT EXISTS ClazzEnrolmentReplicate ( cePk INTEGER NOT NULL , ceVersionId INTEGER NOT NULL DEFAULT 0 , ceDestination INTEGER NOT NULL , cePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cePk, ceDestination) )'; _stmtList.add_11rb$(element_140); var element_141 = 'CREATE INDEX index_ClazzEnrolmentReplicate_cePk_ceDestination_ceVersionId ON ClazzEnrolmentReplicate (cePk, ceDestination, ceVersionId)'; _stmtList.add_11rb$(element_141); var element_142 = 'CREATE INDEX index_ClazzEnrolmentReplicate_ceDestination_cePending ON ClazzEnrolmentReplicate (ceDestination, cePending)'; _stmtList.add_11rb$(element_142); var element_143 = 'CREATE TABLE IF NOT EXISTS LeavingReasonReplicate ( lrPk INTEGER NOT NULL , lrVersionId INTEGER NOT NULL DEFAULT 0 , lrDestination INTEGER NOT NULL , lrPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (lrPk, lrDestination) )'; _stmtList.add_11rb$(element_143); var element_144 = 'CREATE INDEX index_LeavingReasonReplicate_lrPk_lrDestination_lrVersionId ON LeavingReasonReplicate (lrPk, lrDestination, lrVersionId)'; _stmtList.add_11rb$(element_144); var element_145 = 'CREATE INDEX index_LeavingReasonReplicate_lrDestination_lrPending ON LeavingReasonReplicate (lrDestination, lrPending)'; _stmtList.add_11rb$(element_145); var element_146 = 'CREATE TABLE IF NOT EXISTS ContentEntryReplicate ( cePk INTEGER NOT NULL , ceVersionId INTEGER NOT NULL DEFAULT 0 , ceDestination INTEGER NOT NULL , cePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cePk, ceDestination) )'; _stmtList.add_11rb$(element_146); var element_147 = 'CREATE INDEX index_ContentEntryReplicate_cePk_ceDestination_ceVersionId ON ContentEntryReplicate (cePk, ceDestination, ceVersionId)'; _stmtList.add_11rb$(element_147); var element_148 = 'CREATE INDEX index_ContentEntryReplicate_ceDestination_cePending ON ContentEntryReplicate (ceDestination, cePending)'; _stmtList.add_11rb$(element_148); var element_149 = 'CREATE TABLE IF NOT EXISTS ContentEntryContentCategoryJoinReplicate ( ceccjPk INTEGER NOT NULL , ceccjVersionId INTEGER NOT NULL DEFAULT 0 , ceccjDestination INTEGER NOT NULL , ceccjPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ceccjPk, ceccjDestination) )'; _stmtList.add_11rb$(element_149); var element_150 = 'CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjPk_ceccjDestination_ceccjVersionId ON ContentEntryContentCategoryJoinReplicate (ceccjPk, ceccjDestination, ceccjVersionId)'; _stmtList.add_11rb$(element_150); var element_151 = 'CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjDestination_ceccjPending ON ContentEntryContentCategoryJoinReplicate (ceccjDestination, ceccjPending)'; _stmtList.add_11rb$(element_151); var element_152 = 'CREATE TABLE IF NOT EXISTS ContentEntryParentChildJoinReplicate ( cepcjPk INTEGER NOT NULL , cepcjVersionId INTEGER NOT NULL DEFAULT 0 , cepcjDestination INTEGER NOT NULL , cepcjPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cepcjPk, cepcjDestination) )'; _stmtList.add_11rb$(element_152); var element_153 = 'CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjPk_cepcjDestination_cepcjVersionId ON ContentEntryParentChildJoinReplicate (cepcjPk, cepcjDestination, cepcjVersionId)'; _stmtList.add_11rb$(element_153); var element_154 = 'CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjDestination_cepcjPending ON ContentEntryParentChildJoinReplicate (cepcjDestination, cepcjPending)'; _stmtList.add_11rb$(element_154); var element_155 = 'CREATE TABLE IF NOT EXISTS ContentEntryRelatedEntryJoinReplicate ( cerejPk INTEGER NOT NULL , cerejVersionId INTEGER NOT NULL DEFAULT 0 , cerejDestination INTEGER NOT NULL , cerejPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cerejPk, cerejDestination) )'; _stmtList.add_11rb$(element_155); var element_156 = 'CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejPk_cerejDestination_cerejVersionId ON ContentEntryRelatedEntryJoinReplicate (cerejPk, cerejDestination, cerejVersionId)'; _stmtList.add_11rb$(element_156); var element_157 = 'CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejDestination_cerejPending ON ContentEntryRelatedEntryJoinReplicate (cerejDestination, cerejPending)'; _stmtList.add_11rb$(element_157); var element_158 = 'CREATE TABLE IF NOT EXISTS ContentCategorySchemaReplicate ( ccsPk INTEGER NOT NULL , ccsVersionId INTEGER NOT NULL DEFAULT 0 , ccsDestination INTEGER NOT NULL , ccsPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ccsPk, ccsDestination) )'; _stmtList.add_11rb$(element_158); var element_159 = 'CREATE INDEX index_ContentCategorySchemaReplicate_ccsPk_ccsDestination_ccsVersionId ON ContentCategorySchemaReplicate (ccsPk, ccsDestination, ccsVersionId)'; _stmtList.add_11rb$(element_159); var element_160 = 'CREATE INDEX index_ContentCategorySchemaReplicate_ccsDestination_ccsPending ON ContentCategorySchemaReplicate (ccsDestination, ccsPending)'; _stmtList.add_11rb$(element_160); var element_161 = 'CREATE TABLE IF NOT EXISTS ContentCategoryReplicate ( ccPk INTEGER NOT NULL , ccVersionId INTEGER NOT NULL DEFAULT 0 , ccDestination INTEGER NOT NULL , ccPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ccPk, ccDestination) )'; _stmtList.add_11rb$(element_161); var element_162 = 'CREATE INDEX index_ContentCategoryReplicate_ccPk_ccDestination_ccVersionId ON ContentCategoryReplicate (ccPk, ccDestination, ccVersionId)'; _stmtList.add_11rb$(element_162); var element_163 = 'CREATE INDEX index_ContentCategoryReplicate_ccDestination_ccPending ON ContentCategoryReplicate (ccDestination, ccPending)'; _stmtList.add_11rb$(element_163); var element_164 = 'CREATE TABLE IF NOT EXISTS LanguageReplicate ( languagePk INTEGER NOT NULL , languageVersionId INTEGER NOT NULL DEFAULT 0 , languageDestination INTEGER NOT NULL , languagePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (languagePk, languageDestination) )'; _stmtList.add_11rb$(element_164); var element_165 = 'CREATE INDEX index_LanguageReplicate_languagePk_languageDestination_languageVersionId ON LanguageReplicate (languagePk, languageDestination, languageVersionId)'; _stmtList.add_11rb$(element_165); var element_166 = 'CREATE INDEX index_LanguageReplicate_languageDestination_languagePending ON LanguageReplicate (languageDestination, languagePending)'; _stmtList.add_11rb$(element_166); var element_167 = 'CREATE TABLE IF NOT EXISTS LanguageVariantReplicate ( lvPk INTEGER NOT NULL , lvVersionId INTEGER NOT NULL DEFAULT 0 , lvDestination INTEGER NOT NULL , lvPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (lvPk, lvDestination) )'; _stmtList.add_11rb$(element_167); var element_168 = 'CREATE INDEX index_LanguageVariantReplicate_lvPk_lvDestination_lvVersionId ON LanguageVariantReplicate (lvPk, lvDestination, lvVersionId)'; _stmtList.add_11rb$(element_168); var element_169 = 'CREATE INDEX index_LanguageVariantReplicate_lvDestination_lvPending ON LanguageVariantReplicate (lvDestination, lvPending)'; _stmtList.add_11rb$(element_169); var element_170 = 'CREATE TABLE IF NOT EXISTS PersonGroupReplicate ( pgPk INTEGER NOT NULL , pgVersionId INTEGER NOT NULL DEFAULT 0 , pgDestination INTEGER NOT NULL , pgPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (pgPk, pgDestination) )'; _stmtList.add_11rb$(element_170); var element_171 = 'CREATE INDEX index_PersonGroupReplicate_pgPk_pgDestination_pgVersionId ON PersonGroupReplicate (pgPk, pgDestination, pgVersionId)'; _stmtList.add_11rb$(element_171); var element_172 = 'CREATE INDEX index_PersonGroupReplicate_pgDestination_pgPending ON PersonGroupReplicate (pgDestination, pgPending)'; _stmtList.add_11rb$(element_172); var element_173 = 'CREATE TABLE IF NOT EXISTS PersonGroupMemberReplicate ( pgmPk INTEGER NOT NULL , pgmVersionId INTEGER NOT NULL DEFAULT 0 , pgmDestination INTEGER NOT NULL , pgmPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (pgmPk, pgmDestination) )'; _stmtList.add_11rb$(element_173); var element_174 = 'CREATE INDEX index_PersonGroupMemberReplicate_pgmPk_pgmDestination_pgmVersionId ON PersonGroupMemberReplicate (pgmPk, pgmDestination, pgmVersionId)'; _stmtList.add_11rb$(element_174); var element_175 = 'CREATE INDEX index_PersonGroupMemberReplicate_pgmDestination_pgmPending ON PersonGroupMemberReplicate (pgmDestination, pgmPending)'; _stmtList.add_11rb$(element_175); var element_176 = 'CREATE TABLE IF NOT EXISTS PersonPictureReplicate ( ppPk INTEGER NOT NULL , ppVersionId INTEGER NOT NULL DEFAULT 0 , ppDestination INTEGER NOT NULL , ppPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ppPk, ppDestination) )'; _stmtList.add_11rb$(element_176); var element_177 = 'CREATE INDEX index_PersonPictureReplicate_ppPk_ppDestination_ppVersionId ON PersonPictureReplicate (ppPk, ppDestination, ppVersionId)'; _stmtList.add_11rb$(element_177); var element_178 = 'CREATE INDEX index_PersonPictureReplicate_ppDestination_ppPending ON PersonPictureReplicate (ppDestination, ppPending)'; _stmtList.add_11rb$(element_178); var element_179 = 'CREATE TABLE IF NOT EXISTS ContainerReplicate ( containerPk INTEGER NOT NULL , containerVersionId INTEGER NOT NULL DEFAULT 0 , containerDestination INTEGER NOT NULL , containerPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (containerPk, containerDestination) )'; _stmtList.add_11rb$(element_179); var element_180 = 'CREATE INDEX index_ContainerReplicate_containerPk_containerDestination_containerVersionId ON ContainerReplicate (containerPk, containerDestination, containerVersionId)'; _stmtList.add_11rb$(element_180); var element_181 = 'CREATE INDEX index_ContainerReplicate_containerDestination_containerPending ON ContainerReplicate (containerDestination, containerPending)'; _stmtList.add_11rb$(element_181); var element_182 = 'CREATE TABLE IF NOT EXISTS VerbEntityReplicate ( vePk INTEGER NOT NULL , veVersionId INTEGER NOT NULL DEFAULT 0 , veDestination INTEGER NOT NULL , vePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (vePk, veDestination) )'; _stmtList.add_11rb$(element_182); var element_183 = 'CREATE INDEX index_VerbEntityReplicate_vePk_veDestination_veVersionId ON VerbEntityReplicate (vePk, veDestination, veVersionId)'; _stmtList.add_11rb$(element_183); var element_184 = 'CREATE INDEX index_VerbEntityReplicate_veDestination_vePending ON VerbEntityReplicate (veDestination, vePending)'; _stmtList.add_11rb$(element_184); var element_185 = 'CREATE TABLE IF NOT EXISTS XObjectEntityReplicate ( xoePk INTEGER NOT NULL , xoeVersionId INTEGER NOT NULL DEFAULT 0 , xoeDestination INTEGER NOT NULL , xoePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (xoePk, xoeDestination) )'; _stmtList.add_11rb$(element_185); var element_186 = 'CREATE INDEX index_XObjectEntityReplicate_xoePk_xoeDestination_xoeVersionId ON XObjectEntityReplicate (xoePk, xoeDestination, xoeVersionId)'; _stmtList.add_11rb$(element_186); var element_187 = 'CREATE INDEX index_XObjectEntityReplicate_xoeDestination_xoePending ON XObjectEntityReplicate (xoeDestination, xoePending)'; _stmtList.add_11rb$(element_187); var element_188 = 'CREATE TABLE IF NOT EXISTS StatementEntityReplicate ( sePk INTEGER NOT NULL , seVersionId INTEGER NOT NULL DEFAULT 0 , seDestination INTEGER NOT NULL , sePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (sePk, seDestination) )'; _stmtList.add_11rb$(element_188); var element_189 = 'CREATE INDEX index_StatementEntityReplicate_sePk_seDestination_seVersionId ON StatementEntityReplicate (sePk, seDestination, seVersionId)'; _stmtList.add_11rb$(element_189); var element_190 = 'CREATE INDEX index_StatementEntityReplicate_seDestination_sePending ON StatementEntityReplicate (seDestination, sePending)'; _stmtList.add_11rb$(element_190); var element_191 = 'CREATE TABLE IF NOT EXISTS ContextXObjectStatementJoinReplicate ( cxosjPk INTEGER NOT NULL , cxosjVersionId INTEGER NOT NULL DEFAULT 0 , cxosjDestination INTEGER NOT NULL , cxosjPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cxosjPk, cxosjDestination) )'; _stmtList.add_11rb$(element_191); var element_192 = 'CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjPk_cxosjDestination_cxosjVersionId ON ContextXObjectStatementJoinReplicate (cxosjPk, cxosjDestination, cxosjVersionId)'; _stmtList.add_11rb$(element_192); var element_193 = 'CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjDestination_cxosjPending ON ContextXObjectStatementJoinReplicate (cxosjDestination, cxosjPending)'; _stmtList.add_11rb$(element_193); var element_194 = 'CREATE TABLE IF NOT EXISTS AgentEntityReplicate ( aePk INTEGER NOT NULL , aeVersionId INTEGER NOT NULL DEFAULT 0 , aeDestination INTEGER NOT NULL , aePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (aePk, aeDestination) )'; _stmtList.add_11rb$(element_194); var element_195 = 'CREATE INDEX index_AgentEntityReplicate_aePk_aeDestination_aeVersionId ON AgentEntityReplicate (aePk, aeDestination, aeVersionId)'; _stmtList.add_11rb$(element_195); var element_196 = 'CREATE INDEX index_AgentEntityReplicate_aeDestination_aePending ON AgentEntityReplicate (aeDestination, aePending)'; _stmtList.add_11rb$(element_196); var element_197 = 'CREATE TABLE IF NOT EXISTS StateEntityReplicate ( sePk INTEGER NOT NULL , seVersionId INTEGER NOT NULL DEFAULT 0 , seDestination INTEGER NOT NULL , sePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (sePk, seDestination) )'; _stmtList.add_11rb$(element_197); var element_198 = 'CREATE INDEX index_StateEntityReplicate_sePk_seDestination_seVersionId ON StateEntityReplicate (sePk, seDestination, seVersionId)'; _stmtList.add_11rb$(element_198); var element_199 = 'CREATE INDEX index_StateEntityReplicate_seDestination_sePending ON StateEntityReplicate (seDestination, sePending)'; _stmtList.add_11rb$(element_199); var element_200 = 'CREATE TABLE IF NOT EXISTS StateContentEntityReplicate ( scePk INTEGER NOT NULL , sceVersionId INTEGER NOT NULL DEFAULT 0 , sceDestination INTEGER NOT NULL , scePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (scePk, sceDestination) )'; _stmtList.add_11rb$(element_200); var element_201 = 'CREATE INDEX index_StateContentEntityReplicate_scePk_sceDestination_sceVersionId ON StateContentEntityReplicate (scePk, sceDestination, sceVersionId)'; _stmtList.add_11rb$(element_201); var element_202 = 'CREATE INDEX index_StateContentEntityReplicate_sceDestination_scePending ON StateContentEntityReplicate (sceDestination, scePending)'; _stmtList.add_11rb$(element_202); var element_203 = 'CREATE TABLE IF NOT EXISTS XLangMapEntryReplicate ( xlmePk INTEGER NOT NULL , xlmeVersionId INTEGER NOT NULL DEFAULT 0 , xlmeDestination INTEGER NOT NULL , xlmePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (xlmePk, xlmeDestination) )'; _stmtList.add_11rb$(element_203); var element_204 = 'CREATE INDEX index_XLangMapEntryReplicate_xlmePk_xlmeDestination_xlmeVersionId ON XLangMapEntryReplicate (xlmePk, xlmeDestination, xlmeVersionId)'; _stmtList.add_11rb$(element_204); var element_205 = 'CREATE INDEX index_XLangMapEntryReplicate_xlmeDestination_xlmePending ON XLangMapEntryReplicate (xlmeDestination, xlmePending)'; _stmtList.add_11rb$(element_205); var element_206 = 'CREATE TABLE IF NOT EXISTS SchoolReplicate ( schoolPk INTEGER NOT NULL , schoolVersionId INTEGER NOT NULL DEFAULT 0 , schoolDestination INTEGER NOT NULL , schoolPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (schoolPk, schoolDestination) )'; _stmtList.add_11rb$(element_206); var element_207 = 'CREATE INDEX index_SchoolReplicate_schoolPk_schoolDestination_schoolVersionId ON SchoolReplicate (schoolPk, schoolDestination, schoolVersionId)'; _stmtList.add_11rb$(element_207); var element_208 = 'CREATE INDEX index_SchoolReplicate_schoolDestination_schoolPending ON SchoolReplicate (schoolDestination, schoolPending)'; _stmtList.add_11rb$(element_208); var element_209 = 'CREATE TABLE IF NOT EXISTS SchoolMemberReplicate ( smPk INTEGER NOT NULL , smVersionId INTEGER NOT NULL DEFAULT 0 , smDestination INTEGER NOT NULL , smPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (smPk, smDestination) )'; _stmtList.add_11rb$(element_209); var element_210 = 'CREATE INDEX index_SchoolMemberReplicate_smPk_smDestination_smVersionId ON SchoolMemberReplicate (smPk, smDestination, smVersionId)'; _stmtList.add_11rb$(element_210); var element_211 = 'CREATE INDEX index_SchoolMemberReplicate_smDestination_smPending ON SchoolMemberReplicate (smDestination, smPending)'; _stmtList.add_11rb$(element_211); var element_212 = 'CREATE TABLE IF NOT EXISTS CommentsReplicate ( commentsPk INTEGER NOT NULL , commentsVersionId INTEGER NOT NULL DEFAULT 0 , commentsDestination INTEGER NOT NULL , commentsPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (commentsPk, commentsDestination) )'; _stmtList.add_11rb$(element_212); var element_213 = 'CREATE INDEX index_CommentsReplicate_commentsPk_commentsDestination_commentsVersionId ON CommentsReplicate (commentsPk, commentsDestination, commentsVersionId)'; _stmtList.add_11rb$(element_213); var element_214 = 'CREATE INDEX index_CommentsReplicate_commentsDestination_commentsPending ON CommentsReplicate (commentsDestination, commentsPending)'; _stmtList.add_11rb$(element_214); var element_215 = 'CREATE TABLE IF NOT EXISTS ReportReplicate ( reportPk INTEGER NOT NULL , reportVersionId INTEGER NOT NULL DEFAULT 0 , reportDestination INTEGER NOT NULL , reportPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (reportPk, reportDestination) )'; _stmtList.add_11rb$(element_215); var element_216 = 'CREATE INDEX index_ReportReplicate_reportPk_reportDestination_reportVersionId ON ReportReplicate (reportPk, reportDestination, reportVersionId)'; _stmtList.add_11rb$(element_216); var element_217 = 'CREATE INDEX index_ReportReplicate_reportDestination_reportPending ON ReportReplicate (reportDestination, reportPending)'; _stmtList.add_11rb$(element_217); var element_218 = 'CREATE TABLE IF NOT EXISTS SiteReplicate ( sitePk INTEGER NOT NULL , siteVersionId INTEGER NOT NULL DEFAULT 0 , siteDestination INTEGER NOT NULL , sitePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (sitePk, siteDestination) )'; _stmtList.add_11rb$(element_218); var element_219 = 'CREATE INDEX index_SiteReplicate_sitePk_siteDestination_siteVersionId ON SiteReplicate (sitePk, siteDestination, siteVersionId)'; _stmtList.add_11rb$(element_219); var element_220 = 'CREATE INDEX index_SiteReplicate_siteDestination_sitePending ON SiteReplicate (siteDestination, sitePending)'; _stmtList.add_11rb$(element_220); var element_221 = 'CREATE TABLE IF NOT EXISTS LearnerGroupReplicate ( lgPk INTEGER NOT NULL , lgVersionId INTEGER NOT NULL DEFAULT 0 , lgDestination INTEGER NOT NULL , lgPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (lgPk, lgDestination) )'; _stmtList.add_11rb$(element_221); var element_222 = 'CREATE INDEX index_LearnerGroupReplicate_lgPk_lgDestination_lgVersionId ON LearnerGroupReplicate (lgPk, lgDestination, lgVersionId)'; _stmtList.add_11rb$(element_222); var element_223 = 'CREATE INDEX index_LearnerGroupReplicate_lgDestination_lgPending ON LearnerGroupReplicate (lgDestination, lgPending)'; _stmtList.add_11rb$(element_223); var element_224 = 'CREATE TABLE IF NOT EXISTS LearnerGroupMemberReplicate ( lgmPk INTEGER NOT NULL , lgmVersionId INTEGER NOT NULL DEFAULT 0 , lgmDestination INTEGER NOT NULL , lgmPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (lgmPk, lgmDestination) )'; _stmtList.add_11rb$(element_224); var element_225 = 'CREATE INDEX index_LearnerGroupMemberReplicate_lgmPk_lgmDestination_lgmVersionId ON LearnerGroupMemberReplicate (lgmPk, lgmDestination, lgmVersionId)'; _stmtList.add_11rb$(element_225); var element_226 = 'CREATE INDEX index_LearnerGroupMemberReplicate_lgmDestination_lgmPending ON LearnerGroupMemberReplicate (lgmDestination, lgmPending)'; _stmtList.add_11rb$(element_226); var element_227 = 'CREATE TABLE IF NOT EXISTS GroupLearningSessionReplicate ( glsPk INTEGER NOT NULL , glsVersionId INTEGER NOT NULL DEFAULT 0 , glsDestination INTEGER NOT NULL , glsPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (glsPk, glsDestination) )'; _stmtList.add_11rb$(element_227); var element_228 = 'CREATE INDEX index_GroupLearningSessionReplicate_glsPk_glsDestination_glsVersionId ON GroupLearningSessionReplicate (glsPk, glsDestination, glsVersionId)'; _stmtList.add_11rb$(element_228); var element_229 = 'CREATE INDEX index_GroupLearningSessionReplicate_glsDestination_glsPending ON GroupLearningSessionReplicate (glsDestination, glsPending)'; _stmtList.add_11rb$(element_229); var element_230 = 'CREATE TABLE IF NOT EXISTS SiteTermsReplicate ( stPk INTEGER NOT NULL , stVersionId INTEGER NOT NULL DEFAULT 0 , stDestination INTEGER NOT NULL , stPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (stPk, stDestination) )'; _stmtList.add_11rb$(element_230); var element_231 = 'CREATE INDEX index_SiteTermsReplicate_stPk_stDestination_stVersionId ON SiteTermsReplicate (stPk, stDestination, stVersionId)'; _stmtList.add_11rb$(element_231); var element_232 = 'CREATE INDEX index_SiteTermsReplicate_stDestination_stPending ON SiteTermsReplicate (stDestination, stPending)'; _stmtList.add_11rb$(element_232); var element_233 = 'CREATE TABLE IF NOT EXISTS ClazzContentJoinReplicate ( ccjPk INTEGER NOT NULL , ccjVersionId INTEGER NOT NULL DEFAULT 0 , ccjDestination INTEGER NOT NULL , ccjPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ccjPk, ccjDestination) )'; _stmtList.add_11rb$(element_233); var element_234 = 'CREATE INDEX index_ClazzContentJoinReplicate_ccjPk_ccjDestination_ccjVersionId ON ClazzContentJoinReplicate (ccjPk, ccjDestination, ccjVersionId)'; _stmtList.add_11rb$(element_234); var element_235 = 'CREATE INDEX index_ClazzContentJoinReplicate_ccjDestination_ccjPending ON ClazzContentJoinReplicate (ccjDestination, ccjPending)'; _stmtList.add_11rb$(element_235); var element_236 = 'CREATE TABLE IF NOT EXISTS PersonParentJoinReplicate ( ppjPk INTEGER NOT NULL , ppjVersionId INTEGER NOT NULL DEFAULT 0 , ppjDestination INTEGER NOT NULL , ppjPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ppjPk, ppjDestination) )'; _stmtList.add_11rb$(element_236); var element_237 = 'CREATE INDEX index_PersonParentJoinReplicate_ppjPk_ppjDestination_ppjVersionId ON PersonParentJoinReplicate (ppjPk, ppjDestination, ppjVersionId)'; _stmtList.add_11rb$(element_237); var element_238 = 'CREATE INDEX index_PersonParentJoinReplicate_ppjDestination_ppjPending ON PersonParentJoinReplicate (ppjDestination, ppjPending)'; _stmtList.add_11rb$(element_238); var element_239 = 'CREATE TABLE IF NOT EXISTS ScopedGrantReplicate ( sgPk INTEGER NOT NULL , sgVersionId INTEGER NOT NULL DEFAULT 0 , sgDestination INTEGER NOT NULL , sgPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (sgPk, sgDestination) )'; _stmtList.add_11rb$(element_239); var element_240 = 'CREATE INDEX index_ScopedGrantReplicate_sgPk_sgDestination_sgVersionId ON ScopedGrantReplicate (sgPk, sgDestination, sgVersionId)'; _stmtList.add_11rb$(element_240); var element_241 = 'CREATE INDEX index_ScopedGrantReplicate_sgDestination_sgPending ON ScopedGrantReplicate (sgDestination, sgPending)'; _stmtList.add_11rb$(element_241); var element_242 = 'CREATE TABLE IF NOT EXISTS ErrorReportReplicate ( erPk INTEGER NOT NULL , erVersionId INTEGER NOT NULL DEFAULT 0 , erDestination INTEGER NOT NULL , erPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (erPk, erDestination) )'; _stmtList.add_11rb$(element_242); var element_243 = 'CREATE INDEX index_ErrorReportReplicate_erPk_erDestination_erVersionId ON ErrorReportReplicate (erPk, erDestination, erVersionId)'; _stmtList.add_11rb$(element_243); var element_244 = 'CREATE INDEX index_ErrorReportReplicate_erDestination_erPending ON ErrorReportReplicate (erDestination, erPending)'; _stmtList.add_11rb$(element_244); var element_245 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentReplicate ( caPk INTEGER NOT NULL , caVersionId INTEGER NOT NULL DEFAULT 0 , caDestination INTEGER NOT NULL , caPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (caPk, caDestination) )'; _stmtList.add_11rb$(element_245); var element_246 = 'CREATE INDEX index_ClazzAssignmentReplicate_caPk_caDestination_caVersionId ON ClazzAssignmentReplicate (caPk, caDestination, caVersionId)'; _stmtList.add_11rb$(element_246); var element_247 = 'CREATE INDEX index_ClazzAssignmentReplicate_caDestination_caPending ON ClazzAssignmentReplicate (caDestination, caPending)'; _stmtList.add_11rb$(element_247); var element_248 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoinReplicate ( cacjPk INTEGER NOT NULL , cacjVersionId INTEGER NOT NULL DEFAULT 0 , cacjDestination INTEGER NOT NULL , cacjPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cacjPk, cacjDestination) )'; _stmtList.add_11rb$(element_248); var element_249 = 'CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjPk_cacjDestination_cacjVersionId ON ClazzAssignmentContentJoinReplicate (cacjPk, cacjDestination, cacjVersionId)'; _stmtList.add_11rb$(element_249); var element_250 = 'CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjDestination_cacjPending ON ClazzAssignmentContentJoinReplicate (cacjDestination, cacjPending)'; _stmtList.add_11rb$(element_250); var element_251 = 'CREATE TABLE IF NOT EXISTS PersonAuth2Replicate ( paPk INTEGER NOT NULL , paVersionId INTEGER NOT NULL DEFAULT 0 , paDestination INTEGER NOT NULL , paPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (paPk, paDestination) )'; _stmtList.add_11rb$(element_251); var element_252 = 'CREATE INDEX index_PersonAuth2Replicate_paPk_paDestination_paVersionId ON PersonAuth2Replicate (paPk, paDestination, paVersionId)'; _stmtList.add_11rb$(element_252); var element_253 = 'CREATE INDEX index_PersonAuth2Replicate_paDestination_paPending ON PersonAuth2Replicate (paDestination, paPending)'; _stmtList.add_11rb$(element_253); var element_254 = 'CREATE TABLE IF NOT EXISTS UserSessionReplicate ( usPk INTEGER NOT NULL , usVersionId INTEGER NOT NULL DEFAULT 0 , usDestination INTEGER NOT NULL , usPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (usPk, usDestination) )'; _stmtList.add_11rb$(element_254); var element_255 = 'CREATE INDEX index_UserSessionReplicate_usPk_usDestination_usVersionId ON UserSessionReplicate (usPk, usDestination, usVersionId)'; _stmtList.add_11rb$(element_255); var element_256 = 'CREATE INDEX index_UserSessionReplicate_usDestination_usPending ON UserSessionReplicate (usDestination, usPending)'; _stmtList.add_11rb$(element_256); var element_257 = 'CREATE TABLE IF NOT EXISTS CoursePicture ( coursePictureClazzUid INTEGER NOT NULL , coursePictureMasterCsn INTEGER NOT NULL , coursePictureLocalCsn INTEGER NOT NULL , coursePictureLastChangedBy INTEGER NOT NULL , coursePictureLct INTEGER NOT NULL , coursePictureUri TEXT , coursePictureMd5 TEXT , coursePictureFileSize INTEGER NOT NULL , coursePictureTimestamp INTEGER NOT NULL , coursePictureMimeType TEXT , coursePictureActive INTEGER NOT NULL , coursePictureUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_257); var element_258 = 'CREATE TABLE IF NOT EXISTS CoursePictureReplicate ( cpPk INTEGER NOT NULL , cpVersionId INTEGER NOT NULL DEFAULT 0 , cpDestination INTEGER NOT NULL , cpPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cpPk, cpDestination) )'; _stmtList.add_11rb$(element_258); var element_259 = 'CREATE INDEX index_CoursePictureReplicate_cpPk_cpDestination_cpVersionId ON CoursePictureReplicate (cpPk, cpDestination, cpVersionId)'; _stmtList.add_11rb$(element_259); var element_260 = 'CREATE INDEX index_CoursePictureReplicate_cpDestination_cpPending ON CoursePictureReplicate (cpDestination, cpPending)'; _stmtList.add_11rb$(element_260); var element_261 = 'CREATE TABLE IF NOT EXISTS ContentEntryPicture ( cepContentEntryUid INTEGER NOT NULL , cepUri TEXT , cepMd5 TEXT , cepFileSize INTEGER NOT NULL , cepTimestamp INTEGER NOT NULL , cepMimeType TEXT , cepActive INTEGER NOT NULL , cepUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_261); var element_262 = 'CREATE TABLE IF NOT EXISTS ContentEntryPictureReplicate ( cepPk INTEGER NOT NULL , cepVersionId INTEGER NOT NULL DEFAULT 0 , cepDestination INTEGER NOT NULL , cepPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cepPk, cepDestination) )'; _stmtList.add_11rb$(element_262); var element_263 = 'CREATE INDEX index_ContentEntryPictureReplicate_cepPk_cepDestination_cepVersionId ON ContentEntryPictureReplicate (cepPk, cepDestination, cepVersionId)'; _stmtList.add_11rb$(element_263); var element_264 = 'CREATE INDEX index_ContentEntryPictureReplicate_cepDestination_cepPending ON ContentEntryPictureReplicate (cepDestination, cepPending)'; _stmtList.add_11rb$(element_264); var element_265 = 'CREATE TABLE IF NOT EXISTS Chat ( chatStartDate INTEGER NOT NULL , chatTitle TEXT , chatGroup INTEGER NOT NULL , chatLct INTEGER NOT NULL , chatUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_265); var element_266 = 'CREATE TABLE IF NOT EXISTS ChatMember ( chatMemberChatUid INTEGER NOT NULL , chatMemberPersonUid INTEGER NOT NULL , chatMemberJoinedDate INTEGER NOT NULL , chatMemberLeftDate INTEGER NOT NULL , chatMemberLct INTEGER NOT NULL , chatMemberUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_266); var element_267 = 'CREATE TABLE IF NOT EXISTS Message ( messageSenderPersonUid INTEGER NOT NULL , messageTableId INTEGER NOT NULL , messageEntityUid INTEGER NOT NULL , messageText TEXT , messageTimestamp INTEGER NOT NULL , messageClazzUid INTEGER NOT NULL , messageLct INTEGER NOT NULL , messageUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_267); var element_268 = 'CREATE TABLE IF NOT EXISTS MessageReplicate ( messagePk INTEGER NOT NULL , messageVersionId INTEGER NOT NULL DEFAULT 0 , messageDestination INTEGER NOT NULL , messagePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (messagePk, messageDestination) )'; _stmtList.add_11rb$(element_268); var element_269 = 'CREATE INDEX index_MessageReplicate_messagePk_messageDestination_messageVersionId ON MessageReplicate (messagePk, messageDestination, messageVersionId)'; _stmtList.add_11rb$(element_269); var element_270 = 'CREATE INDEX index_MessageReplicate_messageDestination_messagePending ON MessageReplicate (messageDestination, messagePending)'; _stmtList.add_11rb$(element_270); var element_271 = 'CREATE TABLE IF NOT EXISTS ChatReplicate ( chatPk INTEGER NOT NULL , chatVersionId INTEGER NOT NULL DEFAULT 0 , chatDestination INTEGER NOT NULL , chatPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (chatPk, chatDestination) )'; _stmtList.add_11rb$(element_271); var element_272 = 'CREATE INDEX index_ChatReplicate_chatPk_chatDestination_chatVersionId ON ChatReplicate (chatPk, chatDestination, chatVersionId)'; _stmtList.add_11rb$(element_272); var element_273 = 'CREATE INDEX index_ChatReplicate_chatDestination_chatPending ON ChatReplicate (chatDestination, chatPending)'; _stmtList.add_11rb$(element_273); var element_274 = 'CREATE TABLE IF NOT EXISTS ChatMemberReplicate ( chatMemberPk INTEGER NOT NULL , chatMemberVersionId INTEGER NOT NULL DEFAULT 0 , chatMemberDestination INTEGER NOT NULL , chatMemberPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (chatMemberPk, chatMemberDestination) )'; _stmtList.add_11rb$(element_274); var element_275 = 'CREATE INDEX index_ChatMemberReplicate_chatMemberPk_chatMemberDestination_chatMemberVersionId ON ChatMemberReplicate (chatMemberPk, chatMemberDestination, chatMemberVersionId)'; _stmtList.add_11rb$(element_275); var element_276 = 'CREATE INDEX index_ChatMemberReplicate_chatMemberDestination_chatMemberPending ON ChatMemberReplicate (chatMemberDestination, chatMemberPending)'; _stmtList.add_11rb$(element_276); var element_277 = 'CREATE TABLE IF NOT EXISTS MessageRead ( messageReadPersonUid INTEGER NOT NULL , messageReadMessageUid INTEGER NOT NULL , messageReadEntityUid INTEGER NOT NULL , messageReadLct INTEGER NOT NULL , messageReadUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_277); var element_278 = 'CREATE TABLE IF NOT EXISTS MessageReadReplicate ( messageReadPk INTEGER NOT NULL , messageReadVersionId INTEGER NOT NULL DEFAULT 0 , messageReadDestination INTEGER NOT NULL , messageReadPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (messageReadPk, messageReadDestination) )'; _stmtList.add_11rb$(element_278); var element_279 = 'CREATE INDEX index_MessageReadReplicate_messageReadPk_messageReadDestination_messageReadVersionId ON MessageReadReplicate (messageReadPk, messageReadDestination, messageReadVersionId)'; _stmtList.add_11rb$(element_279); var element_280 = 'CREATE INDEX index_MessageReadReplicate_messageReadDestination_messageReadPending ON MessageReadReplicate (messageReadDestination, messageReadPending)'; _stmtList.add_11rb$(element_280); var element_281 = 'CREATE TABLE IF NOT EXISTS CourseDiscussion ( courseDiscussionTitle TEXT , courseDiscussionDesc TEXT , courseDiscussionClazzUid INTEGER NOT NULL , courseDiscussionActive INTEGER NOT NULL , courseDiscussionLct INTEGER NOT NULL , courseDiscussionUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_281); var element_282 = 'CREATE TABLE IF NOT EXISTS CourseDiscussionReplicate ( courseDiscussionPk INTEGER NOT NULL , courseDiscussionVersionId INTEGER NOT NULL DEFAULT 0 , courseDiscussionDestination INTEGER NOT NULL , courseDiscussionPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (courseDiscussionPk, courseDiscussionDestination) )'; _stmtList.add_11rb$(element_282); var element_283 = 'CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionPk_courseDiscussionDestination_courseDiscussionVersionId ON CourseDiscussionReplicate (courseDiscussionPk, courseDiscussionDestination, courseDiscussionVersionId)'; _stmtList.add_11rb$(element_283); var element_284 = 'CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionDestination_courseDiscussionPending ON CourseDiscussionReplicate (courseDiscussionDestination, courseDiscussionPending)'; _stmtList.add_11rb$(element_284); var element_285 = 'CREATE TABLE IF NOT EXISTS DiscussionTopic ( discussionTopicTitle TEXT , discussionTopicDesc TEXT , discussionTopicStartDate INTEGER NOT NULL , discussionTopicCourseDiscussionUid INTEGER NOT NULL , discussionTopicVisible INTEGER NOT NULL , discussionTopicArchive INTEGER NOT NULL , discussionTopicIndex INTEGER NOT NULL , discussionTopicClazzUid INTEGER NOT NULL , discussionTopicLct INTEGER NOT NULL , discussionTopicUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_285); var element_286 = 'CREATE TABLE IF NOT EXISTS DiscussionTopicReplicate ( discussionTopicPk INTEGER NOT NULL , discussionTopicVersionId INTEGER NOT NULL DEFAULT 0 , discussionTopicDestination INTEGER NOT NULL , discussionTopicPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (discussionTopicPk, discussionTopicDestination) )'; _stmtList.add_11rb$(element_286); var element_287 = 'CREATE INDEX index_DiscussionTopicReplicate_discussionTopicPk_discussionTopicDestination_discussionTopicVersionId ON DiscussionTopicReplicate (discussionTopicPk, discussionTopicDestination, discussionTopicVersionId)'; _stmtList.add_11rb$(element_287); var element_288 = 'CREATE INDEX index_DiscussionTopicReplicate_discussionTopicDestination_discussionTopicPending ON DiscussionTopicReplicate (discussionTopicDestination, discussionTopicPending)'; _stmtList.add_11rb$(element_288); var element_289 = 'CREATE TABLE IF NOT EXISTS DiscussionPost ( discussionPostTitle TEXT , discussionPostMessage TEXT , discussionPostStartDate INTEGER NOT NULL , discussionPostDiscussionTopicUid INTEGER NOT NULL , discussionPostVisible INTEGER NOT NULL , discussionPostArchive INTEGER NOT NULL , discussionPostStartedPersonUid INTEGER NOT NULL , discussionPostClazzUid INTEGER NOT NULL , discussionPostLct INTEGER NOT NULL , discussionPostUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; _stmtList.add_11rb$(element_289); var element_290 = 'CREATE TABLE IF NOT EXISTS DiscussionPostReplicate ( discussionPostPk INTEGER NOT NULL , discussionPostVersionId INTEGER NOT NULL DEFAULT 0 , discussionPostDestination INTEGER NOT NULL , discussionPostPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (discussionPostPk, discussionPostDestination) )'; _stmtList.add_11rb$(element_290); var element_291 = 'CREATE INDEX index_DiscussionPostReplicate_discussionPostPk_discussionPostDestination_discussionPostVersionId ON DiscussionPostReplicate (discussionPostPk, discussionPostDestination, discussionPostVersionId)'; _stmtList.add_11rb$(element_291); var element_292 = 'CREATE INDEX index_DiscussionPostReplicate_discussionPostDestination_discussionPostPending ON DiscussionPostReplicate (discussionPostDestination, discussionPostPending)'; _stmtList.add_11rb$(element_292); var element_293 = ' CREATE TRIGGER ch_ins_14 AFTER INSERT ON ClazzLog BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 14 AS chTableId, NEW.clazzLogUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 14 AND chEntityPk = NEW.clazzLogUid); END '; _stmtList.add_11rb$(element_293); var element_294 = ' CREATE TRIGGER ch_upd_14 AFTER UPDATE ON ClazzLog BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 14 AS chTableId, NEW.clazzLogUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 14 AND chEntityPk = NEW.clazzLogUid); END '; _stmtList.add_11rb$(element_294); var element_295 = ' CREATE TRIGGER ch_del_14 AFTER DELETE ON ClazzLog BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 14 AS chTableId, OLD.clazzLogUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 14 AND chEntityPk = OLD.clazzLogUid); END '; _stmtList.add_11rb$(element_295); var element_296 = 'CREATE VIEW ClazzLog_ReceiveView AS SELECT ClazzLog.*, ClazzLogReplicate.* FROM ClazzLog LEFT JOIN ClazzLogReplicate ON ClazzLogReplicate.clPk = ClazzLog.clazzLogUid '; _stmtList.add_11rb$(element_296); var element_297 = ' CREATE TRIGGER clazzlog_remote_insert_ins INSTEAD OF INSERT ON ClazzLog_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzLog(clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES (NEW.clazzLogUid, NEW.clazzLogClazzUid, NEW.logDate, NEW.timeRecorded, NEW.clazzLogDone, NEW.cancellationNote, NEW.clazzLogCancelled, NEW.clazzLogNumPresent, NEW.clazzLogNumAbsent, NEW.clazzLogNumPartial, NEW.clazzLogScheduleUid, NEW.clazzLogStatusFlag, NEW.clazzLogMSQN, NEW.clazzLogLCSN, NEW.clazzLogLCB, NEW.clazzLogLastChangedTime) /*psql ON CONFLICT (clazzLogUid) DO UPDATE SET clazzLogClazzUid = EXCLUDED.clazzLogClazzUid, logDate = EXCLUDED.logDate, timeRecorded = EXCLUDED.timeRecorded, clazzLogDone = EXCLUDED.clazzLogDone, cancellationNote = EXCLUDED.cancellationNote, clazzLogCancelled = EXCLUDED.clazzLogCancelled, clazzLogNumPresent = EXCLUDED.clazzLogNumPresent, clazzLogNumAbsent = EXCLUDED.clazzLogNumAbsent, clazzLogNumPartial = EXCLUDED.clazzLogNumPartial, clazzLogScheduleUid = EXCLUDED.clazzLogScheduleUid, clazzLogStatusFlag = EXCLUDED.clazzLogStatusFlag, clazzLogMSQN = EXCLUDED.clazzLogMSQN, clazzLogLCSN = EXCLUDED.clazzLogLCSN, clazzLogLCB = EXCLUDED.clazzLogLCB, clazzLogLastChangedTime = EXCLUDED.clazzLogLastChangedTime */; END '; _stmtList.add_11rb$(element_297); var element_298 = ' CREATE TRIGGER ch_ins_15 AFTER INSERT ON ClazzLogAttendanceRecord BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 15 AS chTableId, NEW.clazzLogAttendanceRecordUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 15 AND chEntityPk = NEW.clazzLogAttendanceRecordUid); END '; _stmtList.add_11rb$(element_298); var element_299 = ' CREATE TRIGGER ch_upd_15 AFTER UPDATE ON ClazzLogAttendanceRecord BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 15 AS chTableId, NEW.clazzLogAttendanceRecordUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 15 AND chEntityPk = NEW.clazzLogAttendanceRecordUid); END '; _stmtList.add_11rb$(element_299); var element_300 = ' CREATE TRIGGER ch_del_15 AFTER DELETE ON ClazzLogAttendanceRecord BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 15 AS chTableId, OLD.clazzLogAttendanceRecordUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 15 AND chEntityPk = OLD.clazzLogAttendanceRecordUid); END '; _stmtList.add_11rb$(element_300); var element_301 = 'CREATE VIEW ClazzLogAttendanceRecord_ReceiveView AS SELECT ClazzLogAttendanceRecord.*, ClazzLogAttendanceRecordReplicate.* FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLogAttendanceRecordReplicate ON ClazzLogAttendanceRecordReplicate.clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid '; _stmtList.add_11rb$(element_301); var element_302 = ' CREATE TRIGGER clazzlogattendancerecord_remote_insert_ins INSTEAD OF INSERT ON ClazzLogAttendanceRecord_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzLogAttendanceRecord(clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES (NEW.clazzLogAttendanceRecordUid, NEW.clazzLogAttendanceRecordClazzLogUid, NEW.clazzLogAttendanceRecordPersonUid, NEW.attendanceStatus, NEW.clazzLogAttendanceRecordMasterChangeSeqNum, NEW.clazzLogAttendanceRecordLocalChangeSeqNum, NEW.clazzLogAttendanceRecordLastChangedBy, NEW.clazzLogAttendanceRecordLastChangedTime) /*psql ON CONFLICT (clazzLogAttendanceRecordUid) DO UPDATE SET clazzLogAttendanceRecordClazzLogUid = EXCLUDED.clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid = EXCLUDED.clazzLogAttendanceRecordPersonUid, attendanceStatus = EXCLUDED.attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy = EXCLUDED.clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime = EXCLUDED.clazzLogAttendanceRecordLastChangedTime */; END '; _stmtList.add_11rb$(element_302); var element_303 = ' CREATE TRIGGER ch_ins_21 AFTER INSERT ON Schedule BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 21 AS chTableId, NEW.scheduleUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 21 AND chEntityPk = NEW.scheduleUid); END '; _stmtList.add_11rb$(element_303); var element_304 = ' CREATE TRIGGER ch_upd_21 AFTER UPDATE ON Schedule BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 21 AS chTableId, NEW.scheduleUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 21 AND chEntityPk = NEW.scheduleUid); END '; _stmtList.add_11rb$(element_304); var element_305 = ' CREATE TRIGGER ch_del_21 AFTER DELETE ON Schedule BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 21 AS chTableId, OLD.scheduleUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 21 AND chEntityPk = OLD.scheduleUid); END '; _stmtList.add_11rb$(element_305); var element_306 = 'CREATE VIEW Schedule_ReceiveView AS SELECT Schedule.*, ScheduleReplicate.* FROM Schedule LEFT JOIN ScheduleReplicate ON ScheduleReplicate.schedulePk = Schedule.scheduleUid '; _stmtList.add_11rb$(element_306); var element_307 = ' CREATE TRIGGER schedule_remote_insert_ins INSTEAD OF INSERT ON Schedule_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Schedule(scheduleUid, sceduleStartTime, scheduleEndTime, scheduleDay, scheduleMonth, scheduleFrequency, umCalendarUid, scheduleClazzUid, scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum, scheduleLastChangedBy, scheduleLastChangedTime, scheduleActive) VALUES (NEW.scheduleUid, NEW.sceduleStartTime, NEW.scheduleEndTime, NEW.scheduleDay, NEW.scheduleMonth, NEW.scheduleFrequency, NEW.umCalendarUid, NEW.scheduleClazzUid, NEW.scheduleMasterChangeSeqNum, NEW.scheduleLocalChangeSeqNum, NEW.scheduleLastChangedBy, NEW.scheduleLastChangedTime, NEW.scheduleActive) /*psql ON CONFLICT (scheduleUid) DO UPDATE SET sceduleStartTime = EXCLUDED.sceduleStartTime, scheduleEndTime = EXCLUDED.scheduleEndTime, scheduleDay = EXCLUDED.scheduleDay, scheduleMonth = EXCLUDED.scheduleMonth, scheduleFrequency = EXCLUDED.scheduleFrequency, umCalendarUid = EXCLUDED.umCalendarUid, scheduleClazzUid = EXCLUDED.scheduleClazzUid, scheduleMasterChangeSeqNum = EXCLUDED.scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum = EXCLUDED.scheduleLocalChangeSeqNum, scheduleLastChangedBy = EXCLUDED.scheduleLastChangedBy, scheduleLastChangedTime = EXCLUDED.scheduleLastChangedTime, scheduleActive = EXCLUDED.scheduleActive */; END '; _stmtList.add_11rb$(element_307); var element_308 = ' CREATE TRIGGER ch_ins_28 AFTER INSERT ON HolidayCalendar BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 28 AS chTableId, NEW.umCalendarUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 28 AND chEntityPk = NEW.umCalendarUid); END '; _stmtList.add_11rb$(element_308); var element_309 = ' CREATE TRIGGER ch_upd_28 AFTER UPDATE ON HolidayCalendar BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 28 AS chTableId, NEW.umCalendarUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 28 AND chEntityPk = NEW.umCalendarUid); END '; _stmtList.add_11rb$(element_309); var element_310 = ' CREATE TRIGGER ch_del_28 AFTER DELETE ON HolidayCalendar BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 28 AS chTableId, OLD.umCalendarUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 28 AND chEntityPk = OLD.umCalendarUid); END '; _stmtList.add_11rb$(element_310); var element_311 = 'CREATE VIEW HolidayCalendar_ReceiveView AS SELECT HolidayCalendar.*, HolidayCalendarReplicate.* FROM HolidayCalendar LEFT JOIN HolidayCalendarReplicate ON HolidayCalendarReplicate.hcPk = HolidayCalendar.umCalendarUid '; _stmtList.add_11rb$(element_311); var element_312 = ' CREATE TRIGGER holidaycalendar_remote_insert_ins INSTEAD OF INSERT ON HolidayCalendar_ReceiveView FOR EACH ROW BEGIN REPLACE INTO HolidayCalendar(umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES (NEW.umCalendarUid, NEW.umCalendarName, NEW.umCalendarCategory, NEW.umCalendarActive, NEW.umCalendarMasterChangeSeqNum, NEW.umCalendarLocalChangeSeqNum, NEW.umCalendarLastChangedBy, NEW.umCalendarLct) /*psql ON CONFLICT (umCalendarUid) DO UPDATE SET umCalendarName = EXCLUDED.umCalendarName, umCalendarCategory = EXCLUDED.umCalendarCategory, umCalendarActive = EXCLUDED.umCalendarActive, umCalendarMasterChangeSeqNum = EXCLUDED.umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum = EXCLUDED.umCalendarLocalChangeSeqNum, umCalendarLastChangedBy = EXCLUDED.umCalendarLastChangedBy, umCalendarLct = EXCLUDED.umCalendarLct */; END '; _stmtList.add_11rb$(element_312); var element_313 = ' CREATE TRIGGER ch_ins_99 AFTER INSERT ON Holiday BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 99 AS chTableId, NEW.holUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 99 AND chEntityPk = NEW.holUid); END '; _stmtList.add_11rb$(element_313); var element_314 = ' CREATE TRIGGER ch_upd_99 AFTER UPDATE ON Holiday BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 99 AS chTableId, NEW.holUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 99 AND chEntityPk = NEW.holUid); END '; _stmtList.add_11rb$(element_314); var element_315 = ' CREATE TRIGGER ch_del_99 AFTER DELETE ON Holiday BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 99 AS chTableId, OLD.holUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 99 AND chEntityPk = OLD.holUid); END '; _stmtList.add_11rb$(element_315); var element_316 = 'CREATE VIEW Holiday_ReceiveView AS SELECT Holiday.*, HolidayReplicate.* FROM Holiday LEFT JOIN HolidayReplicate ON HolidayReplicate.holidayPk = Holiday.holUid '; _stmtList.add_11rb$(element_316); var element_317 = ' CREATE TRIGGER holiday_remote_insert_ins INSTEAD OF INSERT ON Holiday_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Holiday(holUid, holMasterCsn, holLocalCsn, holLastModBy, holLct, holActive, holHolidayCalendarUid, holStartTime, holEndTime, holName) VALUES (NEW.holUid, NEW.holMasterCsn, NEW.holLocalCsn, NEW.holLastModBy, NEW.holLct, NEW.holActive, NEW.holHolidayCalendarUid, NEW.holStartTime, NEW.holEndTime, NEW.holName) /*psql ON CONFLICT (holUid) DO UPDATE SET holMasterCsn = EXCLUDED.holMasterCsn, holLocalCsn = EXCLUDED.holLocalCsn, holLastModBy = EXCLUDED.holLastModBy, holLct = EXCLUDED.holLct, holActive = EXCLUDED.holActive, holHolidayCalendarUid = EXCLUDED.holHolidayCalendarUid, holStartTime = EXCLUDED.holStartTime, holEndTime = EXCLUDED.holEndTime, holName = EXCLUDED.holName */; END '; _stmtList.add_11rb$(element_317); var element_318 = ' CREATE TRIGGER ch_ins_9 AFTER INSERT ON Person BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 9 AS chTableId, NEW.personUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 9 AND chEntityPk = NEW.personUid); END '; _stmtList.add_11rb$(element_318); var element_319 = ' CREATE TRIGGER ch_upd_9 AFTER UPDATE ON Person BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 9 AS chTableId, NEW.personUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 9 AND chEntityPk = NEW.personUid); END '; _stmtList.add_11rb$(element_319); var element_320 = ' CREATE TRIGGER ch_del_9 AFTER DELETE ON Person BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 9 AS chTableId, OLD.personUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 9 AND chEntityPk = OLD.personUid); END '; _stmtList.add_11rb$(element_320); var element_321 = 'CREATE VIEW Person_ReceiveView AS SELECT Person.*, PersonReplicate.* FROM Person LEFT JOIN PersonReplicate ON PersonReplicate.personPk = Person.personUid '; _stmtList.add_11rb$(element_321); var element_322 = ' CREATE TRIGGER person_remote_insert_ins INSTEAD OF INSERT ON Person_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Person(personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES (NEW.personUid, NEW.username, NEW.firstNames, NEW.lastName, NEW.emailAddr, NEW.phoneNum, NEW.gender, NEW.active, NEW.admin, NEW.personNotes, NEW.fatherName, NEW.fatherNumber, NEW.motherName, NEW.motherNum, NEW.dateOfBirth, NEW.personAddress, NEW.personOrgId, NEW.personGroupUid, NEW.personMasterChangeSeqNum, NEW.personLocalChangeSeqNum, NEW.personLastChangedBy, NEW.personLct, NEW.personCountry, NEW.personType) /*psql ON CONFLICT (personUid) DO UPDATE SET username = EXCLUDED.username, firstNames = EXCLUDED.firstNames, lastName = EXCLUDED.lastName, emailAddr = EXCLUDED.emailAddr, phoneNum = EXCLUDED.phoneNum, gender = EXCLUDED.gender, active = EXCLUDED.active, admin = EXCLUDED.admin, personNotes = EXCLUDED.personNotes, fatherName = EXCLUDED.fatherName, fatherNumber = EXCLUDED.fatherNumber, motherName = EXCLUDED.motherName, motherNum = EXCLUDED.motherNum, dateOfBirth = EXCLUDED.dateOfBirth, personAddress = EXCLUDED.personAddress, personOrgId = EXCLUDED.personOrgId, personGroupUid = EXCLUDED.personGroupUid, personMasterChangeSeqNum = EXCLUDED.personMasterChangeSeqNum, personLocalChangeSeqNum = EXCLUDED.personLocalChangeSeqNum, personLastChangedBy = EXCLUDED.personLastChangedBy, personLct = EXCLUDED.personLct, personCountry = EXCLUDED.personCountry, personType = EXCLUDED.personType */; END '; _stmtList.add_11rb$(element_322); var element_323 = ' CREATE TRIGGER ch_ins_6 AFTER INSERT ON Clazz BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 6 AS chTableId, NEW.clazzUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 6 AND chEntityPk = NEW.clazzUid); END '; _stmtList.add_11rb$(element_323); var element_324 = ' CREATE TRIGGER ch_upd_6 AFTER UPDATE ON Clazz BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 6 AS chTableId, NEW.clazzUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 6 AND chEntityPk = NEW.clazzUid); END '; _stmtList.add_11rb$(element_324); var element_325 = ' CREATE TRIGGER ch_del_6 AFTER DELETE ON Clazz BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 6 AS chTableId, OLD.clazzUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 6 AND chEntityPk = OLD.clazzUid); END '; _stmtList.add_11rb$(element_325); var element_326 = 'CREATE VIEW Clazz_ReceiveView AS SELECT Clazz.*, ClazzReplicate.* FROM Clazz LEFT JOIN ClazzReplicate ON ClazzReplicate.clazzPk = Clazz.clazzUid '; _stmtList.add_11rb$(element_326); var element_327 = ' CREATE TRIGGER clazz_remote_insert_ins INSTEAD OF INSERT ON Clazz_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Clazz(clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES (NEW.clazzUid, NEW.clazzName, NEW.clazzDesc, NEW.attendanceAverage, NEW.clazzHolidayUMCalendarUid, NEW.clazzScheuleUMCalendarUid, NEW.isClazzActive, NEW.clazzLocationUid, NEW.clazzStartTime, NEW.clazzEndTime, NEW.clazzFeatures, NEW.clazzSchoolUid, NEW.clazzEnrolmentPolicy, NEW.clazzTerminologyUid, NEW.clazzMasterChangeSeqNum, NEW.clazzLocalChangeSeqNum, NEW.clazzLastChangedBy, NEW.clazzLct, NEW.clazzTimeZone, NEW.clazzStudentsPersonGroupUid, NEW.clazzTeachersPersonGroupUid, NEW.clazzPendingStudentsPersonGroupUid, NEW.clazzParentsPersonGroupUid, NEW.clazzCode) /*psql ON CONFLICT (clazzUid) DO UPDATE SET clazzName = EXCLUDED.clazzName, clazzDesc = EXCLUDED.clazzDesc, attendanceAverage = EXCLUDED.attendanceAverage, clazzHolidayUMCalendarUid = EXCLUDED.clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid = EXCLUDED.clazzScheuleUMCalendarUid, isClazzActive = EXCLUDED.isClazzActive, clazzLocationUid = EXCLUDED.clazzLocationUid, clazzStartTime = EXCLUDED.clazzStartTime, clazzEndTime = EXCLUDED.clazzEndTime, clazzFeatures = EXCLUDED.clazzFeatures, clazzSchoolUid = EXCLUDED.clazzSchoolUid, clazzEnrolmentPolicy = EXCLUDED.clazzEnrolmentPolicy, clazzTerminologyUid = EXCLUDED.clazzTerminologyUid, clazzMasterChangeSeqNum = EXCLUDED.clazzMasterChangeSeqNum, clazzLocalChangeSeqNum = EXCLUDED.clazzLocalChangeSeqNum, clazzLastChangedBy = EXCLUDED.clazzLastChangedBy, clazzLct = EXCLUDED.clazzLct, clazzTimeZone = EXCLUDED.clazzTimeZone, clazzStudentsPersonGroupUid = EXCLUDED.clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid = EXCLUDED.clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid = EXCLUDED.clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid = EXCLUDED.clazzParentsPersonGroupUid, clazzCode = EXCLUDED.clazzCode */; END '; _stmtList.add_11rb$(element_327); var element_328 = ' CREATE TRIGGER ch_ins_65 AFTER INSERT ON ClazzEnrolment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 65 AS chTableId, NEW.clazzEnrolmentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 65 AND chEntityPk = NEW.clazzEnrolmentUid); END '; _stmtList.add_11rb$(element_328); var element_329 = ' CREATE TRIGGER ch_upd_65 AFTER UPDATE ON ClazzEnrolment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 65 AS chTableId, NEW.clazzEnrolmentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 65 AND chEntityPk = NEW.clazzEnrolmentUid); END '; _stmtList.add_11rb$(element_329); var element_330 = ' CREATE TRIGGER ch_del_65 AFTER DELETE ON ClazzEnrolment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 65 AS chTableId, OLD.clazzEnrolmentUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 65 AND chEntityPk = OLD.clazzEnrolmentUid); END '; _stmtList.add_11rb$(element_330); var element_331 = 'CREATE VIEW ClazzEnrolment_ReceiveView AS SELECT ClazzEnrolment.*, ClazzEnrolmentReplicate.* FROM ClazzEnrolment LEFT JOIN ClazzEnrolmentReplicate ON ClazzEnrolmentReplicate.cePk = ClazzEnrolment.clazzEnrolmentUid '; _stmtList.add_11rb$(element_331); var element_332 = ' CREATE TRIGGER clazzenrolment_remote_insert_ins INSTEAD OF INSERT ON ClazzEnrolment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzEnrolment(clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct) VALUES (NEW.clazzEnrolmentUid, NEW.clazzEnrolmentPersonUid, NEW.clazzEnrolmentClazzUid, NEW.clazzEnrolmentDateJoined, NEW.clazzEnrolmentDateLeft, NEW.clazzEnrolmentRole, NEW.clazzEnrolmentAttendancePercentage, NEW.clazzEnrolmentActive, NEW.clazzEnrolmentLeavingReasonUid, NEW.clazzEnrolmentOutcome, NEW.clazzEnrolmentLocalChangeSeqNum, NEW.clazzEnrolmentMasterChangeSeqNum, NEW.clazzEnrolmentLastChangedBy, NEW.clazzEnrolmentLct) /*psql ON CONFLICT (clazzEnrolmentUid) DO UPDATE SET clazzEnrolmentPersonUid = EXCLUDED.clazzEnrolmentPersonUid, clazzEnrolmentClazzUid = EXCLUDED.clazzEnrolmentClazzUid, clazzEnrolmentDateJoined = EXCLUDED.clazzEnrolmentDateJoined, clazzEnrolmentDateLeft = EXCLUDED.clazzEnrolmentDateLeft, clazzEnrolmentRole = EXCLUDED.clazzEnrolmentRole, clazzEnrolmentAttendancePercentage = EXCLUDED.clazzEnrolmentAttendancePercentage, clazzEnrolmentActive = EXCLUDED.clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid = EXCLUDED.clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome = EXCLUDED.clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum = EXCLUDED.clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum = EXCLUDED.clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy = EXCLUDED.clazzEnrolmentLastChangedBy, clazzEnrolmentLct = EXCLUDED.clazzEnrolmentLct */; END '; _stmtList.add_11rb$(element_332); var element_333 = ' CREATE TRIGGER ch_ins_410 AFTER INSERT ON LeavingReason BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 410 AS chTableId, NEW.leavingReasonUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 410 AND chEntityPk = NEW.leavingReasonUid); END '; _stmtList.add_11rb$(element_333); var element_334 = ' CREATE TRIGGER ch_upd_410 AFTER UPDATE ON LeavingReason BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 410 AS chTableId, NEW.leavingReasonUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 410 AND chEntityPk = NEW.leavingReasonUid); END '; _stmtList.add_11rb$(element_334); var element_335 = ' CREATE TRIGGER ch_del_410 AFTER DELETE ON LeavingReason BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 410 AS chTableId, OLD.leavingReasonUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 410 AND chEntityPk = OLD.leavingReasonUid); END '; _stmtList.add_11rb$(element_335); var element_336 = 'CREATE VIEW LeavingReason_ReceiveView AS SELECT LeavingReason.*, LeavingReasonReplicate.* FROM LeavingReason LEFT JOIN LeavingReasonReplicate ON LeavingReasonReplicate.lrPk = LeavingReason.leavingReasonUid '; _stmtList.add_11rb$(element_336); var element_337 = ' CREATE TRIGGER leavingreason_remote_insert_ins INSTEAD OF INSERT ON LeavingReason_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LeavingReason(leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES (NEW.leavingReasonUid, NEW.leavingReasonTitle, NEW.leavingReasonMCSN, NEW.leavingReasonCSN, NEW.leavingReasonLCB, NEW.leavingReasonLct) /*psql ON CONFLICT (leavingReasonUid) DO UPDATE SET leavingReasonTitle = EXCLUDED.leavingReasonTitle, leavingReasonMCSN = EXCLUDED.leavingReasonMCSN, leavingReasonCSN = EXCLUDED.leavingReasonCSN, leavingReasonLCB = EXCLUDED.leavingReasonLCB, leavingReasonLct = EXCLUDED.leavingReasonLct */; END '; _stmtList.add_11rb$(element_337); var element_338 = ' CREATE TRIGGER ch_ins_42 AFTER INSERT ON ContentEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 42 AS chTableId, NEW.contentEntryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 42 AND chEntityPk = NEW.contentEntryUid); END '; _stmtList.add_11rb$(element_338); var element_339 = ' CREATE TRIGGER ch_upd_42 AFTER UPDATE ON ContentEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 42 AS chTableId, NEW.contentEntryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 42 AND chEntityPk = NEW.contentEntryUid); END '; _stmtList.add_11rb$(element_339); var element_340 = ' CREATE TRIGGER ch_del_42 AFTER DELETE ON ContentEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 42 AS chTableId, OLD.contentEntryUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 42 AND chEntityPk = OLD.contentEntryUid); END '; _stmtList.add_11rb$(element_340); var element_341 = 'CREATE VIEW ContentEntry_ReceiveView AS SELECT ContentEntry.*, ContentEntryReplicate.* FROM ContentEntry LEFT JOIN ContentEntryReplicate ON ContentEntryReplicate.cePk = ContentEntry.contentEntryUid '; _stmtList.add_11rb$(element_341); var element_342 = ' CREATE TRIGGER contententry_remote_insert_ins INSTEAD OF INSERT ON ContentEntry_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntry(contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES (NEW.contentEntryUid, NEW.title, NEW.description, NEW.entryId, NEW.author, NEW.publisher, NEW.licenseType, NEW.licenseName, NEW.licenseUrl, NEW.sourceUrl, NEW.thumbnailUrl, NEW.lastModified, NEW.primaryLanguageUid, NEW.languageVariantUid, NEW.contentFlags, NEW.leaf, NEW.publik, NEW.ceInactive, NEW.completionCriteria, NEW.minScore, NEW.contentTypeFlag, NEW.contentOwner, NEW.contentEntryLocalChangeSeqNum, NEW.contentEntryMasterChangeSeqNum, NEW.contentEntryLastChangedBy, NEW.contentEntryLct) /*psql ON CONFLICT (contentEntryUid) DO UPDATE SET title = EXCLUDED.title, description = EXCLUDED.description, entryId = EXCLUDED.entryId, author = EXCLUDED.author, publisher = EXCLUDED.publisher, licenseType = EXCLUDED.licenseType, licenseName = EXCLUDED.licenseName, licenseUrl = EXCLUDED.licenseUrl, sourceUrl = EXCLUDED.sourceUrl, thumbnailUrl = EXCLUDED.thumbnailUrl, lastModified = EXCLUDED.lastModified, primaryLanguageUid = EXCLUDED.primaryLanguageUid, languageVariantUid = EXCLUDED.languageVariantUid, contentFlags = EXCLUDED.contentFlags, leaf = EXCLUDED.leaf, publik = EXCLUDED.publik, ceInactive = EXCLUDED.ceInactive, completionCriteria = EXCLUDED.completionCriteria, minScore = EXCLUDED.minScore, contentTypeFlag = EXCLUDED.contentTypeFlag, contentOwner = EXCLUDED.contentOwner, contentEntryLocalChangeSeqNum = EXCLUDED.contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum = EXCLUDED.contentEntryMasterChangeSeqNum, contentEntryLastChangedBy = EXCLUDED.contentEntryLastChangedBy, contentEntryLct = EXCLUDED.contentEntryLct*/; END '; _stmtList.add_11rb$(element_342); var element_343 = ' CREATE TRIGGER ch_ins_3 AFTER INSERT ON ContentEntryContentCategoryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 3 AS chTableId, NEW.ceccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 3 AND chEntityPk = NEW.ceccjUid); END '; _stmtList.add_11rb$(element_343); var element_344 = ' CREATE TRIGGER ch_upd_3 AFTER UPDATE ON ContentEntryContentCategoryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 3 AS chTableId, NEW.ceccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 3 AND chEntityPk = NEW.ceccjUid); END '; _stmtList.add_11rb$(element_344); var element_345 = ' CREATE TRIGGER ch_del_3 AFTER DELETE ON ContentEntryContentCategoryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 3 AS chTableId, OLD.ceccjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 3 AND chEntityPk = OLD.ceccjUid); END '; _stmtList.add_11rb$(element_345); var element_346 = 'CREATE VIEW ContentEntryContentCategoryJoin_ReceiveView AS SELECT ContentEntryContentCategoryJoin.*, ContentEntryContentCategoryJoinReplicate.* FROM ContentEntryContentCategoryJoin LEFT JOIN ContentEntryContentCategoryJoinReplicate ON ContentEntryContentCategoryJoinReplicate.ceccjPk = ContentEntryContentCategoryJoin.ceccjUid '; _stmtList.add_11rb$(element_346); var element_347 = ' CREATE TRIGGER contententrycontentcategoryjoin_remote_insert_ins INSTEAD OF INSERT ON ContentEntryContentCategoryJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryContentCategoryJoin(ceccjUid, ceccjContentEntryUid, ceccjContentCategoryUid, ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum, ceccjLastChangedBy, ceccjLct) VALUES (NEW.ceccjUid, NEW.ceccjContentEntryUid, NEW.ceccjContentCategoryUid, NEW.ceccjLocalChangeSeqNum, NEW.ceccjMasterChangeSeqNum, NEW.ceccjLastChangedBy, NEW.ceccjLct) /*psql ON CONFLICT (ceccjUid) DO UPDATE SET ceccjContentEntryUid = EXCLUDED.ceccjContentEntryUid, ceccjContentCategoryUid = EXCLUDED.ceccjContentCategoryUid, ceccjLocalChangeSeqNum = EXCLUDED.ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum = EXCLUDED.ceccjMasterChangeSeqNum, ceccjLastChangedBy = EXCLUDED.ceccjLastChangedBy, ceccjLct = EXCLUDED.ceccjLct */; END '; _stmtList.add_11rb$(element_347); var element_348 = ' CREATE TRIGGER ch_ins_7 AFTER INSERT ON ContentEntryParentChildJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 7 AS chTableId, NEW.cepcjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 7 AND chEntityPk = NEW.cepcjUid); END '; _stmtList.add_11rb$(element_348); var element_349 = ' CREATE TRIGGER ch_upd_7 AFTER UPDATE ON ContentEntryParentChildJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 7 AS chTableId, NEW.cepcjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 7 AND chEntityPk = NEW.cepcjUid); END '; _stmtList.add_11rb$(element_349); var element_350 = ' CREATE TRIGGER ch_del_7 AFTER DELETE ON ContentEntryParentChildJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 7 AS chTableId, OLD.cepcjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 7 AND chEntityPk = OLD.cepcjUid); END '; _stmtList.add_11rb$(element_350); var element_351 = 'CREATE VIEW ContentEntryParentChildJoin_ReceiveView AS SELECT ContentEntryParentChildJoin.*, ContentEntryParentChildJoinReplicate.* FROM ContentEntryParentChildJoin LEFT JOIN ContentEntryParentChildJoinReplicate ON ContentEntryParentChildJoinReplicate.cepcjPk = ContentEntryParentChildJoin.cepcjUid '; _stmtList.add_11rb$(element_351); var element_352 = ' CREATE TRIGGER contententryparentchildjoin_remote_insert_ins INSTEAD OF INSERT ON ContentEntryParentChildJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryParentChildJoin(cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex, cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct) VALUES (NEW.cepcjParentContentEntryUid, NEW.cepcjChildContentEntryUid, NEW.childIndex, NEW.cepcjUid, NEW.cepcjLocalChangeSeqNum, NEW.cepcjMasterChangeSeqNum, NEW.cepcjLastChangedBy, NEW.cepcjLct) /*psql ON CONFLICT (cepcjUid) DO UPDATE SET cepcjParentContentEntryUid = EXCLUDED.cepcjParentContentEntryUid, cepcjChildContentEntryUid = EXCLUDED.cepcjChildContentEntryUid, childIndex = EXCLUDED.childIndex, cepcjLocalChangeSeqNum = EXCLUDED.cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum = EXCLUDED.cepcjMasterChangeSeqNum, cepcjLastChangedBy = EXCLUDED.cepcjLastChangedBy, cepcjLct = EXCLUDED.cepcjLct */; END '; _stmtList.add_11rb$(element_352); var element_353 = ' CREATE TRIGGER ch_ins_8 AFTER INSERT ON ContentEntryRelatedEntryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 8 AS chTableId, NEW.cerejUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 8 AND chEntityPk = NEW.cerejUid); END '; _stmtList.add_11rb$(element_353); var element_354 = ' CREATE TRIGGER ch_upd_8 AFTER UPDATE ON ContentEntryRelatedEntryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 8 AS chTableId, NEW.cerejUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 8 AND chEntityPk = NEW.cerejUid); END '; _stmtList.add_11rb$(element_354); var element_355 = ' CREATE TRIGGER ch_del_8 AFTER DELETE ON ContentEntryRelatedEntryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 8 AS chTableId, OLD.cerejUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 8 AND chEntityPk = OLD.cerejUid); END '; _stmtList.add_11rb$(element_355); var element_356 = 'CREATE VIEW ContentEntryRelatedEntryJoin_ReceiveView AS SELECT ContentEntryRelatedEntryJoin.*, ContentEntryRelatedEntryJoinReplicate.* FROM ContentEntryRelatedEntryJoin LEFT JOIN ContentEntryRelatedEntryJoinReplicate ON ContentEntryRelatedEntryJoinReplicate.cerejPk = ContentEntryRelatedEntryJoin.cerejUid '; _stmtList.add_11rb$(element_356); var element_357 = ' CREATE TRIGGER contententryrelatedentryjoin_remote_insert_ins INSTEAD OF INSERT ON ContentEntryRelatedEntryJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryRelatedEntryJoin(cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct) VALUES (NEW.cerejUid, NEW.cerejContentEntryUid, NEW.cerejRelatedEntryUid, NEW.cerejLastChangedBy, NEW.relType, NEW.comment, NEW.cerejRelLanguageUid, NEW.cerejLocalChangeSeqNum, NEW.cerejMasterChangeSeqNum, NEW.cerejLct) /*psql ON CONFLICT (cerejUid) DO UPDATE SET cerejContentEntryUid = EXCLUDED.cerejContentEntryUid, cerejRelatedEntryUid = EXCLUDED.cerejRelatedEntryUid, cerejLastChangedBy = EXCLUDED.cerejLastChangedBy, relType = EXCLUDED.relType, comment = EXCLUDED.comment, cerejRelLanguageUid = EXCLUDED.cerejRelLanguageUid, cerejLocalChangeSeqNum = EXCLUDED.cerejLocalChangeSeqNum, cerejMasterChangeSeqNum = EXCLUDED.cerejMasterChangeSeqNum, cerejLct = EXCLUDED.cerejLct */; END '; _stmtList.add_11rb$(element_357); var element_358 = ' CREATE TRIGGER ch_ins_2 AFTER INSERT ON ContentCategorySchema BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 2 AS chTableId, NEW.contentCategorySchemaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 2 AND chEntityPk = NEW.contentCategorySchemaUid); END '; _stmtList.add_11rb$(element_358); var element_359 = ' CREATE TRIGGER ch_upd_2 AFTER UPDATE ON ContentCategorySchema BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 2 AS chTableId, NEW.contentCategorySchemaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 2 AND chEntityPk = NEW.contentCategorySchemaUid); END '; _stmtList.add_11rb$(element_359); var element_360 = ' CREATE TRIGGER ch_del_2 AFTER DELETE ON ContentCategorySchema BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 2 AS chTableId, OLD.contentCategorySchemaUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 2 AND chEntityPk = OLD.contentCategorySchemaUid); END '; _stmtList.add_11rb$(element_360); var element_361 = 'CREATE VIEW ContentCategorySchema_ReceiveView AS SELECT ContentCategorySchema.*, ContentCategorySchemaReplicate.* FROM ContentCategorySchema LEFT JOIN ContentCategorySchemaReplicate ON ContentCategorySchemaReplicate.ccsPk = ContentCategorySchema.contentCategorySchemaUid '; _stmtList.add_11rb$(element_361); var element_362 = ' CREATE TRIGGER contentcategoryschema_remote_insert_ins INSTEAD OF INSERT ON ContentCategorySchema_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentCategorySchema(contentCategorySchemaUid, schemaName, schemaUrl, contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy, contentCategorySchemaLct) VALUES (NEW.contentCategorySchemaUid, NEW.schemaName, NEW.schemaUrl, NEW.contentCategorySchemaLocalChangeSeqNum, NEW.contentCategorySchemaMasterChangeSeqNum, NEW.contentCategorySchemaLastChangedBy, NEW.contentCategorySchemaLct) /*psql ON CONFLICT (contentCategorySchemaUid) DO UPDATE SET schemaName = EXCLUDED.schemaName, schemaUrl = EXCLUDED.schemaUrl, contentCategorySchemaLocalChangeSeqNum = EXCLUDED.contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum = EXCLUDED.contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy = EXCLUDED.contentCategorySchemaLastChangedBy, contentCategorySchemaLct = EXCLUDED.contentCategorySchemaLct */; END '; _stmtList.add_11rb$(element_362); var element_363 = ' CREATE TRIGGER ch_ins_1 AFTER INSERT ON ContentCategory BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 1 AS chTableId, NEW.contentCategoryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 1 AND chEntityPk = NEW.contentCategoryUid); END '; _stmtList.add_11rb$(element_363); var element_364 = ' CREATE TRIGGER ch_upd_1 AFTER UPDATE ON ContentCategory BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 1 AS chTableId, NEW.contentCategoryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 1 AND chEntityPk = NEW.contentCategoryUid); END '; _stmtList.add_11rb$(element_364); var element_365 = ' CREATE TRIGGER ch_del_1 AFTER DELETE ON ContentCategory BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 1 AS chTableId, OLD.contentCategoryUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 1 AND chEntityPk = OLD.contentCategoryUid); END '; _stmtList.add_11rb$(element_365); var element_366 = 'CREATE VIEW ContentCategory_ReceiveView AS SELECT ContentCategory.*, ContentCategoryReplicate.* FROM ContentCategory LEFT JOIN ContentCategoryReplicate ON ContentCategoryReplicate.ccPk = ContentCategory.contentCategoryUid '; _stmtList.add_11rb$(element_366); var element_367 = ' CREATE TRIGGER contentcategory_remote_insert_ins INSTEAD OF INSERT ON ContentCategory_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentCategory(contentCategoryUid, ctnCatContentCategorySchemaUid, name, contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy, contentCategoryLct) VALUES (NEW.contentCategoryUid, NEW.ctnCatContentCategorySchemaUid, NEW.name, NEW.contentCategoryLocalChangeSeqNum, NEW.contentCategoryMasterChangeSeqNum, NEW.contentCategoryLastChangedBy, NEW.contentCategoryLct) /*psql ON CONFLICT (contentCategoryUid) DO UPDATE SET ctnCatContentCategorySchemaUid = EXCLUDED.ctnCatContentCategorySchemaUid, name = EXCLUDED.name, contentCategoryLocalChangeSeqNum = EXCLUDED.contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum = EXCLUDED.contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy = EXCLUDED.contentCategoryLastChangedBy, contentCategoryLct = EXCLUDED.contentCategoryLct */; END '; _stmtList.add_11rb$(element_367); var element_368 = ' CREATE TRIGGER ch_ins_13 AFTER INSERT ON Language BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 13 AS chTableId, NEW.langUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 13 AND chEntityPk = NEW.langUid); END '; _stmtList.add_11rb$(element_368); var element_369 = ' CREATE TRIGGER ch_upd_13 AFTER UPDATE ON Language BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 13 AS chTableId, NEW.langUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 13 AND chEntityPk = NEW.langUid); END '; _stmtList.add_11rb$(element_369); var element_370 = ' CREATE TRIGGER ch_del_13 AFTER DELETE ON Language BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 13 AS chTableId, OLD.langUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 13 AND chEntityPk = OLD.langUid); END '; _stmtList.add_11rb$(element_370); var element_371 = 'CREATE VIEW Language_ReceiveView AS SELECT Language.*, LanguageReplicate.* FROM Language LEFT JOIN LanguageReplicate ON LanguageReplicate.languagePk = Language.langUid '; _stmtList.add_11rb$(element_371); var element_372 = ' CREATE TRIGGER language_remote_insert_ins INSTEAD OF INSERT ON Language_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Language(langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES (NEW.langUid, NEW.name, NEW.iso_639_1_standard, NEW.iso_639_2_standard, NEW.iso_639_3_standard, NEW.Language_Type, NEW.languageActive, NEW.langLocalChangeSeqNum, NEW.langMasterChangeSeqNum, NEW.langLastChangedBy, NEW.langLct) /*psql ON CONFLICT (langUid) DO UPDATE SET name = EXCLUDED.name, iso_639_1_standard = EXCLUDED.iso_639_1_standard, iso_639_2_standard = EXCLUDED.iso_639_2_standard, iso_639_3_standard = EXCLUDED.iso_639_3_standard, Language_Type = EXCLUDED.Language_Type, languageActive = EXCLUDED.languageActive, langLocalChangeSeqNum = EXCLUDED.langLocalChangeSeqNum, langMasterChangeSeqNum = EXCLUDED.langMasterChangeSeqNum, langLastChangedBy = EXCLUDED.langLastChangedBy, langLct = EXCLUDED.langLct */; END '; _stmtList.add_11rb$(element_372); var element_373 = ' CREATE TRIGGER ch_ins_10 AFTER INSERT ON LanguageVariant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 10 AS chTableId, NEW.langVariantUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 10 AND chEntityPk = NEW.langVariantUid); END '; _stmtList.add_11rb$(element_373); var element_374 = ' CREATE TRIGGER ch_upd_10 AFTER UPDATE ON LanguageVariant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 10 AS chTableId, NEW.langVariantUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 10 AND chEntityPk = NEW.langVariantUid); END '; _stmtList.add_11rb$(element_374); var element_375 = ' CREATE TRIGGER ch_del_10 AFTER DELETE ON LanguageVariant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 10 AS chTableId, OLD.langVariantUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 10 AND chEntityPk = OLD.langVariantUid); END '; _stmtList.add_11rb$(element_375); var element_376 = 'CREATE VIEW LanguageVariant_ReceiveView AS SELECT LanguageVariant.*, LanguageVariantReplicate.* FROM LanguageVariant LEFT JOIN LanguageVariantReplicate ON LanguageVariantReplicate.lvPk = LanguageVariant.langVariantUid '; _stmtList.add_11rb$(element_376); var element_377 = ' CREATE TRIGGER languagevariant_remote_insert_ins INSTEAD OF INSERT ON LanguageVariant_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LanguageVariant(langVariantUid, langUid, countryCode, name, langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum, langVariantLastChangedBy, langVariantLct) VALUES (NEW.langVariantUid, NEW.langUid, NEW.countryCode, NEW.name, NEW.langVariantLocalChangeSeqNum, NEW.langVariantMasterChangeSeqNum, NEW.langVariantLastChangedBy, NEW.langVariantLct) /*psql ON CONFLICT (langVariantUid) DO UPDATE SET langUid = EXCLUDED.langUid, countryCode = EXCLUDED.countryCode, name = EXCLUDED.name, langVariantLocalChangeSeqNum = EXCLUDED.langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum = EXCLUDED.langVariantMasterChangeSeqNum, langVariantLastChangedBy = EXCLUDED.langVariantLastChangedBy, langVariantLct = EXCLUDED.langVariantLct */; END '; _stmtList.add_11rb$(element_377); var element_378 = ' CREATE TRIGGER ch_ins_43 AFTER INSERT ON PersonGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 43 AS chTableId, NEW.groupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 43 AND chEntityPk = NEW.groupUid); END '; _stmtList.add_11rb$(element_378); var element_379 = ' CREATE TRIGGER ch_upd_43 AFTER UPDATE ON PersonGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 43 AS chTableId, NEW.groupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 43 AND chEntityPk = NEW.groupUid); END '; _stmtList.add_11rb$(element_379); var element_380 = ' CREATE TRIGGER ch_del_43 AFTER DELETE ON PersonGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 43 AS chTableId, OLD.groupUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 43 AND chEntityPk = OLD.groupUid); END '; _stmtList.add_11rb$(element_380); var element_381 = 'CREATE VIEW PersonGroup_ReceiveView AS SELECT PersonGroup.*, PersonGroupReplicate.* FROM PersonGroup LEFT JOIN PersonGroupReplicate ON PersonGroupReplicate.pgPk = PersonGroup.groupUid '; _stmtList.add_11rb$(element_381); var element_382 = ' CREATE TRIGGER persongroup_remote_insert_ins INSTEAD OF INSERT ON PersonGroup_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonGroup(groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES (NEW.groupUid, NEW.groupMasterCsn, NEW.groupLocalCsn, NEW.groupLastChangedBy, NEW.groupLct, NEW.groupName, NEW.groupActive, NEW.personGroupFlag) /*psql ON CONFLICT (groupUid) DO UPDATE SET groupMasterCsn = EXCLUDED.groupMasterCsn, groupLocalCsn = EXCLUDED.groupLocalCsn, groupLastChangedBy = EXCLUDED.groupLastChangedBy, groupLct = EXCLUDED.groupLct, groupName = EXCLUDED.groupName, groupActive = EXCLUDED.groupActive, personGroupFlag = EXCLUDED.personGroupFlag */; END '; _stmtList.add_11rb$(element_382); var element_383 = ' CREATE TRIGGER ch_ins_44 AFTER INSERT ON PersonGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 44 AS chTableId, NEW.groupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 44 AND chEntityPk = NEW.groupMemberUid); END '; _stmtList.add_11rb$(element_383); var element_384 = ' CREATE TRIGGER ch_upd_44 AFTER UPDATE ON PersonGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 44 AS chTableId, NEW.groupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 44 AND chEntityPk = NEW.groupMemberUid); END '; _stmtList.add_11rb$(element_384); var element_385 = ' CREATE TRIGGER ch_del_44 AFTER DELETE ON PersonGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 44 AS chTableId, OLD.groupMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 44 AND chEntityPk = OLD.groupMemberUid); END '; _stmtList.add_11rb$(element_385); var element_386 = 'CREATE VIEW PersonGroupMember_ReceiveView AS SELECT PersonGroupMember.*, PersonGroupMemberReplicate.* FROM PersonGroupMember LEFT JOIN PersonGroupMemberReplicate ON PersonGroupMemberReplicate.pgmPk = PersonGroupMember.groupMemberUid '; _stmtList.add_11rb$(element_386); var element_387 = ' CREATE TRIGGER persongroupmember_remote_insert_ins INSTEAD OF INSERT ON PersonGroupMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonGroupMember(groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES (NEW.groupMemberUid, NEW.groupMemberActive, NEW.groupMemberPersonUid, NEW.groupMemberGroupUid, NEW.groupMemberMasterCsn, NEW.groupMemberLocalCsn, NEW.groupMemberLastChangedBy, NEW.groupMemberLct) /*psql ON CONFLICT (groupMemberUid) DO UPDATE SET groupMemberActive = EXCLUDED.groupMemberActive, groupMemberPersonUid = EXCLUDED.groupMemberPersonUid, groupMemberGroupUid = EXCLUDED.groupMemberGroupUid, groupMemberMasterCsn = EXCLUDED.groupMemberMasterCsn, groupMemberLocalCsn = EXCLUDED.groupMemberLocalCsn, groupMemberLastChangedBy = EXCLUDED.groupMemberLastChangedBy, groupMemberLct = EXCLUDED.groupMemberLct */; END '; _stmtList.add_11rb$(element_387); var element_388 = ' CREATE TRIGGER ch_ins_50 AFTER INSERT ON PersonPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 50 AS chTableId, NEW.personPictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 50 AND chEntityPk = NEW.personPictureUid); END '; _stmtList.add_11rb$(element_388); var element_389 = ' CREATE TRIGGER ch_upd_50 AFTER UPDATE ON PersonPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 50 AS chTableId, NEW.personPictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 50 AND chEntityPk = NEW.personPictureUid); END '; _stmtList.add_11rb$(element_389); var element_390 = ' CREATE TRIGGER ch_del_50 AFTER DELETE ON PersonPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 50 AS chTableId, OLD.personPictureUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 50 AND chEntityPk = OLD.personPictureUid); END '; _stmtList.add_11rb$(element_390); var element_391 = 'CREATE VIEW PersonPicture_ReceiveView AS SELECT PersonPicture.*, PersonPictureReplicate.* FROM PersonPicture LEFT JOIN PersonPictureReplicate ON PersonPictureReplicate.ppPk = PersonPicture.personPictureUid '; _stmtList.add_11rb$(element_391); var element_392 = ' CREATE TRIGGER personpicture_remote_insert_ins INSTEAD OF INSERT ON PersonPicture_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonPicture(personPictureUid, personPicturePersonUid, personPictureMasterCsn, personPictureLocalCsn, personPictureLastChangedBy, personPictureLct, personPictureUri, personPictureMd5, fileSize, picTimestamp, mimeType, personPictureActive) VALUES (NEW.personPictureUid, NEW.personPicturePersonUid, NEW.personPictureMasterCsn, NEW.personPictureLocalCsn, NEW.personPictureLastChangedBy, NEW.personPictureLct, NEW.personPictureUri, NEW.personPictureMd5, NEW.fileSize, NEW.picTimestamp, NEW.mimeType, NEW.personPictureActive) /*psql ON CONFLICT (personPictureUid) DO UPDATE SET personPicturePersonUid = EXCLUDED.personPicturePersonUid, personPictureMasterCsn = EXCLUDED.personPictureMasterCsn, personPictureLocalCsn = EXCLUDED.personPictureLocalCsn, personPictureLastChangedBy = EXCLUDED.personPictureLastChangedBy, personPictureLct = EXCLUDED.personPictureLct, personPictureUri = EXCLUDED.personPictureUri, personPictureMd5 = EXCLUDED.personPictureMd5, fileSize = EXCLUDED.fileSize, picTimestamp = EXCLUDED.picTimestamp, mimeType = EXCLUDED.mimeType, personPictureActive = EXCLUDED.personPictureActive */; END '; _stmtList.add_11rb$(element_392); var element_393 = trimMargin('\n |\n | CREATE TRIGGER ATTUPD_PersonPicture\n | AFTER UPDATE ON PersonPicture FOR EACH ROW WHEN\n | OLD.personPictureMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.personPictureUri AS zaUri\n | FROM PersonPicture \n | WHERE PersonPicture.personPictureUid = OLD.personPictureUid\n | AND (SELECT COUNT(*) \n | FROM PersonPicture\n | WHERE personPictureMd5 = OLD.personPictureMd5) = 0\n | ; \n | END\n | \n '); _stmtList.add_11rb$(element_393); var element_394 = ' CREATE TRIGGER ch_ins_51 AFTER INSERT ON Container BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 51 AS chTableId, NEW.containerUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 51 AND chEntityPk = NEW.containerUid); END '; _stmtList.add_11rb$(element_394); var element_395 = ' CREATE TRIGGER ch_upd_51 AFTER UPDATE ON Container BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 51 AS chTableId, NEW.containerUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 51 AND chEntityPk = NEW.containerUid); END '; _stmtList.add_11rb$(element_395); var element_396 = ' CREATE TRIGGER ch_del_51 AFTER DELETE ON Container BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 51 AS chTableId, OLD.containerUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 51 AND chEntityPk = OLD.containerUid); END '; _stmtList.add_11rb$(element_396); var element_397 = 'CREATE VIEW Container_ReceiveView AS SELECT Container.*, ContainerReplicate.* FROM Container LEFT JOIN ContainerReplicate ON ContainerReplicate.containerPk = Container.containerUid '; _stmtList.add_11rb$(element_397); var element_398 = ' CREATE TRIGGER container_remote_insert_ins INSTEAD OF INSERT ON Container_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Container(containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) SELECT NEW.containerUid, NEW.cntLocalCsn, NEW.cntMasterCsn, NEW.cntLastModBy, NEW.cntLct, NEW.fileSize, NEW.containerContentEntryUid, NEW.cntLastModified, NEW.mimeType, NEW.remarks, NEW.mobileOptimized, NEW.cntNumEntries WHERE NEW.cntLct > (SELECT COALESCE( (SELECT ContainerInt.cntLct FROM Container ContainerInt WHERE ContainerInt.containerUid = NEW.containerUid), 0)) /*psql ON CONFLICT (containerUid) DO UPDATE SET cntLocalCsn = EXCLUDED.cntLocalCsn, cntMasterCsn = EXCLUDED.cntMasterCsn, cntLastModBy = EXCLUDED.cntLastModBy, cntLct = EXCLUDED.cntLct, fileSize = EXCLUDED.fileSize, containerContentEntryUid = EXCLUDED.containerContentEntryUid, cntLastModified = EXCLUDED.cntLastModified, mimeType = EXCLUDED.mimeType, remarks = EXCLUDED.remarks, mobileOptimized = EXCLUDED.mobileOptimized, cntNumEntries = EXCLUDED.cntNumEntries */; END '; _stmtList.add_11rb$(element_398); var element_399 = ' CREATE TRIGGER ch_ins_62 AFTER INSERT ON VerbEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 62 AS chTableId, NEW.verbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 62 AND chEntityPk = NEW.verbUid); END '; _stmtList.add_11rb$(element_399); var element_400 = ' CREATE TRIGGER ch_upd_62 AFTER UPDATE ON VerbEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 62 AS chTableId, NEW.verbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 62 AND chEntityPk = NEW.verbUid); END '; _stmtList.add_11rb$(element_400); var element_401 = ' CREATE TRIGGER ch_del_62 AFTER DELETE ON VerbEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 62 AS chTableId, OLD.verbUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 62 AND chEntityPk = OLD.verbUid); END '; _stmtList.add_11rb$(element_401); var element_402 = 'CREATE VIEW VerbEntity_ReceiveView AS SELECT VerbEntity.*, VerbEntityReplicate.* FROM VerbEntity LEFT JOIN VerbEntityReplicate ON VerbEntityReplicate.vePk = VerbEntity.verbUid '; _stmtList.add_11rb$(element_402); var element_403 = ' CREATE TRIGGER verbentity_remote_insert_ins INSTEAD OF INSERT ON VerbEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO VerbEntity(verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES (NEW.verbUid, NEW.urlId, NEW.verbInActive, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.verbLct) /*psql ON CONFLICT (verbUid) DO UPDATE SET urlId = EXCLUDED.urlId, verbInActive = EXCLUDED.verbInActive, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, verbLct = EXCLUDED.verbLct */; END '; _stmtList.add_11rb$(element_403); var element_404 = ' CREATE TRIGGER ch_ins_64 AFTER INSERT ON XObjectEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 64 AS chTableId, NEW.xObjectUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 64 AND chEntityPk = NEW.xObjectUid); END '; _stmtList.add_11rb$(element_404); var element_405 = ' CREATE TRIGGER ch_upd_64 AFTER UPDATE ON XObjectEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 64 AS chTableId, NEW.xObjectUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 64 AND chEntityPk = NEW.xObjectUid); END '; _stmtList.add_11rb$(element_405); var element_406 = ' CREATE TRIGGER ch_del_64 AFTER DELETE ON XObjectEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 64 AS chTableId, OLD.xObjectUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 64 AND chEntityPk = OLD.xObjectUid); END '; _stmtList.add_11rb$(element_406); var element_407 = 'CREATE VIEW XObjectEntity_ReceiveView AS SELECT XObjectEntity.*, XObjectEntityReplicate.* FROM XObjectEntity LEFT JOIN XObjectEntityReplicate ON XObjectEntityReplicate.xoePk = XObjectEntity.xObjectUid '; _stmtList.add_11rb$(element_407); var element_408 = ' CREATE TRIGGER xobjectentity_remote_insert_ins INSTEAD OF INSERT ON XObjectEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO XObjectEntity(xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, objectStatementRefUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES (NEW.xObjectUid, NEW.objectType, NEW.objectId, NEW.definitionType, NEW.interactionType, NEW.correctResponsePattern, NEW.objectContentEntryUid, NEW.objectStatementRefUid, NEW.xObjectMasterChangeSeqNum, NEW.xObjectocalChangeSeqNum, NEW.xObjectLastChangedBy, NEW.xObjectLct) /*psql ON CONFLICT (xObjectUid) DO UPDATE SET objectType = EXCLUDED.objectType, objectId = EXCLUDED.objectId, definitionType = EXCLUDED.definitionType, interactionType = EXCLUDED.interactionType, correctResponsePattern = EXCLUDED.correctResponsePattern, objectContentEntryUid = EXCLUDED.objectContentEntryUid,objectStatementRefUid = EXCLUDED.objectStatementRefUid, xObjectMasterChangeSeqNum = EXCLUDED.xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum = EXCLUDED.xObjectocalChangeSeqNum, xObjectLastChangedBy = EXCLUDED.xObjectLastChangedBy, xObjectLct = EXCLUDED.xObjectLct */; END '; _stmtList.add_11rb$(element_408); var element_409 = ' CREATE TRIGGER ch_ins_60 AFTER INSERT ON StatementEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 60 AS chTableId, NEW.statementUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 60 AND chEntityPk = NEW.statementUid); END '; _stmtList.add_11rb$(element_409); var element_410 = ' CREATE TRIGGER ch_upd_60 AFTER UPDATE ON StatementEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 60 AS chTableId, NEW.statementUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 60 AND chEntityPk = NEW.statementUid); END '; _stmtList.add_11rb$(element_410); var element_411 = ' CREATE TRIGGER ch_del_60 AFTER DELETE ON StatementEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 60 AS chTableId, OLD.statementUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 60 AND chEntityPk = OLD.statementUid); END '; _stmtList.add_11rb$(element_411); var element_412 = 'CREATE VIEW StatementEntity_ReceiveView AS SELECT StatementEntity.*, StatementEntityReplicate.* FROM StatementEntity LEFT JOIN StatementEntityReplicate ON StatementEntityReplicate.sePk = StatementEntity.statementUid '; _stmtList.add_11rb$(element_412); var element_413 = ' CREATE TRIGGER statemententity_remote_insert_ins INSTEAD OF INSERT ON StatementEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO StatementEntity(statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid) VALUES (NEW.statementUid, NEW.statementId, NEW.statementPersonUid, NEW.statementVerbUid, NEW.xObjectUid, NEW.subStatementActorUid, NEW.substatementVerbUid, NEW.subStatementObjectUid, NEW.agentUid, NEW.instructorUid, NEW.authorityUid, NEW.teamUid, NEW.resultCompletion, NEW.resultSuccess, NEW.resultScoreScaled, NEW.resultScoreRaw, NEW.resultScoreMin, NEW.resultScoreMax, NEW.resultDuration, NEW.resultResponse, NEW.timestamp, NEW.stored, NEW.contextRegistration, NEW.contextPlatform, NEW.contextStatementId, NEW.fullStatement, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.statementLct, NEW.extensionProgress, NEW.contentEntryRoot, NEW.statementContentEntryUid, NEW.statementLearnerGroupUid, NEW.statementClazzUid) /*psql ON CONFLICT (statementUid) DO UPDATE SET statementId = EXCLUDED.statementId, statementPersonUid = EXCLUDED.statementPersonUid, statementVerbUid = EXCLUDED.statementVerbUid, xObjectUid = EXCLUDED.xObjectUid, subStatementActorUid = EXCLUDED.subStatementActorUid, substatementVerbUid = EXCLUDED.substatementVerbUid, subStatementObjectUid = EXCLUDED.subStatementObjectUid, agentUid = EXCLUDED.agentUid, instructorUid = EXCLUDED.instructorUid, authorityUid = EXCLUDED.authorityUid, teamUid = EXCLUDED.teamUid, resultCompletion = EXCLUDED.resultCompletion, resultSuccess = EXCLUDED.resultSuccess, resultScoreScaled = EXCLUDED.resultScoreScaled, resultScoreRaw = EXCLUDED.resultScoreRaw, resultScoreMin = EXCLUDED.resultScoreMin, resultScoreMax = EXCLUDED.resultScoreMax, resultDuration = EXCLUDED.resultDuration, resultResponse = EXCLUDED.resultResponse, timestamp = EXCLUDED.timestamp, stored = EXCLUDED.stored, contextRegistration = EXCLUDED.contextRegistration, contextPlatform = EXCLUDED.contextPlatform, contextStatementId = EXCLUDED.contextStatementId, fullStatement = EXCLUDED.fullStatement, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, statementLct = EXCLUDED.statementLct, extensionProgress = EXCLUDED.extensionProgress, contentEntryRoot = EXCLUDED.contentEntryRoot, statementContentEntryUid = EXCLUDED.statementContentEntryUid, statementLearnerGroupUid = EXCLUDED.statementLearnerGroupUid, statementClazzUid = EXCLUDED.statementClazzUid */; END '; _stmtList.add_11rb$(element_413); var element_414 = ' CREATE TRIGGER ch_ins_66 AFTER INSERT ON ContextXObjectStatementJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 66 AS chTableId, NEW.contextXObjectStatementJoinUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 66 AND chEntityPk = NEW.contextXObjectStatementJoinUid); END '; _stmtList.add_11rb$(element_414); var element_415 = ' CREATE TRIGGER ch_upd_66 AFTER UPDATE ON ContextXObjectStatementJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 66 AS chTableId, NEW.contextXObjectStatementJoinUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 66 AND chEntityPk = NEW.contextXObjectStatementJoinUid); END '; _stmtList.add_11rb$(element_415); var element_416 = ' CREATE TRIGGER ch_del_66 AFTER DELETE ON ContextXObjectStatementJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 66 AS chTableId, OLD.contextXObjectStatementJoinUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 66 AND chEntityPk = OLD.contextXObjectStatementJoinUid); END '; _stmtList.add_11rb$(element_416); var element_417 = 'CREATE VIEW ContextXObjectStatementJoin_ReceiveView AS SELECT ContextXObjectStatementJoin.*, ContextXObjectStatementJoinReplicate.* FROM ContextXObjectStatementJoin LEFT JOIN ContextXObjectStatementJoinReplicate ON ContextXObjectStatementJoinReplicate.cxosjPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid '; _stmtList.add_11rb$(element_417); var element_418 = ' CREATE TRIGGER contextxobjectstatementjoin_remote_insert_ins INSTEAD OF INSERT ON ContextXObjectStatementJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContextXObjectStatementJoin(contextXObjectStatementJoinUid, contextActivityFlag, contextStatementUid, contextXObjectUid, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, contextXObjectLct) VALUES (NEW.contextXObjectStatementJoinUid, NEW.contextActivityFlag, NEW.contextStatementUid, NEW.contextXObjectUid, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.contextXObjectLct) /*psql ON CONFLICT (contextXObjectStatementJoinUid) DO UPDATE SET contextActivityFlag = EXCLUDED.contextActivityFlag, contextStatementUid = EXCLUDED.contextStatementUid, contextXObjectUid = EXCLUDED.contextXObjectUid, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, contextXObjectLct = EXCLUDED.contextXObjectLct */; END '; _stmtList.add_11rb$(element_418); var element_419 = ' CREATE TRIGGER ch_ins_68 AFTER INSERT ON AgentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 68 AS chTableId, NEW.agentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 68 AND chEntityPk = NEW.agentUid); END '; _stmtList.add_11rb$(element_419); var element_420 = ' CREATE TRIGGER ch_upd_68 AFTER UPDATE ON AgentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 68 AS chTableId, NEW.agentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 68 AND chEntityPk = NEW.agentUid); END '; _stmtList.add_11rb$(element_420); var element_421 = ' CREATE TRIGGER ch_del_68 AFTER DELETE ON AgentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 68 AS chTableId, OLD.agentUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 68 AND chEntityPk = OLD.agentUid); END '; _stmtList.add_11rb$(element_421); var element_422 = 'CREATE VIEW AgentEntity_ReceiveView AS SELECT AgentEntity.*, AgentEntityReplicate.* FROM AgentEntity LEFT JOIN AgentEntityReplicate ON AgentEntityReplicate.aePk = AgentEntity.agentUid '; _stmtList.add_11rb$(element_422); var element_423 = ' CREATE TRIGGER agententity_remote_insert_ins INSTEAD OF INSERT ON AgentEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO AgentEntity(agentUid, agentMbox, agentMbox_sha1sum, agentOpenid, agentAccountName, agentHomePage, agentPersonUid, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, agentLct) VALUES (NEW.agentUid, NEW.agentMbox, NEW.agentMbox_sha1sum, NEW.agentOpenid, NEW.agentAccountName, NEW.agentHomePage, NEW.agentPersonUid, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.agentLct) /*psql ON CONFLICT (agentUid) DO UPDATE SET agentMbox = EXCLUDED.agentMbox, agentMbox_sha1sum = EXCLUDED.agentMbox_sha1sum, agentOpenid = EXCLUDED.agentOpenid, agentAccountName = EXCLUDED.agentAccountName, agentHomePage = EXCLUDED.agentHomePage, agentPersonUid = EXCLUDED.agentPersonUid, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, agentLct = EXCLUDED.agentLct*/; END '; _stmtList.add_11rb$(element_423); var element_424 = ' CREATE TRIGGER ch_ins_70 AFTER INSERT ON StateEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 70 AS chTableId, NEW.stateUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 70 AND chEntityPk = NEW.stateUid); END '; _stmtList.add_11rb$(element_424); var element_425 = ' CREATE TRIGGER ch_upd_70 AFTER UPDATE ON StateEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 70 AS chTableId, NEW.stateUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 70 AND chEntityPk = NEW.stateUid); END '; _stmtList.add_11rb$(element_425); var element_426 = ' CREATE TRIGGER ch_del_70 AFTER DELETE ON StateEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 70 AS chTableId, OLD.stateUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 70 AND chEntityPk = OLD.stateUid); END '; _stmtList.add_11rb$(element_426); var element_427 = 'CREATE VIEW StateEntity_ReceiveView AS SELECT StateEntity.*, StateEntityReplicate.* FROM StateEntity LEFT JOIN StateEntityReplicate ON StateEntityReplicate.sePk = StateEntity.stateUid '; _stmtList.add_11rb$(element_427); var element_428 = ' CREATE TRIGGER stateentity_remote_insert_ins INSTEAD OF INSERT ON StateEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO StateEntity(stateUid, stateId, agentUid, activityId, registration, isIsactive, timestamp, stateMasterChangeSeqNum, stateLocalChangeSeqNum, stateLastChangedBy, stateLct) VALUES (NEW.stateUid, NEW.stateId, NEW.agentUid, NEW.activityId, NEW.registration, NEW.isIsactive, NEW.timestamp, NEW.stateMasterChangeSeqNum, NEW.stateLocalChangeSeqNum, NEW.stateLastChangedBy, NEW.stateLct) /*psql ON CONFLICT (stateUid) DO UPDATE SET stateId = EXCLUDED.stateId, agentUid = EXCLUDED.agentUid, activityId = EXCLUDED.activityId, registration = EXCLUDED.registration, isIsactive = EXCLUDED.isIsactive, timestamp = EXCLUDED.timestamp, stateMasterChangeSeqNum = EXCLUDED.stateMasterChangeSeqNum, stateLocalChangeSeqNum = EXCLUDED.stateLocalChangeSeqNum, stateLastChangedBy = EXCLUDED.stateLastChangedBy, stateLct = EXCLUDED.stateLct */; END '; _stmtList.add_11rb$(element_428); var element_429 = ' CREATE TRIGGER ch_ins_72 AFTER INSERT ON StateContentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 72 AS chTableId, NEW.stateContentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 72 AND chEntityPk = NEW.stateContentUid); END '; _stmtList.add_11rb$(element_429); var element_430 = ' CREATE TRIGGER ch_upd_72 AFTER UPDATE ON StateContentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 72 AS chTableId, NEW.stateContentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 72 AND chEntityPk = NEW.stateContentUid); END '; _stmtList.add_11rb$(element_430); var element_431 = ' CREATE TRIGGER ch_del_72 AFTER DELETE ON StateContentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 72 AS chTableId, OLD.stateContentUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 72 AND chEntityPk = OLD.stateContentUid); END '; _stmtList.add_11rb$(element_431); var element_432 = 'CREATE VIEW StateContentEntity_ReceiveView AS SELECT StateContentEntity.*, StateContentEntityReplicate.* FROM StateContentEntity LEFT JOIN StateContentEntityReplicate ON StateContentEntityReplicate.scePk = StateContentEntity.stateContentUid '; _stmtList.add_11rb$(element_432); var element_433 = ' CREATE TRIGGER statecontententity_remote_insert_ins INSTEAD OF INSERT ON StateContentEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO StateContentEntity(stateContentUid, stateContentStateUid, stateContentKey, stateContentValue, isIsactive, stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum, stateContentLastChangedBy, stateContentLct) VALUES (NEW.stateContentUid, NEW.stateContentStateUid, NEW.stateContentKey, NEW.stateContentValue, NEW.isIsactive, NEW.stateContentMasterChangeSeqNum, NEW.stateContentLocalChangeSeqNum, NEW.stateContentLastChangedBy, NEW.stateContentLct) /*psql ON CONFLICT (stateContentUid) DO UPDATE SET stateContentStateUid = EXCLUDED.stateContentStateUid, stateContentKey = EXCLUDED.stateContentKey, stateContentValue = EXCLUDED.stateContentValue, isIsactive = EXCLUDED.isIsactive, stateContentMasterChangeSeqNum = EXCLUDED.stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum = EXCLUDED.stateContentLocalChangeSeqNum, stateContentLastChangedBy = EXCLUDED.stateContentLastChangedBy, stateContentLct = EXCLUDED.stateContentLct */; END '; _stmtList.add_11rb$(element_433); var element_434 = ' CREATE TRIGGER ch_ins_74 AFTER INSERT ON XLangMapEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 74 AS chTableId, NEW.statementLangMapUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 74 AND chEntityPk = NEW.statementLangMapUid); END '; _stmtList.add_11rb$(element_434); var element_435 = ' CREATE TRIGGER ch_upd_74 AFTER UPDATE ON XLangMapEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 74 AS chTableId, NEW.statementLangMapUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 74 AND chEntityPk = NEW.statementLangMapUid); END '; _stmtList.add_11rb$(element_435); var element_436 = ' CREATE TRIGGER ch_del_74 AFTER DELETE ON XLangMapEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 74 AS chTableId, OLD.statementLangMapUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 74 AND chEntityPk = OLD.statementLangMapUid); END '; _stmtList.add_11rb$(element_436); var element_437 = 'CREATE VIEW XLangMapEntry_ReceiveView AS SELECT XLangMapEntry.*, XLangMapEntryReplicate.* FROM XLangMapEntry LEFT JOIN XLangMapEntryReplicate ON XLangMapEntryReplicate.xlmePk = XLangMapEntry.statementLangMapUid '; _stmtList.add_11rb$(element_437); var element_438 = ' CREATE TRIGGER xlangmapentry_remote_insert_ins INSTEAD OF INSERT ON XLangMapEntry_ReceiveView FOR EACH ROW BEGIN REPLACE INTO XLangMapEntry(verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct, statementLangMapUid) VALUES (NEW.verbLangMapUid, NEW.objectLangMapUid, NEW.languageLangMapUid, NEW.languageVariantLangMapUid, NEW.valueLangMap, NEW.statementLangMapMasterCsn, NEW.statementLangMapLocalCsn, NEW.statementLangMapLcb, NEW.statementLangMapLct, NEW.statementLangMapUid) /*psql ON CONFLICT (statementLangMapUid) DO UPDATE SET verbLangMapUid = EXCLUDED.verbLangMapUid, objectLangMapUid = EXCLUDED.objectLangMapUid, languageLangMapUid = EXCLUDED.languageLangMapUid, languageVariantLangMapUid = EXCLUDED.languageVariantLangMapUid, valueLangMap = EXCLUDED.valueLangMap, statementLangMapMasterCsn = EXCLUDED.statementLangMapMasterCsn, statementLangMapLocalCsn = EXCLUDED.statementLangMapLocalCsn, statementLangMapLcb = EXCLUDED.statementLangMapLcb, statementLangMapLct = EXCLUDED.statementLangMapLct */; END '; _stmtList.add_11rb$(element_438); var element_439 = ' CREATE TRIGGER ch_ins_164 AFTER INSERT ON School BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 164 AS chTableId, NEW.schoolUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 164 AND chEntityPk = NEW.schoolUid); END '; _stmtList.add_11rb$(element_439); var element_440 = ' CREATE TRIGGER ch_upd_164 AFTER UPDATE ON School BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 164 AS chTableId, NEW.schoolUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 164 AND chEntityPk = NEW.schoolUid); END '; _stmtList.add_11rb$(element_440); var element_441 = ' CREATE TRIGGER ch_del_164 AFTER DELETE ON School BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 164 AS chTableId, OLD.schoolUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 164 AND chEntityPk = OLD.schoolUid); END '; _stmtList.add_11rb$(element_441); var element_442 = 'CREATE VIEW School_ReceiveView AS SELECT School.*, SchoolReplicate.* FROM School LEFT JOIN SchoolReplicate ON SchoolReplicate.schoolPk = School.schoolUid '; _stmtList.add_11rb$(element_442); var element_443 = ' CREATE TRIGGER school_remote_insert_ins INSTEAD OF INSERT ON School_ReceiveView FOR EACH ROW BEGIN REPLACE INTO School(schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone) VALUES (NEW.schoolUid, NEW.schoolName, NEW.schoolDesc, NEW.schoolAddress, NEW.schoolActive, NEW.schoolPhoneNumber, NEW.schoolGender, NEW.schoolHolidayCalendarUid, NEW.schoolFeatures, NEW.schoolLocationLong, NEW.schoolLocationLatt, NEW.schoolEmailAddress, NEW.schoolTeachersPersonGroupUid, NEW.schoolStudentsPersonGroupUid, NEW.schoolPendingStudentsPersonGroupUid, NEW.schoolCode, NEW.schoolMasterChangeSeqNum, NEW.schoolLocalChangeSeqNum, NEW.schoolLastChangedBy, NEW.schoolLct, NEW.schoolTimeZone) /*psql ON CONFLICT (schoolUid) DO UPDATE SET schoolName = EXCLUDED.schoolName, schoolDesc = EXCLUDED.schoolDesc, schoolAddress = EXCLUDED.schoolAddress, schoolActive = EXCLUDED.schoolActive, schoolPhoneNumber = EXCLUDED.schoolPhoneNumber, schoolGender = EXCLUDED.schoolGender, schoolHolidayCalendarUid = EXCLUDED.schoolHolidayCalendarUid, schoolFeatures = EXCLUDED.schoolFeatures, schoolLocationLong = EXCLUDED.schoolLocationLong, schoolLocationLatt = EXCLUDED.schoolLocationLatt, schoolEmailAddress = EXCLUDED.schoolEmailAddress, schoolTeachersPersonGroupUid = EXCLUDED.schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid = EXCLUDED.schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid = EXCLUDED.schoolPendingStudentsPersonGroupUid, schoolCode = EXCLUDED.schoolCode, schoolMasterChangeSeqNum = EXCLUDED.schoolMasterChangeSeqNum, schoolLocalChangeSeqNum = EXCLUDED.schoolLocalChangeSeqNum, schoolLastChangedBy = EXCLUDED.schoolLastChangedBy, schoolLct = EXCLUDED.schoolLct, schoolTimeZone = EXCLUDED.schoolTimeZone */; END '; _stmtList.add_11rb$(element_443); var element_444 = ' CREATE TRIGGER ch_ins_200 AFTER INSERT ON SchoolMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 200 AS chTableId, NEW.schoolMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 200 AND chEntityPk = NEW.schoolMemberUid); END '; _stmtList.add_11rb$(element_444); var element_445 = ' CREATE TRIGGER ch_upd_200 AFTER UPDATE ON SchoolMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 200 AS chTableId, NEW.schoolMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 200 AND chEntityPk = NEW.schoolMemberUid); END '; _stmtList.add_11rb$(element_445); var element_446 = ' CREATE TRIGGER ch_del_200 AFTER DELETE ON SchoolMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 200 AS chTableId, OLD.schoolMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 200 AND chEntityPk = OLD.schoolMemberUid); END '; _stmtList.add_11rb$(element_446); var element_447 = 'CREATE VIEW SchoolMember_ReceiveView AS SELECT SchoolMember.*, SchoolMemberReplicate.* FROM SchoolMember LEFT JOIN SchoolMemberReplicate ON SchoolMemberReplicate.smPk = SchoolMember.schoolMemberUid '; _stmtList.add_11rb$(element_447); var element_448 = ' CREATE TRIGGER schoolmember_remote_insert_ins INSTEAD OF INSERT ON SchoolMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO SchoolMember(schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct) VALUES (NEW.schoolMemberUid, NEW.schoolMemberPersonUid, NEW.schoolMemberSchoolUid, NEW.schoolMemberJoinDate, NEW.schoolMemberLeftDate, NEW.schoolMemberRole, NEW.schoolMemberActive, NEW.schoolMemberLocalChangeSeqNum, NEW.schoolMemberMasterChangeSeqNum, NEW.schoolMemberLastChangedBy, NEW.schoolMemberLct) /*psql ON CONFLICT (schoolMemberUid) DO UPDATE SET schoolMemberPersonUid = EXCLUDED.schoolMemberPersonUid, schoolMemberSchoolUid = EXCLUDED.schoolMemberSchoolUid, schoolMemberJoinDate = EXCLUDED.schoolMemberJoinDate, schoolMemberLeftDate = EXCLUDED.schoolMemberLeftDate, schoolMemberRole = EXCLUDED.schoolMemberRole, schoolMemberActive = EXCLUDED.schoolMemberActive, schoolMemberLocalChangeSeqNum = EXCLUDED.schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum = EXCLUDED.schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy = EXCLUDED.schoolMemberLastChangedBy, schoolMemberLct = EXCLUDED.schoolMemberLct */; END '; _stmtList.add_11rb$(element_448); var element_449 = ' CREATE TRIGGER ch_ins_208 AFTER INSERT ON Comments BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 208 AS chTableId, NEW.commentsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 208 AND chEntityPk = NEW.commentsUid); END '; _stmtList.add_11rb$(element_449); var element_450 = ' CREATE TRIGGER ch_upd_208 AFTER UPDATE ON Comments BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 208 AS chTableId, NEW.commentsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 208 AND chEntityPk = NEW.commentsUid); END '; _stmtList.add_11rb$(element_450); var element_451 = ' CREATE TRIGGER ch_del_208 AFTER DELETE ON Comments BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 208 AS chTableId, OLD.commentsUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 208 AND chEntityPk = OLD.commentsUid); END '; _stmtList.add_11rb$(element_451); var element_452 = 'CREATE VIEW Comments_ReceiveView AS SELECT Comments.*, CommentsReplicate.* FROM Comments LEFT JOIN CommentsReplicate ON CommentsReplicate.commentsPk = Comments.commentsUid '; _stmtList.add_11rb$(element_452); var element_453 = ' CREATE TRIGGER comments_remote_insert_ins INSTEAD OF INSERT ON Comments_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Comments(commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES (NEW.commentsUid, NEW.commentsText, NEW.commentsEntityType, NEW.commentsEntityUid, NEW.commentsPublic, NEW.commentsStatus, NEW.commentsPersonUid, NEW.commentsToPersonUid, NEW.commentSubmitterUid, NEW.commentsFlagged, NEW.commentsInActive, NEW.commentsDateTimeAdded, NEW.commentsDateTimeUpdated, NEW.commentsMCSN, NEW.commentsLCSN, NEW.commentsLCB, NEW.commentsLct) /*psql ON CONFLICT (commentsUid) DO UPDATE SET commentsText = EXCLUDED.commentsText, commentsEntityType = EXCLUDED.commentsEntityType, commentsEntityUid = EXCLUDED.commentsEntityUid, commentsPublic = EXCLUDED.commentsPublic, commentsStatus = EXCLUDED.commentsStatus, commentsPersonUid = EXCLUDED.commentsPersonUid, commentsToPersonUid = EXCLUDED.commentsToPersonUid, commentSubmitterUid = EXCLUDED.commentSubmitterUid, commentsFlagged = EXCLUDED.commentsFlagged, commentsInActive = EXCLUDED.commentsInActive, commentsDateTimeAdded = EXCLUDED.commentsDateTimeAdded, commentsDateTimeUpdated = EXCLUDED.commentsDateTimeUpdated, commentsMCSN = EXCLUDED.commentsMCSN, commentsLCSN = EXCLUDED.commentsLCSN, commentsLCB = EXCLUDED.commentsLCB, commentsLct = EXCLUDED.commentsLct */; END '; _stmtList.add_11rb$(element_453); var element_454 = ' CREATE TRIGGER ch_ins_101 AFTER INSERT ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, NEW.reportUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = NEW.reportUid); END '; _stmtList.add_11rb$(element_454); var element_455 = ' CREATE TRIGGER ch_upd_101 AFTER UPDATE ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, NEW.reportUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = NEW.reportUid); END '; _stmtList.add_11rb$(element_455); var element_456 = ' CREATE TRIGGER ch_del_101 AFTER DELETE ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, OLD.reportUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = OLD.reportUid); END '; _stmtList.add_11rb$(element_456); var element_457 = 'CREATE VIEW Report_ReceiveView AS SELECT Report.*, ReportReplicate.* FROM Report LEFT JOIN ReportReplicate ON ReportReplicate.reportPk = Report.reportUid '; _stmtList.add_11rb$(element_457); var element_458 = ' CREATE TRIGGER report_remote_insert_ins INSTEAD OF INSERT ON Report_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Report(reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct) VALUES (NEW.reportUid, NEW.reportOwnerUid, NEW.xAxis, NEW.reportDateRangeSelection, NEW.fromDate, NEW.fromRelTo, NEW.fromRelOffSet, NEW.fromRelUnit, NEW.toDate, NEW.toRelTo, NEW.toRelOffSet, NEW.toRelUnit, NEW.reportTitle, NEW.reportDescription, NEW.reportSeries, NEW.reportInactive, NEW.isTemplate, NEW.priority, NEW.reportTitleId, NEW.reportDescId, NEW.reportMasterChangeSeqNum, NEW.reportLocalChangeSeqNum, NEW.reportLastChangedBy, NEW.reportLct) /*psql ON CONFLICT (reportUid) DO UPDATE SET reportOwnerUid = EXCLUDED.reportOwnerUid, xAxis = EXCLUDED.xAxis, reportDateRangeSelection = EXCLUDED.reportDateRangeSelection, fromDate = EXCLUDED.fromDate, fromRelTo = EXCLUDED.fromRelTo, fromRelOffSet = EXCLUDED.fromRelOffSet, fromRelUnit = EXCLUDED.fromRelUnit, toDate = EXCLUDED.toDate, toRelTo = EXCLUDED.toRelTo, toRelOffSet = EXCLUDED.toRelOffSet, toRelUnit = EXCLUDED.toRelUnit, reportTitle = EXCLUDED.reportTitle, reportDescription = EXCLUDED.reportDescription, reportSeries = EXCLUDED.reportSeries, reportInactive = EXCLUDED.reportInactive, isTemplate = EXCLUDED.isTemplate, priority = EXCLUDED.priority, reportTitleId = EXCLUDED.reportTitleId, reportDescId = EXCLUDED.reportDescId, reportMasterChangeSeqNum = EXCLUDED.reportMasterChangeSeqNum, reportLocalChangeSeqNum = EXCLUDED.reportLocalChangeSeqNum, reportLastChangedBy = EXCLUDED.reportLastChangedBy, reportLct = EXCLUDED.reportLct */; END '; _stmtList.add_11rb$(element_458); var element_459 = ' CREATE TRIGGER ch_ins_189 AFTER INSERT ON Site BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 189 AS chTableId, NEW.siteUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 189 AND chEntityPk = NEW.siteUid); END '; _stmtList.add_11rb$(element_459); var element_460 = ' CREATE TRIGGER ch_upd_189 AFTER UPDATE ON Site BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 189 AS chTableId, NEW.siteUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 189 AND chEntityPk = NEW.siteUid); END '; _stmtList.add_11rb$(element_460); var element_461 = ' CREATE TRIGGER ch_del_189 AFTER DELETE ON Site BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 189 AS chTableId, OLD.siteUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 189 AND chEntityPk = OLD.siteUid); END '; _stmtList.add_11rb$(element_461); var element_462 = 'CREATE VIEW Site_ReceiveView AS SELECT Site.*, SiteReplicate.* FROM Site LEFT JOIN SiteReplicate ON SiteReplicate.sitePk = Site.siteUid '; _stmtList.add_11rb$(element_462); var element_463 = ' CREATE TRIGGER site_remote_insert_ins INSTEAD OF INSERT ON Site_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Site(siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES (NEW.siteUid, NEW.sitePcsn, NEW.siteLcsn, NEW.siteLcb, NEW.siteLct, NEW.siteName, NEW.guestLogin, NEW.registrationAllowed, NEW.authSalt) /*psql ON CONFLICT (siteUid) DO UPDATE SET sitePcsn = EXCLUDED.sitePcsn, siteLcsn = EXCLUDED.siteLcsn, siteLcb = EXCLUDED.siteLcb, siteLct = EXCLUDED.siteLct, siteName = EXCLUDED.siteName, guestLogin = EXCLUDED.guestLogin, registrationAllowed = EXCLUDED.registrationAllowed, authSalt = EXCLUDED.authSalt*/; END '; _stmtList.add_11rb$(element_463); var element_464 = ' CREATE TRIGGER ch_ins_301 AFTER INSERT ON LearnerGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 301 AS chTableId, NEW.learnerGroupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 301 AND chEntityPk = NEW.learnerGroupUid); END '; _stmtList.add_11rb$(element_464); var element_465 = ' CREATE TRIGGER ch_upd_301 AFTER UPDATE ON LearnerGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 301 AS chTableId, NEW.learnerGroupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 301 AND chEntityPk = NEW.learnerGroupUid); END '; _stmtList.add_11rb$(element_465); var element_466 = ' CREATE TRIGGER ch_del_301 AFTER DELETE ON LearnerGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 301 AS chTableId, OLD.learnerGroupUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 301 AND chEntityPk = OLD.learnerGroupUid); END '; _stmtList.add_11rb$(element_466); var element_467 = 'CREATE VIEW LearnerGroup_ReceiveView AS SELECT LearnerGroup.*, LearnerGroupReplicate.* FROM LearnerGroup LEFT JOIN LearnerGroupReplicate ON LearnerGroupReplicate.lgPk = LearnerGroup.learnerGroupUid '; _stmtList.add_11rb$(element_467); var element_468 = ' CREATE TRIGGER learnergroup_remote_insert_ins INSTEAD OF INSERT ON LearnerGroup_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LearnerGroup(learnerGroupUid, learnerGroupName, learnerGroupDescription, learnerGroupActive, learnerGroupMCSN, learnerGroupCSN, learnerGroupLCB, learnerGroupLct) VALUES (NEW.learnerGroupUid, NEW.learnerGroupName, NEW.learnerGroupDescription, NEW.learnerGroupActive, NEW.learnerGroupMCSN, NEW.learnerGroupCSN, NEW.learnerGroupLCB, NEW.learnerGroupLct) /*psql ON CONFLICT (learnerGroupUid) DO UPDATE SET learnerGroupName = EXCLUDED.learnerGroupName, learnerGroupDescription = EXCLUDED.learnerGroupDescription, learnerGroupActive = EXCLUDED.learnerGroupActive, learnerGroupMCSN = EXCLUDED.learnerGroupMCSN, learnerGroupCSN = EXCLUDED.learnerGroupCSN, learnerGroupLCB = EXCLUDED.learnerGroupLCB, learnerGroupLct = EXCLUDED.learnerGroupLct */; END '; _stmtList.add_11rb$(element_468); var element_469 = ' CREATE TRIGGER ch_ins_300 AFTER INSERT ON LearnerGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 300 AS chTableId, NEW.learnerGroupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 300 AND chEntityPk = NEW.learnerGroupMemberUid); END '; _stmtList.add_11rb$(element_469); var element_470 = ' CREATE TRIGGER ch_upd_300 AFTER UPDATE ON LearnerGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 300 AS chTableId, NEW.learnerGroupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 300 AND chEntityPk = NEW.learnerGroupMemberUid); END '; _stmtList.add_11rb$(element_470); var element_471 = ' CREATE TRIGGER ch_del_300 AFTER DELETE ON LearnerGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 300 AS chTableId, OLD.learnerGroupMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 300 AND chEntityPk = OLD.learnerGroupMemberUid); END '; _stmtList.add_11rb$(element_471); var element_472 = 'CREATE VIEW LearnerGroupMember_ReceiveView AS SELECT LearnerGroupMember.*, LearnerGroupMemberReplicate.* FROM LearnerGroupMember LEFT JOIN LearnerGroupMemberReplicate ON LearnerGroupMemberReplicate.lgmPk = LearnerGroupMember.learnerGroupMemberUid '; _stmtList.add_11rb$(element_472); var element_473 = ' CREATE TRIGGER learnergroupmember_remote_insert_ins INSTEAD OF INSERT ON LearnerGroupMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LearnerGroupMember(learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct) VALUES (NEW.learnerGroupMemberUid, NEW.learnerGroupMemberPersonUid, NEW.learnerGroupMemberLgUid, NEW.learnerGroupMemberRole, NEW.learnerGroupMemberActive, NEW.learnerGroupMemberMCSN, NEW.learnerGroupMemberCSN, NEW.learnerGroupMemberLCB, NEW.learnerGroupMemberLct) /*psql ON CONFLICT (learnerGroupMemberUid) DO UPDATE SET learnerGroupMemberPersonUid = EXCLUDED.learnerGroupMemberPersonUid, learnerGroupMemberLgUid = EXCLUDED.learnerGroupMemberLgUid, learnerGroupMemberRole = EXCLUDED.learnerGroupMemberRole, learnerGroupMemberActive = EXCLUDED.learnerGroupMemberActive, learnerGroupMemberMCSN = EXCLUDED.learnerGroupMemberMCSN, learnerGroupMemberCSN = EXCLUDED.learnerGroupMemberCSN, learnerGroupMemberLCB = EXCLUDED.learnerGroupMemberLCB, learnerGroupMemberLct = EXCLUDED.learnerGroupMemberLct */; END '; _stmtList.add_11rb$(element_473); var element_474 = ' CREATE TRIGGER ch_ins_302 AFTER INSERT ON GroupLearningSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 302 AS chTableId, NEW.groupLearningSessionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 302 AND chEntityPk = NEW.groupLearningSessionUid); END '; _stmtList.add_11rb$(element_474); var element_475 = ' CREATE TRIGGER ch_upd_302 AFTER UPDATE ON GroupLearningSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 302 AS chTableId, NEW.groupLearningSessionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 302 AND chEntityPk = NEW.groupLearningSessionUid); END '; _stmtList.add_11rb$(element_475); var element_476 = ' CREATE TRIGGER ch_del_302 AFTER DELETE ON GroupLearningSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 302 AS chTableId, OLD.groupLearningSessionUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 302 AND chEntityPk = OLD.groupLearningSessionUid); END '; _stmtList.add_11rb$(element_476); var element_477 = 'CREATE VIEW GroupLearningSession_ReceiveView AS SELECT GroupLearningSession.*, GroupLearningSessionReplicate.* FROM GroupLearningSession LEFT JOIN GroupLearningSessionReplicate ON GroupLearningSessionReplicate.glsPk = GroupLearningSession.groupLearningSessionUid '; _stmtList.add_11rb$(element_477); var element_478 = ' CREATE TRIGGER grouplearningsession_remote_insert_ins INSTEAD OF INSERT ON GroupLearningSession_ReceiveView FOR EACH ROW BEGIN REPLACE INTO GroupLearningSession(groupLearningSessionUid, groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid, groupLearningSessionInactive, groupLearningSessionMCSN, groupLearningSessionCSN, groupLearningSessionLCB, groupLearningSessionLct) VALUES (NEW.groupLearningSessionUid, NEW.groupLearningSessionContentUid, NEW.groupLearningSessionLearnerGroupUid, NEW.groupLearningSessionInactive, NEW.groupLearningSessionMCSN, NEW.groupLearningSessionCSN, NEW.groupLearningSessionLCB, NEW.groupLearningSessionLct) /*psql ON CONFLICT (groupLearningSessionUid) DO UPDATE SET groupLearningSessionContentUid = EXCLUDED.groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid = EXCLUDED.groupLearningSessionLearnerGroupUid, groupLearningSessionInactive = EXCLUDED.groupLearningSessionInactive, groupLearningSessionMCSN = EXCLUDED.groupLearningSessionMCSN, groupLearningSessionCSN = EXCLUDED.groupLearningSessionCSN, groupLearningSessionLCB = EXCLUDED.groupLearningSessionLCB, groupLearningSessionLct = EXCLUDED.groupLearningSessionLct */; END '; _stmtList.add_11rb$(element_478); var element_479 = ' CREATE TRIGGER ch_ins_272 AFTER INSERT ON SiteTerms BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 272 AS chTableId, NEW.sTermsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 272 AND chEntityPk = NEW.sTermsUid); END '; _stmtList.add_11rb$(element_479); var element_480 = ' CREATE TRIGGER ch_upd_272 AFTER UPDATE ON SiteTerms BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 272 AS chTableId, NEW.sTermsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 272 AND chEntityPk = NEW.sTermsUid); END '; _stmtList.add_11rb$(element_480); var element_481 = ' CREATE TRIGGER ch_del_272 AFTER DELETE ON SiteTerms BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 272 AS chTableId, OLD.sTermsUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 272 AND chEntityPk = OLD.sTermsUid); END '; _stmtList.add_11rb$(element_481); var element_482 = 'CREATE VIEW SiteTerms_ReceiveView AS SELECT SiteTerms.*, SiteTermsReplicate.* FROM SiteTerms LEFT JOIN SiteTermsReplicate ON SiteTermsReplicate.stPk = SiteTerms.sTermsUid '; _stmtList.add_11rb$(element_482); var element_483 = ' CREATE TRIGGER siteterms_remote_insert_ins INSTEAD OF INSERT ON SiteTerms_ReceiveView FOR EACH ROW BEGIN REPLACE INTO SiteTerms(sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct) VALUES (NEW.sTermsUid, NEW.termsHtml, NEW.sTermsLang, NEW.sTermsLangUid, NEW.sTermsActive, NEW.sTermsLastChangedBy, NEW.sTermsPrimaryCsn, NEW.sTermsLocalCsn, NEW.sTermsLct) /*psql ON CONFLICT (sTermsUid) DO UPDATE SET termsHtml = EXCLUDED.termsHtml, sTermsLang = EXCLUDED.sTermsLang, sTermsLangUid = EXCLUDED.sTermsLangUid, sTermsActive = EXCLUDED.sTermsActive, sTermsLastChangedBy = EXCLUDED.sTermsLastChangedBy, sTermsPrimaryCsn = EXCLUDED.sTermsPrimaryCsn, sTermsLocalCsn = EXCLUDED.sTermsLocalCsn, sTermsLct = EXCLUDED.sTermsLct */; END '; _stmtList.add_11rb$(element_483); var element_484 = ' CREATE TRIGGER ch_ins_134 AFTER INSERT ON ClazzContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 134 AS chTableId, NEW.ccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 134 AND chEntityPk = NEW.ccjUid); END '; _stmtList.add_11rb$(element_484); var element_485 = ' CREATE TRIGGER ch_upd_134 AFTER UPDATE ON ClazzContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 134 AS chTableId, NEW.ccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 134 AND chEntityPk = NEW.ccjUid); END '; _stmtList.add_11rb$(element_485); var element_486 = ' CREATE TRIGGER ch_del_134 AFTER DELETE ON ClazzContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 134 AS chTableId, OLD.ccjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 134 AND chEntityPk = OLD.ccjUid); END '; _stmtList.add_11rb$(element_486); var element_487 = 'CREATE VIEW ClazzContentJoin_ReceiveView AS SELECT ClazzContentJoin.*, ClazzContentJoinReplicate.* FROM ClazzContentJoin LEFT JOIN ClazzContentJoinReplicate ON ClazzContentJoinReplicate.ccjPk = ClazzContentJoin.ccjUid '; _stmtList.add_11rb$(element_487); var element_488 = ' CREATE TRIGGER clazzcontentjoin_remote_insert_ins INSTEAD OF INSERT ON ClazzContentJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzContentJoin(ccjUid, ccjContentEntryUid, ccjClazzUid, ccjActive, ccjLocalChangeSeqNum, ccjMasterChangeSeqNum, ccjLastChangedBy, ccjLct) VALUES (NEW.ccjUid, NEW.ccjContentEntryUid, NEW.ccjClazzUid, NEW.ccjActive, NEW.ccjLocalChangeSeqNum, NEW.ccjMasterChangeSeqNum, NEW.ccjLastChangedBy, NEW.ccjLct) /*psql ON CONFLICT (ccjUid) DO UPDATE SET ccjContentEntryUid = EXCLUDED.ccjContentEntryUid, ccjClazzUid = EXCLUDED.ccjClazzUid, ccjActive = EXCLUDED.ccjActive, ccjLocalChangeSeqNum = EXCLUDED.ccjLocalChangeSeqNum, ccjMasterChangeSeqNum = EXCLUDED.ccjMasterChangeSeqNum, ccjLastChangedBy = EXCLUDED.ccjLastChangedBy, ccjLct = EXCLUDED.ccjLct */; END '; _stmtList.add_11rb$(element_488); var element_489 = ' CREATE TRIGGER ch_ins_512 AFTER INSERT ON PersonParentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 512 AS chTableId, NEW.ppjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 512 AND chEntityPk = NEW.ppjUid); END '; _stmtList.add_11rb$(element_489); var element_490 = ' CREATE TRIGGER ch_upd_512 AFTER UPDATE ON PersonParentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 512 AS chTableId, NEW.ppjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 512 AND chEntityPk = NEW.ppjUid); END '; _stmtList.add_11rb$(element_490); var element_491 = ' CREATE TRIGGER ch_del_512 AFTER DELETE ON PersonParentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 512 AS chTableId, OLD.ppjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 512 AND chEntityPk = OLD.ppjUid); END '; _stmtList.add_11rb$(element_491); var element_492 = 'CREATE VIEW PersonParentJoin_ReceiveView AS SELECT PersonParentJoin.*, PersonParentJoinReplicate.* FROM PersonParentJoin LEFT JOIN PersonParentJoinReplicate ON PersonParentJoinReplicate.ppjPk = PersonParentJoin.ppjUid '; _stmtList.add_11rb$(element_492); var element_493 = ' CREATE TRIGGER personparentjoin_remote_insert_ins INSTEAD OF INSERT ON PersonParentJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonParentJoin(ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr) VALUES (NEW.ppjUid, NEW.ppjPcsn, NEW.ppjLcsn, NEW.ppjLcb, NEW.ppjLct, NEW.ppjParentPersonUid, NEW.ppjMinorPersonUid, NEW.ppjRelationship, NEW.ppjEmail, NEW.ppjPhone, NEW.ppjInactive, NEW.ppjStatus, NEW.ppjApprovalTiemstamp, NEW.ppjApprovalIpAddr) /*psql ON CONFLICT (ppjUid) DO UPDATE SET ppjPcsn = EXCLUDED.ppjPcsn, ppjLcsn = EXCLUDED.ppjLcsn, ppjLcb = EXCLUDED.ppjLcb, ppjLct = EXCLUDED.ppjLct, ppjParentPersonUid = EXCLUDED.ppjParentPersonUid, ppjMinorPersonUid = EXCLUDED.ppjMinorPersonUid, ppjRelationship = EXCLUDED.ppjRelationship, ppjEmail = EXCLUDED.ppjEmail, ppjPhone = EXCLUDED.ppjPhone, ppjInactive = EXCLUDED.ppjInactive, ppjStatus = EXCLUDED.ppjStatus, ppjApprovalTiemstamp = EXCLUDED.ppjApprovalTiemstamp, ppjApprovalIpAddr = EXCLUDED.ppjApprovalIpAddr */; END '; _stmtList.add_11rb$(element_493); var element_494 = ' CREATE TRIGGER ch_ins_48 AFTER INSERT ON ScopedGrant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 48 AS chTableId, NEW.sgUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 48 AND chEntityPk = NEW.sgUid); END '; _stmtList.add_11rb$(element_494); var element_495 = ' CREATE TRIGGER ch_upd_48 AFTER UPDATE ON ScopedGrant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 48 AS chTableId, NEW.sgUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 48 AND chEntityPk = NEW.sgUid); END '; _stmtList.add_11rb$(element_495); var element_496 = ' CREATE TRIGGER ch_del_48 AFTER DELETE ON ScopedGrant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 48 AS chTableId, OLD.sgUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 48 AND chEntityPk = OLD.sgUid); END '; _stmtList.add_11rb$(element_496); var element_497 = 'CREATE VIEW ScopedGrant_ReceiveView AS SELECT ScopedGrant.*, ScopedGrantReplicate.* FROM ScopedGrant LEFT JOIN ScopedGrantReplicate ON ScopedGrantReplicate.sgPk = ScopedGrant.sgUid '; _stmtList.add_11rb$(element_497); var element_498 = ' CREATE TRIGGER sg_remote_insert_ins INSTEAD OF INSERT ON ScopedGrant_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ScopedGrant(sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags) VALUES (NEW.sgUid, NEW.sgPcsn, NEW.sgLcsn, NEW.sgLcb, NEW.sgLct, NEW.sgTableId, NEW.sgEntityUid, NEW.sgPermissions, NEW.sgGroupUid, NEW.sgIndex, NEW.sgFlags) /*psql ON CONFLICT(sgUid) DO UPDATE SET sgLct = EXCLUDED.sgLct, sgPermissions = EXCLUDED.sgPermissions */ ; END '; _stmtList.add_11rb$(element_498); var element_499 = ' CREATE TRIGGER ch_ins_419 AFTER INSERT ON ErrorReport BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 419 AS chTableId, NEW.errUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 419 AND chEntityPk = NEW.errUid); END '; _stmtList.add_11rb$(element_499); var element_500 = ' CREATE TRIGGER ch_upd_419 AFTER UPDATE ON ErrorReport BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 419 AS chTableId, NEW.errUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 419 AND chEntityPk = NEW.errUid); END '; _stmtList.add_11rb$(element_500); var element_501 = ' CREATE TRIGGER ch_del_419 AFTER DELETE ON ErrorReport BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 419 AS chTableId, OLD.errUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 419 AND chEntityPk = OLD.errUid); END '; _stmtList.add_11rb$(element_501); var element_502 = 'CREATE VIEW ErrorReport_ReceiveView AS SELECT ErrorReport.*, ErrorReportReplicate.* FROM ErrorReport LEFT JOIN ErrorReportReplicate ON ErrorReportReplicate.erPk = ErrorReport.errUid '; _stmtList.add_11rb$(element_502); var element_503 = ' CREATE TRIGGER errorreport_remote_insert_ins INSTEAD OF INSERT ON ErrorReport_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ErrorReport(errUid, errPcsn, errLcsn, errLcb, errLct, severity, timestamp, presenterUri, appVersion, versionCode, errorCode, operatingSys, osVersion, stackTrace, message) VALUES (NEW.errUid, NEW.errPcsn, NEW.errLcsn, NEW.errLcb, NEW.errLct, NEW.severity, NEW.timestamp, NEW.presenterUri, NEW.appVersion, NEW.versionCode, NEW.errorCode, NEW.operatingSys, NEW.osVersion, NEW.stackTrace, NEW.message) /*psql ON CONFLICT (errUid) DO UPDATE SET errPcsn = EXCLUDED.errPcsn, errLcsn = EXCLUDED.errLcsn, errLcb = EXCLUDED.errLcb, errLct = EXCLUDED.errLct, severity = EXCLUDED.severity, timestamp = EXCLUDED.timestamp, presenterUri = EXCLUDED.presenterUri, appVersion = EXCLUDED.appVersion, versionCode = EXCLUDED.versionCode, errorCode = EXCLUDED.errorCode, operatingSys = EXCLUDED.operatingSys, osVersion = EXCLUDED.osVersion, stackTrace = EXCLUDED.stackTrace, message = EXCLUDED.message */; END '; _stmtList.add_11rb$(element_503); var element_504 = ' CREATE TRIGGER ch_ins_520 AFTER INSERT ON ClazzAssignment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 520 AS chTableId, NEW.caUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 520 AND chEntityPk = NEW.caUid); END '; _stmtList.add_11rb$(element_504); var element_505 = ' CREATE TRIGGER ch_upd_520 AFTER UPDATE ON ClazzAssignment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 520 AS chTableId, NEW.caUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 520 AND chEntityPk = NEW.caUid); END '; _stmtList.add_11rb$(element_505); var element_506 = ' CREATE TRIGGER ch_del_520 AFTER DELETE ON ClazzAssignment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 520 AS chTableId, OLD.caUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 520 AND chEntityPk = OLD.caUid); END '; _stmtList.add_11rb$(element_506); var element_507 = 'CREATE VIEW ClazzAssignment_ReceiveView AS SELECT ClazzAssignment.*, ClazzAssignmentReplicate.* FROM ClazzAssignment LEFT JOIN ClazzAssignmentReplicate ON ClazzAssignmentReplicate.caPk = ClazzAssignment.caUid '; _stmtList.add_11rb$(element_507); var element_508 = ' CREATE TRIGGER clazzassignment_remote_insert_ins INSTEAD OF INSERT ON ClazzAssignment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzAssignment(caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES (NEW.caUid, NEW.caTitle, NEW.caDescription, NEW.caGroupUid, NEW.caActive, NEW.caClassCommentEnabled, NEW.caPrivateCommentsEnabled, NEW.caRequireFileSubmission, NEW.caFileType, NEW.caSizeLimit, NEW.caNumberOfFiles, NEW.caSubmissionPolicy, NEW.caMarkingType,NEW.caRequireTextSubmission, NEW.caTextLimitType, NEW.caTextLimit, NEW.caXObjectUid, NEW.caClazzUid, NEW.caLocalChangeSeqNum, NEW.caMasterChangeSeqNum, NEW.caLastChangedBy, NEW.caLct) /*psql ON CONFLICT (caUid) DO UPDATE SET caTitle = EXCLUDED.caTitle, caDescription = EXCLUDED.caDescription, caGroupUid = EXCLUDED.caGroupUid, caActive = EXCLUDED.caActive, caClassCommentEnabled = EXCLUDED.caClassCommentEnabled, caPrivateCommentsEnabled = EXCLUDED.caPrivateCommentsEnabled, caRequireFileSubmission = EXCLUDED.caRequireFileSubmission, caFileType = EXCLUDED.caFileType, caSizeLimit = EXCLUDED.caSizeLimit, caNumberOfFiles = EXCLUDED.caNumberOfFiles, caSubmissionPolicy = EXCLUDED.caSubmissionPolicy, caMarkingType = EXCLUDED.caMarkingType, caRequireTextSubmission = EXCLUDED.caRequireTextSubmission, caTextLimitType = EXCLUDED.caTextLimitType, caTextLimit = EXCLUDED.caTextLimit, caXObjectUid = EXCLUDED.caXObjectUid, caClazzUid = EXCLUDED.caClazzUid, caLocalChangeSeqNum = EXCLUDED.caLocalChangeSeqNum, caMasterChangeSeqNum = EXCLUDED.caMasterChangeSeqNum, caLastChangedBy = EXCLUDED.caLastChangedBy, caLct = EXCLUDED.caLct */; END '; _stmtList.add_11rb$(element_508); var element_509 = ' CREATE TRIGGER ch_ins_521 AFTER INSERT ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, NEW.cacjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = NEW.cacjUid); END '; _stmtList.add_11rb$(element_509); var element_510 = ' CREATE TRIGGER ch_upd_521 AFTER UPDATE ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, NEW.cacjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = NEW.cacjUid); END '; _stmtList.add_11rb$(element_510); var element_511 = ' CREATE TRIGGER ch_del_521 AFTER DELETE ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, OLD.cacjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = OLD.cacjUid); END '; _stmtList.add_11rb$(element_511); var element_512 = 'CREATE VIEW ClazzAssignmentContentJoin_ReceiveView AS SELECT ClazzAssignmentContentJoin.*, ClazzAssignmentContentJoinReplicate.* FROM ClazzAssignmentContentJoin LEFT JOIN ClazzAssignmentContentJoinReplicate ON ClazzAssignmentContentJoinReplicate.cacjPk = ClazzAssignmentContentJoin.cacjUid '; _stmtList.add_11rb$(element_512); var element_513 = ' CREATE TRIGGER clazzassignmentcontentjoin_remote_insert_ins INSTEAD OF INSERT ON ClazzAssignmentContentJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzAssignmentContentJoin(cacjUid, cacjContentUid, cacjAssignmentUid, cacjActive,cacjWeight, cacjMCSN, cacjLCSN, cacjLCB, cacjLct) VALUES (NEW.cacjUid, NEW.cacjContentUid, NEW.cacjAssignmentUid, NEW.cacjActive, NEW.cacjWeight, NEW.cacjMCSN, NEW.cacjLCSN, NEW.cacjLCB, NEW.cacjLct) /*psql ON CONFLICT (cacjUid) DO UPDATE SET cacjContentUid = EXCLUDED.cacjContentUid, cacjAssignmentUid = EXCLUDED.cacjAssignmentUid, cacjActive = EXCLUDED.cacjActive, cacjWeight = EXCLUDED.cacjWeight, cacjMCSN = EXCLUDED.cacjMCSN, cacjLCSN = EXCLUDED.cacjLCSN, cacjLCB = EXCLUDED.cacjLCB, cacjLct = EXCLUDED.cacjLct */; END '; _stmtList.add_11rb$(element_513); var element_514 = ' CREATE TRIGGER ch_ins_522 AFTER INSERT ON CourseAssignmentSubmission BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 522 AS chTableId, NEW.casUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 522 AND chEntityPk = NEW.casUid); END '; _stmtList.add_11rb$(element_514); var element_515 = ' CREATE TRIGGER ch_upd_522 AFTER UPDATE ON CourseAssignmentSubmission BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 522 AS chTableId, NEW.casUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 522 AND chEntityPk = NEW.casUid); END '; _stmtList.add_11rb$(element_515); var element_516 = ' CREATE TRIGGER ch_del_522 AFTER DELETE ON CourseAssignmentSubmission BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 522 AS chTableId, OLD.casUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 522 AND chEntityPk = OLD.casUid); END '; _stmtList.add_11rb$(element_516); var element_517 = 'CREATE VIEW CourseAssignmentSubmission_ReceiveView AS SELECT CourseAssignmentSubmission.*, CourseAssignmentSubmissionReplicate.* FROM CourseAssignmentSubmission LEFT JOIN CourseAssignmentSubmissionReplicate ON CourseAssignmentSubmissionReplicate.casPk = CourseAssignmentSubmission.casUid '; _stmtList.add_11rb$(element_517); var element_518 = ' CREATE TRIGGER courseassignmentsubmission_remote_insert_ins INSTEAD OF INSERT ON CourseAssignmentSubmission_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseAssignmentSubmission(casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp) VALUES (NEW.casUid, NEW.casAssignmentUid, NEW.casSubmitterUid, NEW.casSubmitterPersonUid, NEW.casText, NEW.casType, NEW.casTimestamp) /*psql ON CONFLICT (casUid) DO UPDATE SET casAssignmentUid = EXCLUDED.casAssignmentUid, casSubmitterUid = EXCLUDED.casSubmitterUid, casSubmitterPersonUid = EXCLUDED.casSubmitterPersonUid, casText = EXCLUDED.casText, casType = EXCLUDED.casType, casTimestamp = EXCLUDED.casTimestamp */; END '; _stmtList.add_11rb$(element_518); var element_519 = ' CREATE TRIGGER ch_ins_90 AFTER INSERT ON CourseAssignmentSubmissionAttachment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 90 AS chTableId, NEW.casaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 90 AND chEntityPk = NEW.casaUid); END '; _stmtList.add_11rb$(element_519); var element_520 = ' CREATE TRIGGER ch_upd_90 AFTER UPDATE ON CourseAssignmentSubmissionAttachment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 90 AS chTableId, NEW.casaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 90 AND chEntityPk = NEW.casaUid); END '; _stmtList.add_11rb$(element_520); var element_521 = ' CREATE TRIGGER ch_del_90 AFTER DELETE ON CourseAssignmentSubmissionAttachment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 90 AS chTableId, OLD.casaUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 90 AND chEntityPk = OLD.casaUid); END '; _stmtList.add_11rb$(element_521); var element_522 = 'CREATE VIEW CourseAssignmentSubmissionAttachment_ReceiveView AS SELECT CourseAssignmentSubmissionAttachment.*, CourseAssignmentSubmissionAttachmentReplicate.* FROM CourseAssignmentSubmissionAttachment LEFT JOIN CourseAssignmentSubmissionAttachmentReplicate ON CourseAssignmentSubmissionAttachmentReplicate.casaPk = CourseAssignmentSubmissionAttachment.casaUid '; _stmtList.add_11rb$(element_522); var element_523 = ' CREATE TRIGGER courseassignmentsubmissionattachment_remote_insert_ins INSTEAD OF INSERT ON CourseAssignmentSubmissionAttachment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseAssignmentSubmissionAttachment(casaUid, casaSubmissionUid, casaMimeType,casaFileName, casaUri, casaMd5, casaSize, casaTimestamp) VALUES (NEW.casaUid, NEW.casaSubmissionUid, NEW.casaMimeType, NEW.casaFileName, NEW.casaUri, NEW.casaMd5, NEW.casaSize, NEW.casaTimestamp) /*psql ON CONFLICT (casaUid) DO UPDATE SET casaSubmissionUid = EXCLUDED.casaSubmissionUid, casaMimeType = EXCLUDED.casaMimeType, casaFileName = EXCLUDED.casaFileName, casaUri = EXCLUDED.casaUri, casaMd5 = EXCLUDED.casaMd5, casaSize = EXCLUDED.casaSize, casaTimestamp = EXCLUDED.casaTimestamp */; END '; _stmtList.add_11rb$(element_523); var element_524 = trimMargin('\n |\n | CREATE TRIGGER ATTUPD_CourseAssignmentSubmissionAttachment\n | AFTER UPDATE ON CourseAssignmentSubmissionAttachment FOR EACH ROW WHEN\n | OLD.casaMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.casaUri AS zaUri\n | FROM CourseAssignmentSubmissionAttachment \n | WHERE CourseAssignmentSubmissionAttachment.casaUid = OLD.casaUid\n | AND (SELECT COUNT(*) \n | FROM CourseAssignmentSubmissionAttachment\n | WHERE casaMd5 = OLD.casaMd5) = 0\n | ; \n | END\n | \n '); _stmtList.add_11rb$(element_524); var element_525 = ' CREATE TRIGGER ch_ins_523 AFTER INSERT ON CourseAssignmentMark BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 523 AS chTableId, NEW.camUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 523 AND chEntityPk = NEW.camUid); END '; _stmtList.add_11rb$(element_525); var element_526 = ' CREATE TRIGGER ch_upd_523 AFTER UPDATE ON CourseAssignmentMark BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 523 AS chTableId, NEW.camUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 523 AND chEntityPk = NEW.camUid); END '; _stmtList.add_11rb$(element_526); var element_527 = ' CREATE TRIGGER ch_del_523 AFTER DELETE ON CourseAssignmentMark BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 523 AS chTableId, OLD.camUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 523 AND chEntityPk = OLD.camUid); END '; _stmtList.add_11rb$(element_527); var element_528 = 'CREATE VIEW CourseAssignmentMark_ReceiveView AS SELECT CourseAssignmentMark.*, CourseAssignmentMarkReplicate.* FROM CourseAssignmentMark LEFT JOIN CourseAssignmentMarkReplicate ON CourseAssignmentMarkReplicate.camPk = CourseAssignmentMark.camUid '; _stmtList.add_11rb$(element_528); var element_529 = ' CREATE TRIGGER courseassignmentmark_remote_insert_ins INSTEAD OF INSERT ON CourseAssignmentMark_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseAssignmentMark(camUid, camAssignmentUid, camSubmitterUid, camMark, camPenalty, camLct) VALUES (NEW.camUid, NEW.camAssignmentUid, NEW.camSubmitterUid, NEW.camMark, NEW.camPenalty, NEW.camLct) /*psql ON CONFLICT (camUid) DO UPDATE SET camAssignmentUid = EXCLUDED.camAssignmentUid, camSubmitterUid = EXCLUDED.camSubmitterUid, camMark = EXCLUDED.camMark, camPenalty = EXCLUDED.camPenalty, camLct = EXCLUDED.camLct */; END '; _stmtList.add_11rb$(element_529); var element_530 = ' CREATE TRIGGER ch_ins_678 AFTER INSERT ON PersonAuth2 BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 678 AS chTableId, NEW.pauthUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 678 AND chEntityPk = NEW.pauthUid); END '; _stmtList.add_11rb$(element_530); var element_531 = ' CREATE TRIGGER ch_upd_678 AFTER UPDATE ON PersonAuth2 BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 678 AS chTableId, NEW.pauthUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 678 AND chEntityPk = NEW.pauthUid); END '; _stmtList.add_11rb$(element_531); var element_532 = ' CREATE TRIGGER ch_del_678 AFTER DELETE ON PersonAuth2 BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 678 AS chTableId, OLD.pauthUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 678 AND chEntityPk = OLD.pauthUid); END '; _stmtList.add_11rb$(element_532); var element_533 = 'CREATE VIEW PersonAuth2_ReceiveView AS SELECT PersonAuth2.*, PersonAuth2Replicate.* FROM PersonAuth2 LEFT JOIN PersonAuth2Replicate ON PersonAuth2Replicate.paPk = PersonAuth2.pauthUid '; _stmtList.add_11rb$(element_533); var element_534 = ' CREATE TRIGGER personauth2_remote_insert_ins INSTEAD OF INSERT ON PersonAuth2_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonAuth2(pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES (NEW.pauthUid, NEW.pauthMechanism, NEW.pauthAuth, NEW.pauthLcsn, NEW.pauthPcsn, NEW.pauthLcb, NEW.pauthLct) /*psql ON CONFLICT (pauthUid) DO UPDATE SET pauthMechanism = EXCLUDED.pauthMechanism, pauthAuth = EXCLUDED.pauthAuth, pauthLcsn = EXCLUDED.pauthLcsn, pauthPcsn = EXCLUDED.pauthPcsn, pauthLcb = EXCLUDED.pauthLcb, pauthLct = EXCLUDED.pauthLct */; END '; _stmtList.add_11rb$(element_534); var element_535 = ' CREATE TRIGGER ch_ins_679 AFTER INSERT ON UserSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 679 AS chTableId, NEW.usUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 679 AND chEntityPk = NEW.usUid); END '; _stmtList.add_11rb$(element_535); var element_536 = ' CREATE TRIGGER ch_upd_679 AFTER UPDATE ON UserSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 679 AS chTableId, NEW.usUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 679 AND chEntityPk = NEW.usUid); END '; _stmtList.add_11rb$(element_536); var element_537 = ' CREATE TRIGGER ch_del_679 AFTER DELETE ON UserSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 679 AS chTableId, OLD.usUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 679 AND chEntityPk = OLD.usUid); END '; _stmtList.add_11rb$(element_537); var element_538 = 'CREATE VIEW UserSession_ReceiveView AS SELECT UserSession.*, UserSessionReplicate.* FROM UserSession LEFT JOIN UserSessionReplicate ON UserSessionReplicate.usPk = UserSession.usUid '; _stmtList.add_11rb$(element_538); var element_539 = ' CREATE TRIGGER usersession_remote_insert_ins INSTEAD OF INSERT ON UserSession_ReceiveView FOR EACH ROW BEGIN REPLACE INTO UserSession(usUid, usPcsn, usLcsn, usLcb, usLct, usPersonUid, usClientNodeId, usStartTime, usEndTime, usStatus, usReason, usAuth, usSessionType) VALUES (NEW.usUid, NEW.usPcsn, NEW.usLcsn, NEW.usLcb, NEW.usLct, NEW.usPersonUid, NEW.usClientNodeId, NEW.usStartTime, NEW.usEndTime, NEW.usStatus, NEW.usReason, NEW.usAuth, NEW.usSessionType) /*psql ON CONFLICT (usUid) DO UPDATE SET usPcsn = EXCLUDED.usPcsn, usLcsn = EXCLUDED.usLcsn, usLcb = EXCLUDED.usLcb, usLct = EXCLUDED.usLct, usPersonUid = EXCLUDED.usPersonUid, usClientNodeId = EXCLUDED.usClientNodeId, usStartTime = EXCLUDED.usStartTime, usEndTime = EXCLUDED.usEndTime, usStatus = EXCLUDED.usStatus, usReason = EXCLUDED.usReason, usAuth = EXCLUDED.usAuth, usSessionType = EXCLUDED.usSessionType */; END '; _stmtList.add_11rb$(element_539); var element_540 = ' CREATE TRIGGER ch_ins_124 AFTER INSERT ON CourseBlock BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 124 AS chTableId, NEW.cbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 124 AND chEntityPk = NEW.cbUid); END '; _stmtList.add_11rb$(element_540); var element_541 = ' CREATE TRIGGER ch_upd_124 AFTER UPDATE ON CourseBlock BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 124 AS chTableId, NEW.cbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 124 AND chEntityPk = NEW.cbUid); END '; _stmtList.add_11rb$(element_541); var element_542 = ' CREATE TRIGGER ch_del_124 AFTER DELETE ON CourseBlock BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 124 AS chTableId, OLD.cbUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 124 AND chEntityPk = OLD.cbUid); END '; _stmtList.add_11rb$(element_542); var element_543 = 'CREATE VIEW CourseBlock_ReceiveView AS SELECT CourseBlock.*, CourseBlockReplicate.* FROM CourseBlock LEFT JOIN CourseBlockReplicate ON CourseBlockReplicate.cbPk = CourseBlock.cbUid '; _stmtList.add_11rb$(element_543); var element_544 = ' CREATE TRIGGER courseblock_remote_insert_ins INSTEAD OF INSERT ON CourseBlock_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseBlock(cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints,cbMinPoints, cbIndex, cbClazzUid, cbActive,cbHidden, cbEntityUid, cbLct) VALUES (NEW.cbUid, NEW.cbType, NEW.cbIndentLevel, NEW.cbModuleParentBlockUid, NEW.cbTitle, NEW.cbDescription, NEW.cbCompletionCriteria, NEW.cbHideUntilDate, NEW.cbDeadlineDate, NEW.cbLateSubmissionPenalty, NEW.cbGracePeriodDate, NEW.cbMaxPoints,NEW.cbMinPoints, NEW.cbIndex, NEW.cbClazzUid,NEW.cbActive, NEW.cbHidden, NEW.cbEntityUid, NEW.cbLct) /*psql ON CONFLICT (cbUid) DO UPDATE SET cbType = EXCLUDED.cbType, cbIndentLevel = EXCLUDED.cbIndentLevel, cbModuleParentBlockUid = EXCLUDED.cbModuleParentBlockUid, cbTitle = EXCLUDED.cbTitle, cbDescription = EXCLUDED.cbDescription, cbCompletionCriteria = EXCLUDED.cbCompletionCriteria, cbHideUntilDate = EXCLUDED.cbHideUntilDate,cbDeadlineDate = EXCLUDED.cbDeadlineDate, cbLateSubmissionPenalty = EXCLUDED.cbLateSubmissionPenalty, cbGracePeriodDate= EXCLUDED.cbGracePeriodDate, cbMaxPoints = EXCLUDED.cbMaxPoints, cbMinPoints = EXCLUDED.cbMinPoints, cbIndex = EXCLUDED.cbIndex,cbClazzUid = EXCLUDED.cbClazzUid, cbActive = EXCLUDED.cbActive, cbHidden = EXCLUDED.cbHidden, cbEntityUid = EXCLUDED.cbEntityUid, cbLct = EXCLUDED.cbLct */; END '; _stmtList.add_11rb$(element_544); var element_545 = ' CREATE TRIGGER ch_ins_450 AFTER INSERT ON CourseTerminology BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 450 AS chTableId, NEW.ctUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 450 AND chEntityPk = NEW.ctUid); END '; _stmtList.add_11rb$(element_545); var element_546 = ' CREATE TRIGGER ch_upd_450 AFTER UPDATE ON CourseTerminology BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 450 AS chTableId, NEW.ctUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 450 AND chEntityPk = NEW.ctUid); END '; _stmtList.add_11rb$(element_546); var element_547 = ' CREATE TRIGGER ch_del_450 AFTER DELETE ON CourseTerminology BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 450 AS chTableId, OLD.ctUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 450 AND chEntityPk = OLD.ctUid); END '; _stmtList.add_11rb$(element_547); var element_548 = 'CREATE VIEW CourseTerminology_ReceiveView AS SELECT CourseTerminology.*, CourseTerminologyReplicate.* FROM CourseTerminology LEFT JOIN CourseTerminologyReplicate ON CourseTerminologyReplicate.ctPk = CourseTerminology.ctUid '; _stmtList.add_11rb$(element_548); var element_549 = ' CREATE TRIGGER courseterminology_remote_insert_ins INSTEAD OF INSERT ON CourseTerminology_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseTerminology(ctUid, ctTitle, ctTerminology, ctLct) VALUES (NEW.ctUid, NEW.ctTitle, NEW.ctTerminology, NEW.ctLct) /*psql ON CONFLICT (ctUid) DO UPDATE SET ctTitle = EXCLUDED.ctTitle, ctTerminology = EXCLUDED.ctTerminology, ctLct = EXCLUDED.ctLct */; END '; _stmtList.add_11rb$(element_549); var element_550 = ' CREATE TRIGGER ch_ins_242 AFTER INSERT ON CourseGroupSet BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 242 AS chTableId, NEW.cgsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 242 AND chEntityPk = NEW.cgsUid); END '; _stmtList.add_11rb$(element_550); var element_551 = ' CREATE TRIGGER ch_upd_242 AFTER UPDATE ON CourseGroupSet BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 242 AS chTableId, NEW.cgsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 242 AND chEntityPk = NEW.cgsUid); END '; _stmtList.add_11rb$(element_551); var element_552 = ' CREATE TRIGGER ch_del_242 AFTER DELETE ON CourseGroupSet BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 242 AS chTableId, OLD.cgsUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 242 AND chEntityPk = OLD.cgsUid); END '; _stmtList.add_11rb$(element_552); var element_553 = 'CREATE VIEW CourseGroupSet_ReceiveView AS SELECT CourseGroupSet.*, CourseGroupSetReplicate.* FROM CourseGroupSet LEFT JOIN CourseGroupSetReplicate ON CourseGroupSetReplicate.cgsPk = CourseGroupSet.cgsUid '; _stmtList.add_11rb$(element_553); var element_554 = ' CREATE TRIGGER coursegroupset_remote_insert_ins INSTEAD OF INSERT ON CourseGroupSet_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseGroupSet(cgsUid, cgsName, cgsTotalGroups, cgsActive, cgsClazzUid, cgsLct) VALUES (NEW.cgsUid, NEW.cgsName, NEW.cgsTotalGroups, NEW.cgsActive, NEW.cgsClazzUid, NEW.cgsLct) /*psql ON CONFLICT (cgsUid) DO UPDATE SET cgsName = EXCLUDED.cgsName, cgsTotalGroups = EXCLUDED.cgsTotalGroups, cgsActive = EXCLUDED.cgsActive, cgsClazzUid = EXCLUDED.cgsClazzUid, cgsLct = EXCLUDED.cgsLct */; END '; _stmtList.add_11rb$(element_554); var element_555 = ' CREATE TRIGGER ch_ins_243 AFTER INSERT ON CourseGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 243 AS chTableId, NEW.cgmUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 243 AND chEntityPk = NEW.cgmUid); END '; _stmtList.add_11rb$(element_555); var element_556 = ' CREATE TRIGGER ch_upd_243 AFTER UPDATE ON CourseGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 243 AS chTableId, NEW.cgmUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 243 AND chEntityPk = NEW.cgmUid); END '; _stmtList.add_11rb$(element_556); var element_557 = ' CREATE TRIGGER ch_del_243 AFTER DELETE ON CourseGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 243 AS chTableId, OLD.cgmUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 243 AND chEntityPk = OLD.cgmUid); END '; _stmtList.add_11rb$(element_557); var element_558 = 'CREATE VIEW CourseGroupMember_ReceiveView AS SELECT CourseGroupMember.*, CourseGroupMemberReplicate.* FROM CourseGroupMember LEFT JOIN CourseGroupMemberReplicate ON CourseGroupMemberReplicate.cgmPk = CourseGroupMember.cgmUid '; _stmtList.add_11rb$(element_558); var element_559 = ' CREATE TRIGGER coursegroupmember_remote_insert_ins INSTEAD OF INSERT ON CourseGroupMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseGroupMember(cgmUid, cgmSetUid, cgmGroupNumber, cgmPersonUid, cgmLct) VALUES (NEW.cgmUid, NEW.cgmSetUid, NEW.cgmGroupNumber, NEW.cgmPersonUid, NEW.cgmLct) /*psql ON CONFLICT (cgmUid) DO UPDATE SET cgmSetUid = EXCLUDED.cgmSetUid, cgmGroupNumber = EXCLUDED.cgmGroupNumber, cgmPersonUid = EXCLUDED.cgmPersonUid, cgmLct = EXCLUDED.cgmLct */; END '; _stmtList.add_11rb$(element_559); var element_560 = ' CREATE TRIGGER ch_ins_125 AFTER INSERT ON CoursePicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 125 AS chTableId, NEW.coursePictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 125 AND chEntityPk = NEW.coursePictureUid); END '; _stmtList.add_11rb$(element_560); var element_561 = ' CREATE TRIGGER ch_upd_125 AFTER UPDATE ON CoursePicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 125 AS chTableId, NEW.coursePictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 125 AND chEntityPk = NEW.coursePictureUid); END '; _stmtList.add_11rb$(element_561); var element_562 = ' CREATE TRIGGER ch_del_125 AFTER DELETE ON CoursePicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 125 AS chTableId, OLD.coursePictureUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 125 AND chEntityPk = OLD.coursePictureUid); END '; _stmtList.add_11rb$(element_562); var element_563 = 'CREATE VIEW CoursePicture_ReceiveView AS SELECT CoursePicture.*, CoursePictureReplicate.* FROM CoursePicture LEFT JOIN CoursePictureReplicate ON CoursePictureReplicate.cpPk = CoursePicture.coursePictureUid '; _stmtList.add_11rb$(element_563); var element_564 = ' CREATE TRIGGER coursepicture_remote_insert_ins INSTEAD OF INSERT ON CoursePicture_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CoursePicture(coursePictureUid, coursePictureClazzUid, coursePictureMasterCsn, coursePictureLocalCsn, coursePictureLastChangedBy, coursePictureLct, coursePictureUri, coursePictureMd5, coursePictureFileSize, coursePictureTimestamp, coursePictureMimeType, coursePictureActive) VALUES (NEW.coursePictureUid, NEW.coursePictureClazzUid, NEW.coursePictureMasterCsn, NEW.coursePictureLocalCsn, NEW.coursePictureLastChangedBy, NEW.coursePictureLct, NEW.coursePictureUri, NEW.coursePictureMd5, NEW.coursePictureFileSize, NEW.coursePictureTimestamp, NEW.coursePictureMimeType, NEW.coursePictureActive) /*psql ON CONFLICT (coursePictureUid) DO UPDATE SET coursePictureClazzUid = EXCLUDED.coursePictureClazzUid, coursePictureMasterCsn = EXCLUDED.coursePictureMasterCsn, coursePictureLocalCsn = EXCLUDED.coursePictureLocalCsn, coursePictureLastChangedBy = EXCLUDED.coursePictureLastChangedBy, coursePictureLct = EXCLUDED.coursePictureLct, coursePictureUri = EXCLUDED.coursePictureUri, coursePictureMd5 = EXCLUDED.coursePictureMd5, coursePictureFileSize = EXCLUDED.coursePictureFileSize, coursePictureTimestamp = EXCLUDED.coursePictureTimestamp, coursePictureMimeType = EXCLUDED.coursePictureMimeType, coursePictureActive = EXCLUDED.coursePictureActive */; END '; _stmtList.add_11rb$(element_564); var element_565 = trimMargin('\n |\n | CREATE TRIGGER ATTUPD_CoursePicture\n | AFTER UPDATE ON CoursePicture FOR EACH ROW WHEN\n | OLD.coursePictureMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.coursePictureUri AS zaUri\n | FROM CoursePicture \n | WHERE CoursePicture.coursePictureUid = OLD.coursePictureUid\n | AND (SELECT COUNT(*) \n | FROM CoursePicture\n | WHERE coursePictureMd5 = OLD.coursePictureMd5) = 0\n | ; \n | END\n | \n '); _stmtList.add_11rb$(element_565); var element_566 = ' CREATE TRIGGER ch_ins_138 AFTER INSERT ON ContentEntryPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 138 AS chTableId, NEW.cepUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 138 AND chEntityPk = NEW.cepUid); END '; _stmtList.add_11rb$(element_566); var element_567 = ' CREATE TRIGGER ch_upd_138 AFTER UPDATE ON ContentEntryPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 138 AS chTableId, NEW.cepUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 138 AND chEntityPk = NEW.cepUid); END '; _stmtList.add_11rb$(element_567); var element_568 = ' CREATE TRIGGER ch_del_138 AFTER DELETE ON ContentEntryPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 138 AS chTableId, OLD.cepUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 138 AND chEntityPk = OLD.cepUid); END '; _stmtList.add_11rb$(element_568); var element_569 = 'CREATE VIEW ContentEntryPicture_ReceiveView AS SELECT ContentEntryPicture.*, ContentEntryPictureReplicate.* FROM ContentEntryPicture LEFT JOIN ContentEntryPictureReplicate ON ContentEntryPictureReplicate.cepPk = ContentEntryPicture.cepUid '; _stmtList.add_11rb$(element_569); var element_570 = ' CREATE TRIGGER ceppicture_remote_insert_ins INSTEAD OF INSERT ON ContentEntryPicture_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryPicture(cepUid, cepContentEntryUid, cepUri, cepMd5, cepFileSize, cepTimestamp, cepMimeType, cepActive) VALUES (NEW.cepUid, NEW.cepContentEntryUid, NEW.cepUri, NEW.cepMd5, NEW.cepFileSize, NEW.cepTimestamp, NEW.cepMimeType, NEW.cepActive) /*psql ON CONFLICT (cepUid) DO UPDATE SET cepContentEntryUid = EXCLUDED.cepContentEntryUid, cepUri = EXCLUDED.cepUri, cepMd5 = EXCLUDED.cepMd5, cepFileSize = EXCLUDED.cepFileSize, cepTimestamp = EXCLUDED.cepTimestamp, cepMimeType = EXCLUDED.cepMimeType, cepActive = EXCLUDED.cepActive */; END '; _stmtList.add_11rb$(element_570); var element_571 = trimMargin('\n |\n | CREATE TRIGGER ATTUPD_ContentEntryPicture\n | AFTER UPDATE ON ContentEntryPicture FOR EACH ROW WHEN\n | OLD.cepMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.cepUri AS zaUri\n | FROM ContentEntryPicture \n | WHERE ContentEntryPicture.cepUid = OLD.cepUid\n | AND (SELECT COUNT(*) \n | FROM ContentEntryPicture\n | WHERE cepMd5 = OLD.cepMd5) = 0\n | ; \n | END\n | \n '); _stmtList.add_11rb$(element_571); var element_572 = ' CREATE TRIGGER ch_ins_127 AFTER INSERT ON Chat BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 127 AS chTableId, NEW.chatUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 127 AND chEntityPk = NEW.chatUid); END '; _stmtList.add_11rb$(element_572); var element_573 = ' CREATE TRIGGER ch_upd_127 AFTER UPDATE ON Chat BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 127 AS chTableId, NEW.chatUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 127 AND chEntityPk = NEW.chatUid); END '; _stmtList.add_11rb$(element_573); var element_574 = ' CREATE TRIGGER ch_del_127 AFTER DELETE ON Chat BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 127 AS chTableId, OLD.chatUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 127 AND chEntityPk = OLD.chatUid); END '; _stmtList.add_11rb$(element_574); var element_575 = 'CREATE VIEW Chat_ReceiveView AS SELECT Chat.*, ChatReplicate.* FROM Chat LEFT JOIN ChatReplicate ON ChatReplicate.chatPk = Chat.chatUid '; _stmtList.add_11rb$(element_575); var element_576 = ' CREATE TRIGGER chat_remote_insert_ins INSTEAD OF INSERT ON Chat_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Chat(chatUid, chatStartDate, chatTitle, chatGroup, chatLct) VALUES(NEW.chatUid, NEW.chatStartDate, NEW.chatTitle, NEW.chatGroup, NEW.chatLct) /*psql ON CONFLICT (chatUid) DO UPDATE SET chatStartDate = EXCLUDED.chatStartDate, chatTitle = EXCLUDED.chatTitle, chatGroup = EXCLUDED.chatGroup, chatLct = EXCLUDED.chatLct */ ; END '; _stmtList.add_11rb$(element_576); var element_577 = ' CREATE TRIGGER ch_ins_128 AFTER INSERT ON ChatMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 128 AS chTableId, NEW.chatMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 128 AND chEntityPk = NEW.chatMemberUid); END '; _stmtList.add_11rb$(element_577); var element_578 = ' CREATE TRIGGER ch_upd_128 AFTER UPDATE ON ChatMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 128 AS chTableId, NEW.chatMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 128 AND chEntityPk = NEW.chatMemberUid); END '; _stmtList.add_11rb$(element_578); var element_579 = ' CREATE TRIGGER ch_del_128 AFTER DELETE ON ChatMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 128 AS chTableId, OLD.chatMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 128 AND chEntityPk = OLD.chatMemberUid); END '; _stmtList.add_11rb$(element_579); var element_580 = 'CREATE VIEW ChatMember_ReceiveView AS SELECT ChatMember.*, ChatMemberReplicate.* FROM ChatMember LEFT JOIN ChatMemberReplicate ON ChatMemberReplicate.chatMemberPk = ChatMember.chatMemberUid '; _stmtList.add_11rb$(element_580); var element_581 = ' CREATE TRIGGER chatmember_remote_insert_ins INSTEAD OF INSERT ON ChatMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ChatMember(chatMemberUid, chatMemberChatUid, chatMemberPersonUid, chatMemberJoinedDate, chatMemberLeftDate, chatMemberLct) VALUES(NEW.chatMemberUid, NEW.chatMemberChatUid, NEW.chatMemberPersonUid, NEW.chatMemberJoinedDate, NEW.chatMemberLeftDate, NEW.chatMemberLct) /*psql ON CONFLICT (chatMemberUid) DO UPDATE SET chatMemberChatUid = EXCLUDED.chatMemberChatUid, chatMemberPersonUid = EXCLUDED.chatMemberPersonUid, chatMemberJoinedDate = EXCLUDED.chatMemberJoinedDate, chatMemberLeftDate = EXCLUDED.chatMemberLeftDate, chatMemberLct = EXCLUDED.chatMemberLct */ ; END '; _stmtList.add_11rb$(element_581); var element_582 = ' CREATE TRIGGER ch_ins_126 AFTER INSERT ON Message BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 126 AS chTableId, NEW.messageUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 126 AND chEntityPk = NEW.messageUid); END '; _stmtList.add_11rb$(element_582); var element_583 = ' CREATE TRIGGER ch_upd_126 AFTER UPDATE ON Message BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 126 AS chTableId, NEW.messageUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 126 AND chEntityPk = NEW.messageUid); END '; _stmtList.add_11rb$(element_583); var element_584 = ' CREATE TRIGGER ch_del_126 AFTER DELETE ON Message BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 126 AS chTableId, OLD.messageUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 126 AND chEntityPk = OLD.messageUid); END '; _stmtList.add_11rb$(element_584); var element_585 = 'CREATE VIEW Message_ReceiveView AS SELECT Message.*, MessageReplicate.* FROM Message LEFT JOIN MessageReplicate ON MessageReplicate.messagePk = Message.messageUid '; _stmtList.add_11rb$(element_585); var element_586 = ' CREATE TRIGGER message_remote_insert_ins INSTEAD OF INSERT ON Message_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Message(messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct) VALUES(NEW.messageUid, NEW.messageSenderPersonUid, NEW.messageTableId, NEW.messageEntityUid, NEW.messageText, NEW.messageTimestamp, NEW.messageClazzUid, NEW.messageLct) /*psql ON CONFLICT (messageUid) DO UPDATE SET messageSenderPersonUid = EXCLUDED.messageSenderPersonUid, messageTableId = EXCLUDED.messageTableId, messageEntityUid = EXCLUDED.messageEntityUid, messageText = EXCLUDED.messageText, messageTimestamp = EXCLUDED.messageTimestamp, messageClazzUid = EXCLUDED.messageClazzUid, messageLct = EXCLUDED.messageLct */ ; END '; _stmtList.add_11rb$(element_586); var element_587 = ' CREATE TRIGGER ch_ins_129 AFTER INSERT ON MessageRead BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 129 AS chTableId, NEW.messageReadUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 129 AND chEntityPk = NEW.messageReadUid); END '; _stmtList.add_11rb$(element_587); var element_588 = ' CREATE TRIGGER ch_upd_129 AFTER UPDATE ON MessageRead BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 129 AS chTableId, NEW.messageReadUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 129 AND chEntityPk = NEW.messageReadUid); END '; _stmtList.add_11rb$(element_588); var element_589 = ' CREATE TRIGGER ch_del_129 AFTER DELETE ON MessageRead BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 129 AS chTableId, OLD.messageReadUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 129 AND chEntityPk = OLD.messageReadUid); END '; _stmtList.add_11rb$(element_589); var element_590 = 'CREATE VIEW MessageRead_ReceiveView AS SELECT MessageRead.*, MessageReadReplicate.* FROM MessageRead LEFT JOIN MessageReadReplicate ON MessageReadReplicate.messageReadPk = MessageRead.messageReadUid '; _stmtList.add_11rb$(element_590); var element_591 = ' CREATE TRIGGER messageread_remote_insert_ins INSTEAD OF INSERT ON MessageRead_ReceiveView FOR EACH ROW BEGIN REPLACE INTO MessageRead(messageReadUid, messageReadPersonUid, messageReadMessageUid, messageReadEntityUid, messageReadLct) VALUES(NEW.messageReadUid, NEW.messageReadPersonUid, NEW.messageReadMessageUid, NEW.messageReadEntityUid, NEW.messageReadLct) /*psql ON CONFLICT (messageReadUid) DO UPDATE SET messageReadPersonUid = EXCLUDED.messageReadPersonUid, messageReadMessageUid = EXCLUDED.messageReadMessageUid, messageReadEntityUid = EXCLUDED.messageReadEntityUid, messageReadLct = EXCLUDED.messageReadLct */ ; END '; _stmtList.add_11rb$(element_591); var element_592 = ' CREATE TRIGGER ch_ins_130 AFTER INSERT ON CourseDiscussion BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 130 AS chTableId, NEW.courseDiscussionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 130 AND chEntityPk = NEW.courseDiscussionUid); END '; _stmtList.add_11rb$(element_592); var element_593 = ' CREATE TRIGGER ch_upd_130 AFTER UPDATE ON CourseDiscussion BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 130 AS chTableId, NEW.courseDiscussionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 130 AND chEntityPk = NEW.courseDiscussionUid); END '; _stmtList.add_11rb$(element_593); var element_594 = ' CREATE TRIGGER ch_del_130 AFTER DELETE ON CourseDiscussion BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 130 AS chTableId, OLD.courseDiscussionUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 130 AND chEntityPk = OLD.courseDiscussionUid); END '; _stmtList.add_11rb$(element_594); var element_595 = 'CREATE VIEW CourseDiscussion_ReceiveView AS SELECT CourseDiscussion.*, CourseDiscussionReplicate.* FROM CourseDiscussion LEFT JOIN CourseDiscussionReplicate ON CourseDiscussionReplicate.courseDiscussionPk = CourseDiscussion.courseDiscussionUid '; _stmtList.add_11rb$(element_595); var element_596 = ' CREATE TRIGGER coursediscussion_remote_insert_ins INSTEAD OF INSERT ON CourseDiscussion_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseDiscussion(courseDiscussionUid, courseDiscussionActive, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionLct) VALUES(NEW.courseDiscussionUid, NEW.courseDiscussionActive, NEW.courseDiscussionTitle, NEW.courseDiscussionDesc, NEW.courseDiscussionClazzUid, NEW.courseDiscussionLct) /*psql ON CONFLICT (courseDiscussionUid) DO UPDATE SET courseDiscussionActive = EXCLUDED.courseDiscussionActive, courseDiscussionTitle = EXCLUDED.courseDiscussionTitle, courseDiscussionDesc = EXCLUDED.courseDiscussionDesc, courseDiscussionClazzUid = EXCLUDED.courseDiscussionClazzUid, courseDiscussionLct = EXCLUDED.courseDiscussionLct */ ; END '; _stmtList.add_11rb$(element_596); var element_597 = ' CREATE TRIGGER ch_ins_131 AFTER INSERT ON DiscussionTopic BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 131 AS chTableId, NEW.discussionTopicUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 131 AND chEntityPk = NEW.discussionTopicUid); END '; _stmtList.add_11rb$(element_597); var element_598 = ' CREATE TRIGGER ch_upd_131 AFTER UPDATE ON DiscussionTopic BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 131 AS chTableId, NEW.discussionTopicUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 131 AND chEntityPk = NEW.discussionTopicUid); END '; _stmtList.add_11rb$(element_598); var element_599 = ' CREATE TRIGGER ch_del_131 AFTER DELETE ON DiscussionTopic BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 131 AS chTableId, OLD.discussionTopicUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 131 AND chEntityPk = OLD.discussionTopicUid); END '; _stmtList.add_11rb$(element_599); var element_600 = 'CREATE VIEW DiscussionTopic_ReceiveView AS SELECT DiscussionTopic.*, DiscussionTopicReplicate.* FROM DiscussionTopic LEFT JOIN DiscussionTopicReplicate ON DiscussionTopicReplicate.discussionTopicPk = DiscussionTopic.discussionTopicUid '; _stmtList.add_11rb$(element_600); var element_601 = ' CREATE TRIGGER discussiontopic_remote_insert_ins INSTEAD OF INSERT ON DiscussionTopic_ReceiveView FOR EACH ROW BEGIN REPLACE INTO DiscussionTopic(discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(NEW.discussionTopicUid, NEW.discussionTopicTitle, NEW.discussionTopicDesc, NEW.discussionTopicStartDate, NEW.discussionTopicCourseDiscussionUid, NEW.discussionTopicVisible, NEW.discussionTopicArchive, NEW.discussionTopicIndex, NEW.discussionTopicClazzUid, NEW.discussionTopicLct) /*psql ON CONFLICT (discussionTopicUid) DO UPDATE SET discussionTopicTitle = EXCLUDED.discussionTopicTitle, discussionTopicDesc = EXCLUDED.discussionTopicDesc, discussionTopicStartDate = EXCLUDED.discussionTopicStartDate, discussionTopicCourseDiscussionUid = EXCLUDED.discussionTopicCourseDiscussionUid, discussionTopicVisible = EXCLUDED.discussionTopicVisible, discussionTopicArchive = EXCLUDED.discussionTopicArchive, discussionTopicIndex = EXCLUDED.discussionTopicIndex, discussionTopicClazzUid = EXCLUDED.discussionTopicClazzUid, discussionTopicLct = EXCLUDED.discussionTopicLct */ ; END '; _stmtList.add_11rb$(element_601); var element_602 = ' CREATE TRIGGER ch_ins_132 AFTER INSERT ON DiscussionPost BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 132 AS chTableId, NEW.discussionPostUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 132 AND chEntityPk = NEW.discussionPostUid); END '; _stmtList.add_11rb$(element_602); var element_603 = ' CREATE TRIGGER ch_upd_132 AFTER UPDATE ON DiscussionPost BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 132 AS chTableId, NEW.discussionPostUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 132 AND chEntityPk = NEW.discussionPostUid); END '; _stmtList.add_11rb$(element_603); var element_604 = ' CREATE TRIGGER ch_del_132 AFTER DELETE ON DiscussionPost BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 132 AS chTableId, OLD.discussionPostUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 132 AND chEntityPk = OLD.discussionPostUid); END '; _stmtList.add_11rb$(element_604); var element_605 = 'CREATE VIEW DiscussionPost_ReceiveView AS SELECT DiscussionPost.*, DiscussionPostReplicate.* FROM DiscussionPost LEFT JOIN DiscussionPostReplicate ON DiscussionPostReplicate.discussionPostPk = DiscussionPost.discussionPostUid '; _stmtList.add_11rb$(element_605); var element_606 = ' CREATE TRIGGER discussionpost_remote_insert_ins INSTEAD OF INSERT ON DiscussionPost_ReceiveView FOR EACH ROW BEGIN REPLACE INTO DiscussionPost(discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct) VALUES(NEW.discussionPostUid, NEW.discussionPostTitle, NEW.discussionPostMessage, NEW.discussionPostStartDate, NEW.discussionPostDiscussionTopicUid, NEW.discussionPostVisible, NEW.discussionPostArchive, NEW.discussionPostStartedPersonUid, NEW.discussionPostClazzUid, NEW.discussionPostLct) /*psql ON CONFLICT (discussionPostUid) DO UPDATE SET discussionPostTitle = EXCLUDED.discussionPostTitle , discussionPostMessage = EXCLUDED.discussionPostMessage , discussionPostStartDate = EXCLUDED.discussionPostStartDate , discussionPostDiscussionTopicUid = EXCLUDED.discussionPostDiscussionTopicUid, discussionPostVisible = EXCLUDED.discussionPostVisible , discussionPostArchive = EXCLUDED.discussionPostArchive , discussionPostStartedPersonUid = EXCLUDED.discussionPostStartedPersonUid , discussionPostClazzUid = EXCLUDED.discussionPostClazzUid, discussionPostLct = EXCLUDED.discussionPostLct */ ; END '; _stmtList.add_11rb$(element_606); break; case 2: var element_607 = 'CREATE TABLE IF NOT EXISTS _doorwayinfo (dbVersion int primary key, dbHash varchar(255))'; _stmtList.add_11rb$(element_607); var element_608 = "INSERT INTO _doorwayinfo VALUES (107, '')"; _stmtList.add_11rb$(element_608); var element_609 = 'CREATE TABLE IF NOT EXISTS NetworkNode ( bluetoothMacAddress TEXT , ipAddress TEXT , wifiDirectMacAddress TEXT , deviceWifiDirectName TEXT , endpointUrl TEXT , lastUpdateTimeStamp BIGINT NOT NULL , networkServiceLastUpdated BIGINT NOT NULL , nsdServiceName TEXT , port INTEGER NOT NULL , numFailureCount INTEGER NOT NULL , wifiDirectDeviceStatus INTEGER NOT NULL , groupSsid TEXT , nodeId BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_609); var element_610 = 'CREATE TABLE IF NOT EXISTS ClazzLog ( clazzLogClazzUid BIGINT NOT NULL , logDate BIGINT NOT NULL , timeRecorded BIGINT NOT NULL , clazzLogDone BOOL NOT NULL , cancellationNote TEXT , clazzLogCancelled BOOL NOT NULL , clazzLogNumPresent INTEGER NOT NULL , clazzLogNumAbsent INTEGER NOT NULL , clazzLogNumPartial INTEGER NOT NULL , clazzLogScheduleUid BIGINT NOT NULL , clazzLogStatusFlag INTEGER NOT NULL , clazzLogMSQN BIGINT NOT NULL , clazzLogLCSN BIGINT NOT NULL , clazzLogLCB INTEGER NOT NULL , clazzLogLastChangedTime BIGINT NOT NULL , clazzLogUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_610); var element_611 = 'CREATE TABLE IF NOT EXISTS ClazzLogAttendanceRecord ( clazzLogAttendanceRecordClazzLogUid BIGINT NOT NULL , clazzLogAttendanceRecordPersonUid BIGINT NOT NULL , attendanceStatus INTEGER NOT NULL , clazzLogAttendanceRecordMasterChangeSeqNum BIGINT NOT NULL , clazzLogAttendanceRecordLocalChangeSeqNum BIGINT NOT NULL , clazzLogAttendanceRecordLastChangedBy INTEGER NOT NULL , clazzLogAttendanceRecordLastChangedTime BIGINT NOT NULL , clazzLogAttendanceRecordUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_611); var element_612 = 'CREATE TABLE IF NOT EXISTS Schedule ( sceduleStartTime BIGINT NOT NULL , scheduleEndTime BIGINT NOT NULL , scheduleDay INTEGER NOT NULL , scheduleMonth INTEGER NOT NULL , scheduleFrequency INTEGER NOT NULL , umCalendarUid BIGINT NOT NULL , scheduleClazzUid BIGINT NOT NULL , scheduleMasterChangeSeqNum BIGINT NOT NULL , scheduleLocalChangeSeqNum BIGINT NOT NULL , scheduleLastChangedBy INTEGER NOT NULL , scheduleLastChangedTime BIGINT NOT NULL , scheduleActive BOOL NOT NULL , scheduleUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_612); var element_613 = 'CREATE TABLE IF NOT EXISTS DateRange ( dateRangeLocalChangeSeqNum BIGINT NOT NULL , dateRangeMasterChangeSeqNum BIGINT NOT NULL , dateRangLastChangedBy INTEGER NOT NULL , dateRangeLct BIGINT NOT NULL , dateRangeFromDate BIGINT NOT NULL , dateRangeToDate BIGINT NOT NULL , dateRangeUMCalendarUid BIGINT NOT NULL , dateRangeName TEXT , dateRangeDesc TEXT , dateRangeActive BOOL NOT NULL , dateRangeUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_613); var element_614 = 'CREATE TABLE IF NOT EXISTS HolidayCalendar ( umCalendarName TEXT , umCalendarCategory INTEGER NOT NULL , umCalendarActive BOOL NOT NULL , umCalendarMasterChangeSeqNum BIGINT NOT NULL , umCalendarLocalChangeSeqNum BIGINT NOT NULL , umCalendarLastChangedBy INTEGER NOT NULL , umCalendarLct BIGINT NOT NULL , umCalendarUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_614); var element_615 = 'CREATE TABLE IF NOT EXISTS Holiday ( holMasterCsn BIGINT NOT NULL , holLocalCsn BIGINT NOT NULL , holLastModBy INTEGER NOT NULL , holLct BIGINT NOT NULL , holActive BOOL NOT NULL , holHolidayCalendarUid BIGINT NOT NULL , holStartTime BIGINT NOT NULL , holEndTime BIGINT NOT NULL , holName TEXT , holUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_615); var element_616 = 'CREATE TABLE IF NOT EXISTS ScheduledCheck ( checkTime BIGINT NOT NULL , checkType INTEGER NOT NULL , checkUuid TEXT , checkParameters TEXT , scClazzLogUid BIGINT NOT NULL , scheduledCheckMasterCsn BIGINT NOT NULL , scheduledCheckLocalCsn BIGINT NOT NULL , scheduledCheckLastChangedBy INTEGER NOT NULL , scheduledCheckLct BIGINT NOT NULL , scheduledCheckUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_616); var element_617 = 'CREATE TABLE IF NOT EXISTS AuditLog ( auditLogMasterChangeSeqNum BIGINT NOT NULL , auditLogLocalChangeSeqNum BIGINT NOT NULL , auditLogLastChangedBy INTEGER NOT NULL , auditLogLct BIGINT NOT NULL , auditLogActorPersonUid BIGINT NOT NULL , auditLogTableUid INTEGER NOT NULL , auditLogEntityUid BIGINT NOT NULL , auditLogDate BIGINT NOT NULL , notes TEXT , auditLogUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_617); var element_618 = 'CREATE TABLE IF NOT EXISTS CustomField ( customFieldName TEXT , customFieldNameAlt TEXT , customFieldLabelMessageID INTEGER NOT NULL , customFieldIcon TEXT , customFieldIconId INTEGER NOT NULL , actionOnClick TEXT , customFieldType INTEGER NOT NULL , customFieldEntityType INTEGER NOT NULL , customFieldActive BOOL NOT NULL , customFieldDefaultValue TEXT , customFieldMCSN BIGINT NOT NULL , customFieldLCSN BIGINT NOT NULL , customFieldLCB INTEGER NOT NULL , customFieldLct BIGINT NOT NULL , customFieldInputType INTEGER NOT NULL , customFieldUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_618); var element_619 = 'CREATE TABLE IF NOT EXISTS CustomFieldValue ( customFieldValueFieldUid BIGINT NOT NULL , customFieldValueEntityUid BIGINT NOT NULL , customFieldValueValue TEXT , customFieldValueCustomFieldValueOptionUid BIGINT NOT NULL , customFieldValueMCSN BIGINT NOT NULL , customFieldValueLCSN BIGINT NOT NULL , customFieldValueLCB INTEGER NOT NULL , customFieldLct BIGINT NOT NULL , customFieldValueUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_619); var element_620 = 'CREATE TABLE IF NOT EXISTS CustomFieldValueOption ( customFieldValueOptionName TEXT , customFieldValueOptionFieldUid BIGINT NOT NULL , customFieldValueOptionIcon TEXT , customFieldValueOptionMessageId INTEGER NOT NULL , customFieldValueOptionActive BOOL NOT NULL , customFieldValueOptionMCSN BIGINT NOT NULL , customFieldValueOptionLCSN BIGINT NOT NULL , customFieldValueOptionLCB INTEGER NOT NULL , customFieldValueLct BIGINT NOT NULL , customFieldValueOptionUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_620); var element_621 = 'CREATE TABLE IF NOT EXISTS Person ( username TEXT , firstNames TEXT , lastName TEXT , emailAddr TEXT , phoneNum TEXT , gender INTEGER NOT NULL , active BOOL NOT NULL , admin BOOL NOT NULL , personNotes TEXT , fatherName TEXT , fatherNumber TEXT , motherName TEXT , motherNum TEXT , dateOfBirth BIGINT NOT NULL , personAddress TEXT , personOrgId TEXT , personGroupUid BIGINT NOT NULL , personMasterChangeSeqNum BIGINT NOT NULL , personLocalChangeSeqNum BIGINT NOT NULL , personLastChangedBy INTEGER NOT NULL , personLct BIGINT NOT NULL , personCountry TEXT , personType INTEGER NOT NULL DEFAULT 0 , personUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_621); var element_622 = 'CREATE TABLE IF NOT EXISTS Clazz ( clazzName TEXT , clazzDesc TEXT , attendanceAverage FLOAT NOT NULL , clazzHolidayUMCalendarUid BIGINT NOT NULL , clazzScheuleUMCalendarUid BIGINT NOT NULL , isClazzActive BOOL NOT NULL , clazzLocationUid BIGINT NOT NULL , clazzStartTime BIGINT NOT NULL , clazzEndTime BIGINT NOT NULL , clazzFeatures BIGINT NOT NULL , clazzSchoolUid BIGINT NOT NULL , clazzEnrolmentPolicy INTEGER NOT NULL DEFAULT 102 , clazzTerminologyUid BIGINT NOT NULL DEFAULT 25966 , clazzMasterChangeSeqNum BIGINT NOT NULL , clazzLocalChangeSeqNum BIGINT NOT NULL , clazzLastChangedBy INTEGER NOT NULL , clazzLct BIGINT NOT NULL , clazzTimeZone TEXT , clazzStudentsPersonGroupUid BIGINT NOT NULL , clazzTeachersPersonGroupUid BIGINT NOT NULL , clazzPendingStudentsPersonGroupUid BIGINT NOT NULL , clazzParentsPersonGroupUid BIGINT NOT NULL , clazzCode TEXT , clazzUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_622); var element_623 = 'CREATE TABLE IF NOT EXISTS ClazzEnrolment ( clazzEnrolmentPersonUid BIGINT NOT NULL , clazzEnrolmentClazzUid BIGINT NOT NULL , clazzEnrolmentDateJoined BIGINT NOT NULL , clazzEnrolmentDateLeft BIGINT NOT NULL , clazzEnrolmentRole INTEGER NOT NULL , clazzEnrolmentAttendancePercentage FLOAT NOT NULL , clazzEnrolmentActive BOOL NOT NULL , clazzEnrolmentLeavingReasonUid BIGINT NOT NULL , clazzEnrolmentOutcome INTEGER NOT NULL , clazzEnrolmentLocalChangeSeqNum BIGINT NOT NULL , clazzEnrolmentMasterChangeSeqNum BIGINT NOT NULL , clazzEnrolmentLastChangedBy INTEGER NOT NULL , clazzEnrolmentLct BIGINT NOT NULL , clazzEnrolmentUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_623); var element_624 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentPersonUid_clazzEnrolmentClazzUid ON ClazzEnrolment (clazzEnrolmentPersonUid, clazzEnrolmentClazzUid)'; _stmtList.add_11rb$(element_624); var element_625 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentClazzUid_clazzEnrolmentPersonUid ON ClazzEnrolment (clazzEnrolmentClazzUid, clazzEnrolmentPersonUid)'; _stmtList.add_11rb$(element_625); var element_626 = 'CREATE INDEX index_ClazzEnrolment_clazzEnrolmentClazzUid_clazzEnrolmentRole ON ClazzEnrolment (clazzEnrolmentClazzUid, clazzEnrolmentRole)'; _stmtList.add_11rb$(element_626); var element_627 = 'CREATE TABLE IF NOT EXISTS LeavingReason ( leavingReasonTitle TEXT , leavingReasonMCSN BIGINT NOT NULL , leavingReasonCSN BIGINT NOT NULL , leavingReasonLCB INTEGER NOT NULL , leavingReasonLct BIGINT NOT NULL , leavingReasonUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_627); var element_628 = 'CREATE TABLE IF NOT EXISTS ContentEntry ( title TEXT , description TEXT , entryId TEXT , author TEXT , publisher TEXT , licenseType INTEGER NOT NULL , licenseName TEXT , licenseUrl TEXT , sourceUrl TEXT , thumbnailUrl TEXT , lastModified BIGINT NOT NULL , primaryLanguageUid BIGINT NOT NULL , languageVariantUid BIGINT NOT NULL , contentFlags INTEGER NOT NULL , leaf BOOL NOT NULL , publik BOOL NOT NULL , ceInactive BOOL NOT NULL , completionCriteria INTEGER NOT NULL , minScore INTEGER NOT NULL , contentTypeFlag INTEGER NOT NULL , contentOwner BIGINT NOT NULL , contentEntryLocalChangeSeqNum BIGINT NOT NULL , contentEntryMasterChangeSeqNum BIGINT NOT NULL , contentEntryLastChangedBy INTEGER NOT NULL , contentEntryLct BIGINT NOT NULL , contentEntryUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_628); var element_629 = 'CREATE TABLE IF NOT EXISTS ContentEntryContentCategoryJoin ( ceccjContentEntryUid BIGINT NOT NULL , ceccjContentCategoryUid BIGINT NOT NULL , ceccjLocalChangeSeqNum BIGINT NOT NULL , ceccjMasterChangeSeqNum BIGINT NOT NULL , ceccjLastChangedBy INTEGER NOT NULL , ceccjLct BIGINT NOT NULL , ceccjUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_629); var element_630 = 'CREATE TABLE IF NOT EXISTS ContentEntryParentChildJoin ( cepcjLocalChangeSeqNum BIGINT NOT NULL , cepcjMasterChangeSeqNum BIGINT NOT NULL , cepcjLastChangedBy INTEGER NOT NULL , cepcjLct BIGINT NOT NULL , cepcjParentContentEntryUid BIGINT NOT NULL , cepcjChildContentEntryUid BIGINT NOT NULL , childIndex INTEGER NOT NULL , cepcjUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_630); var element_631 = 'CREATE INDEX parent_child ON ContentEntryParentChildJoin (cepcjChildContentEntryUid, cepcjParentContentEntryUid)'; _stmtList.add_11rb$(element_631); var element_632 = 'CREATE TABLE IF NOT EXISTS ContentEntryRelatedEntryJoin ( cerejContentEntryUid BIGINT NOT NULL , cerejRelatedEntryUid BIGINT NOT NULL , cerejLastChangedBy INTEGER NOT NULL , relType INTEGER NOT NULL , comment TEXT , cerejRelLanguageUid BIGINT NOT NULL , cerejLocalChangeSeqNum BIGINT NOT NULL , cerejMasterChangeSeqNum BIGINT NOT NULL , cerejLct BIGINT NOT NULL , cerejUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_632); var element_633 = 'CREATE TABLE IF NOT EXISTS ContentCategorySchema ( schemaName TEXT , schemaUrl TEXT , contentCategorySchemaLocalChangeSeqNum BIGINT NOT NULL , contentCategorySchemaMasterChangeSeqNum BIGINT NOT NULL , contentCategorySchemaLastChangedBy INTEGER NOT NULL , contentCategorySchemaLct BIGINT NOT NULL , contentCategorySchemaUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_633); var element_634 = 'CREATE TABLE IF NOT EXISTS ContentCategory ( ctnCatContentCategorySchemaUid BIGINT NOT NULL , name TEXT , contentCategoryLocalChangeSeqNum BIGINT NOT NULL , contentCategoryMasterChangeSeqNum BIGINT NOT NULL , contentCategoryLastChangedBy INTEGER NOT NULL , contentCategoryLct BIGINT NOT NULL , contentCategoryUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_634); var element_635 = 'CREATE TABLE IF NOT EXISTS Language ( name TEXT , iso_639_1_standard TEXT , iso_639_2_standard TEXT , iso_639_3_standard TEXT , Language_Type TEXT , languageActive BOOL NOT NULL , langLocalChangeSeqNum BIGINT NOT NULL , langMasterChangeSeqNum BIGINT NOT NULL , langLastChangedBy INTEGER NOT NULL , langLct BIGINT NOT NULL , langUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_635); var element_636 = 'CREATE TABLE IF NOT EXISTS LanguageVariant ( langUid BIGINT NOT NULL , countryCode TEXT , name TEXT , langVariantLocalChangeSeqNum BIGINT NOT NULL , langVariantMasterChangeSeqNum BIGINT NOT NULL , langVariantLastChangedBy INTEGER NOT NULL , langVariantLct BIGINT NOT NULL , langVariantUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_636); var element_637 = 'CREATE TABLE IF NOT EXISTS AccessToken ( token TEXT PRIMARY KEY NOT NULL , accessTokenPersonUid BIGINT NOT NULL , expires BIGINT NOT NULL )'; _stmtList.add_11rb$(element_637); var element_638 = 'CREATE TABLE IF NOT EXISTS PersonAuth ( passwordHash TEXT , personAuthStatus INTEGER NOT NULL , personAuthUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_638); var element_639 = 'CREATE TABLE IF NOT EXISTS Role ( roleName TEXT , roleActive BOOL NOT NULL , roleMasterCsn BIGINT NOT NULL , roleLocalCsn BIGINT NOT NULL , roleLastChangedBy INTEGER NOT NULL , roleLct BIGINT NOT NULL , rolePermissions BIGINT NOT NULL , roleUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_639); var element_640 = 'CREATE INDEX index_Role_rolePermissions ON Role (rolePermissions)'; _stmtList.add_11rb$(element_640); var element_641 = 'CREATE TABLE IF NOT EXISTS EntityRole ( erMasterCsn BIGINT NOT NULL , erLocalCsn BIGINT NOT NULL , erLastChangedBy INTEGER NOT NULL , erLct BIGINT NOT NULL , erTableId INTEGER NOT NULL , erEntityUid BIGINT NOT NULL , erGroupUid BIGINT NOT NULL , erRoleUid BIGINT NOT NULL , erActive BOOL NOT NULL , erUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_641); var element_642 = 'CREATE INDEX index_EntityRole_erGroupUid_erRoleUid_erTableId ON EntityRole (erGroupUid, erRoleUid, erTableId)'; _stmtList.add_11rb$(element_642); var element_643 = 'CREATE TABLE IF NOT EXISTS PersonGroup ( groupMasterCsn BIGINT NOT NULL , groupLocalCsn BIGINT NOT NULL , groupLastChangedBy INTEGER NOT NULL , groupLct BIGINT NOT NULL , groupName TEXT , groupActive BOOL NOT NULL , personGroupFlag INTEGER NOT NULL , groupUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_643); var element_644 = 'CREATE TABLE IF NOT EXISTS PersonGroupMember ( groupMemberActive BOOL NOT NULL , groupMemberPersonUid BIGINT NOT NULL , groupMemberGroupUid BIGINT NOT NULL , groupMemberMasterCsn BIGINT NOT NULL , groupMemberLocalCsn BIGINT NOT NULL , groupMemberLastChangedBy INTEGER NOT NULL , groupMemberLct BIGINT NOT NULL , groupMemberUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_644); var element_645 = 'CREATE TABLE IF NOT EXISTS PersonPicture ( personPicturePersonUid BIGINT NOT NULL , personPictureMasterCsn BIGINT NOT NULL , personPictureLocalCsn BIGINT NOT NULL , personPictureLastChangedBy INTEGER NOT NULL , personPictureLct BIGINT NOT NULL , personPictureUri TEXT , personPictureMd5 TEXT , fileSize INTEGER NOT NULL , picTimestamp BIGINT NOT NULL , mimeType TEXT , personPictureActive BOOL NOT NULL , personPictureUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_645); var element_646 = 'CREATE TABLE IF NOT EXISTS ScrapeQueueItem ( sqiContentEntryParentUid BIGINT NOT NULL , sqiContentEntryUid BIGINT NOT NULL , destDir TEXT , scrapeUrl TEXT , status INTEGER NOT NULL , runId INTEGER NOT NULL , itemType INTEGER NOT NULL , errorCode INTEGER NOT NULL , contentType TEXT , timeAdded BIGINT NOT NULL , timeStarted BIGINT NOT NULL , timeFinished BIGINT NOT NULL , priority INTEGER NOT NULL , overrideEntry BOOL NOT NULL , sqiUid SERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_646); var element_647 = 'CREATE INDEX index_ScrapeQueueItem_status_itemType ON ScrapeQueueItem (status, itemType)'; _stmtList.add_11rb$(element_647); var element_648 = 'CREATE TABLE IF NOT EXISTS ScrapeRun ( scrapeType TEXT , scrapeRunStatus INTEGER NOT NULL , conversionParams TEXT , scrapeRunUid SERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_648); var element_649 = 'CREATE TABLE IF NOT EXISTS ConnectivityStatus ( csUid INTEGER PRIMARY KEY NOT NULL , connectivityState INTEGER NOT NULL , wifiSsid TEXT , connectedOrConnecting BOOL NOT NULL )'; _stmtList.add_11rb$(element_649); var element_650 = 'CREATE TABLE IF NOT EXISTS Container ( cntLocalCsn BIGINT NOT NULL , cntMasterCsn BIGINT NOT NULL , cntLastModBy INTEGER NOT NULL , cntLct BIGINT NOT NULL , fileSize BIGINT NOT NULL , containerContentEntryUid BIGINT NOT NULL , cntLastModified BIGINT NOT NULL , mimeType TEXT , remarks TEXT , mobileOptimized BOOL NOT NULL , cntNumEntries INTEGER NOT NULL , containerUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_650); var element_651 = 'CREATE INDEX cnt_uid_to_most_recent ON Container (containerContentEntryUid, cntLastModified)'; _stmtList.add_11rb$(element_651); var element_652 = 'CREATE TABLE IF NOT EXISTS ContainerEntry ( ceContainerUid BIGINT NOT NULL , cePath TEXT , ceCefUid BIGINT NOT NULL , ceUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_652); var element_653 = 'CREATE TABLE IF NOT EXISTS ContainerEntryFile ( cefMd5 TEXT , cefPath TEXT , ceTotalSize BIGINT NOT NULL , ceCompressedSize BIGINT NOT NULL , compression INTEGER NOT NULL , lastModified BIGINT NOT NULL , cefUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_653); var element_654 = 'CREATE TABLE IF NOT EXISTS VerbEntity ( urlId TEXT , verbInActive BOOL NOT NULL , verbMasterChangeSeqNum BIGINT NOT NULL , verbLocalChangeSeqNum BIGINT NOT NULL , verbLastChangedBy INTEGER NOT NULL , verbLct BIGINT NOT NULL , verbUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_654); var element_655 = 'CREATE TABLE IF NOT EXISTS XObjectEntity ( objectType TEXT , objectId TEXT , definitionType TEXT , interactionType TEXT , correctResponsePattern TEXT , objectContentEntryUid BIGINT NOT NULL , objectStatementRefUid BIGINT NOT NULL DEFAULT 0 , xObjectMasterChangeSeqNum BIGINT NOT NULL , xObjectocalChangeSeqNum BIGINT NOT NULL , xObjectLastChangedBy INTEGER NOT NULL , xObjectLct BIGINT NOT NULL , xObjectUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_655); var element_656 = 'CREATE TABLE IF NOT EXISTS StatementEntity ( statementId TEXT , statementPersonUid BIGINT NOT NULL , statementVerbUid BIGINT NOT NULL , xObjectUid BIGINT NOT NULL , subStatementActorUid BIGINT NOT NULL , substatementVerbUid BIGINT NOT NULL , subStatementObjectUid BIGINT NOT NULL , agentUid BIGINT NOT NULL , instructorUid BIGINT NOT NULL , authorityUid BIGINT NOT NULL , teamUid BIGINT NOT NULL , resultCompletion BOOL NOT NULL , resultSuccess SMALLINT NOT NULL , resultScoreScaled FLOAT NOT NULL , resultScoreRaw BIGINT NOT NULL , resultScoreMin BIGINT NOT NULL , resultScoreMax BIGINT NOT NULL , resultDuration BIGINT NOT NULL , resultResponse TEXT , timestamp BIGINT NOT NULL , stored BIGINT NOT NULL , contextRegistration TEXT , contextPlatform TEXT , contextStatementId TEXT , fullStatement TEXT , statementMasterChangeSeqNum BIGINT NOT NULL , statementLocalChangeSeqNum BIGINT NOT NULL , statementLastChangedBy INTEGER NOT NULL , statementLct BIGINT NOT NULL , extensionProgress INTEGER NOT NULL , contentEntryRoot BOOL NOT NULL , statementContentEntryUid BIGINT NOT NULL , statementLearnerGroupUid BIGINT NOT NULL , statementClazzUid BIGINT NOT NULL , statementUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_656); var element_657 = 'CREATE INDEX index_StatementEntity_statementContentEntryUid_statementPersonUid_contentEntryRoot_timestamp_statementLocalChangeSeqNum ON StatementEntity (statementContentEntryUid, statementPersonUid, contentEntryRoot, timestamp, statementLocalChangeSeqNum)'; _stmtList.add_11rb$(element_657); var element_658 = 'CREATE TABLE IF NOT EXISTS ContextXObjectStatementJoin ( contextActivityFlag INTEGER NOT NULL , contextStatementUid BIGINT NOT NULL , contextXObjectUid BIGINT NOT NULL , verbMasterChangeSeqNum BIGINT NOT NULL , verbLocalChangeSeqNum BIGINT NOT NULL , verbLastChangedBy INTEGER NOT NULL , contextXObjectLct BIGINT NOT NULL , contextXObjectStatementJoinUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_658); var element_659 = 'CREATE TABLE IF NOT EXISTS AgentEntity ( agentMbox TEXT , agentMbox_sha1sum TEXT , agentOpenid TEXT , agentAccountName TEXT , agentHomePage TEXT , agentPersonUid BIGINT NOT NULL , statementMasterChangeSeqNum BIGINT NOT NULL , statementLocalChangeSeqNum BIGINT NOT NULL , statementLastChangedBy INTEGER NOT NULL , agentLct BIGINT NOT NULL , agentUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_659); var element_660 = 'CREATE TABLE IF NOT EXISTS StateEntity ( stateId TEXT , agentUid BIGINT NOT NULL , activityId TEXT , registration TEXT , isIsactive BOOL NOT NULL , timestamp BIGINT NOT NULL , stateMasterChangeSeqNum BIGINT NOT NULL , stateLocalChangeSeqNum BIGINT NOT NULL , stateLastChangedBy INTEGER NOT NULL , stateLct BIGINT NOT NULL , stateUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_660); var element_661 = 'CREATE TABLE IF NOT EXISTS StateContentEntity ( stateContentStateUid BIGINT NOT NULL , stateContentKey TEXT , stateContentValue TEXT , isIsactive BOOL NOT NULL , stateContentMasterChangeSeqNum BIGINT NOT NULL , stateContentLocalChangeSeqNum BIGINT NOT NULL , stateContentLastChangedBy INTEGER NOT NULL , stateContentLct BIGINT NOT NULL , stateContentUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_661); var element_662 = 'CREATE TABLE IF NOT EXISTS XLangMapEntry ( verbLangMapUid BIGINT NOT NULL , objectLangMapUid BIGINT NOT NULL , languageLangMapUid BIGINT NOT NULL , languageVariantLangMapUid BIGINT NOT NULL , valueLangMap TEXT , statementLangMapMasterCsn INTEGER NOT NULL , statementLangMapLocalCsn INTEGER NOT NULL , statementLangMapLcb INTEGER NOT NULL , statementLangMapLct BIGINT NOT NULL , statementLangMapUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_662); var element_663 = 'CREATE TABLE IF NOT EXISTS SyncNode ( nodeClientId BIGINT NOT NULL , PRIMARY KEY (nodeClientId) )'; _stmtList.add_11rb$(element_663); var element_664 = 'CREATE TABLE IF NOT EXISTS LocallyAvailableContainer ( laContainerUid BIGINT PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_664); var element_665 = 'CREATE TABLE IF NOT EXISTS ContainerETag ( ceContainerUid BIGINT PRIMARY KEY NOT NULL , cetag TEXT )'; _stmtList.add_11rb$(element_665); var element_666 = 'CREATE TABLE IF NOT EXISTS School ( schoolName TEXT , schoolDesc TEXT , schoolAddress TEXT , schoolActive BOOL NOT NULL , schoolPhoneNumber TEXT , schoolGender INTEGER NOT NULL , schoolHolidayCalendarUid BIGINT NOT NULL , schoolFeatures BIGINT NOT NULL , schoolLocationLong DOUBLE PRECISION NOT NULL , schoolLocationLatt DOUBLE PRECISION NOT NULL , schoolEmailAddress TEXT , schoolTeachersPersonGroupUid BIGINT NOT NULL , schoolStudentsPersonGroupUid BIGINT NOT NULL , schoolPendingStudentsPersonGroupUid BIGINT NOT NULL , schoolCode TEXT , schoolMasterChangeSeqNum BIGINT NOT NULL , schoolLocalChangeSeqNum BIGINT NOT NULL , schoolLastChangedBy INTEGER NOT NULL , schoolLct BIGINT NOT NULL , schoolTimeZone TEXT , schoolUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_666); var element_667 = 'CREATE TABLE IF NOT EXISTS SchoolMember ( schoolMemberPersonUid BIGINT NOT NULL , schoolMemberSchoolUid BIGINT NOT NULL , schoolMemberJoinDate BIGINT NOT NULL , schoolMemberLeftDate BIGINT NOT NULL , schoolMemberRole INTEGER NOT NULL , schoolMemberActive BOOL NOT NULL , schoolMemberLocalChangeSeqNum BIGINT NOT NULL , schoolMemberMasterChangeSeqNum BIGINT NOT NULL , schoolMemberLastChangedBy INTEGER NOT NULL , schoolMemberLct BIGINT NOT NULL , schoolMemberUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_667); var element_668 = 'CREATE INDEX index_SchoolMember_schoolMemberSchoolUid_schoolMemberActive_schoolMemberRole ON SchoolMember (schoolMemberSchoolUid, schoolMemberActive, schoolMemberRole)'; _stmtList.add_11rb$(element_668); var element_669 = 'CREATE TABLE IF NOT EXISTS Comments ( commentsText TEXT , commentsEntityType INTEGER NOT NULL , commentsEntityUid BIGINT NOT NULL , commentsPublic BOOL NOT NULL , commentsStatus INTEGER NOT NULL , commentsPersonUid BIGINT NOT NULL , commentsToPersonUid BIGINT NOT NULL , commentSubmitterUid BIGINT NOT NULL , commentsFlagged BOOL NOT NULL , commentsInActive BOOL NOT NULL , commentsDateTimeAdded BIGINT NOT NULL , commentsDateTimeUpdated BIGINT NOT NULL , commentsMCSN BIGINT NOT NULL , commentsLCSN BIGINT NOT NULL , commentsLCB INTEGER NOT NULL , commentsLct BIGINT NOT NULL , commentsUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_669); var element_670 = 'CREATE TABLE IF NOT EXISTS Report ( reportOwnerUid BIGINT NOT NULL , xAxis INTEGER NOT NULL , reportDateRangeSelection INTEGER NOT NULL , fromDate BIGINT NOT NULL , fromRelTo INTEGER NOT NULL , fromRelOffSet INTEGER NOT NULL , fromRelUnit INTEGER NOT NULL , toDate BIGINT NOT NULL , toRelTo INTEGER NOT NULL , toRelOffSet INTEGER NOT NULL , toRelUnit INTEGER NOT NULL , reportTitle TEXT , reportDescription TEXT , reportSeries TEXT , reportInactive BOOL NOT NULL , isTemplate BOOL NOT NULL , priority INTEGER NOT NULL , reportTitleId INTEGER NOT NULL , reportDescId INTEGER NOT NULL , reportMasterChangeSeqNum BIGINT NOT NULL , reportLocalChangeSeqNum BIGINT NOT NULL , reportLastChangedBy INTEGER NOT NULL , reportLct BIGINT NOT NULL , reportUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_670); var element_671 = 'CREATE TABLE IF NOT EXISTS Site ( sitePcsn BIGINT NOT NULL , siteLcsn BIGINT NOT NULL , siteLcb INTEGER NOT NULL , siteLct BIGINT NOT NULL , siteName TEXT , guestLogin BOOL NOT NULL , registrationAllowed BOOL NOT NULL , authSalt TEXT , siteUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_671); var element_672 = 'CREATE TABLE IF NOT EXISTS ContainerImportJob ( cijContainerUid BIGINT NOT NULL , cijUri TEXT , cijImportMode INTEGER NOT NULL , cijContainerBaseDir TEXT , cijContentEntryUid BIGINT NOT NULL , cijMimeType TEXT , cijSessionId TEXT , cijJobStatus INTEGER NOT NULL , cijBytesSoFar BIGINT NOT NULL , cijImportCompleted BOOL NOT NULL , cijContentLength BIGINT NOT NULL , cijContainerEntryFileUids TEXT , cijConversionParams TEXT , cijUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_672); var element_673 = 'CREATE TABLE IF NOT EXISTS LearnerGroup ( learnerGroupName TEXT , learnerGroupDescription TEXT , learnerGroupActive BOOL NOT NULL , learnerGroupMCSN BIGINT NOT NULL , learnerGroupCSN BIGINT NOT NULL , learnerGroupLCB INTEGER NOT NULL , learnerGroupLct BIGINT NOT NULL , learnerGroupUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_673); var element_674 = 'CREATE TABLE IF NOT EXISTS LearnerGroupMember ( learnerGroupMemberPersonUid BIGINT NOT NULL , learnerGroupMemberLgUid BIGINT NOT NULL , learnerGroupMemberRole INTEGER NOT NULL , learnerGroupMemberActive BOOL NOT NULL , learnerGroupMemberMCSN BIGINT NOT NULL , learnerGroupMemberCSN BIGINT NOT NULL , learnerGroupMemberLCB INTEGER NOT NULL , learnerGroupMemberLct BIGINT NOT NULL , learnerGroupMemberUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_674); var element_675 = 'CREATE TABLE IF NOT EXISTS GroupLearningSession ( groupLearningSessionContentUid BIGINT NOT NULL , groupLearningSessionLearnerGroupUid BIGINT NOT NULL , groupLearningSessionInactive BOOL NOT NULL , groupLearningSessionMCSN BIGINT NOT NULL , groupLearningSessionCSN BIGINT NOT NULL , groupLearningSessionLCB INTEGER NOT NULL , groupLearningSessionLct BIGINT NOT NULL , groupLearningSessionUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_675); var element_676 = 'CREATE TABLE IF NOT EXISTS SiteTerms ( termsHtml TEXT , sTermsLang TEXT , sTermsLangUid BIGINT NOT NULL , sTermsActive BOOL NOT NULL , sTermsLastChangedBy INTEGER NOT NULL , sTermsPrimaryCsn BIGINT NOT NULL , sTermsLocalCsn BIGINT NOT NULL , sTermsLct BIGINT NOT NULL , sTermsUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_676); var element_677 = 'CREATE TABLE IF NOT EXISTS ClazzContentJoin ( ccjContentEntryUid BIGINT NOT NULL , ccjClazzUid BIGINT NOT NULL , ccjActive BOOL NOT NULL , ccjLocalChangeSeqNum BIGINT NOT NULL , ccjMasterChangeSeqNum BIGINT NOT NULL , ccjLastChangedBy INTEGER NOT NULL , ccjLct BIGINT NOT NULL , ccjUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_677); var element_678 = 'CREATE TABLE IF NOT EXISTS PersonParentJoin ( ppjPcsn BIGINT NOT NULL , ppjLcsn BIGINT NOT NULL , ppjLcb INTEGER NOT NULL , ppjLct BIGINT NOT NULL , ppjParentPersonUid BIGINT NOT NULL , ppjMinorPersonUid BIGINT NOT NULL , ppjRelationship INTEGER NOT NULL , ppjEmail TEXT , ppjPhone TEXT , ppjInactive BOOL NOT NULL , ppjStatus INTEGER NOT NULL , ppjApprovalTiemstamp BIGINT NOT NULL , ppjApprovalIpAddr TEXT , ppjUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_678); var element_679 = 'CREATE TABLE IF NOT EXISTS ScopedGrant ( sgPcsn BIGINT NOT NULL , sgLcsn BIGINT NOT NULL , sgLcb INTEGER NOT NULL , sgLct BIGINT NOT NULL , sgTableId INTEGER NOT NULL , sgEntityUid BIGINT NOT NULL , sgPermissions BIGINT NOT NULL , sgGroupUid BIGINT NOT NULL , sgIndex INTEGER NOT NULL , sgFlags INTEGER NOT NULL , sgUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_679); var element_680 = 'CREATE INDEX idx_group_to_entity ON ScopedGrant (sgGroupUid, sgPermissions, sgTableId, sgEntityUid)'; _stmtList.add_11rb$(element_680); var element_681 = 'CREATE INDEX idx_entity_to_group ON ScopedGrant (sgTableId, sgEntityUid, sgPermissions, sgGroupUid)'; _stmtList.add_11rb$(element_681); var element_682 = 'CREATE TABLE IF NOT EXISTS ErrorReport ( errPcsn BIGINT NOT NULL , errLcsn BIGINT NOT NULL , errLcb INTEGER NOT NULL , errLct BIGINT NOT NULL , severity INTEGER NOT NULL , timestamp BIGINT NOT NULL , presenterUri TEXT , appVersion TEXT , versionCode INTEGER NOT NULL , errorCode INTEGER NOT NULL , operatingSys TEXT , osVersion TEXT , stackTrace TEXT , message TEXT , errUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_682); var element_683 = 'CREATE TABLE IF NOT EXISTS ClazzAssignment ( caTitle TEXT , caDescription TEXT , caGroupUid BIGINT NOT NULL DEFAULT 0 , caActive BOOL NOT NULL , caClassCommentEnabled BOOL NOT NULL , caPrivateCommentsEnabled BOOL NOT NULL DEFAULT true, caCompletionCriteria INTEGER NOT NULL DEFAULT 100 , caRequireFileSubmission BOOL NOT NULL DEFAULT true, caFileType INTEGER NOT NULL DEFAULT 0 , caSizeLimit INTEGER NOT NULL DEFAULT 50 , caNumberOfFiles INTEGER NOT NULL DEFAULT 1 , caSubmissionPolicy INTEGER NOT NULL DEFAULT 1 , caMarkingType INTEGER NOT NULL DEFAULT 1 , caRequireTextSubmission BOOL NOT NULL DEFAULT true, caTextLimitType INTEGER NOT NULL DEFAULT 1 , caTextLimit INTEGER NOT NULL DEFAULT 500 , caXObjectUid BIGINT NOT NULL DEFAULT 0 , caClazzUid BIGINT NOT NULL , caLocalChangeSeqNum BIGINT NOT NULL , caMasterChangeSeqNum BIGINT NOT NULL , caLastChangedBy INTEGER NOT NULL , caLct BIGINT NOT NULL , caUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_683); var element_684 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoin ( cacjContentUid BIGINT NOT NULL , cacjAssignmentUid BIGINT NOT NULL , cacjActive BOOL NOT NULL , cacjWeight INTEGER NOT NULL DEFAULT 0 , cacjMCSN BIGINT NOT NULL , cacjLCSN BIGINT NOT NULL , cacjLCB INTEGER NOT NULL , cacjLct BIGINT NOT NULL , cacjUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_684); var element_685 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmission ( casAssignmentUid BIGINT NOT NULL , casSubmitterUid BIGINT NOT NULL , casSubmitterPersonUid BIGINT NOT NULL , casText TEXT , casType INTEGER NOT NULL , casTimestamp BIGINT NOT NULL , casUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_685); var element_686 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachment ( casaSubmissionUid BIGINT NOT NULL , casaMimeType TEXT , casaFileName TEXT , casaUri TEXT , casaMd5 TEXT , casaSize INTEGER NOT NULL , casaTimestamp BIGINT NOT NULL , casaUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_686); var element_687 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentMark ( camAssignmentUid BIGINT NOT NULL , camSubmitterUid BIGINT NOT NULL , camMark FLOAT NOT NULL , camPenalty INTEGER NOT NULL , camLct BIGINT NOT NULL , camUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_687); var element_688 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentRollUp ( cachePersonUid BIGINT NOT NULL , cacheContentEntryUid BIGINT NOT NULL , cacheClazzAssignmentUid BIGINT NOT NULL , cacheStudentScore INTEGER NOT NULL , cacheMaxScore INTEGER NOT NULL , cacheFinalWeightScoreWithPenalty FLOAT NOT NULL DEFAULT 0 , cacheWeight INTEGER NOT NULL DEFAULT 0 , cacheProgress INTEGER NOT NULL , cacheContentComplete BOOL NOT NULL , cacheSuccess SMALLINT NOT NULL , cachePenalty INTEGER NOT NULL , lastCsnChecked BIGINT NOT NULL , cacheUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_688); var element_689 = 'CREATE UNIQUE INDEX index_ClazzAssignmentRollUp_cachePersonUid_cacheContentEntryUid_cacheClazzAssignmentUid ON ClazzAssignmentRollUp (cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid)'; _stmtList.add_11rb$(element_689); var element_690 = 'CREATE TABLE IF NOT EXISTS PersonAuth2 ( pauthUid BIGINT PRIMARY KEY NOT NULL , pauthMechanism TEXT , pauthAuth TEXT , pauthLcsn BIGINT NOT NULL , pauthPcsn BIGINT NOT NULL , pauthLcb BIGINT NOT NULL , pauthLct BIGINT NOT NULL )'; _stmtList.add_11rb$(element_690); var element_691 = 'CREATE TABLE IF NOT EXISTS UserSession ( usPcsn BIGINT NOT NULL , usLcsn BIGINT NOT NULL , usLcb INTEGER NOT NULL , usLct BIGINT NOT NULL , usPersonUid BIGINT NOT NULL , usClientNodeId BIGINT NOT NULL , usStartTime BIGINT NOT NULL , usEndTime BIGINT NOT NULL , usStatus INTEGER NOT NULL , usReason INTEGER NOT NULL , usAuth TEXT , usSessionType INTEGER NOT NULL , usUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_691); var element_692 = 'CREATE INDEX person_status_node_idx ON UserSession (usPersonUid, usStatus, usClientNodeId)'; _stmtList.add_11rb$(element_692); var element_693 = 'CREATE INDEX node_status_person_idx ON UserSession (usClientNodeId, usStatus, usPersonUid)'; _stmtList.add_11rb$(element_693); var element_694 = 'CREATE TABLE IF NOT EXISTS ContentJob ( toUri TEXT , cjProgress BIGINT NOT NULL , cjTotal BIGINT NOT NULL , cjNotificationTitle TEXT , cjIsMeteredAllowed BOOL NOT NULL , params TEXT , cjUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_694); var element_695 = 'CREATE TABLE IF NOT EXISTS ContentJobItem ( cjiJobUid BIGINT NOT NULL , sourceUri TEXT , cjiIsLeaf BOOL NOT NULL , cjiContentEntryUid BIGINT NOT NULL , cjiParentContentEntryUid BIGINT NOT NULL , cjiContainerUid BIGINT NOT NULL , cjiItemProgress BIGINT NOT NULL , cjiItemTotal BIGINT NOT NULL , cjiRecursiveProgress BIGINT NOT NULL , cjiRecursiveTotal BIGINT NOT NULL , cjiStatus INTEGER NOT NULL , cjiRecursiveStatus INTEGER NOT NULL , cjiConnectivityNeeded BOOL NOT NULL , cjiPluginId INTEGER NOT NULL , cjiAttemptCount INTEGER NOT NULL , cjiParentCjiUid BIGINT NOT NULL , cjiServerJobId BIGINT NOT NULL , cjiStartTime BIGINT NOT NULL , cjiFinishTime BIGINT NOT NULL , cjiUploadSessionUid TEXT , cjiContentDeletedOnCancellation BOOL NOT NULL , cjiContainerProcessed BOOL NOT NULL , cjiUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_695); var element_696 = 'CREATE INDEX index_ContentJobItem_cjiContentEntryUid_cjiFinishTime ON ContentJobItem (cjiContentEntryUid, cjiFinishTime)'; _stmtList.add_11rb$(element_696); var element_697 = 'CREATE TABLE IF NOT EXISTS CourseBlock ( cbType INTEGER NOT NULL , cbIndentLevel INTEGER NOT NULL , cbModuleParentBlockUid BIGINT NOT NULL , cbTitle TEXT , cbDescription TEXT , cbCompletionCriteria INTEGER NOT NULL , cbHideUntilDate BIGINT NOT NULL , cbDeadlineDate BIGINT NOT NULL , cbLateSubmissionPenalty INTEGER NOT NULL , cbGracePeriodDate BIGINT NOT NULL , cbMaxPoints INTEGER NOT NULL , cbMinPoints INTEGER NOT NULL , cbIndex INTEGER NOT NULL , cbClazzUid BIGINT NOT NULL , cbActive BOOL NOT NULL , cbHidden BOOL NOT NULL , cbEntityUid BIGINT NOT NULL , cbLct BIGINT NOT NULL , cbUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_697); var element_698 = 'CREATE TABLE IF NOT EXISTS CourseTerminology ( ctTitle TEXT , ctTerminology TEXT , ctLct BIGINT NOT NULL , ctUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_698); var element_699 = 'CREATE TABLE IF NOT EXISTS CourseGroupSet ( cgsName TEXT , cgsTotalGroups INTEGER NOT NULL , cgsActive BOOL NOT NULL , cgsClazzUid BIGINT NOT NULL , cgsLct BIGINT NOT NULL , cgsUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_699); var element_700 = 'CREATE TABLE IF NOT EXISTS CourseGroupMember ( cgmSetUid BIGINT NOT NULL , cgmGroupNumber INTEGER NOT NULL , cgmPersonUid BIGINT NOT NULL , cgmLct BIGINT NOT NULL , cgmUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_700); var element_701 = 'CREATE TABLE IF NOT EXISTS ChangeLog ( chEntityPk BIGINT NOT NULL , chTableId INTEGER NOT NULL , chType INTEGER NOT NULL , PRIMARY KEY (chTableId, chEntityPk) )'; _stmtList.add_11rb$(element_701); var element_702 = 'CREATE TABLE IF NOT EXISTS ZombieAttachmentData ( zaUri TEXT , zaUid INTEGER PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_702); var element_703 = 'CREATE TABLE IF NOT EXISTS DoorNode ( auth TEXT , nodeId BIGINT NOT NULL , rel INTEGER NOT NULL , PRIMARY KEY (nodeId) )'; _stmtList.add_11rb$(element_703); var element_704 = 'CREATE TABLE IF NOT EXISTS ReplicationStatus ( lastFetchReplicationCompleteTime BIGINT NOT NULL , lastLocalChangeTime BIGINT NOT NULL , lastRemoteChangeTime BIGINT NOT NULL , lastSendReplicationCompleteTime BIGINT NOT NULL , nodeId BIGINT NOT NULL , priority INTEGER NOT NULL , tableId INTEGER NOT NULL , repStatusId INTEGER PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_704); var element_705 = 'CREATE UNIQUE INDEX table_node_idx ON ReplicationStatus (tableId, nodeId)'; _stmtList.add_11rb$(element_705); var element_706 = 'CREATE TABLE IF NOT EXISTS ClazzLogReplicate ( clPk BIGINT NOT NULL , clVersionId BIGINT NOT NULL DEFAULT 0 , clDestination BIGINT NOT NULL , clPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (clPk, clDestination) )'; _stmtList.add_11rb$(element_706); var element_707 = 'CREATE INDEX index_ClazzLogReplicate_clPk_clDestination_clVersionId ON ClazzLogReplicate (clPk, clDestination, clVersionId)'; _stmtList.add_11rb$(element_707); var element_708 = 'CREATE INDEX index_ClazzLogReplicate_clDestination_clPending ON ClazzLogReplicate (clDestination, clPending)'; _stmtList.add_11rb$(element_708); var element_709 = 'CREATE TABLE IF NOT EXISTS ClazzLogAttendanceRecordReplicate ( clarPk BIGINT NOT NULL , clarVersionId BIGINT NOT NULL DEFAULT 0 , clarDestination BIGINT NOT NULL , clarPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (clarPk, clarDestination) )'; _stmtList.add_11rb$(element_709); var element_710 = 'CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarPk_clarDestination_clarVersionId ON ClazzLogAttendanceRecordReplicate (clarPk, clarDestination, clarVersionId)'; _stmtList.add_11rb$(element_710); var element_711 = 'CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarDestination_clarPending ON ClazzLogAttendanceRecordReplicate (clarDestination, clarPending)'; _stmtList.add_11rb$(element_711); var element_712 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionReplicate ( casPk BIGINT NOT NULL , casVersionId BIGINT NOT NULL DEFAULT 0 , casDestination BIGINT NOT NULL , casPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (casPk, casDestination) )'; _stmtList.add_11rb$(element_712); var element_713 = 'CREATE INDEX index_CourseAssignmentSubmissionReplicate_casPk_casDestination_casVersionId ON CourseAssignmentSubmissionReplicate (casPk, casDestination, casVersionId)'; _stmtList.add_11rb$(element_713); var element_714 = 'CREATE INDEX index_CourseAssignmentSubmissionReplicate_casDestination_casPending ON CourseAssignmentSubmissionReplicate (casDestination, casPending)'; _stmtList.add_11rb$(element_714); var element_715 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachmentReplicate ( casaPk BIGINT NOT NULL , casaVersionId BIGINT NOT NULL DEFAULT 0 , casaDestination BIGINT NOT NULL , casaPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (casaPk, casaDestination) )'; _stmtList.add_11rb$(element_715); var element_716 = 'CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaPk_casaDestination_casaVersionId ON CourseAssignmentSubmissionAttachmentReplicate (casaPk, casaDestination, casaVersionId)'; _stmtList.add_11rb$(element_716); var element_717 = 'CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaDestination_casaPending ON CourseAssignmentSubmissionAttachmentReplicate (casaDestination, casaPending)'; _stmtList.add_11rb$(element_717); var element_718 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentMarkReplicate ( camPk BIGINT NOT NULL , camVersionId BIGINT NOT NULL DEFAULT 0 , camDestination BIGINT NOT NULL , camPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (camPk, camDestination) )'; _stmtList.add_11rb$(element_718); var element_719 = 'CREATE INDEX index_CourseAssignmentMarkReplicate_camPk_camDestination_camVersionId ON CourseAssignmentMarkReplicate (camPk, camDestination, camVersionId)'; _stmtList.add_11rb$(element_719); var element_720 = 'CREATE INDEX index_CourseAssignmentMarkReplicate_camDestination_camPending ON CourseAssignmentMarkReplicate (camDestination, camPending)'; _stmtList.add_11rb$(element_720); var element_721 = 'CREATE TABLE IF NOT EXISTS CourseBlockReplicate ( cbPk BIGINT NOT NULL , cbVersionId BIGINT NOT NULL DEFAULT 0 , cbDestination BIGINT NOT NULL , cbPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cbPk, cbDestination) )'; _stmtList.add_11rb$(element_721); var element_722 = 'CREATE INDEX index_CourseBlockReplicate_cbPk_cbDestination_cbVersionId ON CourseBlockReplicate (cbPk, cbDestination, cbVersionId)'; _stmtList.add_11rb$(element_722); var element_723 = 'CREATE INDEX index_CourseBlockReplicate_cbDestination_cbPending ON CourseBlockReplicate (cbDestination, cbPending)'; _stmtList.add_11rb$(element_723); var element_724 = 'CREATE TABLE IF NOT EXISTS CourseTerminologyReplicate ( ctPk BIGINT NOT NULL , ctVersionId BIGINT NOT NULL DEFAULT 0 , ctDestination BIGINT NOT NULL , ctPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ctPk, ctDestination) )'; _stmtList.add_11rb$(element_724); var element_725 = 'CREATE INDEX index_CourseTerminologyReplicate_ctPk_ctDestination_ctVersionId ON CourseTerminologyReplicate (ctPk, ctDestination, ctVersionId)'; _stmtList.add_11rb$(element_725); var element_726 = 'CREATE INDEX index_CourseTerminologyReplicate_ctDestination_ctPending ON CourseTerminologyReplicate (ctDestination, ctPending)'; _stmtList.add_11rb$(element_726); var element_727 = 'CREATE TABLE IF NOT EXISTS CourseGroupSetReplicate ( cgsPk BIGINT NOT NULL , cgsVersionId BIGINT NOT NULL DEFAULT 0 , cgsDestination BIGINT NOT NULL , cgsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cgsPk, cgsDestination) )'; _stmtList.add_11rb$(element_727); var element_728 = 'CREATE INDEX index_CourseGroupSetReplicate_cgsPk_cgsDestination_cgsVersionId ON CourseGroupSetReplicate (cgsPk, cgsDestination, cgsVersionId)'; _stmtList.add_11rb$(element_728); var element_729 = 'CREATE INDEX index_CourseGroupSetReplicate_cgsDestination_cgsPending ON CourseGroupSetReplicate (cgsDestination, cgsPending)'; _stmtList.add_11rb$(element_729); var element_730 = 'CREATE TABLE IF NOT EXISTS CourseGroupMemberReplicate ( cgmPk BIGINT NOT NULL , cgmVersionId BIGINT NOT NULL DEFAULT 0 , cgmDestination BIGINT NOT NULL , cgmPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cgmPk, cgmDestination) )'; _stmtList.add_11rb$(element_730); var element_731 = 'CREATE INDEX index_CourseGroupMemberReplicate_cgmPk_cgmDestination_cgmVersionId ON CourseGroupMemberReplicate (cgmPk, cgmDestination, cgmVersionId)'; _stmtList.add_11rb$(element_731); var element_732 = 'CREATE INDEX index_CourseGroupMemberReplicate_cgmDestination_cgmPending ON CourseGroupMemberReplicate (cgmDestination, cgmPending)'; _stmtList.add_11rb$(element_732); var element_733 = 'CREATE TABLE IF NOT EXISTS ScheduleReplicate ( schedulePk BIGINT NOT NULL , scheduleVersionId BIGINT NOT NULL DEFAULT 0 , scheduleDestination BIGINT NOT NULL , schedulePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (schedulePk, scheduleDestination) )'; _stmtList.add_11rb$(element_733); var element_734 = 'CREATE INDEX index_ScheduleReplicate_schedulePk_scheduleDestination_scheduleVersionId ON ScheduleReplicate (schedulePk, scheduleDestination, scheduleVersionId)'; _stmtList.add_11rb$(element_734); var element_735 = 'CREATE INDEX index_ScheduleReplicate_scheduleDestination_schedulePending ON ScheduleReplicate (scheduleDestination, schedulePending)'; _stmtList.add_11rb$(element_735); var element_736 = 'CREATE TABLE IF NOT EXISTS HolidayCalendarReplicate ( hcPk BIGINT NOT NULL , hcVersionId BIGINT NOT NULL DEFAULT 0 , hcDestination BIGINT NOT NULL , hcPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (hcPk, hcDestination) )'; _stmtList.add_11rb$(element_736); var element_737 = 'CREATE INDEX index_HolidayCalendarReplicate_hcPk_hcDestination_hcVersionId ON HolidayCalendarReplicate (hcPk, hcDestination, hcVersionId)'; _stmtList.add_11rb$(element_737); var element_738 = 'CREATE INDEX index_HolidayCalendarReplicate_hcDestination_hcPending ON HolidayCalendarReplicate (hcDestination, hcPending)'; _stmtList.add_11rb$(element_738); var element_739 = 'CREATE TABLE IF NOT EXISTS HolidayReplicate ( holidayPk BIGINT NOT NULL , holidayVersionId BIGINT NOT NULL DEFAULT 0 , holidayDestination BIGINT NOT NULL , holidayPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (holidayPk, holidayDestination) )'; _stmtList.add_11rb$(element_739); var element_740 = 'CREATE INDEX index_HolidayReplicate_holidayPk_holidayDestination_holidayVersionId ON HolidayReplicate (holidayPk, holidayDestination, holidayVersionId)'; _stmtList.add_11rb$(element_740); var element_741 = 'CREATE INDEX index_HolidayReplicate_holidayDestination_holidayPending ON HolidayReplicate (holidayDestination, holidayPending)'; _stmtList.add_11rb$(element_741); var element_742 = 'CREATE TABLE IF NOT EXISTS PersonReplicate ( personPk BIGINT NOT NULL , personVersionId BIGINT NOT NULL DEFAULT 0 , personDestination BIGINT NOT NULL , personPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (personPk, personDestination) )'; _stmtList.add_11rb$(element_742); var element_743 = 'CREATE INDEX index_PersonReplicate_personPk_personDestination_personVersionId ON PersonReplicate (personPk, personDestination, personVersionId)'; _stmtList.add_11rb$(element_743); var element_744 = 'CREATE INDEX index_PersonReplicate_personDestination_personPending ON PersonReplicate (personDestination, personPending)'; _stmtList.add_11rb$(element_744); var element_745 = 'CREATE TABLE IF NOT EXISTS ClazzReplicate ( clazzPk BIGINT NOT NULL , clazzVersionId BIGINT NOT NULL DEFAULT 0 , clazzDestination BIGINT NOT NULL , clazzPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (clazzPk, clazzDestination) )'; _stmtList.add_11rb$(element_745); var element_746 = 'CREATE INDEX index_ClazzReplicate_clazzPk_clazzDestination_clazzVersionId ON ClazzReplicate (clazzPk, clazzDestination, clazzVersionId)'; _stmtList.add_11rb$(element_746); var element_747 = 'CREATE INDEX index_ClazzReplicate_clazzDestination_clazzPending ON ClazzReplicate (clazzDestination, clazzPending)'; _stmtList.add_11rb$(element_747); var element_748 = 'CREATE TABLE IF NOT EXISTS ClazzEnrolmentReplicate ( cePk BIGINT NOT NULL , ceVersionId BIGINT NOT NULL DEFAULT 0 , ceDestination BIGINT NOT NULL , cePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cePk, ceDestination) )'; _stmtList.add_11rb$(element_748); var element_749 = 'CREATE INDEX index_ClazzEnrolmentReplicate_cePk_ceDestination_ceVersionId ON ClazzEnrolmentReplicate (cePk, ceDestination, ceVersionId)'; _stmtList.add_11rb$(element_749); var element_750 = 'CREATE INDEX index_ClazzEnrolmentReplicate_ceDestination_cePending ON ClazzEnrolmentReplicate (ceDestination, cePending)'; _stmtList.add_11rb$(element_750); var element_751 = 'CREATE TABLE IF NOT EXISTS LeavingReasonReplicate ( lrPk BIGINT NOT NULL , lrVersionId BIGINT NOT NULL DEFAULT 0 , lrDestination BIGINT NOT NULL , lrPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lrPk, lrDestination) )'; _stmtList.add_11rb$(element_751); var element_752 = 'CREATE INDEX index_LeavingReasonReplicate_lrPk_lrDestination_lrVersionId ON LeavingReasonReplicate (lrPk, lrDestination, lrVersionId)'; _stmtList.add_11rb$(element_752); var element_753 = 'CREATE INDEX index_LeavingReasonReplicate_lrDestination_lrPending ON LeavingReasonReplicate (lrDestination, lrPending)'; _stmtList.add_11rb$(element_753); var element_754 = 'CREATE TABLE IF NOT EXISTS ContentEntryReplicate ( cePk BIGINT NOT NULL , ceVersionId BIGINT NOT NULL DEFAULT 0 , ceDestination BIGINT NOT NULL , cePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cePk, ceDestination) )'; _stmtList.add_11rb$(element_754); var element_755 = 'CREATE INDEX index_ContentEntryReplicate_cePk_ceDestination_ceVersionId ON ContentEntryReplicate (cePk, ceDestination, ceVersionId)'; _stmtList.add_11rb$(element_755); var element_756 = 'CREATE INDEX index_ContentEntryReplicate_ceDestination_cePending ON ContentEntryReplicate (ceDestination, cePending)'; _stmtList.add_11rb$(element_756); var element_757 = 'CREATE TABLE IF NOT EXISTS ContentEntryContentCategoryJoinReplicate ( ceccjPk BIGINT NOT NULL , ceccjVersionId BIGINT NOT NULL DEFAULT 0 , ceccjDestination BIGINT NOT NULL , ceccjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ceccjPk, ceccjDestination) )'; _stmtList.add_11rb$(element_757); var element_758 = 'CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjPk_ceccjDestination_ceccjVersionId ON ContentEntryContentCategoryJoinReplicate (ceccjPk, ceccjDestination, ceccjVersionId)'; _stmtList.add_11rb$(element_758); var element_759 = 'CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjDestination_ceccjPending ON ContentEntryContentCategoryJoinReplicate (ceccjDestination, ceccjPending)'; _stmtList.add_11rb$(element_759); var element_760 = 'CREATE TABLE IF NOT EXISTS ContentEntryParentChildJoinReplicate ( cepcjPk BIGINT NOT NULL , cepcjVersionId BIGINT NOT NULL DEFAULT 0 , cepcjDestination BIGINT NOT NULL , cepcjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cepcjPk, cepcjDestination) )'; _stmtList.add_11rb$(element_760); var element_761 = 'CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjPk_cepcjDestination_cepcjVersionId ON ContentEntryParentChildJoinReplicate (cepcjPk, cepcjDestination, cepcjVersionId)'; _stmtList.add_11rb$(element_761); var element_762 = 'CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjDestination_cepcjPending ON ContentEntryParentChildJoinReplicate (cepcjDestination, cepcjPending)'; _stmtList.add_11rb$(element_762); var element_763 = 'CREATE TABLE IF NOT EXISTS ContentEntryRelatedEntryJoinReplicate ( cerejPk BIGINT NOT NULL , cerejVersionId BIGINT NOT NULL DEFAULT 0 , cerejDestination BIGINT NOT NULL , cerejPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cerejPk, cerejDestination) )'; _stmtList.add_11rb$(element_763); var element_764 = 'CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejPk_cerejDestination_cerejVersionId ON ContentEntryRelatedEntryJoinReplicate (cerejPk, cerejDestination, cerejVersionId)'; _stmtList.add_11rb$(element_764); var element_765 = 'CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejDestination_cerejPending ON ContentEntryRelatedEntryJoinReplicate (cerejDestination, cerejPending)'; _stmtList.add_11rb$(element_765); var element_766 = 'CREATE TABLE IF NOT EXISTS ContentCategorySchemaReplicate ( ccsPk BIGINT NOT NULL , ccsVersionId BIGINT NOT NULL DEFAULT 0 , ccsDestination BIGINT NOT NULL , ccsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ccsPk, ccsDestination) )'; _stmtList.add_11rb$(element_766); var element_767 = 'CREATE INDEX index_ContentCategorySchemaReplicate_ccsPk_ccsDestination_ccsVersionId ON ContentCategorySchemaReplicate (ccsPk, ccsDestination, ccsVersionId)'; _stmtList.add_11rb$(element_767); var element_768 = 'CREATE INDEX index_ContentCategorySchemaReplicate_ccsDestination_ccsPending ON ContentCategorySchemaReplicate (ccsDestination, ccsPending)'; _stmtList.add_11rb$(element_768); var element_769 = 'CREATE TABLE IF NOT EXISTS ContentCategoryReplicate ( ccPk BIGINT NOT NULL , ccVersionId BIGINT NOT NULL DEFAULT 0 , ccDestination BIGINT NOT NULL , ccPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ccPk, ccDestination) )'; _stmtList.add_11rb$(element_769); var element_770 = 'CREATE INDEX index_ContentCategoryReplicate_ccPk_ccDestination_ccVersionId ON ContentCategoryReplicate (ccPk, ccDestination, ccVersionId)'; _stmtList.add_11rb$(element_770); var element_771 = 'CREATE INDEX index_ContentCategoryReplicate_ccDestination_ccPending ON ContentCategoryReplicate (ccDestination, ccPending)'; _stmtList.add_11rb$(element_771); var element_772 = 'CREATE TABLE IF NOT EXISTS LanguageReplicate ( languagePk BIGINT NOT NULL , languageVersionId BIGINT NOT NULL DEFAULT 0 , languageDestination BIGINT NOT NULL , languagePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (languagePk, languageDestination) )'; _stmtList.add_11rb$(element_772); var element_773 = 'CREATE INDEX index_LanguageReplicate_languagePk_languageDestination_languageVersionId ON LanguageReplicate (languagePk, languageDestination, languageVersionId)'; _stmtList.add_11rb$(element_773); var element_774 = 'CREATE INDEX index_LanguageReplicate_languageDestination_languagePending ON LanguageReplicate (languageDestination, languagePending)'; _stmtList.add_11rb$(element_774); var element_775 = 'CREATE TABLE IF NOT EXISTS LanguageVariantReplicate ( lvPk BIGINT NOT NULL , lvVersionId BIGINT NOT NULL DEFAULT 0 , lvDestination BIGINT NOT NULL , lvPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lvPk, lvDestination) )'; _stmtList.add_11rb$(element_775); var element_776 = 'CREATE INDEX index_LanguageVariantReplicate_lvPk_lvDestination_lvVersionId ON LanguageVariantReplicate (lvPk, lvDestination, lvVersionId)'; _stmtList.add_11rb$(element_776); var element_777 = 'CREATE INDEX index_LanguageVariantReplicate_lvDestination_lvPending ON LanguageVariantReplicate (lvDestination, lvPending)'; _stmtList.add_11rb$(element_777); var element_778 = 'CREATE TABLE IF NOT EXISTS PersonGroupReplicate ( pgPk BIGINT NOT NULL , pgVersionId BIGINT NOT NULL DEFAULT 0 , pgDestination BIGINT NOT NULL , pgPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (pgPk, pgDestination) )'; _stmtList.add_11rb$(element_778); var element_779 = 'CREATE INDEX index_PersonGroupReplicate_pgPk_pgDestination_pgVersionId ON PersonGroupReplicate (pgPk, pgDestination, pgVersionId)'; _stmtList.add_11rb$(element_779); var element_780 = 'CREATE INDEX index_PersonGroupReplicate_pgDestination_pgPending ON PersonGroupReplicate (pgDestination, pgPending)'; _stmtList.add_11rb$(element_780); var element_781 = 'CREATE TABLE IF NOT EXISTS PersonGroupMemberReplicate ( pgmPk BIGINT NOT NULL , pgmVersionId BIGINT NOT NULL DEFAULT 0 , pgmDestination BIGINT NOT NULL , pgmPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (pgmPk, pgmDestination) )'; _stmtList.add_11rb$(element_781); var element_782 = 'CREATE INDEX index_PersonGroupMemberReplicate_pgmPk_pgmDestination_pgmVersionId ON PersonGroupMemberReplicate (pgmPk, pgmDestination, pgmVersionId)'; _stmtList.add_11rb$(element_782); var element_783 = 'CREATE INDEX index_PersonGroupMemberReplicate_pgmDestination_pgmPending ON PersonGroupMemberReplicate (pgmDestination, pgmPending)'; _stmtList.add_11rb$(element_783); var element_784 = 'CREATE TABLE IF NOT EXISTS PersonPictureReplicate ( ppPk BIGINT NOT NULL , ppVersionId BIGINT NOT NULL DEFAULT 0 , ppDestination BIGINT NOT NULL , ppPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ppPk, ppDestination) )'; _stmtList.add_11rb$(element_784); var element_785 = 'CREATE INDEX index_PersonPictureReplicate_ppPk_ppDestination_ppVersionId ON PersonPictureReplicate (ppPk, ppDestination, ppVersionId)'; _stmtList.add_11rb$(element_785); var element_786 = 'CREATE INDEX index_PersonPictureReplicate_ppDestination_ppPending ON PersonPictureReplicate (ppDestination, ppPending)'; _stmtList.add_11rb$(element_786); var element_787 = 'CREATE TABLE IF NOT EXISTS ContainerReplicate ( containerPk BIGINT NOT NULL , containerVersionId BIGINT NOT NULL DEFAULT 0 , containerDestination BIGINT NOT NULL , containerPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (containerPk, containerDestination) )'; _stmtList.add_11rb$(element_787); var element_788 = 'CREATE INDEX index_ContainerReplicate_containerPk_containerDestination_containerVersionId ON ContainerReplicate (containerPk, containerDestination, containerVersionId)'; _stmtList.add_11rb$(element_788); var element_789 = 'CREATE INDEX index_ContainerReplicate_containerDestination_containerPending ON ContainerReplicate (containerDestination, containerPending)'; _stmtList.add_11rb$(element_789); var element_790 = 'CREATE TABLE IF NOT EXISTS VerbEntityReplicate ( vePk BIGINT NOT NULL , veVersionId BIGINT NOT NULL DEFAULT 0 , veDestination BIGINT NOT NULL , vePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (vePk, veDestination) )'; _stmtList.add_11rb$(element_790); var element_791 = 'CREATE INDEX index_VerbEntityReplicate_vePk_veDestination_veVersionId ON VerbEntityReplicate (vePk, veDestination, veVersionId)'; _stmtList.add_11rb$(element_791); var element_792 = 'CREATE INDEX index_VerbEntityReplicate_veDestination_vePending ON VerbEntityReplicate (veDestination, vePending)'; _stmtList.add_11rb$(element_792); var element_793 = 'CREATE TABLE IF NOT EXISTS XObjectEntityReplicate ( xoePk BIGINT NOT NULL , xoeVersionId BIGINT NOT NULL DEFAULT 0 , xoeDestination BIGINT NOT NULL , xoePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (xoePk, xoeDestination) )'; _stmtList.add_11rb$(element_793); var element_794 = 'CREATE INDEX index_XObjectEntityReplicate_xoePk_xoeDestination_xoeVersionId ON XObjectEntityReplicate (xoePk, xoeDestination, xoeVersionId)'; _stmtList.add_11rb$(element_794); var element_795 = 'CREATE INDEX index_XObjectEntityReplicate_xoeDestination_xoePending ON XObjectEntityReplicate (xoeDestination, xoePending)'; _stmtList.add_11rb$(element_795); var element_796 = 'CREATE TABLE IF NOT EXISTS StatementEntityReplicate ( sePk BIGINT NOT NULL , seVersionId BIGINT NOT NULL DEFAULT 0 , seDestination BIGINT NOT NULL , sePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sePk, seDestination) )'; _stmtList.add_11rb$(element_796); var element_797 = 'CREATE INDEX index_StatementEntityReplicate_sePk_seDestination_seVersionId ON StatementEntityReplicate (sePk, seDestination, seVersionId)'; _stmtList.add_11rb$(element_797); var element_798 = 'CREATE INDEX index_StatementEntityReplicate_seDestination_sePending ON StatementEntityReplicate (seDestination, sePending)'; _stmtList.add_11rb$(element_798); var element_799 = 'CREATE TABLE IF NOT EXISTS ContextXObjectStatementJoinReplicate ( cxosjPk BIGINT NOT NULL , cxosjVersionId BIGINT NOT NULL DEFAULT 0 , cxosjDestination BIGINT NOT NULL , cxosjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cxosjPk, cxosjDestination) )'; _stmtList.add_11rb$(element_799); var element_800 = 'CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjPk_cxosjDestination_cxosjVersionId ON ContextXObjectStatementJoinReplicate (cxosjPk, cxosjDestination, cxosjVersionId)'; _stmtList.add_11rb$(element_800); var element_801 = 'CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjDestination_cxosjPending ON ContextXObjectStatementJoinReplicate (cxosjDestination, cxosjPending)'; _stmtList.add_11rb$(element_801); var element_802 = 'CREATE TABLE IF NOT EXISTS AgentEntityReplicate ( aePk BIGINT NOT NULL , aeVersionId BIGINT NOT NULL DEFAULT 0 , aeDestination BIGINT NOT NULL , aePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (aePk, aeDestination) )'; _stmtList.add_11rb$(element_802); var element_803 = 'CREATE INDEX index_AgentEntityReplicate_aePk_aeDestination_aeVersionId ON AgentEntityReplicate (aePk, aeDestination, aeVersionId)'; _stmtList.add_11rb$(element_803); var element_804 = 'CREATE INDEX index_AgentEntityReplicate_aeDestination_aePending ON AgentEntityReplicate (aeDestination, aePending)'; _stmtList.add_11rb$(element_804); var element_805 = 'CREATE TABLE IF NOT EXISTS StateEntityReplicate ( sePk BIGINT NOT NULL , seVersionId BIGINT NOT NULL DEFAULT 0 , seDestination BIGINT NOT NULL , sePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sePk, seDestination) )'; _stmtList.add_11rb$(element_805); var element_806 = 'CREATE INDEX index_StateEntityReplicate_sePk_seDestination_seVersionId ON StateEntityReplicate (sePk, seDestination, seVersionId)'; _stmtList.add_11rb$(element_806); var element_807 = 'CREATE INDEX index_StateEntityReplicate_seDestination_sePending ON StateEntityReplicate (seDestination, sePending)'; _stmtList.add_11rb$(element_807); var element_808 = 'CREATE TABLE IF NOT EXISTS StateContentEntityReplicate ( scePk BIGINT NOT NULL , sceVersionId BIGINT NOT NULL DEFAULT 0 , sceDestination BIGINT NOT NULL , scePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (scePk, sceDestination) )'; _stmtList.add_11rb$(element_808); var element_809 = 'CREATE INDEX index_StateContentEntityReplicate_scePk_sceDestination_sceVersionId ON StateContentEntityReplicate (scePk, sceDestination, sceVersionId)'; _stmtList.add_11rb$(element_809); var element_810 = 'CREATE INDEX index_StateContentEntityReplicate_sceDestination_scePending ON StateContentEntityReplicate (sceDestination, scePending)'; _stmtList.add_11rb$(element_810); var element_811 = 'CREATE TABLE IF NOT EXISTS XLangMapEntryReplicate ( xlmePk BIGINT NOT NULL , xlmeVersionId BIGINT NOT NULL DEFAULT 0 , xlmeDestination BIGINT NOT NULL , xlmePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (xlmePk, xlmeDestination) )'; _stmtList.add_11rb$(element_811); var element_812 = 'CREATE INDEX index_XLangMapEntryReplicate_xlmePk_xlmeDestination_xlmeVersionId ON XLangMapEntryReplicate (xlmePk, xlmeDestination, xlmeVersionId)'; _stmtList.add_11rb$(element_812); var element_813 = 'CREATE INDEX index_XLangMapEntryReplicate_xlmeDestination_xlmePending ON XLangMapEntryReplicate (xlmeDestination, xlmePending)'; _stmtList.add_11rb$(element_813); var element_814 = 'CREATE TABLE IF NOT EXISTS SchoolReplicate ( schoolPk BIGINT NOT NULL , schoolVersionId BIGINT NOT NULL DEFAULT 0 , schoolDestination BIGINT NOT NULL , schoolPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (schoolPk, schoolDestination) )'; _stmtList.add_11rb$(element_814); var element_815 = 'CREATE INDEX index_SchoolReplicate_schoolPk_schoolDestination_schoolVersionId ON SchoolReplicate (schoolPk, schoolDestination, schoolVersionId)'; _stmtList.add_11rb$(element_815); var element_816 = 'CREATE INDEX index_SchoolReplicate_schoolDestination_schoolPending ON SchoolReplicate (schoolDestination, schoolPending)'; _stmtList.add_11rb$(element_816); var element_817 = 'CREATE TABLE IF NOT EXISTS SchoolMemberReplicate ( smPk BIGINT NOT NULL , smVersionId BIGINT NOT NULL DEFAULT 0 , smDestination BIGINT NOT NULL , smPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (smPk, smDestination) )'; _stmtList.add_11rb$(element_817); var element_818 = 'CREATE INDEX index_SchoolMemberReplicate_smPk_smDestination_smVersionId ON SchoolMemberReplicate (smPk, smDestination, smVersionId)'; _stmtList.add_11rb$(element_818); var element_819 = 'CREATE INDEX index_SchoolMemberReplicate_smDestination_smPending ON SchoolMemberReplicate (smDestination, smPending)'; _stmtList.add_11rb$(element_819); var element_820 = 'CREATE TABLE IF NOT EXISTS CommentsReplicate ( commentsPk BIGINT NOT NULL , commentsVersionId BIGINT NOT NULL DEFAULT 0 , commentsDestination BIGINT NOT NULL , commentsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (commentsPk, commentsDestination) )'; _stmtList.add_11rb$(element_820); var element_821 = 'CREATE INDEX index_CommentsReplicate_commentsPk_commentsDestination_commentsVersionId ON CommentsReplicate (commentsPk, commentsDestination, commentsVersionId)'; _stmtList.add_11rb$(element_821); var element_822 = 'CREATE INDEX index_CommentsReplicate_commentsDestination_commentsPending ON CommentsReplicate (commentsDestination, commentsPending)'; _stmtList.add_11rb$(element_822); var element_823 = 'CREATE TABLE IF NOT EXISTS ReportReplicate ( reportPk BIGINT NOT NULL , reportVersionId BIGINT NOT NULL DEFAULT 0 , reportDestination BIGINT NOT NULL , reportPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (reportPk, reportDestination) )'; _stmtList.add_11rb$(element_823); var element_824 = 'CREATE INDEX index_ReportReplicate_reportPk_reportDestination_reportVersionId ON ReportReplicate (reportPk, reportDestination, reportVersionId)'; _stmtList.add_11rb$(element_824); var element_825 = 'CREATE INDEX index_ReportReplicate_reportDestination_reportPending ON ReportReplicate (reportDestination, reportPending)'; _stmtList.add_11rb$(element_825); var element_826 = 'CREATE TABLE IF NOT EXISTS SiteReplicate ( sitePk BIGINT NOT NULL , siteVersionId BIGINT NOT NULL DEFAULT 0 , siteDestination BIGINT NOT NULL , sitePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sitePk, siteDestination) )'; _stmtList.add_11rb$(element_826); var element_827 = 'CREATE INDEX index_SiteReplicate_sitePk_siteDestination_siteVersionId ON SiteReplicate (sitePk, siteDestination, siteVersionId)'; _stmtList.add_11rb$(element_827); var element_828 = 'CREATE INDEX index_SiteReplicate_siteDestination_sitePending ON SiteReplicate (siteDestination, sitePending)'; _stmtList.add_11rb$(element_828); var element_829 = 'CREATE TABLE IF NOT EXISTS LearnerGroupReplicate ( lgPk BIGINT NOT NULL , lgVersionId BIGINT NOT NULL DEFAULT 0 , lgDestination BIGINT NOT NULL , lgPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lgPk, lgDestination) )'; _stmtList.add_11rb$(element_829); var element_830 = 'CREATE INDEX index_LearnerGroupReplicate_lgPk_lgDestination_lgVersionId ON LearnerGroupReplicate (lgPk, lgDestination, lgVersionId)'; _stmtList.add_11rb$(element_830); var element_831 = 'CREATE INDEX index_LearnerGroupReplicate_lgDestination_lgPending ON LearnerGroupReplicate (lgDestination, lgPending)'; _stmtList.add_11rb$(element_831); var element_832 = 'CREATE TABLE IF NOT EXISTS LearnerGroupMemberReplicate ( lgmPk BIGINT NOT NULL , lgmVersionId BIGINT NOT NULL DEFAULT 0 , lgmDestination BIGINT NOT NULL , lgmPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lgmPk, lgmDestination) )'; _stmtList.add_11rb$(element_832); var element_833 = 'CREATE INDEX index_LearnerGroupMemberReplicate_lgmPk_lgmDestination_lgmVersionId ON LearnerGroupMemberReplicate (lgmPk, lgmDestination, lgmVersionId)'; _stmtList.add_11rb$(element_833); var element_834 = 'CREATE INDEX index_LearnerGroupMemberReplicate_lgmDestination_lgmPending ON LearnerGroupMemberReplicate (lgmDestination, lgmPending)'; _stmtList.add_11rb$(element_834); var element_835 = 'CREATE TABLE IF NOT EXISTS GroupLearningSessionReplicate ( glsPk BIGINT NOT NULL , glsVersionId BIGINT NOT NULL DEFAULT 0 , glsDestination BIGINT NOT NULL , glsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (glsPk, glsDestination) )'; _stmtList.add_11rb$(element_835); var element_836 = 'CREATE INDEX index_GroupLearningSessionReplicate_glsPk_glsDestination_glsVersionId ON GroupLearningSessionReplicate (glsPk, glsDestination, glsVersionId)'; _stmtList.add_11rb$(element_836); var element_837 = 'CREATE INDEX index_GroupLearningSessionReplicate_glsDestination_glsPending ON GroupLearningSessionReplicate (glsDestination, glsPending)'; _stmtList.add_11rb$(element_837); var element_838 = 'CREATE TABLE IF NOT EXISTS SiteTermsReplicate ( stPk BIGINT NOT NULL , stVersionId BIGINT NOT NULL DEFAULT 0 , stDestination BIGINT NOT NULL , stPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (stPk, stDestination) )'; _stmtList.add_11rb$(element_838); var element_839 = 'CREATE INDEX index_SiteTermsReplicate_stPk_stDestination_stVersionId ON SiteTermsReplicate (stPk, stDestination, stVersionId)'; _stmtList.add_11rb$(element_839); var element_840 = 'CREATE INDEX index_SiteTermsReplicate_stDestination_stPending ON SiteTermsReplicate (stDestination, stPending)'; _stmtList.add_11rb$(element_840); var element_841 = 'CREATE TABLE IF NOT EXISTS ClazzContentJoinReplicate ( ccjPk BIGINT NOT NULL , ccjVersionId BIGINT NOT NULL DEFAULT 0 , ccjDestination BIGINT NOT NULL , ccjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ccjPk, ccjDestination) )'; _stmtList.add_11rb$(element_841); var element_842 = 'CREATE INDEX index_ClazzContentJoinReplicate_ccjPk_ccjDestination_ccjVersionId ON ClazzContentJoinReplicate (ccjPk, ccjDestination, ccjVersionId)'; _stmtList.add_11rb$(element_842); var element_843 = 'CREATE INDEX index_ClazzContentJoinReplicate_ccjDestination_ccjPending ON ClazzContentJoinReplicate (ccjDestination, ccjPending)'; _stmtList.add_11rb$(element_843); var element_844 = 'CREATE TABLE IF NOT EXISTS PersonParentJoinReplicate ( ppjPk BIGINT NOT NULL , ppjVersionId BIGINT NOT NULL DEFAULT 0 , ppjDestination BIGINT NOT NULL , ppjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ppjPk, ppjDestination) )'; _stmtList.add_11rb$(element_844); var element_845 = 'CREATE INDEX index_PersonParentJoinReplicate_ppjPk_ppjDestination_ppjVersionId ON PersonParentJoinReplicate (ppjPk, ppjDestination, ppjVersionId)'; _stmtList.add_11rb$(element_845); var element_846 = 'CREATE INDEX index_PersonParentJoinReplicate_ppjDestination_ppjPending ON PersonParentJoinReplicate (ppjDestination, ppjPending)'; _stmtList.add_11rb$(element_846); var element_847 = 'CREATE TABLE IF NOT EXISTS ScopedGrantReplicate ( sgPk BIGINT NOT NULL , sgVersionId BIGINT NOT NULL DEFAULT 0 , sgDestination BIGINT NOT NULL , sgPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sgPk, sgDestination) )'; _stmtList.add_11rb$(element_847); var element_848 = 'CREATE INDEX index_ScopedGrantReplicate_sgPk_sgDestination_sgVersionId ON ScopedGrantReplicate (sgPk, sgDestination, sgVersionId)'; _stmtList.add_11rb$(element_848); var element_849 = 'CREATE INDEX index_ScopedGrantReplicate_sgDestination_sgPending ON ScopedGrantReplicate (sgDestination, sgPending)'; _stmtList.add_11rb$(element_849); var element_850 = 'CREATE TABLE IF NOT EXISTS ErrorReportReplicate ( erPk BIGINT NOT NULL , erVersionId BIGINT NOT NULL DEFAULT 0 , erDestination BIGINT NOT NULL , erPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (erPk, erDestination) )'; _stmtList.add_11rb$(element_850); var element_851 = 'CREATE INDEX index_ErrorReportReplicate_erPk_erDestination_erVersionId ON ErrorReportReplicate (erPk, erDestination, erVersionId)'; _stmtList.add_11rb$(element_851); var element_852 = 'CREATE INDEX index_ErrorReportReplicate_erDestination_erPending ON ErrorReportReplicate (erDestination, erPending)'; _stmtList.add_11rb$(element_852); var element_853 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentReplicate ( caPk BIGINT NOT NULL , caVersionId BIGINT NOT NULL DEFAULT 0 , caDestination BIGINT NOT NULL , caPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (caPk, caDestination) )'; _stmtList.add_11rb$(element_853); var element_854 = 'CREATE INDEX index_ClazzAssignmentReplicate_caPk_caDestination_caVersionId ON ClazzAssignmentReplicate (caPk, caDestination, caVersionId)'; _stmtList.add_11rb$(element_854); var element_855 = 'CREATE INDEX index_ClazzAssignmentReplicate_caDestination_caPending ON ClazzAssignmentReplicate (caDestination, caPending)'; _stmtList.add_11rb$(element_855); var element_856 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoinReplicate ( cacjPk BIGINT NOT NULL , cacjVersionId BIGINT NOT NULL DEFAULT 0 , cacjDestination BIGINT NOT NULL , cacjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cacjPk, cacjDestination) )'; _stmtList.add_11rb$(element_856); var element_857 = 'CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjPk_cacjDestination_cacjVersionId ON ClazzAssignmentContentJoinReplicate (cacjPk, cacjDestination, cacjVersionId)'; _stmtList.add_11rb$(element_857); var element_858 = 'CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjDestination_cacjPending ON ClazzAssignmentContentJoinReplicate (cacjDestination, cacjPending)'; _stmtList.add_11rb$(element_858); var element_859 = 'CREATE TABLE IF NOT EXISTS PersonAuth2Replicate ( paPk BIGINT NOT NULL , paVersionId BIGINT NOT NULL DEFAULT 0 , paDestination BIGINT NOT NULL , paPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (paPk, paDestination) )'; _stmtList.add_11rb$(element_859); var element_860 = 'CREATE INDEX index_PersonAuth2Replicate_paPk_paDestination_paVersionId ON PersonAuth2Replicate (paPk, paDestination, paVersionId)'; _stmtList.add_11rb$(element_860); var element_861 = 'CREATE INDEX index_PersonAuth2Replicate_paDestination_paPending ON PersonAuth2Replicate (paDestination, paPending)'; _stmtList.add_11rb$(element_861); var element_862 = 'CREATE TABLE IF NOT EXISTS UserSessionReplicate ( usPk BIGINT NOT NULL , usVersionId BIGINT NOT NULL DEFAULT 0 , usDestination BIGINT NOT NULL , usPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (usPk, usDestination) )'; _stmtList.add_11rb$(element_862); var element_863 = 'CREATE INDEX index_UserSessionReplicate_usPk_usDestination_usVersionId ON UserSessionReplicate (usPk, usDestination, usVersionId)'; _stmtList.add_11rb$(element_863); var element_864 = 'CREATE INDEX index_UserSessionReplicate_usDestination_usPending ON UserSessionReplicate (usDestination, usPending)'; _stmtList.add_11rb$(element_864); var element_865 = 'CREATE TABLE IF NOT EXISTS CoursePicture ( coursePictureClazzUid BIGINT NOT NULL , coursePictureMasterCsn BIGINT NOT NULL , coursePictureLocalCsn BIGINT NOT NULL , coursePictureLastChangedBy INTEGER NOT NULL , coursePictureLct BIGINT NOT NULL , coursePictureUri TEXT , coursePictureMd5 TEXT , coursePictureFileSize INTEGER NOT NULL , coursePictureTimestamp BIGINT NOT NULL , coursePictureMimeType TEXT , coursePictureActive BOOL NOT NULL , coursePictureUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_865); var element_866 = 'CREATE TABLE IF NOT EXISTS CoursePictureReplicate ( cpPk BIGINT NOT NULL , cpVersionId BIGINT NOT NULL DEFAULT 0 , cpDestination BIGINT NOT NULL , cpPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cpPk, cpDestination) )'; _stmtList.add_11rb$(element_866); var element_867 = 'CREATE INDEX index_CoursePictureReplicate_cpPk_cpDestination_cpVersionId ON CoursePictureReplicate (cpPk, cpDestination, cpVersionId)'; _stmtList.add_11rb$(element_867); var element_868 = 'CREATE INDEX index_CoursePictureReplicate_cpDestination_cpPending ON CoursePictureReplicate (cpDestination, cpPending)'; _stmtList.add_11rb$(element_868); var element_869 = 'CREATE TABLE IF NOT EXISTS ContentEntryPicture ( cepContentEntryUid BIGINT NOT NULL , cepUri TEXT , cepMd5 TEXT , cepFileSize INTEGER NOT NULL , cepTimestamp BIGINT NOT NULL , cepMimeType TEXT , cepActive BOOL NOT NULL , cepUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_869); var element_870 = 'CREATE TABLE IF NOT EXISTS ContentEntryPictureReplicate ( cepPk BIGINT NOT NULL , cepVersionId BIGINT NOT NULL DEFAULT 0 , cepDestination BIGINT NOT NULL , cepPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cepPk, cepDestination) )'; _stmtList.add_11rb$(element_870); var element_871 = 'CREATE INDEX index_ContentEntryPictureReplicate_cepPk_cepDestination_cepVersionId ON ContentEntryPictureReplicate (cepPk, cepDestination, cepVersionId)'; _stmtList.add_11rb$(element_871); var element_872 = 'CREATE INDEX index_ContentEntryPictureReplicate_cepDestination_cepPending ON ContentEntryPictureReplicate (cepDestination, cepPending)'; _stmtList.add_11rb$(element_872); var element_873 = 'CREATE TABLE IF NOT EXISTS Chat ( chatStartDate BIGINT NOT NULL , chatTitle TEXT , chatGroup BOOL NOT NULL , chatLct BIGINT NOT NULL , chatUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_873); var element_874 = 'CREATE TABLE IF NOT EXISTS ChatMember ( chatMemberChatUid BIGINT NOT NULL , chatMemberPersonUid BIGINT NOT NULL , chatMemberJoinedDate BIGINT NOT NULL , chatMemberLeftDate BIGINT NOT NULL , chatMemberLct BIGINT NOT NULL , chatMemberUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_874); var element_875 = 'CREATE TABLE IF NOT EXISTS Message ( messageSenderPersonUid BIGINT NOT NULL , messageTableId INTEGER NOT NULL , messageEntityUid BIGINT NOT NULL , messageText TEXT , messageTimestamp BIGINT NOT NULL , messageClazzUid BIGINT NOT NULL , messageLct BIGINT NOT NULL , messageUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_875); var element_876 = 'CREATE TABLE IF NOT EXISTS MessageReplicate ( messagePk BIGINT NOT NULL , messageVersionId BIGINT NOT NULL DEFAULT 0 , messageDestination BIGINT NOT NULL , messagePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (messagePk, messageDestination) )'; _stmtList.add_11rb$(element_876); var element_877 = 'CREATE INDEX index_MessageReplicate_messagePk_messageDestination_messageVersionId ON MessageReplicate (messagePk, messageDestination, messageVersionId)'; _stmtList.add_11rb$(element_877); var element_878 = 'CREATE INDEX index_MessageReplicate_messageDestination_messagePending ON MessageReplicate (messageDestination, messagePending)'; _stmtList.add_11rb$(element_878); var element_879 = 'CREATE TABLE IF NOT EXISTS ChatReplicate ( chatPk BIGINT NOT NULL , chatVersionId BIGINT NOT NULL DEFAULT 0 , chatDestination BIGINT NOT NULL , chatPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (chatPk, chatDestination) )'; _stmtList.add_11rb$(element_879); var element_880 = 'CREATE INDEX index_ChatReplicate_chatPk_chatDestination_chatVersionId ON ChatReplicate (chatPk, chatDestination, chatVersionId)'; _stmtList.add_11rb$(element_880); var element_881 = 'CREATE INDEX index_ChatReplicate_chatDestination_chatPending ON ChatReplicate (chatDestination, chatPending)'; _stmtList.add_11rb$(element_881); var element_882 = 'CREATE TABLE IF NOT EXISTS ChatMemberReplicate ( chatMemberPk BIGINT NOT NULL , chatMemberVersionId BIGINT NOT NULL DEFAULT 0 , chatMemberDestination BIGINT NOT NULL , chatMemberPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (chatMemberPk, chatMemberDestination) )'; _stmtList.add_11rb$(element_882); var element_883 = 'CREATE INDEX index_ChatMemberReplicate_chatMemberPk_chatMemberDestination_chatMemberVersionId ON ChatMemberReplicate (chatMemberPk, chatMemberDestination, chatMemberVersionId)'; _stmtList.add_11rb$(element_883); var element_884 = 'CREATE INDEX index_ChatMemberReplicate_chatMemberDestination_chatMemberPending ON ChatMemberReplicate (chatMemberDestination, chatMemberPending)'; _stmtList.add_11rb$(element_884); var element_885 = 'CREATE TABLE IF NOT EXISTS MessageRead ( messageReadPersonUid BIGINT NOT NULL , messageReadMessageUid BIGINT NOT NULL , messageReadEntityUid BIGINT NOT NULL , messageReadLct BIGINT NOT NULL , messageReadUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_885); var element_886 = 'CREATE TABLE IF NOT EXISTS MessageReadReplicate ( messageReadPk BIGINT NOT NULL , messageReadVersionId BIGINT NOT NULL DEFAULT 0 , messageReadDestination BIGINT NOT NULL , messageReadPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (messageReadPk, messageReadDestination) )'; _stmtList.add_11rb$(element_886); var element_887 = 'CREATE INDEX index_MessageReadReplicate_messageReadPk_messageReadDestination_messageReadVersionId ON MessageReadReplicate (messageReadPk, messageReadDestination, messageReadVersionId)'; _stmtList.add_11rb$(element_887); var element_888 = 'CREATE INDEX index_MessageReadReplicate_messageReadDestination_messageReadPending ON MessageReadReplicate (messageReadDestination, messageReadPending)'; _stmtList.add_11rb$(element_888); var element_889 = 'CREATE TABLE IF NOT EXISTS CourseDiscussion ( courseDiscussionTitle TEXT , courseDiscussionDesc TEXT , courseDiscussionClazzUid BIGINT NOT NULL , courseDiscussionActive BOOL NOT NULL , courseDiscussionLct BIGINT NOT NULL , courseDiscussionUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_889); var element_890 = 'CREATE TABLE IF NOT EXISTS CourseDiscussionReplicate ( courseDiscussionPk BIGINT NOT NULL , courseDiscussionVersionId BIGINT NOT NULL DEFAULT 0 , courseDiscussionDestination BIGINT NOT NULL , courseDiscussionPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (courseDiscussionPk, courseDiscussionDestination) )'; _stmtList.add_11rb$(element_890); var element_891 = 'CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionPk_courseDiscussionDestination_courseDiscussionVersionId ON CourseDiscussionReplicate (courseDiscussionPk, courseDiscussionDestination, courseDiscussionVersionId)'; _stmtList.add_11rb$(element_891); var element_892 = 'CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionDestination_courseDiscussionPending ON CourseDiscussionReplicate (courseDiscussionDestination, courseDiscussionPending)'; _stmtList.add_11rb$(element_892); var element_893 = 'CREATE TABLE IF NOT EXISTS DiscussionTopic ( discussionTopicTitle TEXT , discussionTopicDesc TEXT , discussionTopicStartDate BIGINT NOT NULL , discussionTopicCourseDiscussionUid BIGINT NOT NULL , discussionTopicVisible BOOL NOT NULL , discussionTopicArchive BOOL NOT NULL , discussionTopicIndex INTEGER NOT NULL , discussionTopicClazzUid BIGINT NOT NULL , discussionTopicLct BIGINT NOT NULL , discussionTopicUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_893); var element_894 = 'CREATE TABLE IF NOT EXISTS DiscussionTopicReplicate ( discussionTopicPk BIGINT NOT NULL , discussionTopicVersionId BIGINT NOT NULL DEFAULT 0 , discussionTopicDestination BIGINT NOT NULL , discussionTopicPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (discussionTopicPk, discussionTopicDestination) )'; _stmtList.add_11rb$(element_894); var element_895 = 'CREATE INDEX index_DiscussionTopicReplicate_discussionTopicPk_discussionTopicDestination_discussionTopicVersionId ON DiscussionTopicReplicate (discussionTopicPk, discussionTopicDestination, discussionTopicVersionId)'; _stmtList.add_11rb$(element_895); var element_896 = 'CREATE INDEX index_DiscussionTopicReplicate_discussionTopicDestination_discussionTopicPending ON DiscussionTopicReplicate (discussionTopicDestination, discussionTopicPending)'; _stmtList.add_11rb$(element_896); var element_897 = 'CREATE TABLE IF NOT EXISTS DiscussionPost ( discussionPostTitle TEXT , discussionPostMessage TEXT , discussionPostStartDate BIGINT NOT NULL , discussionPostDiscussionTopicUid BIGINT NOT NULL , discussionPostVisible BOOL NOT NULL , discussionPostArchive BOOL NOT NULL , discussionPostStartedPersonUid BIGINT NOT NULL , discussionPostClazzUid BIGINT NOT NULL , discussionPostLct BIGINT NOT NULL , discussionPostUid BIGSERIAL PRIMARY KEY NOT NULL )'; _stmtList.add_11rb$(element_897); var element_898 = 'CREATE TABLE IF NOT EXISTS DiscussionPostReplicate ( discussionPostPk BIGINT NOT NULL , discussionPostVersionId BIGINT NOT NULL DEFAULT 0 , discussionPostDestination BIGINT NOT NULL , discussionPostPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (discussionPostPk, discussionPostDestination) )'; _stmtList.add_11rb$(element_898); var element_899 = 'CREATE INDEX index_DiscussionPostReplicate_discussionPostPk_discussionPostDestination_discussionPostVersionId ON DiscussionPostReplicate (discussionPostPk, discussionPostDestination, discussionPostVersionId)'; _stmtList.add_11rb$(element_899); var element_900 = 'CREATE INDEX index_DiscussionPostReplicate_discussionPostDestination_discussionPostPending ON DiscussionPostReplicate (discussionPostDestination, discussionPostPending)'; _stmtList.add_11rb$(element_900); var element_901 = ' CREATE OR REPLACE FUNCTION ch_upd_14_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (14, NEW.clazzLogUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_901); var element_902 = ' CREATE TRIGGER ch_upd_14_trig AFTER UPDATE OR INSERT ON ClazzLog FOR EACH ROW EXECUTE PROCEDURE ch_upd_14_fn(); '; _stmtList.add_11rb$(element_902); var element_903 = ' CREATE OR REPLACE FUNCTION ch_del_14_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (14, OLD.clazzLogUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_903); var element_904 = ' CREATE TRIGGER ch_del_14_trig AFTER DELETE ON ClazzLog FOR EACH ROW EXECUTE PROCEDURE ch_del_14_fn(); '; _stmtList.add_11rb$(element_904); var element_905 = 'CREATE VIEW ClazzLog_ReceiveView AS SELECT ClazzLog.*, ClazzLogReplicate.* FROM ClazzLog LEFT JOIN ClazzLogReplicate ON ClazzLogReplicate.clPk = ClazzLog.clazzLogUid '; _stmtList.add_11rb$(element_905); var element_906 = "CREATE OR REPLACE FUNCTION clazzlog_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzLog(clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES (NEW.clazzLogUid, NEW.clazzLogClazzUid, NEW.logDate, NEW.timeRecorded, NEW.clazzLogDone, NEW.cancellationNote, NEW.clazzLogCancelled, NEW.clazzLogNumPresent, NEW.clazzLogNumAbsent, NEW.clazzLogNumPartial, NEW.clazzLogScheduleUid, NEW.clazzLogStatusFlag, NEW.clazzLogMSQN, NEW.clazzLogLCSN, NEW.clazzLogLCB, NEW.clazzLogLastChangedTime) ON CONFLICT (clazzLogUid) DO UPDATE SET clazzLogClazzUid = EXCLUDED.clazzLogClazzUid, logDate = EXCLUDED.logDate, timeRecorded = EXCLUDED.timeRecorded, clazzLogDone = EXCLUDED.clazzLogDone, cancellationNote = EXCLUDED.cancellationNote, clazzLogCancelled = EXCLUDED.clazzLogCancelled, clazzLogNumPresent = EXCLUDED.clazzLogNumPresent, clazzLogNumAbsent = EXCLUDED.clazzLogNumAbsent, clazzLogNumPartial = EXCLUDED.clazzLogNumPartial, clazzLogScheduleUid = EXCLUDED.clazzLogScheduleUid, clazzLogStatusFlag = EXCLUDED.clazzLogStatusFlag, clazzLogMSQN = EXCLUDED.clazzLogMSQN, clazzLogLCSN = EXCLUDED.clazzLogLCSN, clazzLogLCB = EXCLUDED.clazzLogLCB, clazzLogLastChangedTime = EXCLUDED.clazzLogLastChangedTime ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_906); var element_907 = ' CREATE TRIGGER clazzlog_remote_insert_trig INSTEAD OF INSERT ON ClazzLog_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzlog_remote_insert_fn() '; _stmtList.add_11rb$(element_907); var element_908 = ' CREATE OR REPLACE FUNCTION ch_upd_15_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (15, NEW.clazzLogAttendanceRecordUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_908); var element_909 = ' CREATE TRIGGER ch_upd_15_trig AFTER UPDATE OR INSERT ON ClazzLogAttendanceRecord FOR EACH ROW EXECUTE PROCEDURE ch_upd_15_fn(); '; _stmtList.add_11rb$(element_909); var element_910 = ' CREATE OR REPLACE FUNCTION ch_del_15_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (15, OLD.clazzLogAttendanceRecordUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_910); var element_911 = ' CREATE TRIGGER ch_del_15_trig AFTER DELETE ON ClazzLogAttendanceRecord FOR EACH ROW EXECUTE PROCEDURE ch_del_15_fn(); '; _stmtList.add_11rb$(element_911); var element_912 = 'CREATE VIEW ClazzLogAttendanceRecord_ReceiveView AS SELECT ClazzLogAttendanceRecord.*, ClazzLogAttendanceRecordReplicate.* FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLogAttendanceRecordReplicate ON ClazzLogAttendanceRecordReplicate.clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid '; _stmtList.add_11rb$(element_912); var element_913 = "CREATE OR REPLACE FUNCTION clazzlogattendancerecord_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzLogAttendanceRecord(clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES (NEW.clazzLogAttendanceRecordUid, NEW.clazzLogAttendanceRecordClazzLogUid, NEW.clazzLogAttendanceRecordPersonUid, NEW.attendanceStatus, NEW.clazzLogAttendanceRecordMasterChangeSeqNum, NEW.clazzLogAttendanceRecordLocalChangeSeqNum, NEW.clazzLogAttendanceRecordLastChangedBy, NEW.clazzLogAttendanceRecordLastChangedTime) ON CONFLICT (clazzLogAttendanceRecordUid) DO UPDATE SET clazzLogAttendanceRecordClazzLogUid = EXCLUDED.clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid = EXCLUDED.clazzLogAttendanceRecordPersonUid, attendanceStatus = EXCLUDED.attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy = EXCLUDED.clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime = EXCLUDED.clazzLogAttendanceRecordLastChangedTime ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_913); var element_914 = ' CREATE TRIGGER clazzlogattendancerecord_remote_insert_trig INSTEAD OF INSERT ON ClazzLogAttendanceRecord_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzlogattendancerecord_remote_insert_fn() '; _stmtList.add_11rb$(element_914); var element_915 = ' CREATE OR REPLACE FUNCTION ch_upd_21_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (21, NEW.scheduleUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_915); var element_916 = ' CREATE TRIGGER ch_upd_21_trig AFTER UPDATE OR INSERT ON Schedule FOR EACH ROW EXECUTE PROCEDURE ch_upd_21_fn(); '; _stmtList.add_11rb$(element_916); var element_917 = ' CREATE OR REPLACE FUNCTION ch_del_21_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (21, OLD.scheduleUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_917); var element_918 = ' CREATE TRIGGER ch_del_21_trig AFTER DELETE ON Schedule FOR EACH ROW EXECUTE PROCEDURE ch_del_21_fn(); '; _stmtList.add_11rb$(element_918); var element_919 = 'CREATE VIEW Schedule_ReceiveView AS SELECT Schedule.*, ScheduleReplicate.* FROM Schedule LEFT JOIN ScheduleReplicate ON ScheduleReplicate.schedulePk = Schedule.scheduleUid '; _stmtList.add_11rb$(element_919); var element_920 = "CREATE OR REPLACE FUNCTION schedule_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Schedule(scheduleUid, sceduleStartTime, scheduleEndTime, scheduleDay, scheduleMonth, scheduleFrequency, umCalendarUid, scheduleClazzUid, scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum, scheduleLastChangedBy, scheduleLastChangedTime, scheduleActive) VALUES (NEW.scheduleUid, NEW.sceduleStartTime, NEW.scheduleEndTime, NEW.scheduleDay, NEW.scheduleMonth, NEW.scheduleFrequency, NEW.umCalendarUid, NEW.scheduleClazzUid, NEW.scheduleMasterChangeSeqNum, NEW.scheduleLocalChangeSeqNum, NEW.scheduleLastChangedBy, NEW.scheduleLastChangedTime, NEW.scheduleActive) ON CONFLICT (scheduleUid) DO UPDATE SET sceduleStartTime = EXCLUDED.sceduleStartTime, scheduleEndTime = EXCLUDED.scheduleEndTime, scheduleDay = EXCLUDED.scheduleDay, scheduleMonth = EXCLUDED.scheduleMonth, scheduleFrequency = EXCLUDED.scheduleFrequency, umCalendarUid = EXCLUDED.umCalendarUid, scheduleClazzUid = EXCLUDED.scheduleClazzUid, scheduleMasterChangeSeqNum = EXCLUDED.scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum = EXCLUDED.scheduleLocalChangeSeqNum, scheduleLastChangedBy = EXCLUDED.scheduleLastChangedBy, scheduleLastChangedTime = EXCLUDED.scheduleLastChangedTime, scheduleActive = EXCLUDED.scheduleActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_920); var element_921 = ' CREATE TRIGGER schedule_remote_insert_trig INSTEAD OF INSERT ON Schedule_ReceiveView FOR EACH ROW EXECUTE PROCEDURE schedule_remote_insert_fn() '; _stmtList.add_11rb$(element_921); var element_922 = ' CREATE OR REPLACE FUNCTION ch_upd_28_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (28, NEW.umCalendarUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_922); var element_923 = ' CREATE TRIGGER ch_upd_28_trig AFTER UPDATE OR INSERT ON HolidayCalendar FOR EACH ROW EXECUTE PROCEDURE ch_upd_28_fn(); '; _stmtList.add_11rb$(element_923); var element_924 = ' CREATE OR REPLACE FUNCTION ch_del_28_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (28, OLD.umCalendarUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_924); var element_925 = ' CREATE TRIGGER ch_del_28_trig AFTER DELETE ON HolidayCalendar FOR EACH ROW EXECUTE PROCEDURE ch_del_28_fn(); '; _stmtList.add_11rb$(element_925); var element_926 = 'CREATE VIEW HolidayCalendar_ReceiveView AS SELECT HolidayCalendar.*, HolidayCalendarReplicate.* FROM HolidayCalendar LEFT JOIN HolidayCalendarReplicate ON HolidayCalendarReplicate.hcPk = HolidayCalendar.umCalendarUid '; _stmtList.add_11rb$(element_926); var element_927 = "CREATE OR REPLACE FUNCTION holidaycalendar_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO HolidayCalendar(umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES (NEW.umCalendarUid, NEW.umCalendarName, NEW.umCalendarCategory, NEW.umCalendarActive, NEW.umCalendarMasterChangeSeqNum, NEW.umCalendarLocalChangeSeqNum, NEW.umCalendarLastChangedBy, NEW.umCalendarLct) ON CONFLICT (umCalendarUid) DO UPDATE SET umCalendarName = EXCLUDED.umCalendarName, umCalendarCategory = EXCLUDED.umCalendarCategory, umCalendarActive = EXCLUDED.umCalendarActive, umCalendarMasterChangeSeqNum = EXCLUDED.umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum = EXCLUDED.umCalendarLocalChangeSeqNum, umCalendarLastChangedBy = EXCLUDED.umCalendarLastChangedBy, umCalendarLct = EXCLUDED.umCalendarLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_927); var element_928 = ' CREATE TRIGGER holidaycalendar_remote_insert_trig INSTEAD OF INSERT ON HolidayCalendar_ReceiveView FOR EACH ROW EXECUTE PROCEDURE holidaycalendar_remote_insert_fn() '; _stmtList.add_11rb$(element_928); var element_929 = ' CREATE OR REPLACE FUNCTION ch_upd_99_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (99, NEW.holUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_929); var element_930 = ' CREATE TRIGGER ch_upd_99_trig AFTER UPDATE OR INSERT ON Holiday FOR EACH ROW EXECUTE PROCEDURE ch_upd_99_fn(); '; _stmtList.add_11rb$(element_930); var element_931 = ' CREATE OR REPLACE FUNCTION ch_del_99_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (99, OLD.holUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_931); var element_932 = ' CREATE TRIGGER ch_del_99_trig AFTER DELETE ON Holiday FOR EACH ROW EXECUTE PROCEDURE ch_del_99_fn(); '; _stmtList.add_11rb$(element_932); var element_933 = 'CREATE VIEW Holiday_ReceiveView AS SELECT Holiday.*, HolidayReplicate.* FROM Holiday LEFT JOIN HolidayReplicate ON HolidayReplicate.holidayPk = Holiday.holUid '; _stmtList.add_11rb$(element_933); var element_934 = "CREATE OR REPLACE FUNCTION holiday_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Holiday(holUid, holMasterCsn, holLocalCsn, holLastModBy, holLct, holActive, holHolidayCalendarUid, holStartTime, holEndTime, holName) VALUES (NEW.holUid, NEW.holMasterCsn, NEW.holLocalCsn, NEW.holLastModBy, NEW.holLct, NEW.holActive, NEW.holHolidayCalendarUid, NEW.holStartTime, NEW.holEndTime, NEW.holName) ON CONFLICT (holUid) DO UPDATE SET holMasterCsn = EXCLUDED.holMasterCsn, holLocalCsn = EXCLUDED.holLocalCsn, holLastModBy = EXCLUDED.holLastModBy, holLct = EXCLUDED.holLct, holActive = EXCLUDED.holActive, holHolidayCalendarUid = EXCLUDED.holHolidayCalendarUid, holStartTime = EXCLUDED.holStartTime, holEndTime = EXCLUDED.holEndTime, holName = EXCLUDED.holName ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_934); var element_935 = ' CREATE TRIGGER holiday_remote_insert_trig INSTEAD OF INSERT ON Holiday_ReceiveView FOR EACH ROW EXECUTE PROCEDURE holiday_remote_insert_fn() '; _stmtList.add_11rb$(element_935); var element_936 = ' CREATE OR REPLACE FUNCTION ch_upd_9_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (9, NEW.personUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_936); var element_937 = ' CREATE TRIGGER ch_upd_9_trig AFTER UPDATE OR INSERT ON Person FOR EACH ROW EXECUTE PROCEDURE ch_upd_9_fn(); '; _stmtList.add_11rb$(element_937); var element_938 = ' CREATE OR REPLACE FUNCTION ch_del_9_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (9, OLD.personUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_938); var element_939 = ' CREATE TRIGGER ch_del_9_trig AFTER DELETE ON Person FOR EACH ROW EXECUTE PROCEDURE ch_del_9_fn(); '; _stmtList.add_11rb$(element_939); var element_940 = 'CREATE VIEW Person_ReceiveView AS SELECT Person.*, PersonReplicate.* FROM Person LEFT JOIN PersonReplicate ON PersonReplicate.personPk = Person.personUid '; _stmtList.add_11rb$(element_940); var element_941 = "CREATE OR REPLACE FUNCTION person_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Person(personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES (NEW.personUid, NEW.username, NEW.firstNames, NEW.lastName, NEW.emailAddr, NEW.phoneNum, NEW.gender, NEW.active, NEW.admin, NEW.personNotes, NEW.fatherName, NEW.fatherNumber, NEW.motherName, NEW.motherNum, NEW.dateOfBirth, NEW.personAddress, NEW.personOrgId, NEW.personGroupUid, NEW.personMasterChangeSeqNum, NEW.personLocalChangeSeqNum, NEW.personLastChangedBy, NEW.personLct, NEW.personCountry, NEW.personType) ON CONFLICT (personUid) DO UPDATE SET username = EXCLUDED.username, firstNames = EXCLUDED.firstNames, lastName = EXCLUDED.lastName, emailAddr = EXCLUDED.emailAddr, phoneNum = EXCLUDED.phoneNum, gender = EXCLUDED.gender, active = EXCLUDED.active, admin = EXCLUDED.admin, personNotes = EXCLUDED.personNotes, fatherName = EXCLUDED.fatherName, fatherNumber = EXCLUDED.fatherNumber, motherName = EXCLUDED.motherName, motherNum = EXCLUDED.motherNum, dateOfBirth = EXCLUDED.dateOfBirth, personAddress = EXCLUDED.personAddress, personOrgId = EXCLUDED.personOrgId, personGroupUid = EXCLUDED.personGroupUid, personMasterChangeSeqNum = EXCLUDED.personMasterChangeSeqNum, personLocalChangeSeqNum = EXCLUDED.personLocalChangeSeqNum, personLastChangedBy = EXCLUDED.personLastChangedBy, personLct = EXCLUDED.personLct, personCountry = EXCLUDED.personCountry, personType = EXCLUDED.personType ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_941); var element_942 = ' CREATE TRIGGER person_remote_insert_trig INSTEAD OF INSERT ON Person_ReceiveView FOR EACH ROW EXECUTE PROCEDURE person_remote_insert_fn() '; _stmtList.add_11rb$(element_942); var element_943 = ' CREATE OR REPLACE FUNCTION ch_upd_6_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (6, NEW.clazzUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_943); var element_944 = ' CREATE TRIGGER ch_upd_6_trig AFTER UPDATE OR INSERT ON Clazz FOR EACH ROW EXECUTE PROCEDURE ch_upd_6_fn(); '; _stmtList.add_11rb$(element_944); var element_945 = ' CREATE OR REPLACE FUNCTION ch_del_6_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (6, OLD.clazzUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_945); var element_946 = ' CREATE TRIGGER ch_del_6_trig AFTER DELETE ON Clazz FOR EACH ROW EXECUTE PROCEDURE ch_del_6_fn(); '; _stmtList.add_11rb$(element_946); var element_947 = 'CREATE VIEW Clazz_ReceiveView AS SELECT Clazz.*, ClazzReplicate.* FROM Clazz LEFT JOIN ClazzReplicate ON ClazzReplicate.clazzPk = Clazz.clazzUid '; _stmtList.add_11rb$(element_947); var element_948 = "CREATE OR REPLACE FUNCTION clazz_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Clazz(clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES (NEW.clazzUid, NEW.clazzName, NEW.clazzDesc, NEW.attendanceAverage, NEW.clazzHolidayUMCalendarUid, NEW.clazzScheuleUMCalendarUid, NEW.isClazzActive, NEW.clazzLocationUid, NEW.clazzStartTime, NEW.clazzEndTime, NEW.clazzFeatures, NEW.clazzSchoolUid, NEW.clazzEnrolmentPolicy, NEW.clazzTerminologyUid, NEW.clazzMasterChangeSeqNum, NEW.clazzLocalChangeSeqNum, NEW.clazzLastChangedBy, NEW.clazzLct, NEW.clazzTimeZone, NEW.clazzStudentsPersonGroupUid, NEW.clazzTeachersPersonGroupUid, NEW.clazzPendingStudentsPersonGroupUid, NEW.clazzParentsPersonGroupUid, NEW.clazzCode) ON CONFLICT (clazzUid) DO UPDATE SET clazzName = EXCLUDED.clazzName, clazzDesc = EXCLUDED.clazzDesc, attendanceAverage = EXCLUDED.attendanceAverage, clazzHolidayUMCalendarUid = EXCLUDED.clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid = EXCLUDED.clazzScheuleUMCalendarUid, isClazzActive = EXCLUDED.isClazzActive, clazzLocationUid = EXCLUDED.clazzLocationUid, clazzStartTime = EXCLUDED.clazzStartTime, clazzEndTime = EXCLUDED.clazzEndTime, clazzFeatures = EXCLUDED.clazzFeatures, clazzSchoolUid = EXCLUDED.clazzSchoolUid, clazzEnrolmentPolicy = EXCLUDED.clazzEnrolmentPolicy, clazzTerminologyUid = EXCLUDED.clazzTerminologyUid, clazzMasterChangeSeqNum = EXCLUDED.clazzMasterChangeSeqNum, clazzLocalChangeSeqNum = EXCLUDED.clazzLocalChangeSeqNum, clazzLastChangedBy = EXCLUDED.clazzLastChangedBy, clazzLct = EXCLUDED.clazzLct, clazzTimeZone = EXCLUDED.clazzTimeZone, clazzStudentsPersonGroupUid = EXCLUDED.clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid = EXCLUDED.clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid = EXCLUDED.clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid = EXCLUDED.clazzParentsPersonGroupUid, clazzCode = EXCLUDED.clazzCode ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_948); var element_949 = ' CREATE TRIGGER clazz_remote_insert_trig INSTEAD OF INSERT ON Clazz_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazz_remote_insert_fn() '; _stmtList.add_11rb$(element_949); var element_950 = ' CREATE OR REPLACE FUNCTION ch_upd_65_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (65, NEW.clazzEnrolmentUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_950); var element_951 = ' CREATE TRIGGER ch_upd_65_trig AFTER UPDATE OR INSERT ON ClazzEnrolment FOR EACH ROW EXECUTE PROCEDURE ch_upd_65_fn(); '; _stmtList.add_11rb$(element_951); var element_952 = ' CREATE OR REPLACE FUNCTION ch_del_65_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (65, OLD.clazzEnrolmentUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_952); var element_953 = ' CREATE TRIGGER ch_del_65_trig AFTER DELETE ON ClazzEnrolment FOR EACH ROW EXECUTE PROCEDURE ch_del_65_fn(); '; _stmtList.add_11rb$(element_953); var element_954 = 'CREATE VIEW ClazzEnrolment_ReceiveView AS SELECT ClazzEnrolment.*, ClazzEnrolmentReplicate.* FROM ClazzEnrolment LEFT JOIN ClazzEnrolmentReplicate ON ClazzEnrolmentReplicate.cePk = ClazzEnrolment.clazzEnrolmentUid '; _stmtList.add_11rb$(element_954); var element_955 = "CREATE OR REPLACE FUNCTION clazzenrolment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzEnrolment(clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct) VALUES (NEW.clazzEnrolmentUid, NEW.clazzEnrolmentPersonUid, NEW.clazzEnrolmentClazzUid, NEW.clazzEnrolmentDateJoined, NEW.clazzEnrolmentDateLeft, NEW.clazzEnrolmentRole, NEW.clazzEnrolmentAttendancePercentage, NEW.clazzEnrolmentActive, NEW.clazzEnrolmentLeavingReasonUid, NEW.clazzEnrolmentOutcome, NEW.clazzEnrolmentLocalChangeSeqNum, NEW.clazzEnrolmentMasterChangeSeqNum, NEW.clazzEnrolmentLastChangedBy, NEW.clazzEnrolmentLct) ON CONFLICT (clazzEnrolmentUid) DO UPDATE SET clazzEnrolmentPersonUid = EXCLUDED.clazzEnrolmentPersonUid, clazzEnrolmentClazzUid = EXCLUDED.clazzEnrolmentClazzUid, clazzEnrolmentDateJoined = EXCLUDED.clazzEnrolmentDateJoined, clazzEnrolmentDateLeft = EXCLUDED.clazzEnrolmentDateLeft, clazzEnrolmentRole = EXCLUDED.clazzEnrolmentRole, clazzEnrolmentAttendancePercentage = EXCLUDED.clazzEnrolmentAttendancePercentage, clazzEnrolmentActive = EXCLUDED.clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid = EXCLUDED.clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome = EXCLUDED.clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum = EXCLUDED.clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum = EXCLUDED.clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy = EXCLUDED.clazzEnrolmentLastChangedBy, clazzEnrolmentLct = EXCLUDED.clazzEnrolmentLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_955); var element_956 = ' CREATE TRIGGER clazzenrolment_remote_insert_trig INSTEAD OF INSERT ON ClazzEnrolment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzenrolment_remote_insert_fn() '; _stmtList.add_11rb$(element_956); var element_957 = ' CREATE OR REPLACE FUNCTION ch_upd_410_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (410, NEW.leavingReasonUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_957); var element_958 = ' CREATE TRIGGER ch_upd_410_trig AFTER UPDATE OR INSERT ON LeavingReason FOR EACH ROW EXECUTE PROCEDURE ch_upd_410_fn(); '; _stmtList.add_11rb$(element_958); var element_959 = ' CREATE OR REPLACE FUNCTION ch_del_410_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (410, OLD.leavingReasonUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_959); var element_960 = ' CREATE TRIGGER ch_del_410_trig AFTER DELETE ON LeavingReason FOR EACH ROW EXECUTE PROCEDURE ch_del_410_fn(); '; _stmtList.add_11rb$(element_960); var element_961 = 'CREATE VIEW LeavingReason_ReceiveView AS SELECT LeavingReason.*, LeavingReasonReplicate.* FROM LeavingReason LEFT JOIN LeavingReasonReplicate ON LeavingReasonReplicate.lrPk = LeavingReason.leavingReasonUid '; _stmtList.add_11rb$(element_961); var element_962 = "CREATE OR REPLACE FUNCTION leavingreason_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LeavingReason(leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES (NEW.leavingReasonUid, NEW.leavingReasonTitle, NEW.leavingReasonMCSN, NEW.leavingReasonCSN, NEW.leavingReasonLCB, NEW.leavingReasonLct) ON CONFLICT (leavingReasonUid) DO UPDATE SET leavingReasonTitle = EXCLUDED.leavingReasonTitle, leavingReasonMCSN = EXCLUDED.leavingReasonMCSN, leavingReasonCSN = EXCLUDED.leavingReasonCSN, leavingReasonLCB = EXCLUDED.leavingReasonLCB, leavingReasonLct = EXCLUDED.leavingReasonLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_962); var element_963 = ' CREATE TRIGGER leavingreason_remote_insert_trig INSTEAD OF INSERT ON LeavingReason_ReceiveView FOR EACH ROW EXECUTE PROCEDURE leavingreason_remote_insert_fn() '; _stmtList.add_11rb$(element_963); var element_964 = ' CREATE OR REPLACE FUNCTION ch_upd_42_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (42, NEW.contentEntryUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_964); var element_965 = ' CREATE TRIGGER ch_upd_42_trig AFTER UPDATE OR INSERT ON ContentEntry FOR EACH ROW EXECUTE PROCEDURE ch_upd_42_fn(); '; _stmtList.add_11rb$(element_965); var element_966 = ' CREATE OR REPLACE FUNCTION ch_del_42_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (42, OLD.contentEntryUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_966); var element_967 = ' CREATE TRIGGER ch_del_42_trig AFTER DELETE ON ContentEntry FOR EACH ROW EXECUTE PROCEDURE ch_del_42_fn(); '; _stmtList.add_11rb$(element_967); var element_968 = 'CREATE VIEW ContentEntry_ReceiveView AS SELECT ContentEntry.*, ContentEntryReplicate.* FROM ContentEntry LEFT JOIN ContentEntryReplicate ON ContentEntryReplicate.cePk = ContentEntry.contentEntryUid '; _stmtList.add_11rb$(element_968); var element_969 = trimMargin("\n |CREATE OR REPLACE FUNCTION contententry_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntry(contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES (NEW.contentEntryUid, NEW.title, NEW.description, NEW.entryId, NEW.author, NEW.publisher, NEW.licenseType, NEW.licenseName, NEW.licenseUrl, NEW.sourceUrl, NEW.thumbnailUrl, NEW.lastModified, NEW.primaryLanguageUid, NEW.languageVariantUid, NEW.contentFlags, NEW.leaf, NEW.publik, NEW.ceInactive, NEW.completionCriteria, NEW.minScore, NEW.contentTypeFlag, NEW.contentOwner, NEW.contentEntryLocalChangeSeqNum, NEW.contentEntryMasterChangeSeqNum, NEW.contentEntryLastChangedBy, NEW.contentEntryLct) ON CONFLICT (contentEntryUid) DO UPDATE SET title = EXCLUDED.title, description = EXCLUDED.description, entryId = EXCLUDED.entryId, author = EXCLUDED.author, publisher = EXCLUDED.publisher, licenseType = EXCLUDED.licenseType, licenseName = EXCLUDED.licenseName, licenseUrl = EXCLUDED.licenseUrl, sourceUrl = EXCLUDED.sourceUrl, thumbnailUrl = EXCLUDED.thumbnailUrl, lastModified = EXCLUDED.lastModified, primaryLanguageUid = EXCLUDED.primaryLanguageUid, languageVariantUid = EXCLUDED.languageVariantUid, contentFlags = EXCLUDED.contentFlags, leaf = EXCLUDED.leaf, publik = EXCLUDED.publik, ceInactive = EXCLUDED.ceInactive, completionCriteria = EXCLUDED.completionCriteria, minScore = EXCLUDED.minScore, contentTypeFlag = EXCLUDED.contentTypeFlag, contentOwner = EXCLUDED.contentOwner, contentEntryLocalChangeSeqNum = EXCLUDED.contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum = EXCLUDED.contentEntryMasterChangeSeqNum, contentEntryLastChangedBy = EXCLUDED.contentEntryLastChangedBy, contentEntryLct = EXCLUDED.contentEntryLct\n |; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql\n "); _stmtList.add_11rb$(element_969); var element_970 = ' CREATE TRIGGER contententry_remote_insert_trig INSTEAD OF INSERT ON ContentEntry_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententry_remote_insert_fn() '; _stmtList.add_11rb$(element_970); var element_971 = ' CREATE OR REPLACE FUNCTION ch_upd_3_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (3, NEW.ceccjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_971); var element_972 = ' CREATE TRIGGER ch_upd_3_trig AFTER UPDATE OR INSERT ON ContentEntryContentCategoryJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_3_fn(); '; _stmtList.add_11rb$(element_972); var element_973 = ' CREATE OR REPLACE FUNCTION ch_del_3_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (3, OLD.ceccjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_973); var element_974 = ' CREATE TRIGGER ch_del_3_trig AFTER DELETE ON ContentEntryContentCategoryJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_3_fn(); '; _stmtList.add_11rb$(element_974); var element_975 = 'CREATE VIEW ContentEntryContentCategoryJoin_ReceiveView AS SELECT ContentEntryContentCategoryJoin.*, ContentEntryContentCategoryJoinReplicate.* FROM ContentEntryContentCategoryJoin LEFT JOIN ContentEntryContentCategoryJoinReplicate ON ContentEntryContentCategoryJoinReplicate.ceccjPk = ContentEntryContentCategoryJoin.ceccjUid '; _stmtList.add_11rb$(element_975); var element_976 = "CREATE OR REPLACE FUNCTION contententrycontentcategoryjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryContentCategoryJoin(ceccjUid, ceccjContentEntryUid, ceccjContentCategoryUid, ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum, ceccjLastChangedBy, ceccjLct) VALUES (NEW.ceccjUid, NEW.ceccjContentEntryUid, NEW.ceccjContentCategoryUid, NEW.ceccjLocalChangeSeqNum, NEW.ceccjMasterChangeSeqNum, NEW.ceccjLastChangedBy, NEW.ceccjLct) ON CONFLICT (ceccjUid) DO UPDATE SET ceccjContentEntryUid = EXCLUDED.ceccjContentEntryUid, ceccjContentCategoryUid = EXCLUDED.ceccjContentCategoryUid, ceccjLocalChangeSeqNum = EXCLUDED.ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum = EXCLUDED.ceccjMasterChangeSeqNum, ceccjLastChangedBy = EXCLUDED.ceccjLastChangedBy, ceccjLct = EXCLUDED.ceccjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_976); var element_977 = ' CREATE TRIGGER contententrycontentcategoryjoin_remote_insert_trig INSTEAD OF INSERT ON ContentEntryContentCategoryJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententrycontentcategoryjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_977); var element_978 = ' CREATE OR REPLACE FUNCTION ch_upd_7_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (7, NEW.cepcjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_978); var element_979 = ' CREATE TRIGGER ch_upd_7_trig AFTER UPDATE OR INSERT ON ContentEntryParentChildJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_7_fn(); '; _stmtList.add_11rb$(element_979); var element_980 = ' CREATE OR REPLACE FUNCTION ch_del_7_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (7, OLD.cepcjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_980); var element_981 = ' CREATE TRIGGER ch_del_7_trig AFTER DELETE ON ContentEntryParentChildJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_7_fn(); '; _stmtList.add_11rb$(element_981); var element_982 = 'CREATE VIEW ContentEntryParentChildJoin_ReceiveView AS SELECT ContentEntryParentChildJoin.*, ContentEntryParentChildJoinReplicate.* FROM ContentEntryParentChildJoin LEFT JOIN ContentEntryParentChildJoinReplicate ON ContentEntryParentChildJoinReplicate.cepcjPk = ContentEntryParentChildJoin.cepcjUid '; _stmtList.add_11rb$(element_982); var element_983 = "CREATE OR REPLACE FUNCTION contententryparentchildjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryParentChildJoin(cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex, cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct) VALUES (NEW.cepcjParentContentEntryUid, NEW.cepcjChildContentEntryUid, NEW.childIndex, NEW.cepcjUid, NEW.cepcjLocalChangeSeqNum, NEW.cepcjMasterChangeSeqNum, NEW.cepcjLastChangedBy, NEW.cepcjLct) ON CONFLICT (cepcjUid) DO UPDATE SET cepcjParentContentEntryUid = EXCLUDED.cepcjParentContentEntryUid, cepcjChildContentEntryUid = EXCLUDED.cepcjChildContentEntryUid, childIndex = EXCLUDED.childIndex, cepcjLocalChangeSeqNum = EXCLUDED.cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum = EXCLUDED.cepcjMasterChangeSeqNum, cepcjLastChangedBy = EXCLUDED.cepcjLastChangedBy, cepcjLct = EXCLUDED.cepcjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_983); var element_984 = ' CREATE TRIGGER contententryparentchildjoin_remote_insert_trig INSTEAD OF INSERT ON ContentEntryParentChildJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententryparentchildjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_984); var element_985 = ' CREATE OR REPLACE FUNCTION ch_upd_8_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (8, NEW.cerejUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_985); var element_986 = ' CREATE TRIGGER ch_upd_8_trig AFTER UPDATE OR INSERT ON ContentEntryRelatedEntryJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_8_fn(); '; _stmtList.add_11rb$(element_986); var element_987 = ' CREATE OR REPLACE FUNCTION ch_del_8_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (8, OLD.cerejUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_987); var element_988 = ' CREATE TRIGGER ch_del_8_trig AFTER DELETE ON ContentEntryRelatedEntryJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_8_fn(); '; _stmtList.add_11rb$(element_988); var element_989 = 'CREATE VIEW ContentEntryRelatedEntryJoin_ReceiveView AS SELECT ContentEntryRelatedEntryJoin.*, ContentEntryRelatedEntryJoinReplicate.* FROM ContentEntryRelatedEntryJoin LEFT JOIN ContentEntryRelatedEntryJoinReplicate ON ContentEntryRelatedEntryJoinReplicate.cerejPk = ContentEntryRelatedEntryJoin.cerejUid '; _stmtList.add_11rb$(element_989); var element_990 = "CREATE OR REPLACE FUNCTION contententryrelatedentryjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryRelatedEntryJoin(cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct) VALUES (NEW.cerejUid, NEW.cerejContentEntryUid, NEW.cerejRelatedEntryUid, NEW.cerejLastChangedBy, NEW.relType, NEW.comment, NEW.cerejRelLanguageUid, NEW.cerejLocalChangeSeqNum, NEW.cerejMasterChangeSeqNum, NEW.cerejLct) ON CONFLICT (cerejUid) DO UPDATE SET cerejContentEntryUid = EXCLUDED.cerejContentEntryUid, cerejRelatedEntryUid = EXCLUDED.cerejRelatedEntryUid, cerejLastChangedBy = EXCLUDED.cerejLastChangedBy, relType = EXCLUDED.relType, comment = EXCLUDED.comment, cerejRelLanguageUid = EXCLUDED.cerejRelLanguageUid, cerejLocalChangeSeqNum = EXCLUDED.cerejLocalChangeSeqNum, cerejMasterChangeSeqNum = EXCLUDED.cerejMasterChangeSeqNum, cerejLct = EXCLUDED.cerejLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_990); var element_991 = ' CREATE TRIGGER contententryrelatedentryjoin_remote_insert_trig INSTEAD OF INSERT ON ContentEntryRelatedEntryJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententryrelatedentryjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_991); var element_992 = ' CREATE OR REPLACE FUNCTION ch_upd_2_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (2, NEW.contentCategorySchemaUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_992); var element_993 = ' CREATE TRIGGER ch_upd_2_trig AFTER UPDATE OR INSERT ON ContentCategorySchema FOR EACH ROW EXECUTE PROCEDURE ch_upd_2_fn(); '; _stmtList.add_11rb$(element_993); var element_994 = ' CREATE OR REPLACE FUNCTION ch_del_2_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (2, OLD.contentCategorySchemaUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_994); var element_995 = ' CREATE TRIGGER ch_del_2_trig AFTER DELETE ON ContentCategorySchema FOR EACH ROW EXECUTE PROCEDURE ch_del_2_fn(); '; _stmtList.add_11rb$(element_995); var element_996 = 'CREATE VIEW ContentCategorySchema_ReceiveView AS SELECT ContentCategorySchema.*, ContentCategorySchemaReplicate.* FROM ContentCategorySchema LEFT JOIN ContentCategorySchemaReplicate ON ContentCategorySchemaReplicate.ccsPk = ContentCategorySchema.contentCategorySchemaUid '; _stmtList.add_11rb$(element_996); var element_997 = "CREATE OR REPLACE FUNCTION contentcategoryschema_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentCategorySchema(contentCategorySchemaUid, schemaName, schemaUrl, contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy, contentCategorySchemaLct) VALUES (NEW.contentCategorySchemaUid, NEW.schemaName, NEW.schemaUrl, NEW.contentCategorySchemaLocalChangeSeqNum, NEW.contentCategorySchemaMasterChangeSeqNum, NEW.contentCategorySchemaLastChangedBy, NEW.contentCategorySchemaLct) ON CONFLICT (contentCategorySchemaUid) DO UPDATE SET schemaName = EXCLUDED.schemaName, schemaUrl = EXCLUDED.schemaUrl, contentCategorySchemaLocalChangeSeqNum = EXCLUDED.contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum = EXCLUDED.contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy = EXCLUDED.contentCategorySchemaLastChangedBy, contentCategorySchemaLct = EXCLUDED.contentCategorySchemaLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_997); var element_998 = ' CREATE TRIGGER contentcategoryschema_remote_insert_trig INSTEAD OF INSERT ON ContentCategorySchema_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contentcategoryschema_remote_insert_fn() '; _stmtList.add_11rb$(element_998); var element_999 = ' CREATE OR REPLACE FUNCTION ch_upd_1_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (1, NEW.contentCategoryUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_999); var element_1000 = ' CREATE TRIGGER ch_upd_1_trig AFTER UPDATE OR INSERT ON ContentCategory FOR EACH ROW EXECUTE PROCEDURE ch_upd_1_fn(); '; _stmtList.add_11rb$(element_1000); var element_1001 = ' CREATE OR REPLACE FUNCTION ch_del_1_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (1, OLD.contentCategoryUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1001); var element_1002 = ' CREATE TRIGGER ch_del_1_trig AFTER DELETE ON ContentCategory FOR EACH ROW EXECUTE PROCEDURE ch_del_1_fn(); '; _stmtList.add_11rb$(element_1002); var element_1003 = 'CREATE VIEW ContentCategory_ReceiveView AS SELECT ContentCategory.*, ContentCategoryReplicate.* FROM ContentCategory LEFT JOIN ContentCategoryReplicate ON ContentCategoryReplicate.ccPk = ContentCategory.contentCategoryUid '; _stmtList.add_11rb$(element_1003); var element_1004 = "CREATE OR REPLACE FUNCTION contentcategory_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentCategory(contentCategoryUid, ctnCatContentCategorySchemaUid, name, contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy, contentCategoryLct) VALUES (NEW.contentCategoryUid, NEW.ctnCatContentCategorySchemaUid, NEW.name, NEW.contentCategoryLocalChangeSeqNum, NEW.contentCategoryMasterChangeSeqNum, NEW.contentCategoryLastChangedBy, NEW.contentCategoryLct) ON CONFLICT (contentCategoryUid) DO UPDATE SET ctnCatContentCategorySchemaUid = EXCLUDED.ctnCatContentCategorySchemaUid, name = EXCLUDED.name, contentCategoryLocalChangeSeqNum = EXCLUDED.contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum = EXCLUDED.contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy = EXCLUDED.contentCategoryLastChangedBy, contentCategoryLct = EXCLUDED.contentCategoryLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1004); var element_1005 = ' CREATE TRIGGER contentcategory_remote_insert_trig INSTEAD OF INSERT ON ContentCategory_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contentcategory_remote_insert_fn() '; _stmtList.add_11rb$(element_1005); var element_1006 = ' CREATE OR REPLACE FUNCTION ch_upd_13_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (13, NEW.langUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1006); var element_1007 = ' CREATE TRIGGER ch_upd_13_trig AFTER UPDATE OR INSERT ON Language FOR EACH ROW EXECUTE PROCEDURE ch_upd_13_fn(); '; _stmtList.add_11rb$(element_1007); var element_1008 = ' CREATE OR REPLACE FUNCTION ch_del_13_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (13, OLD.langUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1008); var element_1009 = ' CREATE TRIGGER ch_del_13_trig AFTER DELETE ON Language FOR EACH ROW EXECUTE PROCEDURE ch_del_13_fn(); '; _stmtList.add_11rb$(element_1009); var element_1010 = 'CREATE VIEW Language_ReceiveView AS SELECT Language.*, LanguageReplicate.* FROM Language LEFT JOIN LanguageReplicate ON LanguageReplicate.languagePk = Language.langUid '; _stmtList.add_11rb$(element_1010); var element_1011 = "CREATE OR REPLACE FUNCTION language_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Language(langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES (NEW.langUid, NEW.name, NEW.iso_639_1_standard, NEW.iso_639_2_standard, NEW.iso_639_3_standard, NEW.Language_Type, NEW.languageActive, NEW.langLocalChangeSeqNum, NEW.langMasterChangeSeqNum, NEW.langLastChangedBy, NEW.langLct) ON CONFLICT (langUid) DO UPDATE SET name = EXCLUDED.name, iso_639_1_standard = EXCLUDED.iso_639_1_standard, iso_639_2_standard = EXCLUDED.iso_639_2_standard, iso_639_3_standard = EXCLUDED.iso_639_3_standard, Language_Type = EXCLUDED.Language_Type, languageActive = EXCLUDED.languageActive, langLocalChangeSeqNum = EXCLUDED.langLocalChangeSeqNum, langMasterChangeSeqNum = EXCLUDED.langMasterChangeSeqNum, langLastChangedBy = EXCLUDED.langLastChangedBy, langLct = EXCLUDED.langLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1011); var element_1012 = ' CREATE TRIGGER language_remote_insert_trig INSTEAD OF INSERT ON Language_ReceiveView FOR EACH ROW EXECUTE PROCEDURE language_remote_insert_fn() '; _stmtList.add_11rb$(element_1012); var element_1013 = ' CREATE OR REPLACE FUNCTION ch_upd_10_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (10, NEW.langVariantUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1013); var element_1014 = ' CREATE TRIGGER ch_upd_10_trig AFTER UPDATE OR INSERT ON LanguageVariant FOR EACH ROW EXECUTE PROCEDURE ch_upd_10_fn(); '; _stmtList.add_11rb$(element_1014); var element_1015 = ' CREATE OR REPLACE FUNCTION ch_del_10_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (10, OLD.langVariantUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1015); var element_1016 = ' CREATE TRIGGER ch_del_10_trig AFTER DELETE ON LanguageVariant FOR EACH ROW EXECUTE PROCEDURE ch_del_10_fn(); '; _stmtList.add_11rb$(element_1016); var element_1017 = 'CREATE VIEW LanguageVariant_ReceiveView AS SELECT LanguageVariant.*, LanguageVariantReplicate.* FROM LanguageVariant LEFT JOIN LanguageVariantReplicate ON LanguageVariantReplicate.lvPk = LanguageVariant.langVariantUid '; _stmtList.add_11rb$(element_1017); var element_1018 = "CREATE OR REPLACE FUNCTION languagevariant_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LanguageVariant(langVariantUid, langUid, countryCode, name, langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum, langVariantLastChangedBy, langVariantLct) VALUES (NEW.langVariantUid, NEW.langUid, NEW.countryCode, NEW.name, NEW.langVariantLocalChangeSeqNum, NEW.langVariantMasterChangeSeqNum, NEW.langVariantLastChangedBy, NEW.langVariantLct) ON CONFLICT (langVariantUid) DO UPDATE SET langUid = EXCLUDED.langUid, countryCode = EXCLUDED.countryCode, name = EXCLUDED.name, langVariantLocalChangeSeqNum = EXCLUDED.langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum = EXCLUDED.langVariantMasterChangeSeqNum, langVariantLastChangedBy = EXCLUDED.langVariantLastChangedBy, langVariantLct = EXCLUDED.langVariantLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1018); var element_1019 = ' CREATE TRIGGER languagevariant_remote_insert_trig INSTEAD OF INSERT ON LanguageVariant_ReceiveView FOR EACH ROW EXECUTE PROCEDURE languagevariant_remote_insert_fn() '; _stmtList.add_11rb$(element_1019); var element_1020 = ' CREATE OR REPLACE FUNCTION ch_upd_43_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (43, NEW.groupUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1020); var element_1021 = ' CREATE TRIGGER ch_upd_43_trig AFTER UPDATE OR INSERT ON PersonGroup FOR EACH ROW EXECUTE PROCEDURE ch_upd_43_fn(); '; _stmtList.add_11rb$(element_1021); var element_1022 = ' CREATE OR REPLACE FUNCTION ch_del_43_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (43, OLD.groupUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1022); var element_1023 = ' CREATE TRIGGER ch_del_43_trig AFTER DELETE ON PersonGroup FOR EACH ROW EXECUTE PROCEDURE ch_del_43_fn(); '; _stmtList.add_11rb$(element_1023); var element_1024 = 'CREATE VIEW PersonGroup_ReceiveView AS SELECT PersonGroup.*, PersonGroupReplicate.* FROM PersonGroup LEFT JOIN PersonGroupReplicate ON PersonGroupReplicate.pgPk = PersonGroup.groupUid '; _stmtList.add_11rb$(element_1024); var element_1025 = "CREATE OR REPLACE FUNCTION persongroup_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonGroup(groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES (NEW.groupUid, NEW.groupMasterCsn, NEW.groupLocalCsn, NEW.groupLastChangedBy, NEW.groupLct, NEW.groupName, NEW.groupActive, NEW.personGroupFlag) ON CONFLICT (groupUid) DO UPDATE SET groupMasterCsn = EXCLUDED.groupMasterCsn, groupLocalCsn = EXCLUDED.groupLocalCsn, groupLastChangedBy = EXCLUDED.groupLastChangedBy, groupLct = EXCLUDED.groupLct, groupName = EXCLUDED.groupName, groupActive = EXCLUDED.groupActive, personGroupFlag = EXCLUDED.personGroupFlag ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1025); var element_1026 = ' CREATE TRIGGER persongroup_remote_insert_trig INSTEAD OF INSERT ON PersonGroup_ReceiveView FOR EACH ROW EXECUTE PROCEDURE persongroup_remote_insert_fn() '; _stmtList.add_11rb$(element_1026); var element_1027 = ' CREATE OR REPLACE FUNCTION ch_upd_44_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (44, NEW.groupMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1027); var element_1028 = ' CREATE TRIGGER ch_upd_44_trig AFTER UPDATE OR INSERT ON PersonGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_44_fn(); '; _stmtList.add_11rb$(element_1028); var element_1029 = ' CREATE OR REPLACE FUNCTION ch_del_44_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (44, OLD.groupMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1029); var element_1030 = ' CREATE TRIGGER ch_del_44_trig AFTER DELETE ON PersonGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_del_44_fn(); '; _stmtList.add_11rb$(element_1030); var element_1031 = 'CREATE VIEW PersonGroupMember_ReceiveView AS SELECT PersonGroupMember.*, PersonGroupMemberReplicate.* FROM PersonGroupMember LEFT JOIN PersonGroupMemberReplicate ON PersonGroupMemberReplicate.pgmPk = PersonGroupMember.groupMemberUid '; _stmtList.add_11rb$(element_1031); var element_1032 = "CREATE OR REPLACE FUNCTION persongroupmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonGroupMember(groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES (NEW.groupMemberUid, NEW.groupMemberActive, NEW.groupMemberPersonUid, NEW.groupMemberGroupUid, NEW.groupMemberMasterCsn, NEW.groupMemberLocalCsn, NEW.groupMemberLastChangedBy, NEW.groupMemberLct) ON CONFLICT (groupMemberUid) DO UPDATE SET groupMemberActive = EXCLUDED.groupMemberActive, groupMemberPersonUid = EXCLUDED.groupMemberPersonUid, groupMemberGroupUid = EXCLUDED.groupMemberGroupUid, groupMemberMasterCsn = EXCLUDED.groupMemberMasterCsn, groupMemberLocalCsn = EXCLUDED.groupMemberLocalCsn, groupMemberLastChangedBy = EXCLUDED.groupMemberLastChangedBy, groupMemberLct = EXCLUDED.groupMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1032); var element_1033 = ' CREATE TRIGGER persongroupmember_remote_insert_trig INSTEAD OF INSERT ON PersonGroupMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE persongroupmember_remote_insert_fn() '; _stmtList.add_11rb$(element_1033); var element_1034 = ' CREATE OR REPLACE FUNCTION ch_upd_50_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (50, NEW.personPictureUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1034); var element_1035 = ' CREATE TRIGGER ch_upd_50_trig AFTER UPDATE OR INSERT ON PersonPicture FOR EACH ROW EXECUTE PROCEDURE ch_upd_50_fn(); '; _stmtList.add_11rb$(element_1035); var element_1036 = ' CREATE OR REPLACE FUNCTION ch_del_50_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (50, OLD.personPictureUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1036); var element_1037 = ' CREATE TRIGGER ch_del_50_trig AFTER DELETE ON PersonPicture FOR EACH ROW EXECUTE PROCEDURE ch_del_50_fn(); '; _stmtList.add_11rb$(element_1037); var element_1038 = 'CREATE VIEW PersonPicture_ReceiveView AS SELECT PersonPicture.*, PersonPictureReplicate.* FROM PersonPicture LEFT JOIN PersonPictureReplicate ON PersonPictureReplicate.ppPk = PersonPicture.personPictureUid '; _stmtList.add_11rb$(element_1038); var element_1039 = "CREATE OR REPLACE FUNCTION personpicture_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonPicture(personPictureUid, personPicturePersonUid, personPictureMasterCsn, personPictureLocalCsn, personPictureLastChangedBy, personPictureLct, personPictureUri, personPictureMd5, fileSize, picTimestamp, mimeType, personPictureActive) VALUES (NEW.personPictureUid, NEW.personPicturePersonUid, NEW.personPictureMasterCsn, NEW.personPictureLocalCsn, NEW.personPictureLastChangedBy, NEW.personPictureLct, NEW.personPictureUri, NEW.personPictureMd5, NEW.fileSize, NEW.picTimestamp, NEW.mimeType, NEW.personPictureActive) ON CONFLICT (personPictureUid) DO UPDATE SET personPicturePersonUid = EXCLUDED.personPicturePersonUid, personPictureMasterCsn = EXCLUDED.personPictureMasterCsn, personPictureLocalCsn = EXCLUDED.personPictureLocalCsn, personPictureLastChangedBy = EXCLUDED.personPictureLastChangedBy, personPictureLct = EXCLUDED.personPictureLct, personPictureUri = EXCLUDED.personPictureUri, personPictureMd5 = EXCLUDED.personPictureMd5, fileSize = EXCLUDED.fileSize, picTimestamp = EXCLUDED.picTimestamp, mimeType = EXCLUDED.mimeType, personPictureActive = EXCLUDED.personPictureActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1039); var element_1040 = ' CREATE TRIGGER personpicture_remote_insert_trig INSTEAD OF INSERT ON PersonPicture_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personpicture_remote_insert_fn() '; _stmtList.add_11rb$(element_1040); var element_1041 = trimMargin('\n | CREATE OR REPLACE FUNCTION attach_PersonPicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.personPictureUri AS zaUri\n | FROM PersonPicture \n | WHERE PersonPicture.personPictureUid = OLD.personPictureUid\n | AND (SELECT COUNT(*) \n | FROM PersonPicture\n | WHERE personPictureMd5 = OLD.personPictureMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n '); _stmtList.add_11rb$(element_1041); var element_1042 = trimMargin('\n |CREATE TRIGGER attach_PersonPicture_trig\n |AFTER UPDATE ON PersonPicture\n |FOR EACH ROW WHEN (OLD.personPictureMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_PersonPicture_fn();\n '); _stmtList.add_11rb$(element_1042); var element_1043 = ' CREATE OR REPLACE FUNCTION ch_upd_51_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (51, NEW.containerUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1043); var element_1044 = ' CREATE TRIGGER ch_upd_51_trig AFTER UPDATE OR INSERT ON Container FOR EACH ROW EXECUTE PROCEDURE ch_upd_51_fn(); '; _stmtList.add_11rb$(element_1044); var element_1045 = ' CREATE OR REPLACE FUNCTION ch_del_51_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (51, OLD.containerUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1045); var element_1046 = ' CREATE TRIGGER ch_del_51_trig AFTER DELETE ON Container FOR EACH ROW EXECUTE PROCEDURE ch_del_51_fn(); '; _stmtList.add_11rb$(element_1046); var element_1047 = 'CREATE VIEW Container_ReceiveView AS SELECT Container.*, ContainerReplicate.* FROM Container LEFT JOIN ContainerReplicate ON ContainerReplicate.containerPk = Container.containerUid '; _stmtList.add_11rb$(element_1047); var element_1048 = "CREATE OR REPLACE FUNCTION container_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Container(containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) SELECT NEW.containerUid, NEW.cntLocalCsn, NEW.cntMasterCsn, NEW.cntLastModBy, NEW.cntLct, NEW.fileSize, NEW.containerContentEntryUid, NEW.cntLastModified, NEW.mimeType, NEW.remarks, NEW.mobileOptimized, NEW.cntNumEntries WHERE NEW.cntLct > (SELECT COALESCE( (SELECT ContainerInt.cntLct FROM Container ContainerInt WHERE ContainerInt.containerUid = NEW.containerUid), 0)) ON CONFLICT (containerUid) DO UPDATE SET cntLocalCsn = EXCLUDED.cntLocalCsn, cntMasterCsn = EXCLUDED.cntMasterCsn, cntLastModBy = EXCLUDED.cntLastModBy, cntLct = EXCLUDED.cntLct, fileSize = EXCLUDED.fileSize, containerContentEntryUid = EXCLUDED.containerContentEntryUid, cntLastModified = EXCLUDED.cntLastModified, mimeType = EXCLUDED.mimeType, remarks = EXCLUDED.remarks, mobileOptimized = EXCLUDED.mobileOptimized, cntNumEntries = EXCLUDED.cntNumEntries ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1048); var element_1049 = ' CREATE TRIGGER container_remote_insert_trig INSTEAD OF INSERT ON Container_ReceiveView FOR EACH ROW EXECUTE PROCEDURE container_remote_insert_fn() '; _stmtList.add_11rb$(element_1049); var element_1050 = ' CREATE OR REPLACE FUNCTION ch_upd_62_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (62, NEW.verbUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1050); var element_1051 = ' CREATE TRIGGER ch_upd_62_trig AFTER UPDATE OR INSERT ON VerbEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_62_fn(); '; _stmtList.add_11rb$(element_1051); var element_1052 = ' CREATE OR REPLACE FUNCTION ch_del_62_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (62, OLD.verbUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1052); var element_1053 = ' CREATE TRIGGER ch_del_62_trig AFTER DELETE ON VerbEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_62_fn(); '; _stmtList.add_11rb$(element_1053); var element_1054 = 'CREATE VIEW VerbEntity_ReceiveView AS SELECT VerbEntity.*, VerbEntityReplicate.* FROM VerbEntity LEFT JOIN VerbEntityReplicate ON VerbEntityReplicate.vePk = VerbEntity.verbUid '; _stmtList.add_11rb$(element_1054); var element_1055 = "CREATE OR REPLACE FUNCTION verbentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO VerbEntity(verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES (NEW.verbUid, NEW.urlId, NEW.verbInActive, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.verbLct) ON CONFLICT (verbUid) DO UPDATE SET urlId = EXCLUDED.urlId, verbInActive = EXCLUDED.verbInActive, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, verbLct = EXCLUDED.verbLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1055); var element_1056 = ' CREATE TRIGGER verbentity_remote_insert_trig INSTEAD OF INSERT ON VerbEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE verbentity_remote_insert_fn() '; _stmtList.add_11rb$(element_1056); var element_1057 = ' CREATE OR REPLACE FUNCTION ch_upd_64_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (64, NEW.xObjectUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1057); var element_1058 = ' CREATE TRIGGER ch_upd_64_trig AFTER UPDATE OR INSERT ON XObjectEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_64_fn(); '; _stmtList.add_11rb$(element_1058); var element_1059 = ' CREATE OR REPLACE FUNCTION ch_del_64_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (64, OLD.xObjectUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1059); var element_1060 = ' CREATE TRIGGER ch_del_64_trig AFTER DELETE ON XObjectEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_64_fn(); '; _stmtList.add_11rb$(element_1060); var element_1061 = 'CREATE VIEW XObjectEntity_ReceiveView AS SELECT XObjectEntity.*, XObjectEntityReplicate.* FROM XObjectEntity LEFT JOIN XObjectEntityReplicate ON XObjectEntityReplicate.xoePk = XObjectEntity.xObjectUid '; _stmtList.add_11rb$(element_1061); var element_1062 = "CREATE OR REPLACE FUNCTION xobjectentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO XObjectEntity(xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, objectStatementRefUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES (NEW.xObjectUid, NEW.objectType, NEW.objectId, NEW.definitionType, NEW.interactionType, NEW.correctResponsePattern, NEW.objectContentEntryUid, NEW.objectStatementRefUid, NEW.xObjectMasterChangeSeqNum, NEW.xObjectocalChangeSeqNum, NEW.xObjectLastChangedBy, NEW.xObjectLct) ON CONFLICT (xObjectUid) DO UPDATE SET objectType = EXCLUDED.objectType, objectId = EXCLUDED.objectId, definitionType = EXCLUDED.definitionType, interactionType = EXCLUDED.interactionType, correctResponsePattern = EXCLUDED.correctResponsePattern, objectContentEntryUid = EXCLUDED.objectContentEntryUid,objectStatementRefUid = EXCLUDED.objectStatementRefUid, xObjectMasterChangeSeqNum = EXCLUDED.xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum = EXCLUDED.xObjectocalChangeSeqNum, xObjectLastChangedBy = EXCLUDED.xObjectLastChangedBy, xObjectLct = EXCLUDED.xObjectLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1062); var element_1063 = ' CREATE TRIGGER xobjectentity_remote_insert_trig INSTEAD OF INSERT ON XObjectEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE xobjectentity_remote_insert_fn() '; _stmtList.add_11rb$(element_1063); var element_1064 = ' CREATE OR REPLACE FUNCTION ch_upd_60_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (60, NEW.statementUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1064); var element_1065 = ' CREATE TRIGGER ch_upd_60_trig AFTER UPDATE OR INSERT ON StatementEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_60_fn(); '; _stmtList.add_11rb$(element_1065); var element_1066 = ' CREATE OR REPLACE FUNCTION ch_del_60_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (60, OLD.statementUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1066); var element_1067 = ' CREATE TRIGGER ch_del_60_trig AFTER DELETE ON StatementEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_60_fn(); '; _stmtList.add_11rb$(element_1067); var element_1068 = 'CREATE VIEW StatementEntity_ReceiveView AS SELECT StatementEntity.*, StatementEntityReplicate.* FROM StatementEntity LEFT JOIN StatementEntityReplicate ON StatementEntityReplicate.sePk = StatementEntity.statementUid '; _stmtList.add_11rb$(element_1068); var element_1069 = "CREATE OR REPLACE FUNCTION statemententity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO StatementEntity(statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid) VALUES (NEW.statementUid, NEW.statementId, NEW.statementPersonUid, NEW.statementVerbUid, NEW.xObjectUid, NEW.subStatementActorUid, NEW.substatementVerbUid, NEW.subStatementObjectUid, NEW.agentUid, NEW.instructorUid, NEW.authorityUid, NEW.teamUid, NEW.resultCompletion, NEW.resultSuccess, NEW.resultScoreScaled, NEW.resultScoreRaw, NEW.resultScoreMin, NEW.resultScoreMax, NEW.resultDuration, NEW.resultResponse, NEW.timestamp, NEW.stored, NEW.contextRegistration, NEW.contextPlatform, NEW.contextStatementId, NEW.fullStatement, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.statementLct, NEW.extensionProgress, NEW.contentEntryRoot, NEW.statementContentEntryUid, NEW.statementLearnerGroupUid, NEW.statementClazzUid) ON CONFLICT (statementUid) DO UPDATE SET statementId = EXCLUDED.statementId, statementPersonUid = EXCLUDED.statementPersonUid, statementVerbUid = EXCLUDED.statementVerbUid, xObjectUid = EXCLUDED.xObjectUid, subStatementActorUid = EXCLUDED.subStatementActorUid, substatementVerbUid = EXCLUDED.substatementVerbUid, subStatementObjectUid = EXCLUDED.subStatementObjectUid, agentUid = EXCLUDED.agentUid, instructorUid = EXCLUDED.instructorUid, authorityUid = EXCLUDED.authorityUid, teamUid = EXCLUDED.teamUid, resultCompletion = EXCLUDED.resultCompletion, resultSuccess = EXCLUDED.resultSuccess, resultScoreScaled = EXCLUDED.resultScoreScaled, resultScoreRaw = EXCLUDED.resultScoreRaw, resultScoreMin = EXCLUDED.resultScoreMin, resultScoreMax = EXCLUDED.resultScoreMax, resultDuration = EXCLUDED.resultDuration, resultResponse = EXCLUDED.resultResponse, timestamp = EXCLUDED.timestamp, stored = EXCLUDED.stored, contextRegistration = EXCLUDED.contextRegistration, contextPlatform = EXCLUDED.contextPlatform, contextStatementId = EXCLUDED.contextStatementId, fullStatement = EXCLUDED.fullStatement, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, statementLct = EXCLUDED.statementLct, extensionProgress = EXCLUDED.extensionProgress, contentEntryRoot = EXCLUDED.contentEntryRoot, statementContentEntryUid = EXCLUDED.statementContentEntryUid, statementLearnerGroupUid = EXCLUDED.statementLearnerGroupUid, statementClazzUid = EXCLUDED.statementClazzUid ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1069); var element_1070 = ' CREATE TRIGGER statemententity_remote_insert_trig INSTEAD OF INSERT ON StatementEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE statemententity_remote_insert_fn() '; _stmtList.add_11rb$(element_1070); var element_1071 = ' CREATE OR REPLACE FUNCTION ch_upd_66_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (66, NEW.contextXObjectStatementJoinUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1071); var element_1072 = ' CREATE TRIGGER ch_upd_66_trig AFTER UPDATE OR INSERT ON ContextXObjectStatementJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_66_fn(); '; _stmtList.add_11rb$(element_1072); var element_1073 = ' CREATE OR REPLACE FUNCTION ch_del_66_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (66, OLD.contextXObjectStatementJoinUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1073); var element_1074 = ' CREATE TRIGGER ch_del_66_trig AFTER DELETE ON ContextXObjectStatementJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_66_fn(); '; _stmtList.add_11rb$(element_1074); var element_1075 = 'CREATE VIEW ContextXObjectStatementJoin_ReceiveView AS SELECT ContextXObjectStatementJoin.*, ContextXObjectStatementJoinReplicate.* FROM ContextXObjectStatementJoin LEFT JOIN ContextXObjectStatementJoinReplicate ON ContextXObjectStatementJoinReplicate.cxosjPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid '; _stmtList.add_11rb$(element_1075); var element_1076 = "CREATE OR REPLACE FUNCTION contextxobjectstatementjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContextXObjectStatementJoin(contextXObjectStatementJoinUid, contextActivityFlag, contextStatementUid, contextXObjectUid, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, contextXObjectLct) VALUES (NEW.contextXObjectStatementJoinUid, NEW.contextActivityFlag, NEW.contextStatementUid, NEW.contextXObjectUid, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.contextXObjectLct) ON CONFLICT (contextXObjectStatementJoinUid) DO UPDATE SET contextActivityFlag = EXCLUDED.contextActivityFlag, contextStatementUid = EXCLUDED.contextStatementUid, contextXObjectUid = EXCLUDED.contextXObjectUid, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, contextXObjectLct = EXCLUDED.contextXObjectLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1076); var element_1077 = ' CREATE TRIGGER contextxobjectstatementjoin_remote_insert_trig INSTEAD OF INSERT ON ContextXObjectStatementJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contextxobjectstatementjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_1077); var element_1078 = ' CREATE OR REPLACE FUNCTION ch_upd_68_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (68, NEW.agentUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1078); var element_1079 = ' CREATE TRIGGER ch_upd_68_trig AFTER UPDATE OR INSERT ON AgentEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_68_fn(); '; _stmtList.add_11rb$(element_1079); var element_1080 = ' CREATE OR REPLACE FUNCTION ch_del_68_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (68, OLD.agentUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1080); var element_1081 = ' CREATE TRIGGER ch_del_68_trig AFTER DELETE ON AgentEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_68_fn(); '; _stmtList.add_11rb$(element_1081); var element_1082 = 'CREATE VIEW AgentEntity_ReceiveView AS SELECT AgentEntity.*, AgentEntityReplicate.* FROM AgentEntity LEFT JOIN AgentEntityReplicate ON AgentEntityReplicate.aePk = AgentEntity.agentUid '; _stmtList.add_11rb$(element_1082); var element_1083 = trimMargin("\n |CREATE OR REPLACE FUNCTION agententity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO AgentEntity(agentUid, agentMbox, agentMbox_sha1sum, agentOpenid, agentAccountName, agentHomePage, agentPersonUid, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, agentLct) VALUES (NEW.agentUid, NEW.agentMbox, NEW.agentMbox_sha1sum, NEW.agentOpenid, NEW.agentAccountName, NEW.agentHomePage, NEW.agentPersonUid, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.agentLct) ON CONFLICT (agentUid) DO UPDATE SET agentMbox = EXCLUDED.agentMbox, agentMbox_sha1sum = EXCLUDED.agentMbox_sha1sum, agentOpenid = EXCLUDED.agentOpenid, agentAccountName = EXCLUDED.agentAccountName, agentHomePage = EXCLUDED.agentHomePage, agentPersonUid = EXCLUDED.agentPersonUid, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, agentLct = EXCLUDED.agentLct\n |; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql\n "); _stmtList.add_11rb$(element_1083); var element_1084 = ' CREATE TRIGGER agententity_remote_insert_trig INSTEAD OF INSERT ON AgentEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE agententity_remote_insert_fn() '; _stmtList.add_11rb$(element_1084); var element_1085 = ' CREATE OR REPLACE FUNCTION ch_upd_70_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (70, NEW.stateUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1085); var element_1086 = ' CREATE TRIGGER ch_upd_70_trig AFTER UPDATE OR INSERT ON StateEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_70_fn(); '; _stmtList.add_11rb$(element_1086); var element_1087 = ' CREATE OR REPLACE FUNCTION ch_del_70_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (70, OLD.stateUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1087); var element_1088 = ' CREATE TRIGGER ch_del_70_trig AFTER DELETE ON StateEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_70_fn(); '; _stmtList.add_11rb$(element_1088); var element_1089 = 'CREATE VIEW StateEntity_ReceiveView AS SELECT StateEntity.*, StateEntityReplicate.* FROM StateEntity LEFT JOIN StateEntityReplicate ON StateEntityReplicate.sePk = StateEntity.stateUid '; _stmtList.add_11rb$(element_1089); var element_1090 = "CREATE OR REPLACE FUNCTION stateentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO StateEntity(stateUid, stateId, agentUid, activityId, registration, isIsactive, timestamp, stateMasterChangeSeqNum, stateLocalChangeSeqNum, stateLastChangedBy, stateLct) VALUES (NEW.stateUid, NEW.stateId, NEW.agentUid, NEW.activityId, NEW.registration, NEW.isIsactive, NEW.timestamp, NEW.stateMasterChangeSeqNum, NEW.stateLocalChangeSeqNum, NEW.stateLastChangedBy, NEW.stateLct) ON CONFLICT (stateUid) DO UPDATE SET stateId = EXCLUDED.stateId, agentUid = EXCLUDED.agentUid, activityId = EXCLUDED.activityId, registration = EXCLUDED.registration, isIsactive = EXCLUDED.isIsactive, timestamp = EXCLUDED.timestamp, stateMasterChangeSeqNum = EXCLUDED.stateMasterChangeSeqNum, stateLocalChangeSeqNum = EXCLUDED.stateLocalChangeSeqNum, stateLastChangedBy = EXCLUDED.stateLastChangedBy, stateLct = EXCLUDED.stateLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1090); var element_1091 = ' CREATE TRIGGER stateentity_remote_insert_trig INSTEAD OF INSERT ON StateEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE stateentity_remote_insert_fn() '; _stmtList.add_11rb$(element_1091); var element_1092 = ' CREATE OR REPLACE FUNCTION ch_upd_72_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (72, NEW.stateContentUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1092); var element_1093 = ' CREATE TRIGGER ch_upd_72_trig AFTER UPDATE OR INSERT ON StateContentEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_72_fn(); '; _stmtList.add_11rb$(element_1093); var element_1094 = ' CREATE OR REPLACE FUNCTION ch_del_72_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (72, OLD.stateContentUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1094); var element_1095 = ' CREATE TRIGGER ch_del_72_trig AFTER DELETE ON StateContentEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_72_fn(); '; _stmtList.add_11rb$(element_1095); var element_1096 = 'CREATE VIEW StateContentEntity_ReceiveView AS SELECT StateContentEntity.*, StateContentEntityReplicate.* FROM StateContentEntity LEFT JOIN StateContentEntityReplicate ON StateContentEntityReplicate.scePk = StateContentEntity.stateContentUid '; _stmtList.add_11rb$(element_1096); var element_1097 = "CREATE OR REPLACE FUNCTION statecontententity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO StateContentEntity(stateContentUid, stateContentStateUid, stateContentKey, stateContentValue, isIsactive, stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum, stateContentLastChangedBy, stateContentLct) VALUES (NEW.stateContentUid, NEW.stateContentStateUid, NEW.stateContentKey, NEW.stateContentValue, NEW.isIsactive, NEW.stateContentMasterChangeSeqNum, NEW.stateContentLocalChangeSeqNum, NEW.stateContentLastChangedBy, NEW.stateContentLct) ON CONFLICT (stateContentUid) DO UPDATE SET stateContentStateUid = EXCLUDED.stateContentStateUid, stateContentKey = EXCLUDED.stateContentKey, stateContentValue = EXCLUDED.stateContentValue, isIsactive = EXCLUDED.isIsactive, stateContentMasterChangeSeqNum = EXCLUDED.stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum = EXCLUDED.stateContentLocalChangeSeqNum, stateContentLastChangedBy = EXCLUDED.stateContentLastChangedBy, stateContentLct = EXCLUDED.stateContentLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1097); var element_1098 = ' CREATE TRIGGER statecontententity_remote_insert_trig INSTEAD OF INSERT ON StateContentEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE statecontententity_remote_insert_fn() '; _stmtList.add_11rb$(element_1098); var element_1099 = ' CREATE OR REPLACE FUNCTION ch_upd_74_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (74, NEW.statementLangMapUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1099); var element_1100 = ' CREATE TRIGGER ch_upd_74_trig AFTER UPDATE OR INSERT ON XLangMapEntry FOR EACH ROW EXECUTE PROCEDURE ch_upd_74_fn(); '; _stmtList.add_11rb$(element_1100); var element_1101 = ' CREATE OR REPLACE FUNCTION ch_del_74_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (74, OLD.statementLangMapUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1101); var element_1102 = ' CREATE TRIGGER ch_del_74_trig AFTER DELETE ON XLangMapEntry FOR EACH ROW EXECUTE PROCEDURE ch_del_74_fn(); '; _stmtList.add_11rb$(element_1102); var element_1103 = 'CREATE VIEW XLangMapEntry_ReceiveView AS SELECT XLangMapEntry.*, XLangMapEntryReplicate.* FROM XLangMapEntry LEFT JOIN XLangMapEntryReplicate ON XLangMapEntryReplicate.xlmePk = XLangMapEntry.statementLangMapUid '; _stmtList.add_11rb$(element_1103); var element_1104 = "CREATE OR REPLACE FUNCTION xlangmapentry_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO XLangMapEntry(verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct, statementLangMapUid) VALUES (NEW.verbLangMapUid, NEW.objectLangMapUid, NEW.languageLangMapUid, NEW.languageVariantLangMapUid, NEW.valueLangMap, NEW.statementLangMapMasterCsn, NEW.statementLangMapLocalCsn, NEW.statementLangMapLcb, NEW.statementLangMapLct, NEW.statementLangMapUid) ON CONFLICT (statementLangMapUid) DO UPDATE SET verbLangMapUid = EXCLUDED.verbLangMapUid, objectLangMapUid = EXCLUDED.objectLangMapUid, languageLangMapUid = EXCLUDED.languageLangMapUid, languageVariantLangMapUid = EXCLUDED.languageVariantLangMapUid, valueLangMap = EXCLUDED.valueLangMap, statementLangMapMasterCsn = EXCLUDED.statementLangMapMasterCsn, statementLangMapLocalCsn = EXCLUDED.statementLangMapLocalCsn, statementLangMapLcb = EXCLUDED.statementLangMapLcb, statementLangMapLct = EXCLUDED.statementLangMapLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1104); var element_1105 = ' CREATE TRIGGER xlangmapentry_remote_insert_trig INSTEAD OF INSERT ON XLangMapEntry_ReceiveView FOR EACH ROW EXECUTE PROCEDURE xlangmapentry_remote_insert_fn() '; _stmtList.add_11rb$(element_1105); var element_1106 = ' CREATE OR REPLACE FUNCTION ch_upd_164_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (164, NEW.schoolUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1106); var element_1107 = ' CREATE TRIGGER ch_upd_164_trig AFTER UPDATE OR INSERT ON School FOR EACH ROW EXECUTE PROCEDURE ch_upd_164_fn(); '; _stmtList.add_11rb$(element_1107); var element_1108 = ' CREATE OR REPLACE FUNCTION ch_del_164_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (164, OLD.schoolUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1108); var element_1109 = ' CREATE TRIGGER ch_del_164_trig AFTER DELETE ON School FOR EACH ROW EXECUTE PROCEDURE ch_del_164_fn(); '; _stmtList.add_11rb$(element_1109); var element_1110 = 'CREATE VIEW School_ReceiveView AS SELECT School.*, SchoolReplicate.* FROM School LEFT JOIN SchoolReplicate ON SchoolReplicate.schoolPk = School.schoolUid '; _stmtList.add_11rb$(element_1110); var element_1111 = "CREATE OR REPLACE FUNCTION school_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO School(schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone) VALUES (NEW.schoolUid, NEW.schoolName, NEW.schoolDesc, NEW.schoolAddress, NEW.schoolActive, NEW.schoolPhoneNumber, NEW.schoolGender, NEW.schoolHolidayCalendarUid, NEW.schoolFeatures, NEW.schoolLocationLong, NEW.schoolLocationLatt, NEW.schoolEmailAddress, NEW.schoolTeachersPersonGroupUid, NEW.schoolStudentsPersonGroupUid, NEW.schoolPendingStudentsPersonGroupUid, NEW.schoolCode, NEW.schoolMasterChangeSeqNum, NEW.schoolLocalChangeSeqNum, NEW.schoolLastChangedBy, NEW.schoolLct, NEW.schoolTimeZone) ON CONFLICT (schoolUid) DO UPDATE SET schoolName = EXCLUDED.schoolName, schoolDesc = EXCLUDED.schoolDesc, schoolAddress = EXCLUDED.schoolAddress, schoolActive = EXCLUDED.schoolActive, schoolPhoneNumber = EXCLUDED.schoolPhoneNumber, schoolGender = EXCLUDED.schoolGender, schoolHolidayCalendarUid = EXCLUDED.schoolHolidayCalendarUid, schoolFeatures = EXCLUDED.schoolFeatures, schoolLocationLong = EXCLUDED.schoolLocationLong, schoolLocationLatt = EXCLUDED.schoolLocationLatt, schoolEmailAddress = EXCLUDED.schoolEmailAddress, schoolTeachersPersonGroupUid = EXCLUDED.schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid = EXCLUDED.schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid = EXCLUDED.schoolPendingStudentsPersonGroupUid, schoolCode = EXCLUDED.schoolCode, schoolMasterChangeSeqNum = EXCLUDED.schoolMasterChangeSeqNum, schoolLocalChangeSeqNum = EXCLUDED.schoolLocalChangeSeqNum, schoolLastChangedBy = EXCLUDED.schoolLastChangedBy, schoolLct = EXCLUDED.schoolLct, schoolTimeZone = EXCLUDED.schoolTimeZone ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1111); var element_1112 = ' CREATE TRIGGER school_remote_insert_trig INSTEAD OF INSERT ON School_ReceiveView FOR EACH ROW EXECUTE PROCEDURE school_remote_insert_fn() '; _stmtList.add_11rb$(element_1112); var element_1113 = ' CREATE OR REPLACE FUNCTION ch_upd_200_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (200, NEW.schoolMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1113); var element_1114 = ' CREATE TRIGGER ch_upd_200_trig AFTER UPDATE OR INSERT ON SchoolMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_200_fn(); '; _stmtList.add_11rb$(element_1114); var element_1115 = ' CREATE OR REPLACE FUNCTION ch_del_200_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (200, OLD.schoolMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1115); var element_1116 = ' CREATE TRIGGER ch_del_200_trig AFTER DELETE ON SchoolMember FOR EACH ROW EXECUTE PROCEDURE ch_del_200_fn(); '; _stmtList.add_11rb$(element_1116); var element_1117 = 'CREATE VIEW SchoolMember_ReceiveView AS SELECT SchoolMember.*, SchoolMemberReplicate.* FROM SchoolMember LEFT JOIN SchoolMemberReplicate ON SchoolMemberReplicate.smPk = SchoolMember.schoolMemberUid '; _stmtList.add_11rb$(element_1117); var element_1118 = "CREATE OR REPLACE FUNCTION schoolmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO SchoolMember(schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct) VALUES (NEW.schoolMemberUid, NEW.schoolMemberPersonUid, NEW.schoolMemberSchoolUid, NEW.schoolMemberJoinDate, NEW.schoolMemberLeftDate, NEW.schoolMemberRole, NEW.schoolMemberActive, NEW.schoolMemberLocalChangeSeqNum, NEW.schoolMemberMasterChangeSeqNum, NEW.schoolMemberLastChangedBy, NEW.schoolMemberLct) ON CONFLICT (schoolMemberUid) DO UPDATE SET schoolMemberPersonUid = EXCLUDED.schoolMemberPersonUid, schoolMemberSchoolUid = EXCLUDED.schoolMemberSchoolUid, schoolMemberJoinDate = EXCLUDED.schoolMemberJoinDate, schoolMemberLeftDate = EXCLUDED.schoolMemberLeftDate, schoolMemberRole = EXCLUDED.schoolMemberRole, schoolMemberActive = EXCLUDED.schoolMemberActive, schoolMemberLocalChangeSeqNum = EXCLUDED.schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum = EXCLUDED.schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy = EXCLUDED.schoolMemberLastChangedBy, schoolMemberLct = EXCLUDED.schoolMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1118); var element_1119 = ' CREATE TRIGGER schoolmember_remote_insert_trig INSTEAD OF INSERT ON SchoolMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE schoolmember_remote_insert_fn() '; _stmtList.add_11rb$(element_1119); var element_1120 = ' CREATE OR REPLACE FUNCTION ch_upd_208_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (208, NEW.commentsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1120); var element_1121 = ' CREATE TRIGGER ch_upd_208_trig AFTER UPDATE OR INSERT ON Comments FOR EACH ROW EXECUTE PROCEDURE ch_upd_208_fn(); '; _stmtList.add_11rb$(element_1121); var element_1122 = ' CREATE OR REPLACE FUNCTION ch_del_208_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (208, OLD.commentsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1122); var element_1123 = ' CREATE TRIGGER ch_del_208_trig AFTER DELETE ON Comments FOR EACH ROW EXECUTE PROCEDURE ch_del_208_fn(); '; _stmtList.add_11rb$(element_1123); var element_1124 = 'CREATE VIEW Comments_ReceiveView AS SELECT Comments.*, CommentsReplicate.* FROM Comments LEFT JOIN CommentsReplicate ON CommentsReplicate.commentsPk = Comments.commentsUid '; _stmtList.add_11rb$(element_1124); var element_1125 = "CREATE OR REPLACE FUNCTION comments_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Comments(commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES (NEW.commentsUid, NEW.commentsText, NEW.commentsEntityType, NEW.commentsEntityUid, NEW.commentsPublic, NEW.commentsStatus, NEW.commentsPersonUid, NEW.commentsToPersonUid, NEW.commentSubmitterUid, NEW.commentsFlagged, NEW.commentsInActive, NEW.commentsDateTimeAdded, NEW.commentsDateTimeUpdated, NEW.commentsMCSN, NEW.commentsLCSN, NEW.commentsLCB, NEW.commentsLct) ON CONFLICT (commentsUid) DO UPDATE SET commentsText = EXCLUDED.commentsText, commentsEntityType = EXCLUDED.commentsEntityType, commentsEntityUid = EXCLUDED.commentsEntityUid, commentsPublic = EXCLUDED.commentsPublic, commentsStatus = EXCLUDED.commentsStatus, commentsPersonUid = EXCLUDED.commentsPersonUid, commentsToPersonUid = EXCLUDED.commentsToPersonUid, commentSubmitterUid = EXCLUDED.commentSubmitterUid, commentsFlagged = EXCLUDED.commentsFlagged, commentsInActive = EXCLUDED.commentsInActive, commentsDateTimeAdded = EXCLUDED.commentsDateTimeAdded, commentsDateTimeUpdated = EXCLUDED.commentsDateTimeUpdated, commentsMCSN = EXCLUDED.commentsMCSN, commentsLCSN = EXCLUDED.commentsLCSN, commentsLCB = EXCLUDED.commentsLCB, commentsLct = EXCLUDED.commentsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1125); var element_1126 = ' CREATE TRIGGER comments_remote_insert_trig INSTEAD OF INSERT ON Comments_ReceiveView FOR EACH ROW EXECUTE PROCEDURE comments_remote_insert_fn() '; _stmtList.add_11rb$(element_1126); var element_1127 = ' CREATE OR REPLACE FUNCTION ch_upd_101_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (101, NEW.reportUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1127); var element_1128 = ' CREATE TRIGGER ch_upd_101_trig AFTER UPDATE OR INSERT ON Report FOR EACH ROW EXECUTE PROCEDURE ch_upd_101_fn(); '; _stmtList.add_11rb$(element_1128); var element_1129 = ' CREATE OR REPLACE FUNCTION ch_del_101_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (101, OLD.reportUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1129); var element_1130 = ' CREATE TRIGGER ch_del_101_trig AFTER DELETE ON Report FOR EACH ROW EXECUTE PROCEDURE ch_del_101_fn(); '; _stmtList.add_11rb$(element_1130); var element_1131 = 'CREATE VIEW Report_ReceiveView AS SELECT Report.*, ReportReplicate.* FROM Report LEFT JOIN ReportReplicate ON ReportReplicate.reportPk = Report.reportUid '; _stmtList.add_11rb$(element_1131); var element_1132 = "CREATE OR REPLACE FUNCTION report_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Report(reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct) VALUES (NEW.reportUid, NEW.reportOwnerUid, NEW.xAxis, NEW.reportDateRangeSelection, NEW.fromDate, NEW.fromRelTo, NEW.fromRelOffSet, NEW.fromRelUnit, NEW.toDate, NEW.toRelTo, NEW.toRelOffSet, NEW.toRelUnit, NEW.reportTitle, NEW.reportDescription, NEW.reportSeries, NEW.reportInactive, NEW.isTemplate, NEW.priority, NEW.reportTitleId, NEW.reportDescId, NEW.reportMasterChangeSeqNum, NEW.reportLocalChangeSeqNum, NEW.reportLastChangedBy, NEW.reportLct) ON CONFLICT (reportUid) DO UPDATE SET reportOwnerUid = EXCLUDED.reportOwnerUid, xAxis = EXCLUDED.xAxis, reportDateRangeSelection = EXCLUDED.reportDateRangeSelection, fromDate = EXCLUDED.fromDate, fromRelTo = EXCLUDED.fromRelTo, fromRelOffSet = EXCLUDED.fromRelOffSet, fromRelUnit = EXCLUDED.fromRelUnit, toDate = EXCLUDED.toDate, toRelTo = EXCLUDED.toRelTo, toRelOffSet = EXCLUDED.toRelOffSet, toRelUnit = EXCLUDED.toRelUnit, reportTitle = EXCLUDED.reportTitle, reportDescription = EXCLUDED.reportDescription, reportSeries = EXCLUDED.reportSeries, reportInactive = EXCLUDED.reportInactive, isTemplate = EXCLUDED.isTemplate, priority = EXCLUDED.priority, reportTitleId = EXCLUDED.reportTitleId, reportDescId = EXCLUDED.reportDescId, reportMasterChangeSeqNum = EXCLUDED.reportMasterChangeSeqNum, reportLocalChangeSeqNum = EXCLUDED.reportLocalChangeSeqNum, reportLastChangedBy = EXCLUDED.reportLastChangedBy, reportLct = EXCLUDED.reportLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1132); var element_1133 = ' CREATE TRIGGER report_remote_insert_trig INSTEAD OF INSERT ON Report_ReceiveView FOR EACH ROW EXECUTE PROCEDURE report_remote_insert_fn() '; _stmtList.add_11rb$(element_1133); var element_1134 = ' CREATE OR REPLACE FUNCTION ch_upd_189_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (189, NEW.siteUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1134); var element_1135 = ' CREATE TRIGGER ch_upd_189_trig AFTER UPDATE OR INSERT ON Site FOR EACH ROW EXECUTE PROCEDURE ch_upd_189_fn(); '; _stmtList.add_11rb$(element_1135); var element_1136 = ' CREATE OR REPLACE FUNCTION ch_del_189_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (189, OLD.siteUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1136); var element_1137 = ' CREATE TRIGGER ch_del_189_trig AFTER DELETE ON Site FOR EACH ROW EXECUTE PROCEDURE ch_del_189_fn(); '; _stmtList.add_11rb$(element_1137); var element_1138 = 'CREATE VIEW Site_ReceiveView AS SELECT Site.*, SiteReplicate.* FROM Site LEFT JOIN SiteReplicate ON SiteReplicate.sitePk = Site.siteUid '; _stmtList.add_11rb$(element_1138); var element_1139 = trimMargin("\n |CREATE OR REPLACE FUNCTION site_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Site(siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES (NEW.siteUid, NEW.sitePcsn, NEW.siteLcsn, NEW.siteLcb, NEW.siteLct, NEW.siteName, NEW.guestLogin, NEW.registrationAllowed, NEW.authSalt) ON CONFLICT (siteUid) DO UPDATE SET sitePcsn = EXCLUDED.sitePcsn, siteLcsn = EXCLUDED.siteLcsn, siteLcb = EXCLUDED.siteLcb, siteLct = EXCLUDED.siteLct, siteName = EXCLUDED.siteName, guestLogin = EXCLUDED.guestLogin, registrationAllowed = EXCLUDED.registrationAllowed, authSalt = EXCLUDED.authSalt\n |; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql\n "); _stmtList.add_11rb$(element_1139); var element_1140 = ' CREATE TRIGGER site_remote_insert_trig INSTEAD OF INSERT ON Site_ReceiveView FOR EACH ROW EXECUTE PROCEDURE site_remote_insert_fn() '; _stmtList.add_11rb$(element_1140); var element_1141 = ' CREATE OR REPLACE FUNCTION ch_upd_301_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (301, NEW.learnerGroupUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1141); var element_1142 = ' CREATE TRIGGER ch_upd_301_trig AFTER UPDATE OR INSERT ON LearnerGroup FOR EACH ROW EXECUTE PROCEDURE ch_upd_301_fn(); '; _stmtList.add_11rb$(element_1142); var element_1143 = ' CREATE OR REPLACE FUNCTION ch_del_301_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (301, OLD.learnerGroupUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1143); var element_1144 = ' CREATE TRIGGER ch_del_301_trig AFTER DELETE ON LearnerGroup FOR EACH ROW EXECUTE PROCEDURE ch_del_301_fn(); '; _stmtList.add_11rb$(element_1144); var element_1145 = 'CREATE VIEW LearnerGroup_ReceiveView AS SELECT LearnerGroup.*, LearnerGroupReplicate.* FROM LearnerGroup LEFT JOIN LearnerGroupReplicate ON LearnerGroupReplicate.lgPk = LearnerGroup.learnerGroupUid '; _stmtList.add_11rb$(element_1145); var element_1146 = "CREATE OR REPLACE FUNCTION learnergroup_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LearnerGroup(learnerGroupUid, learnerGroupName, learnerGroupDescription, learnerGroupActive, learnerGroupMCSN, learnerGroupCSN, learnerGroupLCB, learnerGroupLct) VALUES (NEW.learnerGroupUid, NEW.learnerGroupName, NEW.learnerGroupDescription, NEW.learnerGroupActive, NEW.learnerGroupMCSN, NEW.learnerGroupCSN, NEW.learnerGroupLCB, NEW.learnerGroupLct) ON CONFLICT (learnerGroupUid) DO UPDATE SET learnerGroupName = EXCLUDED.learnerGroupName, learnerGroupDescription = EXCLUDED.learnerGroupDescription, learnerGroupActive = EXCLUDED.learnerGroupActive, learnerGroupMCSN = EXCLUDED.learnerGroupMCSN, learnerGroupCSN = EXCLUDED.learnerGroupCSN, learnerGroupLCB = EXCLUDED.learnerGroupLCB, learnerGroupLct = EXCLUDED.learnerGroupLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1146); var element_1147 = ' CREATE TRIGGER learnergroup_remote_insert_trig INSTEAD OF INSERT ON LearnerGroup_ReceiveView FOR EACH ROW EXECUTE PROCEDURE learnergroup_remote_insert_fn() '; _stmtList.add_11rb$(element_1147); var element_1148 = ' CREATE OR REPLACE FUNCTION ch_upd_300_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (300, NEW.learnerGroupMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1148); var element_1149 = ' CREATE TRIGGER ch_upd_300_trig AFTER UPDATE OR INSERT ON LearnerGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_300_fn(); '; _stmtList.add_11rb$(element_1149); var element_1150 = ' CREATE OR REPLACE FUNCTION ch_del_300_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (300, OLD.learnerGroupMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1150); var element_1151 = ' CREATE TRIGGER ch_del_300_trig AFTER DELETE ON LearnerGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_del_300_fn(); '; _stmtList.add_11rb$(element_1151); var element_1152 = 'CREATE VIEW LearnerGroupMember_ReceiveView AS SELECT LearnerGroupMember.*, LearnerGroupMemberReplicate.* FROM LearnerGroupMember LEFT JOIN LearnerGroupMemberReplicate ON LearnerGroupMemberReplicate.lgmPk = LearnerGroupMember.learnerGroupMemberUid '; _stmtList.add_11rb$(element_1152); var element_1153 = "CREATE OR REPLACE FUNCTION learnergroupmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LearnerGroupMember(learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct) VALUES (NEW.learnerGroupMemberUid, NEW.learnerGroupMemberPersonUid, NEW.learnerGroupMemberLgUid, NEW.learnerGroupMemberRole, NEW.learnerGroupMemberActive, NEW.learnerGroupMemberMCSN, NEW.learnerGroupMemberCSN, NEW.learnerGroupMemberLCB, NEW.learnerGroupMemberLct) ON CONFLICT (learnerGroupMemberUid) DO UPDATE SET learnerGroupMemberPersonUid = EXCLUDED.learnerGroupMemberPersonUid, learnerGroupMemberLgUid = EXCLUDED.learnerGroupMemberLgUid, learnerGroupMemberRole = EXCLUDED.learnerGroupMemberRole, learnerGroupMemberActive = EXCLUDED.learnerGroupMemberActive, learnerGroupMemberMCSN = EXCLUDED.learnerGroupMemberMCSN, learnerGroupMemberCSN = EXCLUDED.learnerGroupMemberCSN, learnerGroupMemberLCB = EXCLUDED.learnerGroupMemberLCB, learnerGroupMemberLct = EXCLUDED.learnerGroupMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1153); var element_1154 = ' CREATE TRIGGER learnergroupmember_remote_insert_trig INSTEAD OF INSERT ON LearnerGroupMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE learnergroupmember_remote_insert_fn() '; _stmtList.add_11rb$(element_1154); var element_1155 = ' CREATE OR REPLACE FUNCTION ch_upd_302_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (302, NEW.groupLearningSessionUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1155); var element_1156 = ' CREATE TRIGGER ch_upd_302_trig AFTER UPDATE OR INSERT ON GroupLearningSession FOR EACH ROW EXECUTE PROCEDURE ch_upd_302_fn(); '; _stmtList.add_11rb$(element_1156); var element_1157 = ' CREATE OR REPLACE FUNCTION ch_del_302_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (302, OLD.groupLearningSessionUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1157); var element_1158 = ' CREATE TRIGGER ch_del_302_trig AFTER DELETE ON GroupLearningSession FOR EACH ROW EXECUTE PROCEDURE ch_del_302_fn(); '; _stmtList.add_11rb$(element_1158); var element_1159 = 'CREATE VIEW GroupLearningSession_ReceiveView AS SELECT GroupLearningSession.*, GroupLearningSessionReplicate.* FROM GroupLearningSession LEFT JOIN GroupLearningSessionReplicate ON GroupLearningSessionReplicate.glsPk = GroupLearningSession.groupLearningSessionUid '; _stmtList.add_11rb$(element_1159); var element_1160 = "CREATE OR REPLACE FUNCTION grouplearningsession_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO GroupLearningSession(groupLearningSessionUid, groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid, groupLearningSessionInactive, groupLearningSessionMCSN, groupLearningSessionCSN, groupLearningSessionLCB, groupLearningSessionLct) VALUES (NEW.groupLearningSessionUid, NEW.groupLearningSessionContentUid, NEW.groupLearningSessionLearnerGroupUid, NEW.groupLearningSessionInactive, NEW.groupLearningSessionMCSN, NEW.groupLearningSessionCSN, NEW.groupLearningSessionLCB, NEW.groupLearningSessionLct) ON CONFLICT (groupLearningSessionUid) DO UPDATE SET groupLearningSessionContentUid = EXCLUDED.groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid = EXCLUDED.groupLearningSessionLearnerGroupUid, groupLearningSessionInactive = EXCLUDED.groupLearningSessionInactive, groupLearningSessionMCSN = EXCLUDED.groupLearningSessionMCSN, groupLearningSessionCSN = EXCLUDED.groupLearningSessionCSN, groupLearningSessionLCB = EXCLUDED.groupLearningSessionLCB, groupLearningSessionLct = EXCLUDED.groupLearningSessionLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1160); var element_1161 = ' CREATE TRIGGER grouplearningsession_remote_insert_trig INSTEAD OF INSERT ON GroupLearningSession_ReceiveView FOR EACH ROW EXECUTE PROCEDURE grouplearningsession_remote_insert_fn() '; _stmtList.add_11rb$(element_1161); var element_1162 = ' CREATE OR REPLACE FUNCTION ch_upd_272_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (272, NEW.sTermsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1162); var element_1163 = ' CREATE TRIGGER ch_upd_272_trig AFTER UPDATE OR INSERT ON SiteTerms FOR EACH ROW EXECUTE PROCEDURE ch_upd_272_fn(); '; _stmtList.add_11rb$(element_1163); var element_1164 = ' CREATE OR REPLACE FUNCTION ch_del_272_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (272, OLD.sTermsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1164); var element_1165 = ' CREATE TRIGGER ch_del_272_trig AFTER DELETE ON SiteTerms FOR EACH ROW EXECUTE PROCEDURE ch_del_272_fn(); '; _stmtList.add_11rb$(element_1165); var element_1166 = 'CREATE VIEW SiteTerms_ReceiveView AS SELECT SiteTerms.*, SiteTermsReplicate.* FROM SiteTerms LEFT JOIN SiteTermsReplicate ON SiteTermsReplicate.stPk = SiteTerms.sTermsUid '; _stmtList.add_11rb$(element_1166); var element_1167 = "CREATE OR REPLACE FUNCTION siteterms_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO SiteTerms(sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct) VALUES (NEW.sTermsUid, NEW.termsHtml, NEW.sTermsLang, NEW.sTermsLangUid, NEW.sTermsActive, NEW.sTermsLastChangedBy, NEW.sTermsPrimaryCsn, NEW.sTermsLocalCsn, NEW.sTermsLct) ON CONFLICT (sTermsUid) DO UPDATE SET termsHtml = EXCLUDED.termsHtml, sTermsLang = EXCLUDED.sTermsLang, sTermsLangUid = EXCLUDED.sTermsLangUid, sTermsActive = EXCLUDED.sTermsActive, sTermsLastChangedBy = EXCLUDED.sTermsLastChangedBy, sTermsPrimaryCsn = EXCLUDED.sTermsPrimaryCsn, sTermsLocalCsn = EXCLUDED.sTermsLocalCsn, sTermsLct = EXCLUDED.sTermsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1167); var element_1168 = ' CREATE TRIGGER siteterms_remote_insert_trig INSTEAD OF INSERT ON SiteTerms_ReceiveView FOR EACH ROW EXECUTE PROCEDURE siteterms_remote_insert_fn() '; _stmtList.add_11rb$(element_1168); var element_1169 = ' CREATE OR REPLACE FUNCTION ch_upd_134_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (134, NEW.ccjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1169); var element_1170 = ' CREATE TRIGGER ch_upd_134_trig AFTER UPDATE OR INSERT ON ClazzContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_134_fn(); '; _stmtList.add_11rb$(element_1170); var element_1171 = ' CREATE OR REPLACE FUNCTION ch_del_134_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (134, OLD.ccjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1171); var element_1172 = ' CREATE TRIGGER ch_del_134_trig AFTER DELETE ON ClazzContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_134_fn(); '; _stmtList.add_11rb$(element_1172); var element_1173 = 'CREATE VIEW ClazzContentJoin_ReceiveView AS SELECT ClazzContentJoin.*, ClazzContentJoinReplicate.* FROM ClazzContentJoin LEFT JOIN ClazzContentJoinReplicate ON ClazzContentJoinReplicate.ccjPk = ClazzContentJoin.ccjUid '; _stmtList.add_11rb$(element_1173); var element_1174 = "CREATE OR REPLACE FUNCTION clazzcontentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzContentJoin(ccjUid, ccjContentEntryUid, ccjClazzUid, ccjActive, ccjLocalChangeSeqNum, ccjMasterChangeSeqNum, ccjLastChangedBy, ccjLct) VALUES (NEW.ccjUid, NEW.ccjContentEntryUid, NEW.ccjClazzUid, NEW.ccjActive, NEW.ccjLocalChangeSeqNum, NEW.ccjMasterChangeSeqNum, NEW.ccjLastChangedBy, NEW.ccjLct) ON CONFLICT (ccjUid) DO UPDATE SET ccjContentEntryUid = EXCLUDED.ccjContentEntryUid, ccjClazzUid = EXCLUDED.ccjClazzUid, ccjActive = EXCLUDED.ccjActive, ccjLocalChangeSeqNum = EXCLUDED.ccjLocalChangeSeqNum, ccjMasterChangeSeqNum = EXCLUDED.ccjMasterChangeSeqNum, ccjLastChangedBy = EXCLUDED.ccjLastChangedBy, ccjLct = EXCLUDED.ccjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1174); var element_1175 = ' CREATE TRIGGER clazzcontentjoin_remote_insert_trig INSTEAD OF INSERT ON ClazzContentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzcontentjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_1175); var element_1176 = ' CREATE OR REPLACE FUNCTION ch_upd_512_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (512, NEW.ppjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1176); var element_1177 = ' CREATE TRIGGER ch_upd_512_trig AFTER UPDATE OR INSERT ON PersonParentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_512_fn(); '; _stmtList.add_11rb$(element_1177); var element_1178 = ' CREATE OR REPLACE FUNCTION ch_del_512_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (512, OLD.ppjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1178); var element_1179 = ' CREATE TRIGGER ch_del_512_trig AFTER DELETE ON PersonParentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_512_fn(); '; _stmtList.add_11rb$(element_1179); var element_1180 = 'CREATE VIEW PersonParentJoin_ReceiveView AS SELECT PersonParentJoin.*, PersonParentJoinReplicate.* FROM PersonParentJoin LEFT JOIN PersonParentJoinReplicate ON PersonParentJoinReplicate.ppjPk = PersonParentJoin.ppjUid '; _stmtList.add_11rb$(element_1180); var element_1181 = "CREATE OR REPLACE FUNCTION personparentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonParentJoin(ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr) VALUES (NEW.ppjUid, NEW.ppjPcsn, NEW.ppjLcsn, NEW.ppjLcb, NEW.ppjLct, NEW.ppjParentPersonUid, NEW.ppjMinorPersonUid, NEW.ppjRelationship, NEW.ppjEmail, NEW.ppjPhone, NEW.ppjInactive, NEW.ppjStatus, NEW.ppjApprovalTiemstamp, NEW.ppjApprovalIpAddr) ON CONFLICT (ppjUid) DO UPDATE SET ppjPcsn = EXCLUDED.ppjPcsn, ppjLcsn = EXCLUDED.ppjLcsn, ppjLcb = EXCLUDED.ppjLcb, ppjLct = EXCLUDED.ppjLct, ppjParentPersonUid = EXCLUDED.ppjParentPersonUid, ppjMinorPersonUid = EXCLUDED.ppjMinorPersonUid, ppjRelationship = EXCLUDED.ppjRelationship, ppjEmail = EXCLUDED.ppjEmail, ppjPhone = EXCLUDED.ppjPhone, ppjInactive = EXCLUDED.ppjInactive, ppjStatus = EXCLUDED.ppjStatus, ppjApprovalTiemstamp = EXCLUDED.ppjApprovalTiemstamp, ppjApprovalIpAddr = EXCLUDED.ppjApprovalIpAddr ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1181); var element_1182 = ' CREATE TRIGGER personparentjoin_remote_insert_trig INSTEAD OF INSERT ON PersonParentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personparentjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_1182); var element_1183 = ' CREATE OR REPLACE FUNCTION ch_upd_48_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (48, NEW.sgUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1183); var element_1184 = ' CREATE TRIGGER ch_upd_48_trig AFTER UPDATE OR INSERT ON ScopedGrant FOR EACH ROW EXECUTE PROCEDURE ch_upd_48_fn(); '; _stmtList.add_11rb$(element_1184); var element_1185 = ' CREATE OR REPLACE FUNCTION ch_del_48_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (48, OLD.sgUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1185); var element_1186 = ' CREATE TRIGGER ch_del_48_trig AFTER DELETE ON ScopedGrant FOR EACH ROW EXECUTE PROCEDURE ch_del_48_fn(); '; _stmtList.add_11rb$(element_1186); var element_1187 = 'CREATE VIEW ScopedGrant_ReceiveView AS SELECT ScopedGrant.*, ScopedGrantReplicate.* FROM ScopedGrant LEFT JOIN ScopedGrantReplicate ON ScopedGrantReplicate.sgPk = ScopedGrant.sgUid '; _stmtList.add_11rb$(element_1187); var element_1188 = "CREATE OR REPLACE FUNCTION sg_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ScopedGrant(sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags) VALUES (NEW.sgUid, NEW.sgPcsn, NEW.sgLcsn, NEW.sgLcb, NEW.sgLct, NEW.sgTableId, NEW.sgEntityUid, NEW.sgPermissions, NEW.sgGroupUid, NEW.sgIndex, NEW.sgFlags) ON CONFLICT(sgUid) DO UPDATE SET sgLct = EXCLUDED.sgLct, sgPermissions = EXCLUDED.sgPermissions ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1188); var element_1189 = ' CREATE TRIGGER sg_remote_insert_trig INSTEAD OF INSERT ON ScopedGrant_ReceiveView FOR EACH ROW EXECUTE PROCEDURE sg_remote_insert_fn() '; _stmtList.add_11rb$(element_1189); var element_1190 = ' CREATE OR REPLACE FUNCTION ch_upd_419_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (419, NEW.errUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1190); var element_1191 = ' CREATE TRIGGER ch_upd_419_trig AFTER UPDATE OR INSERT ON ErrorReport FOR EACH ROW EXECUTE PROCEDURE ch_upd_419_fn(); '; _stmtList.add_11rb$(element_1191); var element_1192 = ' CREATE OR REPLACE FUNCTION ch_del_419_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (419, OLD.errUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1192); var element_1193 = ' CREATE TRIGGER ch_del_419_trig AFTER DELETE ON ErrorReport FOR EACH ROW EXECUTE PROCEDURE ch_del_419_fn(); '; _stmtList.add_11rb$(element_1193); var element_1194 = 'CREATE VIEW ErrorReport_ReceiveView AS SELECT ErrorReport.*, ErrorReportReplicate.* FROM ErrorReport LEFT JOIN ErrorReportReplicate ON ErrorReportReplicate.erPk = ErrorReport.errUid '; _stmtList.add_11rb$(element_1194); var element_1195 = "CREATE OR REPLACE FUNCTION errorreport_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ErrorReport(errUid, errPcsn, errLcsn, errLcb, errLct, severity, timestamp, presenterUri, appVersion, versionCode, errorCode, operatingSys, osVersion, stackTrace, message) VALUES (NEW.errUid, NEW.errPcsn, NEW.errLcsn, NEW.errLcb, NEW.errLct, NEW.severity, NEW.timestamp, NEW.presenterUri, NEW.appVersion, NEW.versionCode, NEW.errorCode, NEW.operatingSys, NEW.osVersion, NEW.stackTrace, NEW.message) ON CONFLICT (errUid) DO UPDATE SET errPcsn = EXCLUDED.errPcsn, errLcsn = EXCLUDED.errLcsn, errLcb = EXCLUDED.errLcb, errLct = EXCLUDED.errLct, severity = EXCLUDED.severity, timestamp = EXCLUDED.timestamp, presenterUri = EXCLUDED.presenterUri, appVersion = EXCLUDED.appVersion, versionCode = EXCLUDED.versionCode, errorCode = EXCLUDED.errorCode, operatingSys = EXCLUDED.operatingSys, osVersion = EXCLUDED.osVersion, stackTrace = EXCLUDED.stackTrace, message = EXCLUDED.message ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1195); var element_1196 = ' CREATE TRIGGER errorreport_remote_insert_trig INSTEAD OF INSERT ON ErrorReport_ReceiveView FOR EACH ROW EXECUTE PROCEDURE errorreport_remote_insert_fn() '; _stmtList.add_11rb$(element_1196); var element_1197 = ' CREATE OR REPLACE FUNCTION ch_upd_520_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (520, NEW.caUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1197); var element_1198 = ' CREATE TRIGGER ch_upd_520_trig AFTER UPDATE OR INSERT ON ClazzAssignment FOR EACH ROW EXECUTE PROCEDURE ch_upd_520_fn(); '; _stmtList.add_11rb$(element_1198); var element_1199 = ' CREATE OR REPLACE FUNCTION ch_del_520_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (520, OLD.caUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1199); var element_1200 = ' CREATE TRIGGER ch_del_520_trig AFTER DELETE ON ClazzAssignment FOR EACH ROW EXECUTE PROCEDURE ch_del_520_fn(); '; _stmtList.add_11rb$(element_1200); var element_1201 = 'CREATE VIEW ClazzAssignment_ReceiveView AS SELECT ClazzAssignment.*, ClazzAssignmentReplicate.* FROM ClazzAssignment LEFT JOIN ClazzAssignmentReplicate ON ClazzAssignmentReplicate.caPk = ClazzAssignment.caUid '; _stmtList.add_11rb$(element_1201); var element_1202 = "CREATE OR REPLACE FUNCTION clazzassignment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzAssignment(caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES (NEW.caUid, NEW.caTitle, NEW.caDescription, NEW.caGroupUid, NEW.caActive, NEW.caClassCommentEnabled, NEW.caPrivateCommentsEnabled, NEW.caRequireFileSubmission, NEW.caFileType, NEW.caSizeLimit, NEW.caNumberOfFiles, NEW.caSubmissionPolicy, NEW.caMarkingType,NEW.caRequireTextSubmission, NEW.caTextLimitType, NEW.caTextLimit, NEW.caXObjectUid, NEW.caClazzUid, NEW.caLocalChangeSeqNum, NEW.caMasterChangeSeqNum, NEW.caLastChangedBy, NEW.caLct) ON CONFLICT (caUid) DO UPDATE SET caTitle = EXCLUDED.caTitle, caDescription = EXCLUDED.caDescription, caGroupUid = EXCLUDED.caGroupUid, caActive = EXCLUDED.caActive, caClassCommentEnabled = EXCLUDED.caClassCommentEnabled, caPrivateCommentsEnabled = EXCLUDED.caPrivateCommentsEnabled, caRequireFileSubmission = EXCLUDED.caRequireFileSubmission, caFileType = EXCLUDED.caFileType, caSizeLimit = EXCLUDED.caSizeLimit, caNumberOfFiles = EXCLUDED.caNumberOfFiles, caSubmissionPolicy = EXCLUDED.caSubmissionPolicy, caMarkingType = EXCLUDED.caMarkingType, caRequireTextSubmission = EXCLUDED.caRequireTextSubmission, caTextLimitType = EXCLUDED.caTextLimitType, caTextLimit = EXCLUDED.caTextLimit, caXObjectUid = EXCLUDED.caXObjectUid, caClazzUid = EXCLUDED.caClazzUid, caLocalChangeSeqNum = EXCLUDED.caLocalChangeSeqNum, caMasterChangeSeqNum = EXCLUDED.caMasterChangeSeqNum, caLastChangedBy = EXCLUDED.caLastChangedBy, caLct = EXCLUDED.caLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1202); var element_1203 = ' CREATE TRIGGER clazzassignment_remote_insert_trig INSTEAD OF INSERT ON ClazzAssignment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzassignment_remote_insert_fn() '; _stmtList.add_11rb$(element_1203); var element_1204 = ' CREATE OR REPLACE FUNCTION ch_upd_521_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (521, NEW.cacjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1204); var element_1205 = ' CREATE TRIGGER ch_upd_521_trig AFTER UPDATE OR INSERT ON ClazzAssignmentContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_521_fn(); '; _stmtList.add_11rb$(element_1205); var element_1206 = ' CREATE OR REPLACE FUNCTION ch_del_521_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (521, OLD.cacjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1206); var element_1207 = ' CREATE TRIGGER ch_del_521_trig AFTER DELETE ON ClazzAssignmentContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_521_fn(); '; _stmtList.add_11rb$(element_1207); var element_1208 = 'CREATE VIEW ClazzAssignmentContentJoin_ReceiveView AS SELECT ClazzAssignmentContentJoin.*, ClazzAssignmentContentJoinReplicate.* FROM ClazzAssignmentContentJoin LEFT JOIN ClazzAssignmentContentJoinReplicate ON ClazzAssignmentContentJoinReplicate.cacjPk = ClazzAssignmentContentJoin.cacjUid '; _stmtList.add_11rb$(element_1208); var element_1209 = "CREATE OR REPLACE FUNCTION clazzassignmentcontentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzAssignmentContentJoin(cacjUid, cacjContentUid, cacjAssignmentUid, cacjActive,cacjWeight, cacjMCSN, cacjLCSN, cacjLCB, cacjLct) VALUES (NEW.cacjUid, NEW.cacjContentUid, NEW.cacjAssignmentUid, NEW.cacjActive, NEW.cacjWeight, NEW.cacjMCSN, NEW.cacjLCSN, NEW.cacjLCB, NEW.cacjLct) ON CONFLICT (cacjUid) DO UPDATE SET cacjContentUid = EXCLUDED.cacjContentUid, cacjAssignmentUid = EXCLUDED.cacjAssignmentUid, cacjActive = EXCLUDED.cacjActive, cacjWeight = EXCLUDED.cacjWeight, cacjMCSN = EXCLUDED.cacjMCSN, cacjLCSN = EXCLUDED.cacjLCSN, cacjLCB = EXCLUDED.cacjLCB, cacjLct = EXCLUDED.cacjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1209); var element_1210 = ' CREATE TRIGGER clazzassignmentcontentjoin_remote_insert_trig INSTEAD OF INSERT ON ClazzAssignmentContentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzassignmentcontentjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_1210); var element_1211 = ' CREATE OR REPLACE FUNCTION ch_upd_522_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (522, NEW.casUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1211); var element_1212 = ' CREATE TRIGGER ch_upd_522_trig AFTER UPDATE OR INSERT ON CourseAssignmentSubmission FOR EACH ROW EXECUTE PROCEDURE ch_upd_522_fn(); '; _stmtList.add_11rb$(element_1212); var element_1213 = ' CREATE OR REPLACE FUNCTION ch_del_522_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (522, OLD.casUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1213); var element_1214 = ' CREATE TRIGGER ch_del_522_trig AFTER DELETE ON CourseAssignmentSubmission FOR EACH ROW EXECUTE PROCEDURE ch_del_522_fn(); '; _stmtList.add_11rb$(element_1214); var element_1215 = 'CREATE VIEW CourseAssignmentSubmission_ReceiveView AS SELECT CourseAssignmentSubmission.*, CourseAssignmentSubmissionReplicate.* FROM CourseAssignmentSubmission LEFT JOIN CourseAssignmentSubmissionReplicate ON CourseAssignmentSubmissionReplicate.casPk = CourseAssignmentSubmission.casUid '; _stmtList.add_11rb$(element_1215); var element_1216 = "CREATE OR REPLACE FUNCTION courseassignmentsubmission_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseAssignmentSubmission(casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp) VALUES (NEW.casUid, NEW.casAssignmentUid, NEW.casSubmitterUid, NEW.casSubmitterPersonUid, NEW.casText, NEW.casType, NEW.casTimestamp) ON CONFLICT (casUid) DO UPDATE SET casAssignmentUid = EXCLUDED.casAssignmentUid, casSubmitterUid = EXCLUDED.casSubmitterUid, casSubmitterPersonUid = EXCLUDED.casSubmitterPersonUid, casText = EXCLUDED.casText, casType = EXCLUDED.casType, casTimestamp = EXCLUDED.casTimestamp ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1216); var element_1217 = ' CREATE TRIGGER courseassignmentsubmission_remote_insert_trig INSTEAD OF INSERT ON CourseAssignmentSubmission_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseassignmentsubmission_remote_insert_fn() '; _stmtList.add_11rb$(element_1217); var element_1218 = ' CREATE OR REPLACE FUNCTION ch_upd_90_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (90, NEW.casaUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1218); var element_1219 = ' CREATE TRIGGER ch_upd_90_trig AFTER UPDATE OR INSERT ON CourseAssignmentSubmissionAttachment FOR EACH ROW EXECUTE PROCEDURE ch_upd_90_fn(); '; _stmtList.add_11rb$(element_1219); var element_1220 = ' CREATE OR REPLACE FUNCTION ch_del_90_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (90, OLD.casaUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1220); var element_1221 = ' CREATE TRIGGER ch_del_90_trig AFTER DELETE ON CourseAssignmentSubmissionAttachment FOR EACH ROW EXECUTE PROCEDURE ch_del_90_fn(); '; _stmtList.add_11rb$(element_1221); var element_1222 = 'CREATE VIEW CourseAssignmentSubmissionAttachment_ReceiveView AS SELECT CourseAssignmentSubmissionAttachment.*, CourseAssignmentSubmissionAttachmentReplicate.* FROM CourseAssignmentSubmissionAttachment LEFT JOIN CourseAssignmentSubmissionAttachmentReplicate ON CourseAssignmentSubmissionAttachmentReplicate.casaPk = CourseAssignmentSubmissionAttachment.casaUid '; _stmtList.add_11rb$(element_1222); var element_1223 = "CREATE OR REPLACE FUNCTION courseassignmentsubmissionattachment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseAssignmentSubmissionAttachment(casaUid, casaSubmissionUid, casaMimeType,casaFileName, casaUri, casaMd5, casaSize, casaTimestamp) VALUES (NEW.casaUid, NEW.casaSubmissionUid, NEW.casaMimeType, NEW.casaFileName, NEW.casaUri, NEW.casaMd5, NEW.casaSize, NEW.casaTimestamp) ON CONFLICT (casaUid) DO UPDATE SET casaSubmissionUid = EXCLUDED.casaSubmissionUid, casaMimeType = EXCLUDED.casaMimeType, casaFileName = EXCLUDED.casaFileName, casaUri = EXCLUDED.casaUri, casaMd5 = EXCLUDED.casaMd5, casaSize = EXCLUDED.casaSize, casaTimestamp = EXCLUDED.casaTimestamp ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1223); var element_1224 = ' CREATE TRIGGER courseassignmentsubmissionattachment_remote_insert_trig INSTEAD OF INSERT ON CourseAssignmentSubmissionAttachment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseassignmentsubmissionattachment_remote_insert_fn() '; _stmtList.add_11rb$(element_1224); var element_1225 = trimMargin('\n | CREATE OR REPLACE FUNCTION attach_CourseAssignmentSubmissionAttachment_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.casaUri AS zaUri\n | FROM CourseAssignmentSubmissionAttachment \n | WHERE CourseAssignmentSubmissionAttachment.casaUid = OLD.casaUid\n | AND (SELECT COUNT(*) \n | FROM CourseAssignmentSubmissionAttachment\n | WHERE casaMd5 = OLD.casaMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n '); _stmtList.add_11rb$(element_1225); var element_1226 = trimMargin('\n |CREATE TRIGGER attach_CourseAssignmentSubmissionAttachment_trig\n |AFTER UPDATE ON CourseAssignmentSubmissionAttachment\n |FOR EACH ROW WHEN (OLD.casaMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_CourseAssignmentSubmissionAttachment_fn();\n '); _stmtList.add_11rb$(element_1226); var element_1227 = ' CREATE OR REPLACE FUNCTION ch_upd_523_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (523, NEW.camUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1227); var element_1228 = ' CREATE TRIGGER ch_upd_523_trig AFTER UPDATE OR INSERT ON CourseAssignmentMark FOR EACH ROW EXECUTE PROCEDURE ch_upd_523_fn(); '; _stmtList.add_11rb$(element_1228); var element_1229 = ' CREATE OR REPLACE FUNCTION ch_del_523_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (523, OLD.camUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1229); var element_1230 = ' CREATE TRIGGER ch_del_523_trig AFTER DELETE ON CourseAssignmentMark FOR EACH ROW EXECUTE PROCEDURE ch_del_523_fn(); '; _stmtList.add_11rb$(element_1230); var element_1231 = 'CREATE VIEW CourseAssignmentMark_ReceiveView AS SELECT CourseAssignmentMark.*, CourseAssignmentMarkReplicate.* FROM CourseAssignmentMark LEFT JOIN CourseAssignmentMarkReplicate ON CourseAssignmentMarkReplicate.camPk = CourseAssignmentMark.camUid '; _stmtList.add_11rb$(element_1231); var element_1232 = "CREATE OR REPLACE FUNCTION courseassignmentmark_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseAssignmentMark(camUid, camAssignmentUid, camSubmitterUid, camMark, camPenalty, camLct) VALUES (NEW.camUid, NEW.camAssignmentUid, NEW.camSubmitterUid, NEW.camMark, NEW.camPenalty, NEW.camLct) ON CONFLICT (camUid) DO UPDATE SET camAssignmentUid = EXCLUDED.camAssignmentUid, camSubmitterUid = EXCLUDED.camSubmitterUid, camMark = EXCLUDED.camMark, camPenalty = EXCLUDED.camPenalty, camLct = EXCLUDED.camLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1232); var element_1233 = ' CREATE TRIGGER courseassignmentmark_remote_insert_trig INSTEAD OF INSERT ON CourseAssignmentMark_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseassignmentmark_remote_insert_fn() '; _stmtList.add_11rb$(element_1233); var element_1234 = ' CREATE OR REPLACE FUNCTION ch_upd_678_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (678, NEW.pauthUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1234); var element_1235 = ' CREATE TRIGGER ch_upd_678_trig AFTER UPDATE OR INSERT ON PersonAuth2 FOR EACH ROW EXECUTE PROCEDURE ch_upd_678_fn(); '; _stmtList.add_11rb$(element_1235); var element_1236 = ' CREATE OR REPLACE FUNCTION ch_del_678_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (678, OLD.pauthUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1236); var element_1237 = ' CREATE TRIGGER ch_del_678_trig AFTER DELETE ON PersonAuth2 FOR EACH ROW EXECUTE PROCEDURE ch_del_678_fn(); '; _stmtList.add_11rb$(element_1237); var element_1238 = 'CREATE VIEW PersonAuth2_ReceiveView AS SELECT PersonAuth2.*, PersonAuth2Replicate.* FROM PersonAuth2 LEFT JOIN PersonAuth2Replicate ON PersonAuth2Replicate.paPk = PersonAuth2.pauthUid '; _stmtList.add_11rb$(element_1238); var element_1239 = "CREATE OR REPLACE FUNCTION personauth2_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonAuth2(pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES (NEW.pauthUid, NEW.pauthMechanism, NEW.pauthAuth, NEW.pauthLcsn, NEW.pauthPcsn, NEW.pauthLcb, NEW.pauthLct) ON CONFLICT (pauthUid) DO UPDATE SET pauthMechanism = EXCLUDED.pauthMechanism, pauthAuth = EXCLUDED.pauthAuth, pauthLcsn = EXCLUDED.pauthLcsn, pauthPcsn = EXCLUDED.pauthPcsn, pauthLcb = EXCLUDED.pauthLcb, pauthLct = EXCLUDED.pauthLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1239); var element_1240 = ' CREATE TRIGGER personauth2_remote_insert_trig INSTEAD OF INSERT ON PersonAuth2_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personauth2_remote_insert_fn() '; _stmtList.add_11rb$(element_1240); var element_1241 = ' CREATE OR REPLACE FUNCTION ch_upd_679_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (679, NEW.usUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1241); var element_1242 = ' CREATE TRIGGER ch_upd_679_trig AFTER UPDATE OR INSERT ON UserSession FOR EACH ROW EXECUTE PROCEDURE ch_upd_679_fn(); '; _stmtList.add_11rb$(element_1242); var element_1243 = ' CREATE OR REPLACE FUNCTION ch_del_679_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (679, OLD.usUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1243); var element_1244 = ' CREATE TRIGGER ch_del_679_trig AFTER DELETE ON UserSession FOR EACH ROW EXECUTE PROCEDURE ch_del_679_fn(); '; _stmtList.add_11rb$(element_1244); var element_1245 = 'CREATE VIEW UserSession_ReceiveView AS SELECT UserSession.*, UserSessionReplicate.* FROM UserSession LEFT JOIN UserSessionReplicate ON UserSessionReplicate.usPk = UserSession.usUid '; _stmtList.add_11rb$(element_1245); var element_1246 = "CREATE OR REPLACE FUNCTION usersession_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO UserSession(usUid, usPcsn, usLcsn, usLcb, usLct, usPersonUid, usClientNodeId, usStartTime, usEndTime, usStatus, usReason, usAuth, usSessionType) VALUES (NEW.usUid, NEW.usPcsn, NEW.usLcsn, NEW.usLcb, NEW.usLct, NEW.usPersonUid, NEW.usClientNodeId, NEW.usStartTime, NEW.usEndTime, NEW.usStatus, NEW.usReason, NEW.usAuth, NEW.usSessionType) ON CONFLICT (usUid) DO UPDATE SET usPcsn = EXCLUDED.usPcsn, usLcsn = EXCLUDED.usLcsn, usLcb = EXCLUDED.usLcb, usLct = EXCLUDED.usLct, usPersonUid = EXCLUDED.usPersonUid, usClientNodeId = EXCLUDED.usClientNodeId, usStartTime = EXCLUDED.usStartTime, usEndTime = EXCLUDED.usEndTime, usStatus = EXCLUDED.usStatus, usReason = EXCLUDED.usReason, usAuth = EXCLUDED.usAuth, usSessionType = EXCLUDED.usSessionType ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1246); var element_1247 = ' CREATE TRIGGER usersession_remote_insert_trig INSTEAD OF INSERT ON UserSession_ReceiveView FOR EACH ROW EXECUTE PROCEDURE usersession_remote_insert_fn() '; _stmtList.add_11rb$(element_1247); var element_1248 = ' CREATE OR REPLACE FUNCTION ch_upd_124_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (124, NEW.cbUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1248); var element_1249 = ' CREATE TRIGGER ch_upd_124_trig AFTER UPDATE OR INSERT ON CourseBlock FOR EACH ROW EXECUTE PROCEDURE ch_upd_124_fn(); '; _stmtList.add_11rb$(element_1249); var element_1250 = ' CREATE OR REPLACE FUNCTION ch_del_124_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (124, OLD.cbUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1250); var element_1251 = ' CREATE TRIGGER ch_del_124_trig AFTER DELETE ON CourseBlock FOR EACH ROW EXECUTE PROCEDURE ch_del_124_fn(); '; _stmtList.add_11rb$(element_1251); var element_1252 = 'CREATE VIEW CourseBlock_ReceiveView AS SELECT CourseBlock.*, CourseBlockReplicate.* FROM CourseBlock LEFT JOIN CourseBlockReplicate ON CourseBlockReplicate.cbPk = CourseBlock.cbUid '; _stmtList.add_11rb$(element_1252); var element_1253 = "CREATE OR REPLACE FUNCTION courseblock_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseBlock(cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints,cbMinPoints, cbIndex, cbClazzUid, cbActive,cbHidden, cbEntityUid, cbLct) VALUES (NEW.cbUid, NEW.cbType, NEW.cbIndentLevel, NEW.cbModuleParentBlockUid, NEW.cbTitle, NEW.cbDescription, NEW.cbCompletionCriteria, NEW.cbHideUntilDate, NEW.cbDeadlineDate, NEW.cbLateSubmissionPenalty, NEW.cbGracePeriodDate, NEW.cbMaxPoints,NEW.cbMinPoints, NEW.cbIndex, NEW.cbClazzUid,NEW.cbActive, NEW.cbHidden, NEW.cbEntityUid, NEW.cbLct) ON CONFLICT (cbUid) DO UPDATE SET cbType = EXCLUDED.cbType, cbIndentLevel = EXCLUDED.cbIndentLevel, cbModuleParentBlockUid = EXCLUDED.cbModuleParentBlockUid, cbTitle = EXCLUDED.cbTitle, cbDescription = EXCLUDED.cbDescription, cbCompletionCriteria = EXCLUDED.cbCompletionCriteria, cbHideUntilDate = EXCLUDED.cbHideUntilDate,cbDeadlineDate = EXCLUDED.cbDeadlineDate, cbLateSubmissionPenalty = EXCLUDED.cbLateSubmissionPenalty, cbGracePeriodDate= EXCLUDED.cbGracePeriodDate, cbMaxPoints = EXCLUDED.cbMaxPoints, cbMinPoints = EXCLUDED.cbMinPoints, cbIndex = EXCLUDED.cbIndex,cbClazzUid = EXCLUDED.cbClazzUid, cbActive = EXCLUDED.cbActive, cbHidden = EXCLUDED.cbHidden, cbEntityUid = EXCLUDED.cbEntityUid, cbLct = EXCLUDED.cbLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1253); var element_1254 = ' CREATE TRIGGER courseblock_remote_insert_trig INSTEAD OF INSERT ON CourseBlock_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseblock_remote_insert_fn() '; _stmtList.add_11rb$(element_1254); var element_1255 = ' CREATE OR REPLACE FUNCTION ch_upd_450_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (450, NEW.ctUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1255); var element_1256 = ' CREATE TRIGGER ch_upd_450_trig AFTER UPDATE OR INSERT ON CourseTerminology FOR EACH ROW EXECUTE PROCEDURE ch_upd_450_fn(); '; _stmtList.add_11rb$(element_1256); var element_1257 = ' CREATE OR REPLACE FUNCTION ch_del_450_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (450, OLD.ctUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1257); var element_1258 = ' CREATE TRIGGER ch_del_450_trig AFTER DELETE ON CourseTerminology FOR EACH ROW EXECUTE PROCEDURE ch_del_450_fn(); '; _stmtList.add_11rb$(element_1258); var element_1259 = 'CREATE VIEW CourseTerminology_ReceiveView AS SELECT CourseTerminology.*, CourseTerminologyReplicate.* FROM CourseTerminology LEFT JOIN CourseTerminologyReplicate ON CourseTerminologyReplicate.ctPk = CourseTerminology.ctUid '; _stmtList.add_11rb$(element_1259); var element_1260 = "CREATE OR REPLACE FUNCTION courseterminology_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseTerminology(ctUid, ctTitle, ctTerminology, ctLct) VALUES (NEW.ctUid, NEW.ctTitle, NEW.ctTerminology, NEW.ctLct) ON CONFLICT (ctUid) DO UPDATE SET ctTitle = EXCLUDED.ctTitle, ctTerminology = EXCLUDED.ctTerminology, ctLct = EXCLUDED.ctLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1260); var element_1261 = ' CREATE TRIGGER courseterminology_remote_insert_trig INSTEAD OF INSERT ON CourseTerminology_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseterminology_remote_insert_fn() '; _stmtList.add_11rb$(element_1261); var element_1262 = ' CREATE OR REPLACE FUNCTION ch_upd_242_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (242, NEW.cgsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1262); var element_1263 = ' CREATE TRIGGER ch_upd_242_trig AFTER UPDATE OR INSERT ON CourseGroupSet FOR EACH ROW EXECUTE PROCEDURE ch_upd_242_fn(); '; _stmtList.add_11rb$(element_1263); var element_1264 = ' CREATE OR REPLACE FUNCTION ch_del_242_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (242, OLD.cgsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1264); var element_1265 = ' CREATE TRIGGER ch_del_242_trig AFTER DELETE ON CourseGroupSet FOR EACH ROW EXECUTE PROCEDURE ch_del_242_fn(); '; _stmtList.add_11rb$(element_1265); var element_1266 = 'CREATE VIEW CourseGroupSet_ReceiveView AS SELECT CourseGroupSet.*, CourseGroupSetReplicate.* FROM CourseGroupSet LEFT JOIN CourseGroupSetReplicate ON CourseGroupSetReplicate.cgsPk = CourseGroupSet.cgsUid '; _stmtList.add_11rb$(element_1266); var element_1267 = "CREATE OR REPLACE FUNCTION coursegroupset_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseGroupSet(cgsUid, cgsName, cgsTotalGroups, cgsActive, cgsClazzUid, cgsLct) VALUES (NEW.cgsUid, NEW.cgsName, NEW.cgsTotalGroups, NEW.cgsActive, NEW.cgsClazzUid, NEW.cgsLct) ON CONFLICT (cgsUid) DO UPDATE SET cgsName = EXCLUDED.cgsName, cgsTotalGroups = EXCLUDED.cgsTotalGroups, cgsActive = EXCLUDED.cgsActive, cgsClazzUid = EXCLUDED.cgsClazzUid, cgsLct = EXCLUDED.cgsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1267); var element_1268 = ' CREATE TRIGGER coursegroupset_remote_insert_trig INSTEAD OF INSERT ON CourseGroupSet_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursegroupset_remote_insert_fn() '; _stmtList.add_11rb$(element_1268); var element_1269 = ' CREATE OR REPLACE FUNCTION ch_upd_243_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (243, NEW.cgmUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1269); var element_1270 = ' CREATE TRIGGER ch_upd_243_trig AFTER UPDATE OR INSERT ON CourseGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_243_fn(); '; _stmtList.add_11rb$(element_1270); var element_1271 = ' CREATE OR REPLACE FUNCTION ch_del_243_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (243, OLD.cgmUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1271); var element_1272 = ' CREATE TRIGGER ch_del_243_trig AFTER DELETE ON CourseGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_del_243_fn(); '; _stmtList.add_11rb$(element_1272); var element_1273 = 'CREATE VIEW CourseGroupMember_ReceiveView AS SELECT CourseGroupMember.*, CourseGroupMemberReplicate.* FROM CourseGroupMember LEFT JOIN CourseGroupMemberReplicate ON CourseGroupMemberReplicate.cgmPk = CourseGroupMember.cgmUid '; _stmtList.add_11rb$(element_1273); var element_1274 = "CREATE OR REPLACE FUNCTION coursegroupmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseGroupMember(cgmUid, cgmSetUid, cgmGroupNumber, cgmPersonUid, cgmLct) VALUES (NEW.cgmUid, NEW.cgmSetUid, NEW.cgmGroupNumber, NEW.cgmPersonUid, NEW.cgmLct) ON CONFLICT (cgmUid) DO UPDATE SET cgmSetUid = EXCLUDED.cgmSetUid, cgmGroupNumber = EXCLUDED.cgmGroupNumber, cgmPersonUid = EXCLUDED.cgmPersonUid, cgmLct = EXCLUDED.cgmLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1274); var element_1275 = ' CREATE TRIGGER coursegroupmember_remote_insert_trig INSTEAD OF INSERT ON CourseGroupMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursegroupmember_remote_insert_fn() '; _stmtList.add_11rb$(element_1275); var element_1276 = ' CREATE OR REPLACE FUNCTION ch_upd_125_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (125, NEW.coursePictureUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1276); var element_1277 = ' CREATE TRIGGER ch_upd_125_trig AFTER UPDATE OR INSERT ON CoursePicture FOR EACH ROW EXECUTE PROCEDURE ch_upd_125_fn(); '; _stmtList.add_11rb$(element_1277); var element_1278 = ' CREATE OR REPLACE FUNCTION ch_del_125_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (125, OLD.coursePictureUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1278); var element_1279 = ' CREATE TRIGGER ch_del_125_trig AFTER DELETE ON CoursePicture FOR EACH ROW EXECUTE PROCEDURE ch_del_125_fn(); '; _stmtList.add_11rb$(element_1279); var element_1280 = 'CREATE VIEW CoursePicture_ReceiveView AS SELECT CoursePicture.*, CoursePictureReplicate.* FROM CoursePicture LEFT JOIN CoursePictureReplicate ON CoursePictureReplicate.cpPk = CoursePicture.coursePictureUid '; _stmtList.add_11rb$(element_1280); var element_1281 = "CREATE OR REPLACE FUNCTION coursepicture_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CoursePicture(coursePictureUid, coursePictureClazzUid, coursePictureMasterCsn, coursePictureLocalCsn, coursePictureLastChangedBy, coursePictureLct, coursePictureUri, coursePictureMd5, coursePictureFileSize, coursePictureTimestamp, coursePictureMimeType, coursePictureActive) VALUES (NEW.coursePictureUid, NEW.coursePictureClazzUid, NEW.coursePictureMasterCsn, NEW.coursePictureLocalCsn, NEW.coursePictureLastChangedBy, NEW.coursePictureLct, NEW.coursePictureUri, NEW.coursePictureMd5, NEW.coursePictureFileSize, NEW.coursePictureTimestamp, NEW.coursePictureMimeType, NEW.coursePictureActive) ON CONFLICT (coursePictureUid) DO UPDATE SET coursePictureClazzUid = EXCLUDED.coursePictureClazzUid, coursePictureMasterCsn = EXCLUDED.coursePictureMasterCsn, coursePictureLocalCsn = EXCLUDED.coursePictureLocalCsn, coursePictureLastChangedBy = EXCLUDED.coursePictureLastChangedBy, coursePictureLct = EXCLUDED.coursePictureLct, coursePictureUri = EXCLUDED.coursePictureUri, coursePictureMd5 = EXCLUDED.coursePictureMd5, coursePictureFileSize = EXCLUDED.coursePictureFileSize, coursePictureTimestamp = EXCLUDED.coursePictureTimestamp, coursePictureMimeType = EXCLUDED.coursePictureMimeType, coursePictureActive = EXCLUDED.coursePictureActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1281); var element_1282 = ' CREATE TRIGGER coursepicture_remote_insert_trig INSTEAD OF INSERT ON CoursePicture_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursepicture_remote_insert_fn() '; _stmtList.add_11rb$(element_1282); var element_1283 = trimMargin('\n | CREATE OR REPLACE FUNCTION attach_CoursePicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.coursePictureUri AS zaUri\n | FROM CoursePicture \n | WHERE CoursePicture.coursePictureUid = OLD.coursePictureUid\n | AND (SELECT COUNT(*) \n | FROM CoursePicture\n | WHERE coursePictureMd5 = OLD.coursePictureMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n '); _stmtList.add_11rb$(element_1283); var element_1284 = trimMargin('\n |CREATE TRIGGER attach_CoursePicture_trig\n |AFTER UPDATE ON CoursePicture\n |FOR EACH ROW WHEN (OLD.coursePictureMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_CoursePicture_fn();\n '); _stmtList.add_11rb$(element_1284); var element_1285 = ' CREATE OR REPLACE FUNCTION ch_upd_138_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (138, NEW.cepUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1285); var element_1286 = ' CREATE TRIGGER ch_upd_138_trig AFTER UPDATE OR INSERT ON ContentEntryPicture FOR EACH ROW EXECUTE PROCEDURE ch_upd_138_fn(); '; _stmtList.add_11rb$(element_1286); var element_1287 = ' CREATE OR REPLACE FUNCTION ch_del_138_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (138, OLD.cepUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1287); var element_1288 = ' CREATE TRIGGER ch_del_138_trig AFTER DELETE ON ContentEntryPicture FOR EACH ROW EXECUTE PROCEDURE ch_del_138_fn(); '; _stmtList.add_11rb$(element_1288); var element_1289 = 'CREATE VIEW ContentEntryPicture_ReceiveView AS SELECT ContentEntryPicture.*, ContentEntryPictureReplicate.* FROM ContentEntryPicture LEFT JOIN ContentEntryPictureReplicate ON ContentEntryPictureReplicate.cepPk = ContentEntryPicture.cepUid '; _stmtList.add_11rb$(element_1289); var element_1290 = "CREATE OR REPLACE FUNCTION ceppicture_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryPicture(cepUid, cepContentEntryUid, cepUri, cepMd5, cepFileSize, cepTimestamp, cepMimeType, cepActive) VALUES (NEW.cepUid, NEW.cepContentEntryUid, NEW.cepUri, NEW.cepMd5, NEW.cepFileSize, NEW.cepTimestamp, NEW.cepMimeType, NEW.cepActive) ON CONFLICT (cepUid) DO UPDATE SET cepContentEntryUid = EXCLUDED.cepContentEntryUid, cepUri = EXCLUDED.cepUri, cepMd5 = EXCLUDED.cepMd5, cepFileSize = EXCLUDED.cepFileSize, cepTimestamp = EXCLUDED.cepTimestamp, cepMimeType = EXCLUDED.cepMimeType, cepActive = EXCLUDED.cepActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1290); var element_1291 = ' CREATE TRIGGER ceppicture_remote_insert_trig INSTEAD OF INSERT ON ContentEntryPicture_ReceiveView FOR EACH ROW EXECUTE PROCEDURE ceppicture_remote_insert_fn() '; _stmtList.add_11rb$(element_1291); var element_1292 = trimMargin('\n | CREATE OR REPLACE FUNCTION attach_ContentEntryPicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.cepUri AS zaUri\n | FROM ContentEntryPicture \n | WHERE ContentEntryPicture.cepUid = OLD.cepUid\n | AND (SELECT COUNT(*) \n | FROM ContentEntryPicture\n | WHERE cepMd5 = OLD.cepMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n '); _stmtList.add_11rb$(element_1292); var element_1293 = trimMargin('\n |CREATE TRIGGER attach_ContentEntryPicture_trig\n |AFTER UPDATE ON ContentEntryPicture\n |FOR EACH ROW WHEN (OLD.cepMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_ContentEntryPicture_fn();\n '); _stmtList.add_11rb$(element_1293); var element_1294 = ' CREATE OR REPLACE FUNCTION ch_upd_127_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (127, NEW.chatUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1294); var element_1295 = ' CREATE TRIGGER ch_upd_127_trig AFTER UPDATE OR INSERT ON Chat FOR EACH ROW EXECUTE PROCEDURE ch_upd_127_fn(); '; _stmtList.add_11rb$(element_1295); var element_1296 = ' CREATE OR REPLACE FUNCTION ch_del_127_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (127, OLD.chatUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1296); var element_1297 = ' CREATE TRIGGER ch_del_127_trig AFTER DELETE ON Chat FOR EACH ROW EXECUTE PROCEDURE ch_del_127_fn(); '; _stmtList.add_11rb$(element_1297); var element_1298 = 'CREATE VIEW Chat_ReceiveView AS SELECT Chat.*, ChatReplicate.* FROM Chat LEFT JOIN ChatReplicate ON ChatReplicate.chatPk = Chat.chatUid '; _stmtList.add_11rb$(element_1298); var element_1299 = "CREATE OR REPLACE FUNCTION chat_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Chat(chatUid, chatStartDate, chatTitle, chatGroup, chatLct) VALUES(NEW.chatUid, NEW.chatStartDate, NEW.chatTitle, NEW.chatGroup, NEW.chatLct) ON CONFLICT (chatUid) DO UPDATE SET chatStartDate = EXCLUDED.chatStartDate, chatTitle = EXCLUDED.chatTitle, chatGroup = EXCLUDED.chatGroup, chatLct = EXCLUDED.chatLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1299); var element_1300 = ' CREATE TRIGGER chat_remote_insert_trig INSTEAD OF INSERT ON Chat_ReceiveView FOR EACH ROW EXECUTE PROCEDURE chat_remote_insert_fn() '; _stmtList.add_11rb$(element_1300); var element_1301 = ' CREATE OR REPLACE FUNCTION ch_upd_128_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (128, NEW.chatMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1301); var element_1302 = ' CREATE TRIGGER ch_upd_128_trig AFTER UPDATE OR INSERT ON ChatMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_128_fn(); '; _stmtList.add_11rb$(element_1302); var element_1303 = ' CREATE OR REPLACE FUNCTION ch_del_128_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (128, OLD.chatMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1303); var element_1304 = ' CREATE TRIGGER ch_del_128_trig AFTER DELETE ON ChatMember FOR EACH ROW EXECUTE PROCEDURE ch_del_128_fn(); '; _stmtList.add_11rb$(element_1304); var element_1305 = 'CREATE VIEW ChatMember_ReceiveView AS SELECT ChatMember.*, ChatMemberReplicate.* FROM ChatMember LEFT JOIN ChatMemberReplicate ON ChatMemberReplicate.chatMemberPk = ChatMember.chatMemberUid '; _stmtList.add_11rb$(element_1305); var element_1306 = "CREATE OR REPLACE FUNCTION chatmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChatMember(chatMemberUid, chatMemberChatUid, chatMemberPersonUid, chatMemberJoinedDate, chatMemberLeftDate, chatMemberLct) VALUES(NEW.chatMemberUid, NEW.chatMemberChatUid, NEW.chatMemberPersonUid, NEW.chatMemberJoinedDate, NEW.chatMemberLeftDate, NEW.chatMemberLct) ON CONFLICT (chatMemberUid) DO UPDATE SET chatMemberChatUid = EXCLUDED.chatMemberChatUid, chatMemberPersonUid = EXCLUDED.chatMemberPersonUid, chatMemberJoinedDate = EXCLUDED.chatMemberJoinedDate, chatMemberLeftDate = EXCLUDED.chatMemberLeftDate, chatMemberLct = EXCLUDED.chatMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1306); var element_1307 = ' CREATE TRIGGER chatmember_remote_insert_trig INSTEAD OF INSERT ON ChatMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE chatmember_remote_insert_fn() '; _stmtList.add_11rb$(element_1307); var element_1308 = ' CREATE OR REPLACE FUNCTION ch_upd_126_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (126, NEW.messageUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1308); var element_1309 = ' CREATE TRIGGER ch_upd_126_trig AFTER UPDATE OR INSERT ON Message FOR EACH ROW EXECUTE PROCEDURE ch_upd_126_fn(); '; _stmtList.add_11rb$(element_1309); var element_1310 = ' CREATE OR REPLACE FUNCTION ch_del_126_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (126, OLD.messageUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1310); var element_1311 = ' CREATE TRIGGER ch_del_126_trig AFTER DELETE ON Message FOR EACH ROW EXECUTE PROCEDURE ch_del_126_fn(); '; _stmtList.add_11rb$(element_1311); var element_1312 = 'CREATE VIEW Message_ReceiveView AS SELECT Message.*, MessageReplicate.* FROM Message LEFT JOIN MessageReplicate ON MessageReplicate.messagePk = Message.messageUid '; _stmtList.add_11rb$(element_1312); var element_1313 = "CREATE OR REPLACE FUNCTION message_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Message(messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct) VALUES(NEW.messageUid, NEW.messageSenderPersonUid, NEW.messageTableId, NEW.messageEntityUid, NEW.messageText, NEW.messageTimestamp, NEW.messageClazzUid, NEW.messageLct) ON CONFLICT (messageUid) DO UPDATE SET messageSenderPersonUid = EXCLUDED.messageSenderPersonUid, messageTableId = EXCLUDED.messageTableId, messageEntityUid = EXCLUDED.messageEntityUid, messageText = EXCLUDED.messageText, messageTimestamp = EXCLUDED.messageTimestamp, messageClazzUid = EXCLUDED.messageClazzUid, messageLct = EXCLUDED.messageLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1313); var element_1314 = ' CREATE TRIGGER message_remote_insert_trig INSTEAD OF INSERT ON Message_ReceiveView FOR EACH ROW EXECUTE PROCEDURE message_remote_insert_fn() '; _stmtList.add_11rb$(element_1314); var element_1315 = ' CREATE OR REPLACE FUNCTION ch_upd_129_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (129, NEW.messageReadUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1315); var element_1316 = ' CREATE TRIGGER ch_upd_129_trig AFTER UPDATE OR INSERT ON MessageRead FOR EACH ROW EXECUTE PROCEDURE ch_upd_129_fn(); '; _stmtList.add_11rb$(element_1316); var element_1317 = ' CREATE OR REPLACE FUNCTION ch_del_129_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (129, OLD.messageReadUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1317); var element_1318 = ' CREATE TRIGGER ch_del_129_trig AFTER DELETE ON MessageRead FOR EACH ROW EXECUTE PROCEDURE ch_del_129_fn(); '; _stmtList.add_11rb$(element_1318); var element_1319 = 'CREATE VIEW MessageRead_ReceiveView AS SELECT MessageRead.*, MessageReadReplicate.* FROM MessageRead LEFT JOIN MessageReadReplicate ON MessageReadReplicate.messageReadPk = MessageRead.messageReadUid '; _stmtList.add_11rb$(element_1319); var element_1320 = "CREATE OR REPLACE FUNCTION messageread_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO MessageRead(messageReadUid, messageReadPersonUid, messageReadMessageUid, messageReadEntityUid, messageReadLct) VALUES(NEW.messageReadUid, NEW.messageReadPersonUid, NEW.messageReadMessageUid, NEW.messageReadEntityUid, NEW.messageReadLct) ON CONFLICT (messageReadUid) DO UPDATE SET messageReadPersonUid = EXCLUDED.messageReadPersonUid, messageReadMessageUid = EXCLUDED.messageReadMessageUid, messageReadEntityUid = EXCLUDED.messageReadEntityUid, messageReadLct = EXCLUDED.messageReadLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1320); var element_1321 = ' CREATE TRIGGER messageread_remote_insert_trig INSTEAD OF INSERT ON MessageRead_ReceiveView FOR EACH ROW EXECUTE PROCEDURE messageread_remote_insert_fn() '; _stmtList.add_11rb$(element_1321); var element_1322 = ' CREATE OR REPLACE FUNCTION ch_upd_130_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (130, NEW.courseDiscussionUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1322); var element_1323 = ' CREATE TRIGGER ch_upd_130_trig AFTER UPDATE OR INSERT ON CourseDiscussion FOR EACH ROW EXECUTE PROCEDURE ch_upd_130_fn(); '; _stmtList.add_11rb$(element_1323); var element_1324 = ' CREATE OR REPLACE FUNCTION ch_del_130_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (130, OLD.courseDiscussionUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1324); var element_1325 = ' CREATE TRIGGER ch_del_130_trig AFTER DELETE ON CourseDiscussion FOR EACH ROW EXECUTE PROCEDURE ch_del_130_fn(); '; _stmtList.add_11rb$(element_1325); var element_1326 = 'CREATE VIEW CourseDiscussion_ReceiveView AS SELECT CourseDiscussion.*, CourseDiscussionReplicate.* FROM CourseDiscussion LEFT JOIN CourseDiscussionReplicate ON CourseDiscussionReplicate.courseDiscussionPk = CourseDiscussion.courseDiscussionUid '; _stmtList.add_11rb$(element_1326); var element_1327 = "CREATE OR REPLACE FUNCTION coursediscussion_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseDiscussion(courseDiscussionUid, courseDiscussionActive, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionLct) VALUES(NEW.courseDiscussionUid, NEW.courseDiscussionActive, NEW.courseDiscussionTitle, NEW.courseDiscussionDesc, NEW.courseDiscussionClazzUid, NEW.courseDiscussionLct) ON CONFLICT (courseDiscussionUid) DO UPDATE SET courseDiscussionActive = EXCLUDED.courseDiscussionActive, courseDiscussionTitle = EXCLUDED.courseDiscussionTitle, courseDiscussionDesc = EXCLUDED.courseDiscussionDesc, courseDiscussionClazzUid = EXCLUDED.courseDiscussionClazzUid, courseDiscussionLct = EXCLUDED.courseDiscussionLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1327); var element_1328 = ' CREATE TRIGGER coursediscussion_remote_insert_trig INSTEAD OF INSERT ON CourseDiscussion_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursediscussion_remote_insert_fn() '; _stmtList.add_11rb$(element_1328); var element_1329 = ' CREATE OR REPLACE FUNCTION ch_upd_131_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (131, NEW.discussionTopicUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1329); var element_1330 = ' CREATE TRIGGER ch_upd_131_trig AFTER UPDATE OR INSERT ON DiscussionTopic FOR EACH ROW EXECUTE PROCEDURE ch_upd_131_fn(); '; _stmtList.add_11rb$(element_1330); var element_1331 = ' CREATE OR REPLACE FUNCTION ch_del_131_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (131, OLD.discussionTopicUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1331); var element_1332 = ' CREATE TRIGGER ch_del_131_trig AFTER DELETE ON DiscussionTopic FOR EACH ROW EXECUTE PROCEDURE ch_del_131_fn(); '; _stmtList.add_11rb$(element_1332); var element_1333 = 'CREATE VIEW DiscussionTopic_ReceiveView AS SELECT DiscussionTopic.*, DiscussionTopicReplicate.* FROM DiscussionTopic LEFT JOIN DiscussionTopicReplicate ON DiscussionTopicReplicate.discussionTopicPk = DiscussionTopic.discussionTopicUid '; _stmtList.add_11rb$(element_1333); var element_1334 = "CREATE OR REPLACE FUNCTION discussiontopic_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO DiscussionTopic(discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(NEW.discussionTopicUid, NEW.discussionTopicTitle, NEW.discussionTopicDesc, NEW.discussionTopicStartDate, NEW.discussionTopicCourseDiscussionUid, NEW.discussionTopicVisible, NEW.discussionTopicArchive, NEW.discussionTopicIndex, NEW.discussionTopicClazzUid, NEW.discussionTopicLct) ON CONFLICT (discussionTopicUid) DO UPDATE SET discussionTopicTitle = EXCLUDED.discussionTopicTitle, discussionTopicDesc = EXCLUDED.discussionTopicDesc, discussionTopicStartDate = EXCLUDED.discussionTopicStartDate, discussionTopicCourseDiscussionUid = EXCLUDED.discussionTopicCourseDiscussionUid, discussionTopicVisible = EXCLUDED.discussionTopicVisible, discussionTopicArchive = EXCLUDED.discussionTopicArchive, discussionTopicIndex = EXCLUDED.discussionTopicIndex, discussionTopicClazzUid = EXCLUDED.discussionTopicClazzUid, discussionTopicLct = EXCLUDED.discussionTopicLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1334); var element_1335 = ' CREATE TRIGGER discussiontopic_remote_insert_trig INSTEAD OF INSERT ON DiscussionTopic_ReceiveView FOR EACH ROW EXECUTE PROCEDURE discussiontopic_remote_insert_fn() '; _stmtList.add_11rb$(element_1335); var element_1336 = ' CREATE OR REPLACE FUNCTION ch_upd_132_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (132, NEW.discussionPostUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1336); var element_1337 = ' CREATE TRIGGER ch_upd_132_trig AFTER UPDATE OR INSERT ON DiscussionPost FOR EACH ROW EXECUTE PROCEDURE ch_upd_132_fn(); '; _stmtList.add_11rb$(element_1337); var element_1338 = ' CREATE OR REPLACE FUNCTION ch_del_132_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (132, OLD.discussionPostUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_1338); var element_1339 = ' CREATE TRIGGER ch_del_132_trig AFTER DELETE ON DiscussionPost FOR EACH ROW EXECUTE PROCEDURE ch_del_132_fn(); '; _stmtList.add_11rb$(element_1339); var element_1340 = 'CREATE VIEW DiscussionPost_ReceiveView AS SELECT DiscussionPost.*, DiscussionPostReplicate.* FROM DiscussionPost LEFT JOIN DiscussionPostReplicate ON DiscussionPostReplicate.discussionPostPk = DiscussionPost.discussionPostUid '; _stmtList.add_11rb$(element_1340); var element_1341 = "CREATE OR REPLACE FUNCTION discussionpost_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO DiscussionPost(discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct) VALUES(NEW.discussionPostUid, NEW.discussionPostTitle, NEW.discussionPostMessage, NEW.discussionPostStartDate, NEW.discussionPostDiscussionTopicUid, NEW.discussionPostVisible, NEW.discussionPostArchive, NEW.discussionPostStartedPersonUid, NEW.discussionPostClazzUid, NEW.discussionPostLct) ON CONFLICT (discussionPostUid) DO UPDATE SET discussionPostTitle = EXCLUDED.discussionPostTitle , discussionPostMessage = EXCLUDED.discussionPostMessage , discussionPostStartDate = EXCLUDED.discussionPostStartDate , discussionPostDiscussionTopicUid = EXCLUDED.discussionPostDiscussionTopicUid, discussionPostVisible = EXCLUDED.discussionPostVisible , discussionPostArchive = EXCLUDED.discussionPostArchive , discussionPostStartedPersonUid = EXCLUDED.discussionPostStartedPersonUid , discussionPostClazzUid = EXCLUDED.discussionPostClazzUid, discussionPostLct = EXCLUDED.discussionPostLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_1341); var element_1342 = ' CREATE TRIGGER discussionpost_remote_insert_trig INSTEAD OF INSERT ON DiscussionPost_ReceiveView FOR EACH ROW EXECUTE PROCEDURE discussionpost_remote_insert_fn() '; _stmtList.add_11rb$(element_1342); break; } return _stmtList; }; UmAppDatabase_JdbcKt.prototype.makeClearAllTablesSql = function () { var _stmtList = ArrayList_init(); var element = 'DELETE FROM NetworkNode'; _stmtList.add_11rb$(element); var element_0 = 'DELETE FROM ClazzLog'; _stmtList.add_11rb$(element_0); var element_1 = 'DELETE FROM ClazzLogAttendanceRecord'; _stmtList.add_11rb$(element_1); var element_2 = 'DELETE FROM Schedule'; _stmtList.add_11rb$(element_2); var element_3 = 'DELETE FROM DateRange'; _stmtList.add_11rb$(element_3); var element_4 = 'DELETE FROM HolidayCalendar'; _stmtList.add_11rb$(element_4); var element_5 = 'DELETE FROM Holiday'; _stmtList.add_11rb$(element_5); var element_6 = 'DELETE FROM ScheduledCheck'; _stmtList.add_11rb$(element_6); var element_7 = 'DELETE FROM AuditLog'; _stmtList.add_11rb$(element_7); var element_8 = 'DELETE FROM CustomField'; _stmtList.add_11rb$(element_8); var element_9 = 'DELETE FROM CustomFieldValue'; _stmtList.add_11rb$(element_9); var element_10 = 'DELETE FROM CustomFieldValueOption'; _stmtList.add_11rb$(element_10); var element_11 = 'DELETE FROM Person'; _stmtList.add_11rb$(element_11); var element_12 = 'DELETE FROM Clazz'; _stmtList.add_11rb$(element_12); var element_13 = 'DELETE FROM ClazzEnrolment'; _stmtList.add_11rb$(element_13); var element_14 = 'DELETE FROM LeavingReason'; _stmtList.add_11rb$(element_14); var element_15 = 'DELETE FROM ContentEntry'; _stmtList.add_11rb$(element_15); var element_16 = 'DELETE FROM ContentEntryContentCategoryJoin'; _stmtList.add_11rb$(element_16); var element_17 = 'DELETE FROM ContentEntryParentChildJoin'; _stmtList.add_11rb$(element_17); var element_18 = 'DELETE FROM ContentEntryRelatedEntryJoin'; _stmtList.add_11rb$(element_18); var element_19 = 'DELETE FROM ContentCategorySchema'; _stmtList.add_11rb$(element_19); var element_20 = 'DELETE FROM ContentCategory'; _stmtList.add_11rb$(element_20); var element_21 = 'DELETE FROM Language'; _stmtList.add_11rb$(element_21); var element_22 = 'DELETE FROM LanguageVariant'; _stmtList.add_11rb$(element_22); var element_23 = 'DELETE FROM AccessToken'; _stmtList.add_11rb$(element_23); var element_24 = 'DELETE FROM PersonAuth'; _stmtList.add_11rb$(element_24); var element_25 = 'DELETE FROM Role'; _stmtList.add_11rb$(element_25); var element_26 = 'DELETE FROM EntityRole'; _stmtList.add_11rb$(element_26); var element_27 = 'DELETE FROM PersonGroup'; _stmtList.add_11rb$(element_27); var element_28 = 'DELETE FROM PersonGroupMember'; _stmtList.add_11rb$(element_28); var element_29 = 'DELETE FROM PersonPicture'; _stmtList.add_11rb$(element_29); var element_30 = 'DELETE FROM ScrapeQueueItem'; _stmtList.add_11rb$(element_30); var element_31 = 'DELETE FROM ScrapeRun'; _stmtList.add_11rb$(element_31); var element_32 = 'DELETE FROM ConnectivityStatus'; _stmtList.add_11rb$(element_32); var element_33 = 'DELETE FROM Container'; _stmtList.add_11rb$(element_33); var element_34 = 'DELETE FROM ContainerEntry'; _stmtList.add_11rb$(element_34); var element_35 = 'DELETE FROM ContainerEntryFile'; _stmtList.add_11rb$(element_35); var element_36 = 'DELETE FROM VerbEntity'; _stmtList.add_11rb$(element_36); var element_37 = 'DELETE FROM XObjectEntity'; _stmtList.add_11rb$(element_37); var element_38 = 'DELETE FROM StatementEntity'; _stmtList.add_11rb$(element_38); var element_39 = 'DELETE FROM ContextXObjectStatementJoin'; _stmtList.add_11rb$(element_39); var element_40 = 'DELETE FROM AgentEntity'; _stmtList.add_11rb$(element_40); var element_41 = 'DELETE FROM StateEntity'; _stmtList.add_11rb$(element_41); var element_42 = 'DELETE FROM StateContentEntity'; _stmtList.add_11rb$(element_42); var element_43 = 'DELETE FROM XLangMapEntry'; _stmtList.add_11rb$(element_43); var element_44 = 'DELETE FROM SyncNode'; _stmtList.add_11rb$(element_44); var element_45 = 'DELETE FROM LocallyAvailableContainer'; _stmtList.add_11rb$(element_45); var element_46 = 'DELETE FROM ContainerETag'; _stmtList.add_11rb$(element_46); var element_47 = 'DELETE FROM School'; _stmtList.add_11rb$(element_47); var element_48 = 'DELETE FROM SchoolMember'; _stmtList.add_11rb$(element_48); var element_49 = 'DELETE FROM Comments'; _stmtList.add_11rb$(element_49); var element_50 = 'DELETE FROM Report'; _stmtList.add_11rb$(element_50); var element_51 = 'DELETE FROM Site'; _stmtList.add_11rb$(element_51); var element_52 = 'DELETE FROM ContainerImportJob'; _stmtList.add_11rb$(element_52); var element_53 = 'DELETE FROM LearnerGroup'; _stmtList.add_11rb$(element_53); var element_54 = 'DELETE FROM LearnerGroupMember'; _stmtList.add_11rb$(element_54); var element_55 = 'DELETE FROM GroupLearningSession'; _stmtList.add_11rb$(element_55); var element_56 = 'DELETE FROM SiteTerms'; _stmtList.add_11rb$(element_56); var element_57 = 'DELETE FROM ClazzContentJoin'; _stmtList.add_11rb$(element_57); var element_58 = 'DELETE FROM PersonParentJoin'; _stmtList.add_11rb$(element_58); var element_59 = 'DELETE FROM ScopedGrant'; _stmtList.add_11rb$(element_59); var element_60 = 'DELETE FROM ErrorReport'; _stmtList.add_11rb$(element_60); var element_61 = 'DELETE FROM ClazzAssignment'; _stmtList.add_11rb$(element_61); var element_62 = 'DELETE FROM ClazzAssignmentContentJoin'; _stmtList.add_11rb$(element_62); var element_63 = 'DELETE FROM CourseAssignmentSubmission'; _stmtList.add_11rb$(element_63); var element_64 = 'DELETE FROM CourseAssignmentSubmissionAttachment'; _stmtList.add_11rb$(element_64); var element_65 = 'DELETE FROM CourseAssignmentMark'; _stmtList.add_11rb$(element_65); var element_66 = 'DELETE FROM ClazzAssignmentRollUp'; _stmtList.add_11rb$(element_66); var element_67 = 'DELETE FROM PersonAuth2'; _stmtList.add_11rb$(element_67); var element_68 = 'DELETE FROM UserSession'; _stmtList.add_11rb$(element_68); var element_69 = 'DELETE FROM ContentJob'; _stmtList.add_11rb$(element_69); var element_70 = 'DELETE FROM ContentJobItem'; _stmtList.add_11rb$(element_70); var element_71 = 'DELETE FROM CourseBlock'; _stmtList.add_11rb$(element_71); var element_72 = 'DELETE FROM CourseTerminology'; _stmtList.add_11rb$(element_72); var element_73 = 'DELETE FROM CourseGroupSet'; _stmtList.add_11rb$(element_73); var element_74 = 'DELETE FROM CourseGroupMember'; _stmtList.add_11rb$(element_74); var element_75 = 'DELETE FROM ChangeLog'; _stmtList.add_11rb$(element_75); var element_76 = 'DELETE FROM ZombieAttachmentData'; _stmtList.add_11rb$(element_76); var element_77 = 'DELETE FROM DoorNode'; _stmtList.add_11rb$(element_77); var element_78 = 'DELETE FROM ReplicationStatus'; _stmtList.add_11rb$(element_78); var element_79 = 'DELETE FROM ClazzLogReplicate'; _stmtList.add_11rb$(element_79); var element_80 = 'DELETE FROM ClazzLogAttendanceRecordReplicate'; _stmtList.add_11rb$(element_80); var element_81 = 'DELETE FROM CourseAssignmentSubmissionReplicate'; _stmtList.add_11rb$(element_81); var element_82 = 'DELETE FROM CourseAssignmentSubmissionAttachmentReplicate'; _stmtList.add_11rb$(element_82); var element_83 = 'DELETE FROM CourseAssignmentMarkReplicate'; _stmtList.add_11rb$(element_83); var element_84 = 'DELETE FROM CourseBlockReplicate'; _stmtList.add_11rb$(element_84); var element_85 = 'DELETE FROM CourseTerminologyReplicate'; _stmtList.add_11rb$(element_85); var element_86 = 'DELETE FROM CourseGroupSetReplicate'; _stmtList.add_11rb$(element_86); var element_87 = 'DELETE FROM CourseGroupMemberReplicate'; _stmtList.add_11rb$(element_87); var element_88 = 'DELETE FROM ScheduleReplicate'; _stmtList.add_11rb$(element_88); var element_89 = 'DELETE FROM HolidayCalendarReplicate'; _stmtList.add_11rb$(element_89); var element_90 = 'DELETE FROM HolidayReplicate'; _stmtList.add_11rb$(element_90); var element_91 = 'DELETE FROM PersonReplicate'; _stmtList.add_11rb$(element_91); var element_92 = 'DELETE FROM ClazzReplicate'; _stmtList.add_11rb$(element_92); var element_93 = 'DELETE FROM ClazzEnrolmentReplicate'; _stmtList.add_11rb$(element_93); var element_94 = 'DELETE FROM LeavingReasonReplicate'; _stmtList.add_11rb$(element_94); var element_95 = 'DELETE FROM ContentEntryReplicate'; _stmtList.add_11rb$(element_95); var element_96 = 'DELETE FROM ContentEntryContentCategoryJoinReplicate'; _stmtList.add_11rb$(element_96); var element_97 = 'DELETE FROM ContentEntryParentChildJoinReplicate'; _stmtList.add_11rb$(element_97); var element_98 = 'DELETE FROM ContentEntryRelatedEntryJoinReplicate'; _stmtList.add_11rb$(element_98); var element_99 = 'DELETE FROM ContentCategorySchemaReplicate'; _stmtList.add_11rb$(element_99); var element_100 = 'DELETE FROM ContentCategoryReplicate'; _stmtList.add_11rb$(element_100); var element_101 = 'DELETE FROM LanguageReplicate'; _stmtList.add_11rb$(element_101); var element_102 = 'DELETE FROM LanguageVariantReplicate'; _stmtList.add_11rb$(element_102); var element_103 = 'DELETE FROM PersonGroupReplicate'; _stmtList.add_11rb$(element_103); var element_104 = 'DELETE FROM PersonGroupMemberReplicate'; _stmtList.add_11rb$(element_104); var element_105 = 'DELETE FROM PersonPictureReplicate'; _stmtList.add_11rb$(element_105); var element_106 = 'DELETE FROM ContainerReplicate'; _stmtList.add_11rb$(element_106); var element_107 = 'DELETE FROM VerbEntityReplicate'; _stmtList.add_11rb$(element_107); var element_108 = 'DELETE FROM XObjectEntityReplicate'; _stmtList.add_11rb$(element_108); var element_109 = 'DELETE FROM StatementEntityReplicate'; _stmtList.add_11rb$(element_109); var element_110 = 'DELETE FROM ContextXObjectStatementJoinReplicate'; _stmtList.add_11rb$(element_110); var element_111 = 'DELETE FROM AgentEntityReplicate'; _stmtList.add_11rb$(element_111); var element_112 = 'DELETE FROM StateEntityReplicate'; _stmtList.add_11rb$(element_112); var element_113 = 'DELETE FROM StateContentEntityReplicate'; _stmtList.add_11rb$(element_113); var element_114 = 'DELETE FROM XLangMapEntryReplicate'; _stmtList.add_11rb$(element_114); var element_115 = 'DELETE FROM SchoolReplicate'; _stmtList.add_11rb$(element_115); var element_116 = 'DELETE FROM SchoolMemberReplicate'; _stmtList.add_11rb$(element_116); var element_117 = 'DELETE FROM CommentsReplicate'; _stmtList.add_11rb$(element_117); var element_118 = 'DELETE FROM ReportReplicate'; _stmtList.add_11rb$(element_118); var element_119 = 'DELETE FROM SiteReplicate'; _stmtList.add_11rb$(element_119); var element_120 = 'DELETE FROM LearnerGroupReplicate'; _stmtList.add_11rb$(element_120); var element_121 = 'DELETE FROM LearnerGroupMemberReplicate'; _stmtList.add_11rb$(element_121); var element_122 = 'DELETE FROM GroupLearningSessionReplicate'; _stmtList.add_11rb$(element_122); var element_123 = 'DELETE FROM SiteTermsReplicate'; _stmtList.add_11rb$(element_123); var element_124 = 'DELETE FROM ClazzContentJoinReplicate'; _stmtList.add_11rb$(element_124); var element_125 = 'DELETE FROM PersonParentJoinReplicate'; _stmtList.add_11rb$(element_125); var element_126 = 'DELETE FROM ScopedGrantReplicate'; _stmtList.add_11rb$(element_126); var element_127 = 'DELETE FROM ErrorReportReplicate'; _stmtList.add_11rb$(element_127); var element_128 = 'DELETE FROM ClazzAssignmentReplicate'; _stmtList.add_11rb$(element_128); var element_129 = 'DELETE FROM ClazzAssignmentContentJoinReplicate'; _stmtList.add_11rb$(element_129); var element_130 = 'DELETE FROM PersonAuth2Replicate'; _stmtList.add_11rb$(element_130); var element_131 = 'DELETE FROM UserSessionReplicate'; _stmtList.add_11rb$(element_131); var element_132 = 'DELETE FROM CoursePicture'; _stmtList.add_11rb$(element_132); var element_133 = 'DELETE FROM CoursePictureReplicate'; _stmtList.add_11rb$(element_133); var element_134 = 'DELETE FROM ContentEntryPicture'; _stmtList.add_11rb$(element_134); var element_135 = 'DELETE FROM ContentEntryPictureReplicate'; _stmtList.add_11rb$(element_135); var element_136 = 'DELETE FROM Chat'; _stmtList.add_11rb$(element_136); var element_137 = 'DELETE FROM ChatMember'; _stmtList.add_11rb$(element_137); var element_138 = 'DELETE FROM Message'; _stmtList.add_11rb$(element_138); var element_139 = 'DELETE FROM MessageReplicate'; _stmtList.add_11rb$(element_139); var element_140 = 'DELETE FROM ChatReplicate'; _stmtList.add_11rb$(element_140); var element_141 = 'DELETE FROM ChatMemberReplicate'; _stmtList.add_11rb$(element_141); var element_142 = 'DELETE FROM MessageRead'; _stmtList.add_11rb$(element_142); var element_143 = 'DELETE FROM MessageReadReplicate'; _stmtList.add_11rb$(element_143); var element_144 = 'DELETE FROM CourseDiscussion'; _stmtList.add_11rb$(element_144); var element_145 = 'DELETE FROM CourseDiscussionReplicate'; _stmtList.add_11rb$(element_145); var element_146 = 'DELETE FROM DiscussionTopic'; _stmtList.add_11rb$(element_146); var element_147 = 'DELETE FROM DiscussionTopicReplicate'; _stmtList.add_11rb$(element_147); var element_148 = 'DELETE FROM DiscussionPost'; _stmtList.add_11rb$(element_148); var element_149 = 'DELETE FROM DiscussionPostReplicate'; _stmtList.add_11rb$(element_149); return _stmtList; }; UmAppDatabase_JdbcKt.prototype.clearAllTables = function () { throw IllegalStateException_init('clearAllTables synchronous not supported on Javascript'); }; function Coroutine$clearAllTablesAsync($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$clearAllTablesAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$clearAllTablesAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$clearAllTablesAsync.prototype.constructor = Coroutine$clearAllTablesAsync; Coroutine$clearAllTablesAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this.execSQLBatchAsyncJs_vqirvp$(copyToArray(this.$this.makeClearAllTablesSql()).slice(), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_JdbcKt.prototype.clearAllTablesAsync = function (continuation_0, suspended) { var instance = new Coroutine$clearAllTablesAsync(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UmAppDatabase_JdbcKt.prototype.getInvalidationTracker = function () { return this.jdbcImplHelper.invalidationTracker; }; function UmAppDatabase_JdbcKt$realReplicationNotificationDispatcher$lambda(this$UmAppDatabase_JdbcKt) { return function () { if (equals(this$UmAppDatabase_JdbcKt, get_rootDatabase(this$UmAppDatabase_JdbcKt))) { return new ReplicationNotificationDispatcher(this$UmAppDatabase_JdbcKt, new UmAppDatabase_ReplicationRunOnChangeRunner(this$UmAppDatabase_JdbcKt), coroutines.GlobalScope); } else { return get_replicationNotificationDispatcher(get_rootDatabase(this$UmAppDatabase_JdbcKt)); } }; } function UmAppDatabase_JdbcKt$realNodeIdAuthCache$lambda(this$UmAppDatabase_JdbcKt) { return function () { if (equals(this$UmAppDatabase_JdbcKt, get_rootDatabase(this$UmAppDatabase_JdbcKt))) { var nodeIdAuthCache = new NodeIdAuthCache(this$UmAppDatabase_JdbcKt); nodeIdAuthCache.addNewNodeListener_jgigus$(this$UmAppDatabase_JdbcKt.realReplicationNotificationDispatcher); return nodeIdAuthCache; } else { return get_nodeIdAuthCache(get_rootDatabase(this$UmAppDatabase_JdbcKt)); } }; } function UmAppDatabase_JdbcKt$realPrimaryKeyManager$lambda() { return new DoorPrimaryKeyManager(doorDatabaseMetadata(getKClass(UmAppDatabase)).replicateEntities.keys); } function UmAppDatabase_JdbcKt$_NetworkNodeDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new NetworkNodeDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseBlockDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseBlockDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseTerminologyDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseTerminologyDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseGroupSetDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseGroupSetDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseGroupMemberDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseGroupMemberDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzEnrolmentDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzEnrolmentDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_LeavingReasonDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new LeavingReasonDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentEntryDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentEntryDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentEntryContentCategoryJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentEntryContentCategoryJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentEntryParentChildJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentEntryParentChildJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentEntryRelatedEntryJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentEntryRelatedEntryJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzContentJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzContentJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentCategorySchemaDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentCategorySchemaDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentCategoryDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentCategoryDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_LanguageDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new LanguageDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_LanguageVariantDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new LanguageVariantDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ScrapeQueueItemDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ScrapeQueueItemDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonAuthDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonAuthDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonGroupDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonGroupDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonGroupMemberDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonGroupMemberDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_EntityRoleDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new EntityRoleDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonPictureDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonPictureDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ConnectivityStatusDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ConnectivityStatusDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContainerDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContainerDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContainerEntryDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContainerEntryDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContainerEntryFileDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContainerEntryFileDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContainerETagDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContainerETagDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_VerbDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new VerbDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_XObjectDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new XObjectDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ReportDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ReportDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContainerImportJobDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContainerImportJobDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_StatementDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new StatementDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContextXObjectStatementJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContextXObjectStatementJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_StateDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new StateDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_StateContentDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new StateContentDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_AgentDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new AgentDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_LearnerGroupDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new LearnerGroupDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_LearnerGroupMemberDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new LearnerGroupMemberDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_GroupLearningSessionDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new GroupLearningSessionDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzLogAttendanceRecordDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzLogAttendanceRecordDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzLogDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzLogDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ScheduleDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ScheduleDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_HolidayCalendarDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new HolidayCalendarDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_HolidayDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new HolidayDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_SchoolDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new SchoolDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_XLangMapEntryDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new XLangMapEntryDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_LocallyAvailableContainerDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new LocallyAvailableContainerDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_SchoolMemberDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new SchoolMemberDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzAssignmentDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzAssignmentDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzAssignmentContentJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzAssignmentContentJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ClazzAssignmentRollUpDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ClazzAssignmentRollUpDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseAssignmentSubmissionDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseAssignmentSubmissionDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseAssignmentSubmissionAttachmentDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseAssignmentSubmissionAttachmentDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseAssignmentMarkDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseAssignmentMarkDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CommentsDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CommentsDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_SyncNodeDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new SyncNodeDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_SiteDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new SiteDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_SiteTermsDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new SiteTermsDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonParentJoinDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonParentJoinDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ScopedGrantDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ScopedGrantDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ErrorReportDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ErrorReportDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_PersonAuth2Dao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new PersonAuth2Dao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_UserSessionDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new UserSessionDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentJobItemDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentJobItemDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentJobDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentJobDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CoursePictureDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CoursePictureDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ContentEntryPictureDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ContentEntryPictureDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ChatDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ChatDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_ChatMemberDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new ChatMemberDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_MessageDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new MessageDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_MessageReadDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new MessageReadDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_CourseDiscussionDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new CourseDiscussionDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_DiscussionTopicDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new DiscussionTopicDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } function UmAppDatabase_JdbcKt$_DiscussionPostDao$lambda(this$UmAppDatabase_JdbcKt) { return function () { return new DiscussionPostDao_JdbcKt(this$UmAppDatabase_JdbcKt); }; } UmAppDatabase_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'UmAppDatabase_JdbcKt', interfaces: [RoomJdbcImpl, DoorDatabaseJdbc, UmAppDatabase]}; function UmAppDatabase_ReplicateWrapper(_db) { UmAppDatabase.call(this); this._db_0 = _db; this._PersonDao_z4p9xw$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_PersonDao$lambda(this)); this._ClazzDao_yxezhz$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzDao$lambda(this)); this._CourseBlockDao_i86l99$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseBlockDao$lambda(this)); this._CourseTerminologyDao_f5vdrr$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseTerminologyDao$lambda(this)); this._CourseGroupSetDao_xqwtyb$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseGroupSetDao$lambda(this)); this._CourseGroupMemberDao_q315bl$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseGroupMemberDao$lambda(this)); this._ClazzEnrolmentDao_oy22mt$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzEnrolmentDao$lambda(this)); this._LeavingReasonDao_4srg53$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_LeavingReasonDao$lambda(this)); this._ContentEntryDao_bny0zs$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentEntryDao$lambda(this)); this._ContentEntryContentCategoryJoinDao_xqhj8n$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentEntryContentCategoryJoinDao$lambda(this)); this._ContentEntryParentChildJoinDao_z4w8fg$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentEntryParentChildJoinDao$lambda(this)); this._ContentEntryRelatedEntryJoinDao_4n64nr$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentEntryRelatedEntryJoinDao$lambda(this)); this._ClazzContentJoinDao_jtpmiy$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzContentJoinDao$lambda(this)); this._ContentCategorySchemaDao_7v6m4p$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentCategorySchemaDao$lambda(this)); this._ContentCategoryDao_5p3nm0$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentCategoryDao$lambda(this)); this._LanguageDao_4effpz$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_LanguageDao$lambda(this)); this._LanguageVariantDao_3ts532$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_LanguageVariantDao$lambda(this)); this._PersonGroupDao_uoc3q3$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_PersonGroupDao$lambda(this)); this._PersonGroupMemberDao_hw3wwl$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_PersonGroupMemberDao$lambda(this)); this._PersonPictureDao_oehixy$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_PersonPictureDao$lambda(this)); this._ContainerDao_y4hlv6$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContainerDao$lambda(this)); this._VerbDao_p6904i$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_VerbDao$lambda(this)); this._XObjectDao_414f3s$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_XObjectDao$lambda(this)); this._ReportDao_f6l1xp$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ReportDao$lambda(this)); this._StatementDao_8blrs0$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_StatementDao$lambda(this)); this._ContextXObjectStatementJoinDao_grco9q$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContextXObjectStatementJoinDao$lambda(this)); this._StateDao_1nkqke$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_StateDao$lambda(this)); this._StateContentDao_yxj9d3$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_StateContentDao$lambda(this)); this._AgentDao_4pjncm$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_AgentDao$lambda(this)); this._LearnerGroupDao_d12bg3$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_LearnerGroupDao$lambda(this)); this._LearnerGroupMemberDao_yxhk6x$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_LearnerGroupMemberDao$lambda(this)); this._GroupLearningSessionDao_wyleco$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_GroupLearningSessionDao$lambda(this)); this._ClazzLogAttendanceRecordDao_8wntrv$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzLogAttendanceRecordDao$lambda(this)); this._ClazzLogDao_x9zu45$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzLogDao$lambda(this)); this._ScheduleDao_ctbune$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ScheduleDao$lambda(this)); this._HolidayCalendarDao_ulk4x3$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_HolidayCalendarDao$lambda(this)); this._HolidayDao_o65v9l$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_HolidayDao$lambda(this)); this._SchoolDao_mbg6cz$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_SchoolDao$lambda(this)); this._XLangMapEntryDao_8igs4z$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_XLangMapEntryDao$lambda(this)); this._SchoolMemberDao_t3wkt$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_SchoolMemberDao$lambda(this)); this._ClazzAssignmentDao_3ritje$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzAssignmentDao$lambda(this)); this._ClazzAssignmentContentJoinDao_c3dv5p$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ClazzAssignmentContentJoinDao$lambda(this)); this._CourseAssignmentSubmissionDao_3ulqsz$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseAssignmentSubmissionDao$lambda(this)); this._CourseAssignmentSubmissionAttachmentDao_ib6fwq$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseAssignmentSubmissionAttachmentDao$lambda(this)); this._CourseAssignmentMarkDao_m886vg$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseAssignmentMarkDao$lambda(this)); this._CommentsDao_il4mj1$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CommentsDao$lambda(this)); this._SiteDao_j3be4m$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_SiteDao$lambda(this)); this._SiteTermsDao_7vhenl$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_SiteTermsDao$lambda(this)); this._PersonParentJoinDao_a70e5k$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_PersonParentJoinDao$lambda(this)); this._ScopedGrantDao_wu1qzn$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ScopedGrantDao$lambda(this)); this._ErrorReportDao_yuub65$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ErrorReportDao$lambda(this)); this._PersonAuth2Dao_7mmgyu$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_PersonAuth2Dao$lambda(this)); this._UserSessionDao_9evou4$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_UserSessionDao$lambda(this)); this._CoursePictureDao_3orl8$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CoursePictureDao$lambda(this)); this._ContentEntryPictureDao_j5086u$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ContentEntryPictureDao$lambda(this)); this._ChatDao_vp405z$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ChatDao$lambda(this)); this._ChatMemberDao_xtv975$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_ChatMemberDao$lambda(this)); this._MessageDao_glinco$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_MessageDao$lambda(this)); this._MessageReadDao_n0br0y$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_MessageReadDao$lambda(this)); this._CourseDiscussionDao_2sbhnm$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_CourseDiscussionDao$lambda(this)); this._DiscussionTopicDao_4z0ot4$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_DiscussionTopicDao$lambda(this)); this._DiscussionPostDao_7vrkiv$_0 = lazy_0(UmAppDatabase_ReplicateWrapper$_DiscussionPostDao$lambda(this)); } Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'dbVersion', {configurable: true, get: function () { return 107; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'dbName', {configurable: true, get: function () { return 'DoorWrapper for [' + this._db_0.toString() + ']'; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'networkNodeDao', {configurable: true, get: function () { return this._db_0.networkNodeDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_PersonDao', {configurable: true, get: function () { return this._PersonDao_z4p9xw$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personDao', {configurable: true, get: function () { return this._PersonDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzDao', {configurable: true, get: function () { return this._ClazzDao_yxezhz$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzDao', {configurable: true, get: function () { return this._ClazzDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseBlockDao', {configurable: true, get: function () { return this._CourseBlockDao_i86l99$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseBlockDao', {configurable: true, get: function () { return this._CourseBlockDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseTerminologyDao', {configurable: true, get: function () { return this._CourseTerminologyDao_f5vdrr$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseTerminologyDao', {configurable: true, get: function () { return this._CourseTerminologyDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseGroupSetDao', {configurable: true, get: function () { return this._CourseGroupSetDao_xqwtyb$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseGroupSetDao', {configurable: true, get: function () { return this._CourseGroupSetDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseGroupMemberDao', {configurable: true, get: function () { return this._CourseGroupMemberDao_q315bl$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseGroupMemberDao', {configurable: true, get: function () { return this._CourseGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzEnrolmentDao', {configurable: true, get: function () { return this._ClazzEnrolmentDao_oy22mt$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzEnrolmentDao', {configurable: true, get: function () { return this._ClazzEnrolmentDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_LeavingReasonDao', {configurable: true, get: function () { return this._LeavingReasonDao_4srg53$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'leavingReasonDao', {configurable: true, get: function () { return this._LeavingReasonDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentEntryDao', {configurable: true, get: function () { return this._ContentEntryDao_bny0zs$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentEntryDao', {configurable: true, get: function () { return this._ContentEntryDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentEntryContentCategoryJoinDao', {configurable: true, get: function () { return this._ContentEntryContentCategoryJoinDao_xqhj8n$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentEntryContentCategoryJoinDao', {configurable: true, get: function () { return this._ContentEntryContentCategoryJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentEntryParentChildJoinDao', {configurable: true, get: function () { return this._ContentEntryParentChildJoinDao_z4w8fg$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentEntryParentChildJoinDao', {configurable: true, get: function () { return this._ContentEntryParentChildJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentEntryRelatedEntryJoinDao', {configurable: true, get: function () { return this._ContentEntryRelatedEntryJoinDao_4n64nr$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentEntryRelatedEntryJoinDao', {configurable: true, get: function () { return this._ContentEntryRelatedEntryJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzContentJoinDao', {configurable: true, get: function () { return this._ClazzContentJoinDao_jtpmiy$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzContentJoinDao', {configurable: true, get: function () { return this._ClazzContentJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentCategorySchemaDao', {configurable: true, get: function () { return this._ContentCategorySchemaDao_7v6m4p$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentCategorySchemaDao', {configurable: true, get: function () { return this._ContentCategorySchemaDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentCategoryDao', {configurable: true, get: function () { return this._ContentCategoryDao_5p3nm0$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentCategoryDao', {configurable: true, get: function () { return this._ContentCategoryDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_LanguageDao', {configurable: true, get: function () { return this._LanguageDao_4effpz$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'languageDao', {configurable: true, get: function () { return this._LanguageDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_LanguageVariantDao', {configurable: true, get: function () { return this._LanguageVariantDao_3ts532$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'languageVariantDao', {configurable: true, get: function () { return this._LanguageVariantDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'scrapeQueueItemDao', {configurable: true, get: function () { return this._db_0.scrapeQueueItemDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personAuthDao', {configurable: true, get: function () { return this._db_0.personAuthDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_PersonGroupDao', {configurable: true, get: function () { return this._PersonGroupDao_uoc3q3$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personGroupDao', {configurable: true, get: function () { return this._PersonGroupDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_PersonGroupMemberDao', {configurable: true, get: function () { return this._PersonGroupMemberDao_hw3wwl$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personGroupMemberDao', {configurable: true, get: function () { return this._PersonGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'entityRoleDao', {configurable: true, get: function () { return this._db_0.entityRoleDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_PersonPictureDao', {configurable: true, get: function () { return this._PersonPictureDao_oehixy$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personPictureDao', {configurable: true, get: function () { return this._PersonPictureDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'connectivityStatusDao', {configurable: true, get: function () { return this._db_0.connectivityStatusDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContainerDao', {configurable: true, get: function () { return this._ContainerDao_y4hlv6$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'containerDao', {configurable: true, get: function () { return this._ContainerDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'containerEntryDao', {configurable: true, get: function () { return this._db_0.containerEntryDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'containerEntryFileDao', {configurable: true, get: function () { return this._db_0.containerEntryFileDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'containerETagDao', {configurable: true, get: function () { return this._db_0.containerETagDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_VerbDao', {configurable: true, get: function () { return this._VerbDao_p6904i$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'verbDao', {configurable: true, get: function () { return this._VerbDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_XObjectDao', {configurable: true, get: function () { return this._XObjectDao_414f3s$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'xObjectDao', {configurable: true, get: function () { return this._XObjectDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ReportDao', {configurable: true, get: function () { return this._ReportDao_f6l1xp$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'reportDao', {configurable: true, get: function () { return this._ReportDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'containerImportJobDao', {configurable: true, get: function () { return this._db_0.containerImportJobDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_StatementDao', {configurable: true, get: function () { return this._StatementDao_8blrs0$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'statementDao', {configurable: true, get: function () { return this._StatementDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContextXObjectStatementJoinDao', {configurable: true, get: function () { return this._ContextXObjectStatementJoinDao_grco9q$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contextXObjectStatementJoinDao', {configurable: true, get: function () { return this._ContextXObjectStatementJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_StateDao', {configurable: true, get: function () { return this._StateDao_1nkqke$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'stateDao', {configurable: true, get: function () { return this._StateDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_StateContentDao', {configurable: true, get: function () { return this._StateContentDao_yxj9d3$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'stateContentDao', {configurable: true, get: function () { return this._StateContentDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_AgentDao', {configurable: true, get: function () { return this._AgentDao_4pjncm$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'agentDao', {configurable: true, get: function () { return this._AgentDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_LearnerGroupDao', {configurable: true, get: function () { return this._LearnerGroupDao_d12bg3$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'learnerGroupDao', {configurable: true, get: function () { return this._LearnerGroupDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_LearnerGroupMemberDao', {configurable: true, get: function () { return this._LearnerGroupMemberDao_yxhk6x$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'learnerGroupMemberDao', {configurable: true, get: function () { return this._LearnerGroupMemberDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_GroupLearningSessionDao', {configurable: true, get: function () { return this._GroupLearningSessionDao_wyleco$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'groupLearningSessionDao', {configurable: true, get: function () { return this._GroupLearningSessionDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzLogAttendanceRecordDao', {configurable: true, get: function () { return this._ClazzLogAttendanceRecordDao_8wntrv$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzLogAttendanceRecordDao', {configurable: true, get: function () { return this._ClazzLogAttendanceRecordDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzLogDao', {configurable: true, get: function () { return this._ClazzLogDao_x9zu45$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzLogDao', {configurable: true, get: function () { return this._ClazzLogDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ScheduleDao', {configurable: true, get: function () { return this._ScheduleDao_ctbune$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'scheduleDao', {configurable: true, get: function () { return this._ScheduleDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_HolidayCalendarDao', {configurable: true, get: function () { return this._HolidayCalendarDao_ulk4x3$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'holidayCalendarDao', {configurable: true, get: function () { return this._HolidayCalendarDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_HolidayDao', {configurable: true, get: function () { return this._HolidayDao_o65v9l$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'holidayDao', {configurable: true, get: function () { return this._HolidayDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_SchoolDao', {configurable: true, get: function () { return this._SchoolDao_mbg6cz$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'schoolDao', {configurable: true, get: function () { return this._SchoolDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_XLangMapEntryDao', {configurable: true, get: function () { return this._XLangMapEntryDao_8igs4z$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'xLangMapEntryDao', {configurable: true, get: function () { return this._XLangMapEntryDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'locallyAvailableContainerDao', {configurable: true, get: function () { return this._db_0.locallyAvailableContainerDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_SchoolMemberDao', {configurable: true, get: function () { return this._SchoolMemberDao_t3wkt$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'schoolMemberDao', {configurable: true, get: function () { return this._SchoolMemberDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzAssignmentDao', {configurable: true, get: function () { return this._ClazzAssignmentDao_3ritje$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzAssignmentDao', {configurable: true, get: function () { return this._ClazzAssignmentDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ClazzAssignmentContentJoinDao', {configurable: true, get: function () { return this._ClazzAssignmentContentJoinDao_c3dv5p$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzAssignmentContentJoinDao', {configurable: true, get: function () { return this._ClazzAssignmentContentJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'clazzAssignmentRollUpDao', {configurable: true, get: function () { return this._db_0.clazzAssignmentRollUpDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseAssignmentSubmissionDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionDao_3ulqsz$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseAssignmentSubmissionDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseAssignmentSubmissionAttachmentDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionAttachmentDao_ib6fwq$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseAssignmentSubmissionAttachmentDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionAttachmentDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseAssignmentMarkDao', {configurable: true, get: function () { return this._CourseAssignmentMarkDao_m886vg$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseAssignmentMarkDao', {configurable: true, get: function () { return this._CourseAssignmentMarkDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CommentsDao', {configurable: true, get: function () { return this._CommentsDao_il4mj1$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'commentsDao', {configurable: true, get: function () { return this._CommentsDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'syncNodeDao', {configurable: true, get: function () { return this._db_0.syncNodeDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_SiteDao', {configurable: true, get: function () { return this._SiteDao_j3be4m$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'siteDao', {configurable: true, get: function () { return this._SiteDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_SiteTermsDao', {configurable: true, get: function () { return this._SiteTermsDao_7vhenl$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'siteTermsDao', {configurable: true, get: function () { return this._SiteTermsDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_PersonParentJoinDao', {configurable: true, get: function () { return this._PersonParentJoinDao_a70e5k$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personParentJoinDao', {configurable: true, get: function () { return this._PersonParentJoinDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ScopedGrantDao', {configurable: true, get: function () { return this._ScopedGrantDao_wu1qzn$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'scopedGrantDao', {configurable: true, get: function () { return this._ScopedGrantDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ErrorReportDao', {configurable: true, get: function () { return this._ErrorReportDao_yuub65$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'errorReportDao', {configurable: true, get: function () { return this._ErrorReportDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_PersonAuth2Dao', {configurable: true, get: function () { return this._PersonAuth2Dao_7mmgyu$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'personAuth2Dao', {configurable: true, get: function () { return this._PersonAuth2Dao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_UserSessionDao', {configurable: true, get: function () { return this._UserSessionDao_9evou4$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'userSessionDao', {configurable: true, get: function () { return this._UserSessionDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentJobItemDao', {configurable: true, get: function () { return this._db_0.contentJobItemDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentJobDao', {configurable: true, get: function () { return this._db_0.contentJobDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CoursePictureDao', {configurable: true, get: function () { return this._CoursePictureDao_3orl8$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'coursePictureDao', {configurable: true, get: function () { return this._CoursePictureDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ContentEntryPictureDao', {configurable: true, get: function () { return this._ContentEntryPictureDao_j5086u$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'contentEntryPictureDao', {configurable: true, get: function () { return this._ContentEntryPictureDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ChatDao', {configurable: true, get: function () { return this._ChatDao_vp405z$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'chatDao', {configurable: true, get: function () { return this._ChatDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_ChatMemberDao', {configurable: true, get: function () { return this._ChatMemberDao_xtv975$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'chatMemberDao', {configurable: true, get: function () { return this._ChatMemberDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_MessageDao', {configurable: true, get: function () { return this._MessageDao_glinco$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'messageDao', {configurable: true, get: function () { return this._MessageDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_MessageReadDao', {configurable: true, get: function () { return this._MessageReadDao_n0br0y$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'messageReadDao', {configurable: true, get: function () { return this._MessageReadDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_CourseDiscussionDao', {configurable: true, get: function () { return this._CourseDiscussionDao_2sbhnm$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'courseDiscussionDao', {configurable: true, get: function () { return this._CourseDiscussionDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_DiscussionTopicDao', {configurable: true, get: function () { return this._DiscussionTopicDao_4z0ot4$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'discussionTopicDao', {configurable: true, get: function () { return this._DiscussionTopicDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, '_DiscussionPostDao', {configurable: true, get: function () { return this._DiscussionPostDao_7vrkiv$_0.value; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'discussionPostDao', {configurable: true, get: function () { return this._DiscussionPostDao; }}); Object.defineProperty(UmAppDatabase_ReplicateWrapper.prototype, 'realDatabase', {configurable: true, get: function () { return this._db_0; }}); UmAppDatabase_ReplicateWrapper.prototype.createAllTables = function () { return this._db_0.createAllTables(); }; function Coroutine$clearAllTablesAsync_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$clearAllTablesAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$clearAllTablesAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$clearAllTablesAsync_0.prototype.constructor = Coroutine$clearAllTablesAsync_0; Coroutine$clearAllTablesAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._db_0.clearAllTablesAsync(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicateWrapper.prototype.clearAllTablesAsync = function (continuation_0, suspended) { var instance = new Coroutine$clearAllTablesAsync_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UmAppDatabase_ReplicateWrapper.prototype.clearAllTables = function () { this._db_0.clearAllTables(); }; UmAppDatabase_ReplicateWrapper.prototype.runInTransaction_771g0p$ = function (body) { this._db_0.runInTransaction_771g0p$(body); }; UmAppDatabase_ReplicateWrapper.prototype.getInvalidationTracker = function () { return this._db_0.getInvalidationTracker(); }; function UmAppDatabase_ReplicateWrapper$_PersonDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new PersonDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.personDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseBlockDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseBlockDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseBlockDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseTerminologyDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseTerminologyDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseTerminologyDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseGroupSetDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseGroupSetDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseGroupSetDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseGroupMemberDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseGroupMemberDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseGroupMemberDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzEnrolmentDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzEnrolmentDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzEnrolmentDao); }; } function UmAppDatabase_ReplicateWrapper$_LeavingReasonDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new LeavingReasonDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.leavingReasonDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentEntryDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentEntryDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentEntryDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentEntryContentCategoryJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentEntryContentCategoryJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentEntryContentCategoryJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentEntryParentChildJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentEntryParentChildJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentEntryParentChildJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentEntryRelatedEntryJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentEntryRelatedEntryJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentEntryRelatedEntryJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzContentJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzContentJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzContentJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentCategorySchemaDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentCategorySchemaDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentCategorySchemaDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentCategoryDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentCategoryDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentCategoryDao); }; } function UmAppDatabase_ReplicateWrapper$_LanguageDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new LanguageDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.languageDao); }; } function UmAppDatabase_ReplicateWrapper$_LanguageVariantDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new LanguageVariantDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.languageVariantDao); }; } function UmAppDatabase_ReplicateWrapper$_PersonGroupDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new PersonGroupDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.personGroupDao); }; } function UmAppDatabase_ReplicateWrapper$_PersonGroupMemberDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new PersonGroupMemberDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.personGroupMemberDao); }; } function UmAppDatabase_ReplicateWrapper$_PersonPictureDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new PersonPictureDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.personPictureDao); }; } function UmAppDatabase_ReplicateWrapper$_ContainerDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContainerDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.containerDao); }; } function UmAppDatabase_ReplicateWrapper$_VerbDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new VerbDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.verbDao); }; } function UmAppDatabase_ReplicateWrapper$_XObjectDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new XObjectDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.xObjectDao); }; } function UmAppDatabase_ReplicateWrapper$_ReportDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ReportDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.reportDao); }; } function UmAppDatabase_ReplicateWrapper$_StatementDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new StatementDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.statementDao); }; } function UmAppDatabase_ReplicateWrapper$_ContextXObjectStatementJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContextXObjectStatementJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contextXObjectStatementJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_StateDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new StateDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.stateDao); }; } function UmAppDatabase_ReplicateWrapper$_StateContentDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new StateContentDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.stateContentDao); }; } function UmAppDatabase_ReplicateWrapper$_AgentDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new AgentDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.agentDao); }; } function UmAppDatabase_ReplicateWrapper$_LearnerGroupDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new LearnerGroupDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.learnerGroupDao); }; } function UmAppDatabase_ReplicateWrapper$_LearnerGroupMemberDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new LearnerGroupMemberDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.learnerGroupMemberDao); }; } function UmAppDatabase_ReplicateWrapper$_GroupLearningSessionDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new GroupLearningSessionDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.groupLearningSessionDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzLogAttendanceRecordDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzLogAttendanceRecordDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzLogAttendanceRecordDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzLogDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzLogDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzLogDao); }; } function UmAppDatabase_ReplicateWrapper$_ScheduleDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ScheduleDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.scheduleDao); }; } function UmAppDatabase_ReplicateWrapper$_HolidayCalendarDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new HolidayCalendarDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.holidayCalendarDao); }; } function UmAppDatabase_ReplicateWrapper$_HolidayDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new HolidayDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.holidayDao); }; } function UmAppDatabase_ReplicateWrapper$_SchoolDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new SchoolDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.schoolDao); }; } function UmAppDatabase_ReplicateWrapper$_XLangMapEntryDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new XLangMapEntryDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.xLangMapEntryDao); }; } function UmAppDatabase_ReplicateWrapper$_SchoolMemberDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new SchoolMemberDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.schoolMemberDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzAssignmentDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzAssignmentDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzAssignmentDao); }; } function UmAppDatabase_ReplicateWrapper$_ClazzAssignmentContentJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ClazzAssignmentContentJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.clazzAssignmentContentJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseAssignmentSubmissionDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseAssignmentSubmissionDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseAssignmentSubmissionDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseAssignmentSubmissionAttachmentDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseAssignmentSubmissionAttachmentDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseAssignmentMarkDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseAssignmentMarkDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseAssignmentMarkDao); }; } function UmAppDatabase_ReplicateWrapper$_CommentsDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CommentsDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.commentsDao); }; } function UmAppDatabase_ReplicateWrapper$_SiteDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new SiteDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.siteDao); }; } function UmAppDatabase_ReplicateWrapper$_SiteTermsDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new SiteTermsDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.siteTermsDao); }; } function UmAppDatabase_ReplicateWrapper$_PersonParentJoinDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new PersonParentJoinDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.personParentJoinDao); }; } function UmAppDatabase_ReplicateWrapper$_ScopedGrantDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ScopedGrantDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.scopedGrantDao); }; } function UmAppDatabase_ReplicateWrapper$_ErrorReportDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ErrorReportDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.errorReportDao); }; } function UmAppDatabase_ReplicateWrapper$_PersonAuth2Dao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new PersonAuth2Dao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.personAuth2Dao); }; } function UmAppDatabase_ReplicateWrapper$_UserSessionDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new UserSessionDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.userSessionDao); }; } function UmAppDatabase_ReplicateWrapper$_CoursePictureDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CoursePictureDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.coursePictureDao); }; } function UmAppDatabase_ReplicateWrapper$_ContentEntryPictureDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ContentEntryPictureDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.contentEntryPictureDao); }; } function UmAppDatabase_ReplicateWrapper$_ChatDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ChatDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.chatDao); }; } function UmAppDatabase_ReplicateWrapper$_ChatMemberDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new ChatMemberDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.chatMemberDao); }; } function UmAppDatabase_ReplicateWrapper$_MessageDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new MessageDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.messageDao); }; } function UmAppDatabase_ReplicateWrapper$_MessageReadDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new MessageReadDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.messageReadDao); }; } function UmAppDatabase_ReplicateWrapper$_CourseDiscussionDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new CourseDiscussionDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.courseDiscussionDao); }; } function UmAppDatabase_ReplicateWrapper$_DiscussionTopicDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new DiscussionTopicDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.discussionTopicDao); }; } function UmAppDatabase_ReplicateWrapper$_DiscussionPostDao$lambda(this$UmAppDatabase_ReplicateWrapper) { return function () { return new DiscussionPostDao_ReplicateWrapper(this$UmAppDatabase_ReplicateWrapper._db_0, this$UmAppDatabase_ReplicateWrapper._db_0.discussionPostDao); }; } UmAppDatabase_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'UmAppDatabase_ReplicateWrapper', interfaces: [DoorDatabaseReplicateWrapper, UmAppDatabase]}; function UmAppDatabase_ReplicationRunOnChangeRunner(_db) { this._db_0 = _db; } function Coroutine$handleClazzLogChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzLogChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzLogChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzLogChanged_0.prototype.constructor = Coroutine$handleClazzLogChanged_0; Coroutine$handleClazzLogChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzLogDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 14, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ClazzLog'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzLogChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzLogChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleClazzLogAttendanceRecordChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzLogAttendanceRecordChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzLogAttendanceRecordChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzLogAttendanceRecordChanged_0.prototype.constructor = Coroutine$handleClazzLogAttendanceRecordChanged_0; Coroutine$handleClazzLogAttendanceRecordChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzLogAttendanceRecordDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 15, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ClazzLogAttendanceRecord'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzLogAttendanceRecordChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzLogAttendanceRecordChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleScheduleChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleScheduleChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleScheduleChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleScheduleChanged_0.prototype.constructor = Coroutine$handleScheduleChanged_0; Coroutine$handleScheduleChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.scheduleDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 21, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Schedule'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleScheduleChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleScheduleChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleHolidayCalendarChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleHolidayCalendarChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleHolidayCalendarChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleHolidayCalendarChanged_0.prototype.constructor = Coroutine$handleHolidayCalendarChanged_0; Coroutine$handleHolidayCalendarChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.holidayCalendarDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 28, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('HolidayCalendar'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleHolidayCalendarChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleHolidayCalendarChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleHolidayChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleHolidayChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleHolidayChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleHolidayChanged_0.prototype.constructor = Coroutine$handleHolidayChanged_0; Coroutine$handleHolidayChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.holidayDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 99, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Holiday'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleHolidayChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleHolidayChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handlePersonChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handlePersonChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handlePersonChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handlePersonChanged_0.prototype.constructor = Coroutine$handlePersonChanged_0; Coroutine$handlePersonChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.personDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 9, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Person'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handlePersonChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handlePersonChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleClazzChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzChanged_0.prototype.constructor = Coroutine$handleClazzChanged_0; Coroutine$handleClazzChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 6, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Clazz'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleClazzEnrolmentChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzEnrolmentChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzEnrolmentChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzEnrolmentChanged_0.prototype.constructor = Coroutine$handleClazzEnrolmentChanged_0; Coroutine$handleClazzEnrolmentChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzEnrolmentDao.replicateClazzEnrolmentOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 65, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ClazzEnrolment'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzEnrolmentChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzEnrolmentChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleLeavingReasonChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleLeavingReasonChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleLeavingReasonChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleLeavingReasonChanged_0.prototype.constructor = Coroutine$handleLeavingReasonChanged_0; Coroutine$handleLeavingReasonChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.leavingReasonDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 410, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('LeavingReason'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleLeavingReasonChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleLeavingReasonChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentEntryChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentEntryChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentEntryChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentEntryChanged_0.prototype.constructor = Coroutine$handleContentEntryChanged_0; Coroutine$handleContentEntryChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentEntryDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 42, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentEntry'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentEntryChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentEntryChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentEntryContentCategoryJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentEntryContentCategoryJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentEntryContentCategoryJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentEntryContentCategoryJoinChanged_0.prototype.constructor = Coroutine$handleContentEntryContentCategoryJoinChanged_0; Coroutine$handleContentEntryContentCategoryJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentEntryContentCategoryJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 3, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentEntryContentCategoryJoin'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentEntryContentCategoryJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentEntryContentCategoryJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentEntryParentChildJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentEntryParentChildJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentEntryParentChildJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentEntryParentChildJoinChanged_0.prototype.constructor = Coroutine$handleContentEntryParentChildJoinChanged_0; Coroutine$handleContentEntryParentChildJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentEntryParentChildJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 7, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentEntryParentChildJoin'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentEntryParentChildJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentEntryParentChildJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentEntryRelatedEntryJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentEntryRelatedEntryJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentEntryRelatedEntryJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentEntryRelatedEntryJoinChanged_0.prototype.constructor = Coroutine$handleContentEntryRelatedEntryJoinChanged_0; Coroutine$handleContentEntryRelatedEntryJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentEntryRelatedEntryJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 8, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentEntryRelatedEntryJoin'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentEntryRelatedEntryJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentEntryRelatedEntryJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentCategorySchemaChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentCategorySchemaChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentCategorySchemaChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentCategorySchemaChanged_0.prototype.constructor = Coroutine$handleContentCategorySchemaChanged_0; Coroutine$handleContentCategorySchemaChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentCategorySchemaDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 2, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentCategorySchema'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentCategorySchemaChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentCategorySchemaChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentCategoryChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentCategoryChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentCategoryChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentCategoryChanged_0.prototype.constructor = Coroutine$handleContentCategoryChanged_0; Coroutine$handleContentCategoryChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentCategoryDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 1, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentCategory'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentCategoryChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentCategoryChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleLanguageChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleLanguageChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleLanguageChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleLanguageChanged_0.prototype.constructor = Coroutine$handleLanguageChanged_0; Coroutine$handleLanguageChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.languageDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 13, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Language'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleLanguageChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleLanguageChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleLanguageVariantChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleLanguageVariantChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleLanguageVariantChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleLanguageVariantChanged_0.prototype.constructor = Coroutine$handleLanguageVariantChanged_0; Coroutine$handleLanguageVariantChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.languageVariantDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 10, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('LanguageVariant'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleLanguageVariantChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleLanguageVariantChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handlePersonGroupChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handlePersonGroupChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handlePersonGroupChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handlePersonGroupChanged_0.prototype.constructor = Coroutine$handlePersonGroupChanged_0; Coroutine$handlePersonGroupChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.personGroupDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = this.local$$receiver.personGroupDao.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 4; this.result_0 = this.local$$receiver.personGroupDao.replicateOnChangePersonBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: this.state_0 = 5; this.result_0 = this.local$$receiver.personGroupDao.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: this.state_0 = 6; this.result_0 = deleteFromChangeLog(this.local$$receiver, 43, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return setOf('PersonGroup'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handlePersonGroupChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handlePersonGroupChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handlePersonGroupMemberChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handlePersonGroupMemberChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handlePersonGroupMemberChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handlePersonGroupMemberChanged_0.prototype.constructor = Coroutine$handlePersonGroupMemberChanged_0; Coroutine$handlePersonGroupMemberChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.personGroupMemberDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = this.local$$receiver.personGroupMemberDao.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 4; this.result_0 = this.local$$receiver.personGroupMemberDao.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: this.state_0 = 5; this.result_0 = deleteFromChangeLog(this.local$$receiver, 44, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: return setOf('PersonGroupMember'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handlePersonGroupMemberChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handlePersonGroupMemberChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handlePersonPictureChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handlePersonPictureChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handlePersonPictureChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handlePersonPictureChanged_0.prototype.constructor = Coroutine$handlePersonPictureChanged_0; Coroutine$handlePersonPictureChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.personPictureDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 50, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('PersonPicture'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handlePersonPictureChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handlePersonPictureChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContainerChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContainerChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContainerChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContainerChanged_0.prototype.constructor = Coroutine$handleContainerChanged_0; Coroutine$handleContainerChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.containerDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 51, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Container'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContainerChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContainerChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleVerbEntityChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleVerbEntityChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleVerbEntityChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleVerbEntityChanged_0.prototype.constructor = Coroutine$handleVerbEntityChanged_0; Coroutine$handleVerbEntityChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.verbDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 62, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('VerbEntity'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleVerbEntityChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleVerbEntityChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleXObjectEntityChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleXObjectEntityChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleXObjectEntityChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleXObjectEntityChanged_0.prototype.constructor = Coroutine$handleXObjectEntityChanged_0; Coroutine$handleXObjectEntityChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.xObjectDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 64, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('XObjectEntity'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleXObjectEntityChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleXObjectEntityChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleStatementEntityChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleStatementEntityChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleStatementEntityChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleStatementEntityChanged_0.prototype.constructor = Coroutine$handleStatementEntityChanged_0; Coroutine$handleStatementEntityChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.statementDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 60, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('StatementEntity'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleStatementEntityChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleStatementEntityChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContextXObjectStatementJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContextXObjectStatementJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContextXObjectStatementJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContextXObjectStatementJoinChanged_0.prototype.constructor = Coroutine$handleContextXObjectStatementJoinChanged_0; Coroutine$handleContextXObjectStatementJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contextXObjectStatementJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 66, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContextXObjectStatementJoin'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContextXObjectStatementJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContextXObjectStatementJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleAgentEntityChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleAgentEntityChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleAgentEntityChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleAgentEntityChanged_0.prototype.constructor = Coroutine$handleAgentEntityChanged_0; Coroutine$handleAgentEntityChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.agentDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 68, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('AgentEntity'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleAgentEntityChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleAgentEntityChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleStateEntityChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleStateEntityChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleStateEntityChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleStateEntityChanged_0.prototype.constructor = Coroutine$handleStateEntityChanged_0; Coroutine$handleStateEntityChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.stateDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 70, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('StateEntity'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleStateEntityChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleStateEntityChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleStateContentEntityChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleStateContentEntityChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleStateContentEntityChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleStateContentEntityChanged_0.prototype.constructor = Coroutine$handleStateContentEntityChanged_0; Coroutine$handleStateContentEntityChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.stateContentDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 72, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('StateContentEntity'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleStateContentEntityChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleStateContentEntityChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleXLangMapEntryChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleXLangMapEntryChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleXLangMapEntryChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleXLangMapEntryChanged_0.prototype.constructor = Coroutine$handleXLangMapEntryChanged_0; Coroutine$handleXLangMapEntryChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.xLangMapEntryDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 74, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('XLangMapEntry'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleXLangMapEntryChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleXLangMapEntryChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleSchoolChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleSchoolChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleSchoolChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleSchoolChanged_0.prototype.constructor = Coroutine$handleSchoolChanged_0; Coroutine$handleSchoolChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.schoolDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 164, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('School'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleSchoolChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleSchoolChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleSchoolMemberChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleSchoolMemberChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleSchoolMemberChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleSchoolMemberChanged_0.prototype.constructor = Coroutine$handleSchoolMemberChanged_0; Coroutine$handleSchoolMemberChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.schoolMemberDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 200, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('SchoolMember'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleSchoolMemberChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleSchoolMemberChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCommentsChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCommentsChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCommentsChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCommentsChanged_0.prototype.constructor = Coroutine$handleCommentsChanged_0; Coroutine$handleCommentsChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.commentsDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 208, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Comments'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCommentsChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCommentsChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleReportChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleReportChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleReportChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleReportChanged_0.prototype.constructor = Coroutine$handleReportChanged_0; Coroutine$handleReportChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.reportDao.replicateOnChangeTemplates(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 101, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Report'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleReportChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleReportChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleSiteChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleSiteChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleSiteChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleSiteChanged_0.prototype.constructor = Coroutine$handleSiteChanged_0; Coroutine$handleSiteChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.siteDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 189, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Site'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleSiteChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleSiteChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleLearnerGroupChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleLearnerGroupChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleLearnerGroupChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleLearnerGroupChanged_0.prototype.constructor = Coroutine$handleLearnerGroupChanged_0; Coroutine$handleLearnerGroupChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.learnerGroupDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 301, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('LearnerGroup'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleLearnerGroupChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleLearnerGroupChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleLearnerGroupMemberChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleLearnerGroupMemberChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleLearnerGroupMemberChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleLearnerGroupMemberChanged_0.prototype.constructor = Coroutine$handleLearnerGroupMemberChanged_0; Coroutine$handleLearnerGroupMemberChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.learnerGroupMemberDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 300, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('LearnerGroupMember'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleLearnerGroupMemberChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleLearnerGroupMemberChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleGroupLearningSessionChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleGroupLearningSessionChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleGroupLearningSessionChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleGroupLearningSessionChanged_0.prototype.constructor = Coroutine$handleGroupLearningSessionChanged_0; Coroutine$handleGroupLearningSessionChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.groupLearningSessionDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 302, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('GroupLearningSession'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleGroupLearningSessionChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleGroupLearningSessionChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleSiteTermsChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleSiteTermsChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleSiteTermsChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleSiteTermsChanged_0.prototype.constructor = Coroutine$handleSiteTermsChanged_0; Coroutine$handleSiteTermsChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.siteTermsDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 272, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('SiteTerms'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleSiteTermsChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleSiteTermsChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleClazzContentJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzContentJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzContentJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzContentJoinChanged_0.prototype.constructor = Coroutine$handleClazzContentJoinChanged_0; Coroutine$handleClazzContentJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzContentJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 134, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ClazzContentJoin'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzContentJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzContentJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handlePersonParentJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handlePersonParentJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handlePersonParentJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handlePersonParentJoinChanged_0.prototype.constructor = Coroutine$handlePersonParentJoinChanged_0; Coroutine$handlePersonParentJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.personParentJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 512, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('PersonParentJoin'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handlePersonParentJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handlePersonParentJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleScopedGrantChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleScopedGrantChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleScopedGrantChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleScopedGrantChanged_0.prototype.constructor = Coroutine$handleScopedGrantChanged_0; Coroutine$handleScopedGrantChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.scopedGrantDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = this.local$$receiver.scopedGrantDao.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 4; this.result_0 = this.local$$receiver.scopedGrantDao.replicateOnChangePersonBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: this.state_0 = 5; this.result_0 = this.local$$receiver.scopedGrantDao.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: this.state_0 = 6; this.result_0 = deleteFromChangeLog(this.local$$receiver, 48, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return setOf('ScopedGrant'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleScopedGrantChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleScopedGrantChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleErrorReportChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleErrorReportChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleErrorReportChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleErrorReportChanged_0.prototype.constructor = Coroutine$handleErrorReportChanged_0; Coroutine$handleErrorReportChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.errorReportDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 419, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ErrorReport'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleErrorReportChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleErrorReportChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleClazzAssignmentChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzAssignmentChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzAssignmentChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzAssignmentChanged_0.prototype.constructor = Coroutine$handleClazzAssignmentChanged_0; Coroutine$handleClazzAssignmentChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzAssignmentDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 520, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ClazzAssignment'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzAssignmentChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzAssignmentChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleClazzAssignmentContentJoinChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleClazzAssignmentContentJoinChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleClazzAssignmentContentJoinChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleClazzAssignmentContentJoinChanged_0.prototype.constructor = Coroutine$handleClazzAssignmentContentJoinChanged_0; Coroutine$handleClazzAssignmentContentJoinChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.clazzAssignmentContentJoinDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 521, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ClazzAssignmentContentJoin'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleClazzAssignmentContentJoinChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleClazzAssignmentContentJoinChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseAssignmentSubmissionChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseAssignmentSubmissionChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseAssignmentSubmissionChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseAssignmentSubmissionChanged_0.prototype.constructor = Coroutine$handleCourseAssignmentSubmissionChanged_0; Coroutine$handleCourseAssignmentSubmissionChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseAssignmentSubmissionDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 522, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseAssignmentSubmission'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseAssignmentSubmissionChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseAssignmentSubmissionChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0.prototype.constructor = Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0; Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseAssignmentSubmissionAttachmentDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 90, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseAssignmentSubmissionAttachment'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseAssignmentSubmissionAttachmentChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseAssignmentSubmissionAttachmentChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseAssignmentMarkChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseAssignmentMarkChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseAssignmentMarkChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseAssignmentMarkChanged_0.prototype.constructor = Coroutine$handleCourseAssignmentMarkChanged_0; Coroutine$handleCourseAssignmentMarkChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseAssignmentMarkDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 523, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseAssignmentMark'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseAssignmentMarkChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseAssignmentMarkChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handlePersonAuth2Changed_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handlePersonAuth2Changed_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handlePersonAuth2Changed_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handlePersonAuth2Changed_0.prototype.constructor = Coroutine$handlePersonAuth2Changed_0; Coroutine$handlePersonAuth2Changed_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.personAuth2Dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 678, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('PersonAuth2'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handlePersonAuth2Changed_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handlePersonAuth2Changed_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleUserSessionChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleUserSessionChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleUserSessionChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleUserSessionChanged_0.prototype.constructor = Coroutine$handleUserSessionChanged_0; Coroutine$handleUserSessionChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.userSessionDao.updateReplicationTrackers(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 679, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('UserSession'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleUserSessionChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleUserSessionChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseBlockChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseBlockChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseBlockChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseBlockChanged_0.prototype.constructor = Coroutine$handleCourseBlockChanged_0; Coroutine$handleCourseBlockChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseBlockDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 124, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseBlock'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseBlockChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseBlockChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseTerminologyChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseTerminologyChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseTerminologyChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseTerminologyChanged_0.prototype.constructor = Coroutine$handleCourseTerminologyChanged_0; Coroutine$handleCourseTerminologyChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseTerminologyDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 450, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseTerminology'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseTerminologyChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseTerminologyChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseGroupSetChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseGroupSetChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseGroupSetChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseGroupSetChanged_0.prototype.constructor = Coroutine$handleCourseGroupSetChanged_0; Coroutine$handleCourseGroupSetChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseGroupSetDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 242, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseGroupSet'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseGroupSetChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseGroupSetChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseGroupMemberChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseGroupMemberChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseGroupMemberChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseGroupMemberChanged_0.prototype.constructor = Coroutine$handleCourseGroupMemberChanged_0; Coroutine$handleCourseGroupMemberChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseGroupMemberDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 243, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseGroupMember'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseGroupMemberChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseGroupMemberChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCoursePictureChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCoursePictureChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCoursePictureChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCoursePictureChanged_0.prototype.constructor = Coroutine$handleCoursePictureChanged_0; Coroutine$handleCoursePictureChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.coursePictureDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 125, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CoursePicture'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCoursePictureChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCoursePictureChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleContentEntryPictureChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleContentEntryPictureChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleContentEntryPictureChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleContentEntryPictureChanged_0.prototype.constructor = Coroutine$handleContentEntryPictureChanged_0; Coroutine$handleContentEntryPictureChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.contentEntryPictureDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 138, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ContentEntryPicture'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleContentEntryPictureChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleContentEntryPictureChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleChatChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleChatChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleChatChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleChatChanged_0.prototype.constructor = Coroutine$handleChatChanged_0; Coroutine$handleChatChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.chatDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 127, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('Chat'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleChatChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleChatChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleChatMemberChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleChatMemberChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleChatMemberChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleChatMemberChanged_0.prototype.constructor = Coroutine$handleChatMemberChanged_0; Coroutine$handleChatMemberChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.chatMemberDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 128, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('ChatMember'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleChatMemberChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleChatMemberChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleMessageChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleMessageChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleMessageChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleMessageChanged_0.prototype.constructor = Coroutine$handleMessageChanged_0; Coroutine$handleMessageChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.messageDao.replicateOnChangeChat(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = this.local$$receiver.messageDao.replicateOnChangePosts(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 4; this.result_0 = deleteFromChangeLog(this.local$$receiver, 126, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return setOf('Message'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleMessageChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleMessageChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleMessageReadChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleMessageReadChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleMessageReadChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleMessageReadChanged_0.prototype.constructor = Coroutine$handleMessageReadChanged_0; Coroutine$handleMessageReadChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.messageReadDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 129, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('MessageRead'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleMessageReadChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleMessageReadChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleCourseDiscussionChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleCourseDiscussionChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleCourseDiscussionChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleCourseDiscussionChanged_0.prototype.constructor = Coroutine$handleCourseDiscussionChanged_0; Coroutine$handleCourseDiscussionChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.courseDiscussionDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 130, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('CourseDiscussion'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleCourseDiscussionChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleCourseDiscussionChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleDiscussionTopicChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleDiscussionTopicChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleDiscussionTopicChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleDiscussionTopicChanged_0.prototype.constructor = Coroutine$handleDiscussionTopicChanged_0; Coroutine$handleDiscussionTopicChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.discussionTopicDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 131, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('DiscussionTopic'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleDiscussionTopicChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleDiscussionTopicChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$handleDiscussionPostChanged_0($this, $receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$$receiver = $receiver_0; } Coroutine$handleDiscussionPostChanged_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$handleDiscussionPostChanged_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$handleDiscussionPostChanged_0.prototype.constructor = Coroutine$handleDiscussionPostChanged_0; Coroutine$handleDiscussionPostChanged_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.local$$receiver.discussionPostDao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.state_0 = 3; this.result_0 = deleteFromChangeLog(this.local$$receiver, 132, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return setOf('DiscussionPost'); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.handleDiscussionPostChanged_0 = function ($receiver_0, continuation_0, suspended) { var instance = new Coroutine$handleDiscussionPostChanged_0(this, $receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda(closure$tableNames_0, closure$_checkPendingNotifications_0, this$UmAppDatabase_ReplicationRunOnChangeRunner_0, _transactionDb_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$tableNames = closure$tableNames_0; this.local$closure$_checkPendingNotifications = closure$_checkPendingNotifications_0; this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner = this$UmAppDatabase_ReplicationRunOnChangeRunner_0; this.local$_transactionDb = _transactionDb_0; } Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda.prototype.constructor = Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda; Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: if (this.local$closure$tableNames.contains_11rb$('ClazzLog')) { this.state_0 = 2; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzLogChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 3; continue; case 3: if (this.local$closure$tableNames.contains_11rb$('ClazzLogAttendanceRecord')) { this.state_0 = 4; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzLogAttendanceRecordChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 5; continue; } case 4: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 5; continue; case 5: if (this.local$closure$tableNames.contains_11rb$('Schedule')) { this.state_0 = 6; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleScheduleChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 7; continue; } case 6: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 7; continue; case 7: if (this.local$closure$tableNames.contains_11rb$('HolidayCalendar')) { this.state_0 = 8; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleHolidayCalendarChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 9; continue; } case 8: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 9; continue; case 9: if (this.local$closure$tableNames.contains_11rb$('Holiday')) { this.state_0 = 10; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleHolidayChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 11; continue; } case 10: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 11; continue; case 11: if (this.local$closure$tableNames.contains_11rb$('Person')) { this.state_0 = 12; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handlePersonChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 13; continue; } case 12: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 13; continue; case 13: if (this.local$closure$tableNames.contains_11rb$('Clazz')) { this.state_0 = 14; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 15; continue; } case 14: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 15; continue; case 15: if (this.local$closure$tableNames.contains_11rb$('ClazzEnrolment')) { this.state_0 = 16; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzEnrolmentChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 17; continue; } case 16: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 17; continue; case 17: if (this.local$closure$tableNames.contains_11rb$('LeavingReason')) { this.state_0 = 18; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleLeavingReasonChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 19; continue; } case 18: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 19; continue; case 19: if (this.local$closure$tableNames.contains_11rb$('ContentEntry')) { this.state_0 = 20; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentEntryChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 21; continue; } case 20: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 21; continue; case 21: if (this.local$closure$tableNames.contains_11rb$('ContentEntryContentCategoryJoin')) { this.state_0 = 22; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentEntryContentCategoryJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 23; continue; } case 22: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 23; continue; case 23: if (this.local$closure$tableNames.contains_11rb$('ContentEntryParentChildJoin')) { this.state_0 = 24; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentEntryParentChildJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 25; continue; } case 24: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 25; continue; case 25: if (this.local$closure$tableNames.contains_11rb$('ContentEntryRelatedEntryJoin')) { this.state_0 = 26; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentEntryRelatedEntryJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 27; continue; } case 26: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 27; continue; case 27: if (this.local$closure$tableNames.contains_11rb$('ContentCategorySchema')) { this.state_0 = 28; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentCategorySchemaChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 29; continue; } case 28: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 29; continue; case 29: if (this.local$closure$tableNames.contains_11rb$('ContentCategory')) { this.state_0 = 30; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentCategoryChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 31; continue; } case 30: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 31; continue; case 31: if (this.local$closure$tableNames.contains_11rb$('Language')) { this.state_0 = 32; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleLanguageChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 33; continue; } case 32: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 33; continue; case 33: if (this.local$closure$tableNames.contains_11rb$('LanguageVariant')) { this.state_0 = 34; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleLanguageVariantChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 35; continue; } case 34: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 35; continue; case 35: if (this.local$closure$tableNames.contains_11rb$('PersonGroup')) { this.state_0 = 36; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handlePersonGroupChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 37; continue; } case 36: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 37; continue; case 37: if (this.local$closure$tableNames.contains_11rb$('PersonGroupMember')) { this.state_0 = 38; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handlePersonGroupMemberChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 39; continue; } case 38: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 39; continue; case 39: if (this.local$closure$tableNames.contains_11rb$('PersonPicture')) { this.state_0 = 40; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handlePersonPictureChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 41; continue; } case 40: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 41; continue; case 41: if (this.local$closure$tableNames.contains_11rb$('Container')) { this.state_0 = 42; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContainerChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 43; continue; } case 42: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 43; continue; case 43: if (this.local$closure$tableNames.contains_11rb$('VerbEntity')) { this.state_0 = 44; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleVerbEntityChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 45; continue; } case 44: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 45; continue; case 45: if (this.local$closure$tableNames.contains_11rb$('XObjectEntity')) { this.state_0 = 46; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleXObjectEntityChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 47; continue; } case 46: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 47; continue; case 47: if (this.local$closure$tableNames.contains_11rb$('StatementEntity')) { this.state_0 = 48; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleStatementEntityChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 49; continue; } case 48: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 49; continue; case 49: if (this.local$closure$tableNames.contains_11rb$('ContextXObjectStatementJoin')) { this.state_0 = 50; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContextXObjectStatementJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 51; continue; } case 50: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 51; continue; case 51: if (this.local$closure$tableNames.contains_11rb$('AgentEntity')) { this.state_0 = 52; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleAgentEntityChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 53; continue; } case 52: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 53; continue; case 53: if (this.local$closure$tableNames.contains_11rb$('StateEntity')) { this.state_0 = 54; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleStateEntityChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 55; continue; } case 54: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 55; continue; case 55: if (this.local$closure$tableNames.contains_11rb$('StateContentEntity')) { this.state_0 = 56; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleStateContentEntityChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 57; continue; } case 56: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 57; continue; case 57: if (this.local$closure$tableNames.contains_11rb$('XLangMapEntry')) { this.state_0 = 58; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleXLangMapEntryChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 59; continue; } case 58: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 59; continue; case 59: if (this.local$closure$tableNames.contains_11rb$('School')) { this.state_0 = 60; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleSchoolChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 61; continue; } case 60: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 61; continue; case 61: if (this.local$closure$tableNames.contains_11rb$('SchoolMember')) { this.state_0 = 62; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleSchoolMemberChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 63; continue; } case 62: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 63; continue; case 63: if (this.local$closure$tableNames.contains_11rb$('Comments')) { this.state_0 = 64; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCommentsChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 65; continue; } case 64: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 65; continue; case 65: if (this.local$closure$tableNames.contains_11rb$('Report')) { this.state_0 = 66; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleReportChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 67; continue; } case 66: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 67; continue; case 67: if (this.local$closure$tableNames.contains_11rb$('Site')) { this.state_0 = 68; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleSiteChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 69; continue; } case 68: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 69; continue; case 69: if (this.local$closure$tableNames.contains_11rb$('LearnerGroup')) { this.state_0 = 70; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleLearnerGroupChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 71; continue; } case 70: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 71; continue; case 71: if (this.local$closure$tableNames.contains_11rb$('LearnerGroupMember')) { this.state_0 = 72; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleLearnerGroupMemberChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 73; continue; } case 72: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 73; continue; case 73: if (this.local$closure$tableNames.contains_11rb$('GroupLearningSession')) { this.state_0 = 74; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleGroupLearningSessionChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 75; continue; } case 74: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 75; continue; case 75: if (this.local$closure$tableNames.contains_11rb$('SiteTerms')) { this.state_0 = 76; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleSiteTermsChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 77; continue; } case 76: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 77; continue; case 77: if (this.local$closure$tableNames.contains_11rb$('ClazzContentJoin')) { this.state_0 = 78; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzContentJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 79; continue; } case 78: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 79; continue; case 79: if (this.local$closure$tableNames.contains_11rb$('PersonParentJoin')) { this.state_0 = 80; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handlePersonParentJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 81; continue; } case 80: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 81; continue; case 81: if (this.local$closure$tableNames.contains_11rb$('ScopedGrant')) { this.state_0 = 82; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleScopedGrantChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 83; continue; } case 82: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 83; continue; case 83: if (this.local$closure$tableNames.contains_11rb$('ErrorReport')) { this.state_0 = 84; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleErrorReportChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 85; continue; } case 84: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 85; continue; case 85: if (this.local$closure$tableNames.contains_11rb$('ClazzAssignment')) { this.state_0 = 86; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzAssignmentChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 87; continue; } case 86: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 87; continue; case 87: if (this.local$closure$tableNames.contains_11rb$('ClazzAssignmentContentJoin')) { this.state_0 = 88; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleClazzAssignmentContentJoinChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 89; continue; } case 88: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 89; continue; case 89: if (this.local$closure$tableNames.contains_11rb$('CourseAssignmentSubmission')) { this.state_0 = 90; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseAssignmentSubmissionChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 91; continue; } case 90: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 91; continue; case 91: if (this.local$closure$tableNames.contains_11rb$('CourseAssignmentSubmissionAttachment')) { this.state_0 = 92; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseAssignmentSubmissionAttachmentChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 93; continue; } case 92: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 93; continue; case 93: if (this.local$closure$tableNames.contains_11rb$('CourseAssignmentMark')) { this.state_0 = 94; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseAssignmentMarkChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 95; continue; } case 94: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 95; continue; case 95: if (this.local$closure$tableNames.contains_11rb$('PersonAuth2')) { this.state_0 = 96; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handlePersonAuth2Changed_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 97; continue; } case 96: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 97; continue; case 97: if (this.local$closure$tableNames.contains_11rb$('UserSession')) { this.state_0 = 98; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleUserSessionChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 99; continue; } case 98: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 99; continue; case 99: if (this.local$closure$tableNames.contains_11rb$('CourseBlock')) { this.state_0 = 100; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseBlockChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 101; continue; } case 100: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 101; continue; case 101: if (this.local$closure$tableNames.contains_11rb$('CourseTerminology')) { this.state_0 = 102; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseTerminologyChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 103; continue; } case 102: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 103; continue; case 103: if (this.local$closure$tableNames.contains_11rb$('CourseGroupSet')) { this.state_0 = 104; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseGroupSetChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 105; continue; } case 104: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 105; continue; case 105: if (this.local$closure$tableNames.contains_11rb$('CourseGroupMember')) { this.state_0 = 106; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseGroupMemberChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 107; continue; } case 106: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 107; continue; case 107: if (this.local$closure$tableNames.contains_11rb$('CoursePicture')) { this.state_0 = 108; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCoursePictureChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 109; continue; } case 108: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 109; continue; case 109: if (this.local$closure$tableNames.contains_11rb$('ContentEntryPicture')) { this.state_0 = 110; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleContentEntryPictureChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 111; continue; } case 110: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 111; continue; case 111: if (this.local$closure$tableNames.contains_11rb$('Chat')) { this.state_0 = 112; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleChatChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 113; continue; } case 112: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 113; continue; case 113: if (this.local$closure$tableNames.contains_11rb$('ChatMember')) { this.state_0 = 114; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleChatMemberChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 115; continue; } case 114: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 115; continue; case 115: if (this.local$closure$tableNames.contains_11rb$('Message')) { this.state_0 = 116; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleMessageChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 117; continue; } case 116: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 117; continue; case 117: if (this.local$closure$tableNames.contains_11rb$('MessageRead')) { this.state_0 = 118; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleMessageReadChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 119; continue; } case 118: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 119; continue; case 119: if (this.local$closure$tableNames.contains_11rb$('CourseDiscussion')) { this.state_0 = 120; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleCourseDiscussionChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 121; continue; } case 120: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 121; continue; case 121: if (this.local$closure$tableNames.contains_11rb$('DiscussionTopic')) { this.state_0 = 122; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleDiscussionTopicChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 123; continue; } case 122: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 123; continue; case 123: if (this.local$closure$tableNames.contains_11rb$('DiscussionPost')) { this.state_0 = 124; this.result_0 = this.local$this$UmAppDatabase_ReplicationRunOnChangeRunner.handleDiscussionPostChanged_0(this.local$_transactionDb, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 125; continue; } case 124: this.local$closure$_checkPendingNotifications.addAll_brywnq$(this.result_0); this.state_0 = 125; continue; case 125: return Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda(closure$tableNames_0, closure$_checkPendingNotifications_0, this$UmAppDatabase_ReplicationRunOnChangeRunner_0) { return function (_transactionDb_0, continuation_0, suspended) { var instance = new Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda(closure$tableNames_0, closure$_checkPendingNotifications_0, this$UmAppDatabase_ReplicationRunOnChangeRunner_0, _transactionDb_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$runReplicationRunOnChange_ywdfdh$($this, tableNames_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_checkPendingNotifications = void 0; this.local$tableNames = tableNames_0; } Coroutine$runReplicationRunOnChange_ywdfdh$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$runReplicationRunOnChange_ywdfdh$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$runReplicationRunOnChange_ywdfdh$.prototype.constructor = Coroutine$runReplicationRunOnChange_ywdfdh$; Coroutine$runReplicationRunOnChange_ywdfdh$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_checkPendingNotifications = LinkedHashSet_init(); this.state_0 = 2; this.result_0 = withDoorTransactionAsync(this.$this._db_0, void 0, UmAppDatabase_ReplicationRunOnChangeRunner$runReplicationRunOnChange$lambda(this.local$tableNames, this.local$_checkPendingNotifications, this.$this), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_checkPendingNotifications; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.runReplicationRunOnChange_ywdfdh$ = function (tableNames_0, continuation_0, suspended) { var instance = new Coroutine$runReplicationRunOnChange_ywdfdh$(this, tableNames_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda(closure$newNodeId_0, _transactionDb_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$fnTimeCounter = void 0; this.local$_transactionDb = _transactionDb_0; } Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda.prototype.constructor = Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda; Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$fnTimeCounter = L0; this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.local$_transactionDb.personDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: napier.Napier.d_82mfvz$('Ran PersonDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 3; this.result_0 = this.local$_transactionDb.clazzDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: napier.Napier.d_82mfvz$('Ran ClazzDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.local$_transactionDb.courseBlockDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: napier.Napier.d_82mfvz$('Ran CourseBlockDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 5; this.result_0 = this.local$_transactionDb.courseTerminologyDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: napier.Napier.d_82mfvz$('Ran CourseTerminologyDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 6; this.result_0 = this.local$_transactionDb.courseGroupSetDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: napier.Napier.d_82mfvz$('Ran CourseGroupSetDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 7; this.result_0 = this.local$_transactionDb.courseGroupMemberDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 7: napier.Napier.d_82mfvz$('Ran CourseGroupMemberDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 8; this.result_0 = this.local$_transactionDb.clazzEnrolmentDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 8: napier.Napier.d_82mfvz$('Ran ClazzEnrolmentDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 9; this.result_0 = this.local$_transactionDb.leavingReasonDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 9: napier.Napier.d_82mfvz$('Ran LeavingReasonDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 10; this.result_0 = this.local$_transactionDb.contentEntryDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 10: napier.Napier.d_82mfvz$('Ran ContentEntryDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 11; this.result_0 = this.local$_transactionDb.contentEntryContentCategoryJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 11: napier.Napier.d_82mfvz$('Ran ContentEntryContentCategoryJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 12; this.result_0 = this.local$_transactionDb.contentEntryParentChildJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 12: napier.Napier.d_82mfvz$('Ran ContentEntryParentChildJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 13; this.result_0 = this.local$_transactionDb.contentEntryRelatedEntryJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 13: napier.Napier.d_82mfvz$('Ran ContentEntryRelatedEntryJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 14; this.result_0 = this.local$_transactionDb.clazzContentJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 14: napier.Napier.d_82mfvz$('Ran ClazzContentJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 15; this.result_0 = this.local$_transactionDb.contentCategorySchemaDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 15: napier.Napier.d_82mfvz$('Ran ContentCategorySchemaDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 16; this.result_0 = this.local$_transactionDb.contentCategoryDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 16: napier.Napier.d_82mfvz$('Ran ContentCategoryDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 17; this.result_0 = this.local$_transactionDb.languageDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 17: napier.Napier.d_82mfvz$('Ran LanguageDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 18; this.result_0 = this.local$_transactionDb.languageVariantDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 18: napier.Napier.d_82mfvz$('Ran LanguageVariantDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 19; this.result_0 = this.local$_transactionDb.personGroupDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 19: napier.Napier.d_82mfvz$('Ran PersonGroupDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 20; this.result_0 = this.local$_transactionDb.personGroupDao.replicateOnNewNodeClazzBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 20: napier.Napier.d_82mfvz$('Ran PersonGroupDao#replicateOnNewNodeClazzBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 21; this.result_0 = this.local$_transactionDb.personGroupDao.replicateOnNewNodePersonBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 21: napier.Napier.d_82mfvz$('Ran PersonGroupDao#replicateOnNewNodePersonBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 22; this.result_0 = this.local$_transactionDb.personGroupDao.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 22: napier.Napier.d_82mfvz$('Ran PersonGroupDao#replicateOnNewNodeSchoolBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 23; this.result_0 = this.local$_transactionDb.personGroupMemberDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 23: napier.Napier.d_82mfvz$('Ran PersonGroupMemberDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 24; this.result_0 = this.local$_transactionDb.personGroupMemberDao.replicateOnNewNodeClazzBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 24: napier.Napier.d_82mfvz$('Ran PersonGroupMemberDao#replicateOnNewNodeClazzBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 25; this.result_0 = this.local$_transactionDb.personGroupMemberDao.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 25: napier.Napier.d_82mfvz$('Ran PersonGroupMemberDao#replicateOnNewNodeSchoolBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 26; this.result_0 = this.local$_transactionDb.personPictureDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 26: napier.Napier.d_82mfvz$('Ran PersonPictureDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 27; this.result_0 = this.local$_transactionDb.containerDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 27: napier.Napier.d_82mfvz$('Ran ContainerDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 28; this.result_0 = this.local$_transactionDb.verbDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 28: napier.Napier.d_82mfvz$('Ran VerbDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 29; this.result_0 = this.local$_transactionDb.xObjectDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 29: napier.Napier.d_82mfvz$('Ran XObjectDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 30; this.result_0 = this.local$_transactionDb.reportDao.replicateOnNewNodeTemplates_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 30: napier.Napier.d_82mfvz$('Ran ReportDao#replicateOnNewNodeTemplates in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 31; this.result_0 = this.local$_transactionDb.statementDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 31: napier.Napier.d_82mfvz$('Ran StatementDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 32; this.result_0 = this.local$_transactionDb.contextXObjectStatementJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 32: napier.Napier.d_82mfvz$('Ran ContextXObjectStatementJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 33; this.result_0 = this.local$_transactionDb.stateDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 33: napier.Napier.d_82mfvz$('Ran StateDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 34; this.result_0 = this.local$_transactionDb.stateContentDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 34: napier.Napier.d_82mfvz$('Ran StateContentDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 35; this.result_0 = this.local$_transactionDb.agentDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 35: napier.Napier.d_82mfvz$('Ran AgentDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 36; this.result_0 = this.local$_transactionDb.learnerGroupDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 36: napier.Napier.d_82mfvz$('Ran LearnerGroupDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 37; this.result_0 = this.local$_transactionDb.learnerGroupMemberDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 37: napier.Napier.d_82mfvz$('Ran LearnerGroupMemberDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 38; this.result_0 = this.local$_transactionDb.groupLearningSessionDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 38: napier.Napier.d_82mfvz$('Ran GroupLearningSessionDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 39; this.result_0 = this.local$_transactionDb.clazzLogAttendanceRecordDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 39: napier.Napier.d_82mfvz$('Ran ClazzLogAttendanceRecordDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 40; this.result_0 = this.local$_transactionDb.clazzLogDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 40: napier.Napier.d_82mfvz$('Ran ClazzLogDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 41; this.result_0 = this.local$_transactionDb.scheduleDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 41: napier.Napier.d_82mfvz$('Ran ScheduleDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 42; this.result_0 = this.local$_transactionDb.holidayCalendarDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 42: napier.Napier.d_82mfvz$('Ran HolidayCalendarDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 43; this.result_0 = this.local$_transactionDb.holidayDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 43: napier.Napier.d_82mfvz$('Ran HolidayDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 44; this.result_0 = this.local$_transactionDb.schoolDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 44: napier.Napier.d_82mfvz$('Ran SchoolDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 45; this.result_0 = this.local$_transactionDb.xLangMapEntryDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 45: napier.Napier.d_82mfvz$('Ran XLangMapEntryDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 46; this.result_0 = this.local$_transactionDb.schoolMemberDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 46: napier.Napier.d_82mfvz$('Ran SchoolMemberDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 47; this.result_0 = this.local$_transactionDb.clazzAssignmentDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 47: napier.Napier.d_82mfvz$('Ran ClazzAssignmentDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 48; this.result_0 = this.local$_transactionDb.clazzAssignmentContentJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 48: napier.Napier.d_82mfvz$('Ran ClazzAssignmentContentJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 49; this.result_0 = this.local$_transactionDb.courseAssignmentSubmissionDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 49: napier.Napier.d_82mfvz$('Ran CourseAssignmentSubmissionDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 50; this.result_0 = this.local$_transactionDb.courseAssignmentSubmissionAttachmentDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 50: napier.Napier.d_82mfvz$('Ran CourseAssignmentSubmissionAttachmentDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 51; this.result_0 = this.local$_transactionDb.courseAssignmentMarkDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 51: napier.Napier.d_82mfvz$('Ran CourseAssignmentMarkDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 52; this.result_0 = this.local$_transactionDb.commentsDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 52: napier.Napier.d_82mfvz$('Ran CommentsDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 53; this.result_0 = this.local$_transactionDb.siteDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 53: napier.Napier.d_82mfvz$('Ran SiteDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 54; this.result_0 = this.local$_transactionDb.siteTermsDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 54: napier.Napier.d_82mfvz$('Ran SiteTermsDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 55; this.result_0 = this.local$_transactionDb.personParentJoinDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 55: napier.Napier.d_82mfvz$('Ran PersonParentJoinDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 56; this.result_0 = this.local$_transactionDb.scopedGrantDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 56: napier.Napier.d_82mfvz$('Ran ScopedGrantDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 57; this.result_0 = this.local$_transactionDb.scopedGrantDao.replicateOnNewNodeClazzBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 57: napier.Napier.d_82mfvz$('Ran ScopedGrantDao#replicateOnNewNodeClazzBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 58; this.result_0 = this.local$_transactionDb.scopedGrantDao.replicateOnNewNodePersonBased_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 58: napier.Napier.d_82mfvz$('Ran ScopedGrantDao#replicateOnNewNodePersonBased in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 59; this.result_0 = this.local$_transactionDb.personAuth2Dao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 59: napier.Napier.d_82mfvz$('Ran PersonAuth2Dao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 60; this.result_0 = this.local$_transactionDb.userSessionDao.updateReplicationTrackersOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 60: napier.Napier.d_82mfvz$('Ran UserSessionDao#updateReplicationTrackersOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 61; this.result_0 = this.local$_transactionDb.coursePictureDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 61: napier.Napier.d_82mfvz$('Ran CoursePictureDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 62; this.result_0 = this.local$_transactionDb.contentEntryPictureDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 62: napier.Napier.d_82mfvz$('Ran ContentEntryPictureDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 63; this.result_0 = this.local$_transactionDb.chatDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 63: napier.Napier.d_82mfvz$('Ran ChatDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 64; this.result_0 = this.local$_transactionDb.chatMemberDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 64: napier.Napier.d_82mfvz$('Ran ChatMemberDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 65; this.result_0 = this.local$_transactionDb.messageDao.replicateOnNewNodeChats_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 65: napier.Napier.d_82mfvz$('Ran MessageDao#replicateOnNewNodeChats in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 66; this.result_0 = this.local$_transactionDb.messageDao.replicateOnNewNodePosts_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 66: napier.Napier.d_82mfvz$('Ran MessageDao#replicateOnNewNodePosts in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 67; this.result_0 = this.local$_transactionDb.messageReadDao.replicateOnNewNodeChats_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 67: napier.Napier.d_82mfvz$('Ran MessageReadDao#replicateOnNewNodeChats in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 68; this.result_0 = this.local$_transactionDb.courseDiscussionDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 68: napier.Napier.d_82mfvz$('Ran CourseDiscussionDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 69; this.result_0 = this.local$_transactionDb.discussionTopicDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 69: napier.Napier.d_82mfvz$('Ran DiscussionTopicDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'); this.local$fnTimeCounter = systemTimeInMillis(); this.state_0 = 70; this.result_0 = this.local$_transactionDb.discussionPostDao.replicateOnNewNode_s8cxhz$(this.local$closure$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 70: return napier.Napier.d_82mfvz$('Ran DiscussionPostDao#replicateOnNewNode in ' + toString(systemTimeInMillis().subtract(this.local$fnTimeCounter)) + 'ms'), Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda(closure$newNodeId_0) { return function (_transactionDb_0, continuation_0, suspended) { var instance = new Coroutine$UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda(closure$newNodeId_0, _transactionDb_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$runOnNewNode_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$runOnNewNode_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$runOnNewNode_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$runOnNewNode_s8cxhz$.prototype.constructor = Coroutine$runOnNewNode_s8cxhz$; Coroutine$runOnNewNode_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = withDoorTransactionAsync(this.$this._db_0, void 0, UmAppDatabase_ReplicationRunOnChangeRunner$runOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return setOf_0(['Person', 'Clazz', 'CourseBlock', 'CourseTerminology', 'CourseGroupSet', 'CourseGroupMember', 'ClazzEnrolment', 'LeavingReason', 'ContentEntry', 'ContentEntryContentCategoryJoin', 'ContentEntryParentChildJoin', 'ContentEntryRelatedEntryJoin', 'ClazzContentJoin', 'ContentCategorySchema', 'ContentCategory', 'Language', 'LanguageVariant', 'PersonGroup', 'PersonGroupMember', 'PersonPicture', 'Container', 'VerbEntity', 'XObjectEntity', 'Report', 'StatementEntity', 'ContextXObjectStatementJoin', 'StateEntity', 'StateContentEntity', 'AgentEntity', 'LearnerGroup', 'LearnerGroupMember', 'GroupLearningSession', 'ClazzLogAttendanceRecord', 'ClazzLog', 'Schedule', 'HolidayCalendar', 'Holiday', 'School', 'XLangMapEntry', 'SchoolMember', 'ClazzAssignment', 'ClazzAssignmentContentJoin', 'CourseAssignmentSubmission', 'CourseAssignmentSubmissionAttachment', 'CourseAssignmentMark', 'Comments', 'Site', 'SiteTerms', 'PersonParentJoin', 'ScopedGrant', 'PersonAuth2', 'UserSession', 'CoursePicture', 'ContentEntryPicture', 'Chat', 'ChatMember', 'Message', 'MessageRead', 'CourseDiscussion', 'DiscussionTopic', 'DiscussionPost']); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UmAppDatabase_ReplicationRunOnChangeRunner.prototype.runOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$runOnNewNode_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UmAppDatabase_ReplicationRunOnChangeRunner.$metadata$ = {kind: Kind_CLASS, simpleName: 'UmAppDatabase_ReplicationRunOnChangeRunner', interfaces: [ReplicationRunOnChangeRunner]}; function UmAppDatabase_Repo(db, dbUnwrapped, config, isRootRepository) { UmAppDatabase_Repo$Companion_getInstance(); if (isRootRepository === void 0) isRootRepository = false; UmAppDatabase.call(this); this.db_dckk3g$_0 = db; this.config_awa45k$_0 = config; this.isRootRepository_z663x8$_0 = isRootRepository; this._db_0 = dbUnwrapped; var tmp$; if (this.isRootRepository && this.config.useReplicationSubscription) { tmp$ = makeNewSubscriptionManager(this); } else { tmp$ = null; } this.replicationSubscriptionManager_j1bst2$_0 = tmp$; this._repositoryHelper = new RepositoryHelper(); this._PersonDao_ujubz8$_0 = lazy_0(UmAppDatabase_Repo$_PersonDao$lambda(this)); this._ClazzDao_e4tenz$_0 = lazy_0(UmAppDatabase_Repo$_ClazzDao$lambda(this)); this._CourseBlockDao_ei3yxn$_0 = lazy_0(UmAppDatabase_Repo$_CourseBlockDao$lambda(this)); this._CourseTerminologyDao_jhtq7$_0 = lazy_0(UmAppDatabase_Repo$_CourseTerminologyDao$lambda(this)); this._CourseGroupSetDao_4in49n$_0 = lazy_0(UmAppDatabase_Repo$_CourseGroupSetDao$lambda(this)); this._CourseGroupMemberDao_bgnla1$_0 = lazy_0(UmAppDatabase_Repo$_CourseGroupMemberDao$lambda(this)); this._ClazzEnrolmentDao_4a7n1v$_0 = lazy_0(UmAppDatabase_Repo$_ClazzEnrolmentDao$lambda(this)); this._LeavingReasonDao_hlqrb3$_0 = lazy_0(UmAppDatabase_Repo$_LeavingReasonDao$lambda(this)); this._ContentEntryDao_8jkla8$_0 = lazy_0(UmAppDatabase_Repo$_ContentEntryDao$lambda(this)); this._ContentEntryContentCategoryJoinDao_rca9kf$_0 = lazy_0(UmAppDatabase_Repo$_ContentEntryContentCategoryJoinDao$lambda(this)); this._ContentEntryParentChildJoinDao_p9lgj8$_0 = lazy_0(UmAppDatabase_Repo$_ContentEntryParentChildJoinDao$lambda(this)); this._ContentEntryRelatedEntryJoinDao_h6no6p$_0 = lazy_0(UmAppDatabase_Repo$_ContentEntryRelatedEntryJoinDao$lambda(this)); this._ClazzContentJoinDao_inlg8e$_0 = lazy_0(UmAppDatabase_Repo$_ClazzContentJoinDao$lambda(this)); this._ContentCategorySchemaDao_5s0bb5$_0 = lazy_0(UmAppDatabase_Repo$_ContentCategorySchemaDao$lambda(this)); this._ContentCategoryDao_bkzxts$_0 = lazy_0(UmAppDatabase_Repo$_ContentCategoryDao$lambda(this)); this._LanguageDao_uo42vz$_0 = lazy_0(UmAppDatabase_Repo$_LanguageDao$lambda(this)); this._LanguageVariantDao_dgbgcq$_0 = lazy_0(UmAppDatabase_Repo$_LanguageVariantDao$lambda(this)); this._PersonGroupDao_7mhe25$_0 = lazy_0(UmAppDatabase_Repo$_PersonGroupDao$lambda(this)); this._PersonGroupMemberDao_wihgy5$_0 = lazy_0(UmAppDatabase_Repo$_PersonGroupMemberDao$lambda(this)); this._EntityRoleDao_1gzugw$_0 = lazy_0(UmAppDatabase_Repo$_EntityRoleDao$lambda(this)); this._PersonPictureDao_xtn7v6$_0 = lazy_0(UmAppDatabase_Repo$_PersonPictureDao$lambda(this)); this._ContainerDao_3wn3o6$_0 = lazy_0(UmAppDatabase_Repo$_ContainerDao$lambda(this)); this._VerbDao_nm4w2u$_0 = lazy_0(UmAppDatabase_Repo$_VerbDao$lambda(this)); this._XObjectDao_jq9ao0$_0 = lazy_0(UmAppDatabase_Repo$_XObjectDao$lambda(this)); this._ReportDao_9u0lvp$_0 = lazy_0(UmAppDatabase_Repo$_ReportDao$lambda(this)); this._StatementDao_tpixrc$_0 = lazy_0(UmAppDatabase_Repo$_StatementDao$lambda(this)); this._ContextXObjectStatementJoinDao_6w1wdi$_0 = lazy_0(UmAppDatabase_Repo$_ContextXObjectStatementJoinDao$lambda(this)); this._StateDao_j50u9m$_0 = lazy_0(UmAppDatabase_Repo$_StateDao$lambda(this)); this._StateContentDao_fw26c1$_0 = lazy_0(UmAppDatabase_Repo$_StateContentDao$lambda(this)); this._AgentDao_pi586m$_0 = lazy_0(UmAppDatabase_Repo$_AgentDao$lambda(this)); this._LearnerGroupDao_76gatx$_0 = lazy_0(UmAppDatabase_Repo$_LearnerGroupDao$lambda(this)); this._LearnerGroupMemberDao_7uhmpd$_0 = lazy_0(UmAppDatabase_Repo$_LearnerGroupMemberDao$lambda(this)); this._GroupLearningSessionDao_38ojog$_0 = lazy_0(UmAppDatabase_Repo$_GroupLearningSessionDao$lambda(this)); this._ClazzLogAttendanceRecordDao_4r3kjx$_0 = lazy_0(UmAppDatabase_Repo$_ClazzLogAttendanceRecordDao$lambda(this)); this._ClazzLogDao_70b6y5$_0 = lazy_0(UmAppDatabase_Repo$_ClazzLogDao$lambda(this)); this._ScheduleDao_dgcsim$_0 = lazy_0(UmAppDatabase_Repo$_ScheduleDao$lambda(this)); this._HolidayCalendarDao_dbgjhb$_0 = lazy_0(UmAppDatabase_Repo$_HolidayCalendarDao$lambda(this)); this._HolidayDao_n3kgxr$_0 = lazy_0(UmAppDatabase_Repo$_HolidayDao$lambda(this)); this._SchoolDao_ro0mez$_0 = lazy_0(UmAppDatabase_Repo$_SchoolDao$lambda(this)); this._XLangMapEntryDao_lbg3az$_0 = lazy_0(UmAppDatabase_Repo$_XLangMapEntryDao$lambda(this)); this._SchoolMemberDao_l0miut$_0 = lazy_0(UmAppDatabase_Repo$_SchoolMemberDao$lambda(this)); this._ClazzAssignmentDao_l1mez6$_0 = lazy_0(UmAppDatabase_Repo$_ClazzAssignmentDao$lambda(this)); this._ClazzAssignmentContentJoinDao_1c2tvf$_0 = lazy_0(UmAppDatabase_Repo$_ClazzAssignmentContentJoinDao$lambda(this)); this._ClazzAssignmentRollUpDao_2f8am2$_0 = lazy_0(UmAppDatabase_Repo$_ClazzAssignmentRollUpDao$lambda(this)); this._CourseAssignmentSubmissionDao_9kuy85$_0 = lazy_0(UmAppDatabase_Repo$_CourseAssignmentSubmissionDao$lambda(this)); this._CourseAssignmentSubmissionAttachmentDao_68jpoi$_0 = lazy_0(UmAppDatabase_Repo$_CourseAssignmentSubmissionAttachmentDao$lambda(this)); this._CourseAssignmentMarkDao_7honss$_0 = lazy_0(UmAppDatabase_Repo$_CourseAssignmentMarkDao$lambda(this)); this._CommentsDao_7ok0mz$_0 = lazy_0(UmAppDatabase_Repo$_CommentsDao$lambda(this)); this._SiteDao_35ern6$_0 = lazy_0(UmAppDatabase_Repo$_SiteDao$lambda(this)); this._SiteTermsDao_u5navr$_0 = lazy_0(UmAppDatabase_Repo$_SiteTermsDao$lambda(this)); this._PersonParentJoinDao_saaols$_0 = lazy_0(UmAppDatabase_Repo$_PersonParentJoinDao$lambda(this)); this._ScopedGrantDao_3r6sr$_0 = lazy_0(UmAppDatabase_Repo$_ScopedGrantDao$lambda(this)); this._ErrorReportDao_3fz6m3$_0 = lazy_0(UmAppDatabase_Repo$_ErrorReportDao$lambda(this)); this._PersonAuth2Dao_uo70te$_0 = lazy_0(UmAppDatabase_Repo$_PersonAuth2Dao$lambda(this)); this._UserSessionDao_svxsy4$_0 = lazy_0(UmAppDatabase_Repo$_UserSessionDao$lambda(this)); this._CoursePictureDao_cwo2r8$_0 = lazy_0(UmAppDatabase_Repo$_CoursePictureDao$lambda(this)); this._ContentEntryPictureDao_6clelq$_0 = lazy_0(UmAppDatabase_Repo$_ContentEntryPictureDao$lambda(this)); this._ChatDao_9gdue7$_0 = lazy_0(UmAppDatabase_Repo$_ChatDao$lambda(this)); this._ChatMemberDao_8nduuf$_0 = lazy_0(UmAppDatabase_Repo$_ChatMemberDao$lambda(this)); this._MessageDao_uo7ouo$_0 = lazy_0(UmAppDatabase_Repo$_MessageDao$lambda(this)); this._MessageReadDao_9pyt5y$_0 = lazy_0(UmAppDatabase_Repo$_MessageReadDao$lambda(this)); this._CourseDiscussionDao_zc4gve$_0 = lazy_0(UmAppDatabase_Repo$_CourseDiscussionDao$lambda(this)); this._DiscussionTopicDao_cb2wmo$_0 = lazy_0(UmAppDatabase_Repo$_DiscussionTopicDao$lambda(this)); this._DiscussionPostDao_xx2rrl$_0 = lazy_0(UmAppDatabase_Repo$_DiscussionPostDao$lambda(this)); } Object.defineProperty(UmAppDatabase_Repo.prototype, 'db', {get: function () { return this.db_dckk3g$_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'config', {get: function () { return this.config_awa45k$_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'isRootRepository', {get: function () { return this.isRootRepository_z663x8$_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'context', {configurable: true, get: function () { return this.config.context; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'replicationSubscriptionManager', {configurable: true, get: function () { return this.replicationSubscriptionManager_j1bst2$_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_endpoint_0', {configurable: true, get: function () { return this.config.endpoint; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_httpClient', {configurable: true, get: function () { return this.config.httpClient; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clientId', {configurable: true, get: function () { return this.config.nodeId; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'dbName', {configurable: true, get: function () { return 'Repository for [' + this._db_0.toString() + '] - ' + this.config.endpoint; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'connectivityStatus', {configurable: true, get: function () { return this._repositoryHelper.connectivityStatus; }, set: function (newValue) { this._repositoryHelper.connectivityStatus = newValue; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'dbVersion', {configurable: true, get: function () { return 107; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'networkNodeDao', {configurable: true, get: function () { throw IllegalStateException_init('NetworkNodeDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_PersonDao_0', {configurable: true, get: function () { return this._PersonDao_ujubz8$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personDao', {configurable: true, get: function () { return this._PersonDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzDao_0', {configurable: true, get: function () { return this._ClazzDao_e4tenz$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzDao', {configurable: true, get: function () { return this._ClazzDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseBlockDao_0', {configurable: true, get: function () { return this._CourseBlockDao_ei3yxn$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseBlockDao', {configurable: true, get: function () { return this._CourseBlockDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseTerminologyDao_0', {configurable: true, get: function () { return this._CourseTerminologyDao_jhtq7$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseTerminologyDao', {configurable: true, get: function () { return this._CourseTerminologyDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseGroupSetDao_0', {configurable: true, get: function () { return this._CourseGroupSetDao_4in49n$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseGroupSetDao', {configurable: true, get: function () { return this._CourseGroupSetDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseGroupMemberDao_0', {configurable: true, get: function () { return this._CourseGroupMemberDao_bgnla1$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseGroupMemberDao', {configurable: true, get: function () { return this._CourseGroupMemberDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzEnrolmentDao_0', {configurable: true, get: function () { return this._ClazzEnrolmentDao_4a7n1v$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzEnrolmentDao', {configurable: true, get: function () { return this._ClazzEnrolmentDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_LeavingReasonDao_0', {configurable: true, get: function () { return this._LeavingReasonDao_hlqrb3$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'leavingReasonDao', {configurable: true, get: function () { return this._LeavingReasonDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentEntryDao_0', {configurable: true, get: function () { return this._ContentEntryDao_8jkla8$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentEntryDao', {configurable: true, get: function () { return this._ContentEntryDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentEntryContentCategoryJoinDao_0', {configurable: true, get: function () { return this._ContentEntryContentCategoryJoinDao_rca9kf$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentEntryContentCategoryJoinDao', {configurable: true, get: function () { return this._ContentEntryContentCategoryJoinDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentEntryParentChildJoinDao_0', {configurable: true, get: function () { return this._ContentEntryParentChildJoinDao_p9lgj8$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentEntryParentChildJoinDao', {configurable: true, get: function () { return this._ContentEntryParentChildJoinDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentEntryRelatedEntryJoinDao_0', {configurable: true, get: function () { return this._ContentEntryRelatedEntryJoinDao_h6no6p$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentEntryRelatedEntryJoinDao', {configurable: true, get: function () { return this._ContentEntryRelatedEntryJoinDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzContentJoinDao_0', {configurable: true, get: function () { return this._ClazzContentJoinDao_inlg8e$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzContentJoinDao', {configurable: true, get: function () { return this._ClazzContentJoinDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentCategorySchemaDao_0', {configurable: true, get: function () { return this._ContentCategorySchemaDao_5s0bb5$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentCategorySchemaDao', {configurable: true, get: function () { return this._ContentCategorySchemaDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentCategoryDao_0', {configurable: true, get: function () { return this._ContentCategoryDao_bkzxts$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentCategoryDao', {configurable: true, get: function () { return this._ContentCategoryDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_LanguageDao_0', {configurable: true, get: function () { return this._LanguageDao_uo42vz$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'languageDao', {configurable: true, get: function () { return this._LanguageDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_LanguageVariantDao_0', {configurable: true, get: function () { return this._LanguageVariantDao_dgbgcq$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'languageVariantDao', {configurable: true, get: function () { return this._LanguageVariantDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'scrapeQueueItemDao', {configurable: true, get: function () { throw IllegalStateException_init('ScrapeQueueItemDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personAuthDao', {configurable: true, get: function () { throw IllegalStateException_init('PersonAuthDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_PersonGroupDao_0', {configurable: true, get: function () { return this._PersonGroupDao_7mhe25$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personGroupDao', {configurable: true, get: function () { return this._PersonGroupDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_PersonGroupMemberDao_0', {configurable: true, get: function () { return this._PersonGroupMemberDao_wihgy5$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personGroupMemberDao', {configurable: true, get: function () { return this._PersonGroupMemberDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_EntityRoleDao_0', {configurable: true, get: function () { return this._EntityRoleDao_1gzugw$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'entityRoleDao', {configurable: true, get: function () { return this._EntityRoleDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_PersonPictureDao_0', {configurable: true, get: function () { return this._PersonPictureDao_xtn7v6$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personPictureDao', {configurable: true, get: function () { return this._PersonPictureDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'connectivityStatusDao', {configurable: true, get: function () { throw IllegalStateException_init('ConnectivityStatusDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContainerDao_0', {configurable: true, get: function () { return this._ContainerDao_3wn3o6$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'containerDao', {configurable: true, get: function () { return this._ContainerDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'containerEntryDao', {configurable: true, get: function () { throw IllegalStateException_init('ContainerEntryDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'containerEntryFileDao', {configurable: true, get: function () { throw IllegalStateException_init('ContainerEntryFileDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'containerETagDao', {configurable: true, get: function () { throw IllegalStateException_init('ContainerETagDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_VerbDao_0', {configurable: true, get: function () { return this._VerbDao_nm4w2u$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'verbDao', {configurable: true, get: function () { return this._VerbDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_XObjectDao_0', {configurable: true, get: function () { return this._XObjectDao_jq9ao0$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'xObjectDao', {configurable: true, get: function () { return this._XObjectDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ReportDao_0', {configurable: true, get: function () { return this._ReportDao_9u0lvp$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'reportDao', {configurable: true, get: function () { return this._ReportDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'containerImportJobDao', {configurable: true, get: function () { throw IllegalStateException_init('ContainerImportJobDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_StatementDao_0', {configurable: true, get: function () { return this._StatementDao_tpixrc$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'statementDao', {configurable: true, get: function () { return this._StatementDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContextXObjectStatementJoinDao_0', {configurable: true, get: function () { return this._ContextXObjectStatementJoinDao_6w1wdi$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contextXObjectStatementJoinDao', {configurable: true, get: function () { return this._ContextXObjectStatementJoinDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_StateDao_0', {configurable: true, get: function () { return this._StateDao_j50u9m$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'stateDao', {configurable: true, get: function () { return this._StateDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_StateContentDao_0', {configurable: true, get: function () { return this._StateContentDao_fw26c1$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'stateContentDao', {configurable: true, get: function () { return this._StateContentDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_AgentDao_0', {configurable: true, get: function () { return this._AgentDao_pi586m$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'agentDao', {configurable: true, get: function () { return this._AgentDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_LearnerGroupDao_0', {configurable: true, get: function () { return this._LearnerGroupDao_76gatx$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'learnerGroupDao', {configurable: true, get: function () { return this._LearnerGroupDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_LearnerGroupMemberDao_0', {configurable: true, get: function () { return this._LearnerGroupMemberDao_7uhmpd$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'learnerGroupMemberDao', {configurable: true, get: function () { return this._LearnerGroupMemberDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_GroupLearningSessionDao_0', {configurable: true, get: function () { return this._GroupLearningSessionDao_38ojog$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'groupLearningSessionDao', {configurable: true, get: function () { return this._GroupLearningSessionDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzLogAttendanceRecordDao_0', {configurable: true, get: function () { return this._ClazzLogAttendanceRecordDao_4r3kjx$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzLogAttendanceRecordDao', {configurable: true, get: function () { return this._ClazzLogAttendanceRecordDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzLogDao_0', {configurable: true, get: function () { return this._ClazzLogDao_70b6y5$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzLogDao', {configurable: true, get: function () { return this._ClazzLogDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ScheduleDao_0', {configurable: true, get: function () { return this._ScheduleDao_dgcsim$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'scheduleDao', {configurable: true, get: function () { return this._ScheduleDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_HolidayCalendarDao_0', {configurable: true, get: function () { return this._HolidayCalendarDao_dbgjhb$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'holidayCalendarDao', {configurable: true, get: function () { return this._HolidayCalendarDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_HolidayDao_0', {configurable: true, get: function () { return this._HolidayDao_n3kgxr$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'holidayDao', {configurable: true, get: function () { return this._HolidayDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_SchoolDao_0', {configurable: true, get: function () { return this._SchoolDao_ro0mez$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'schoolDao', {configurable: true, get: function () { return this._SchoolDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_XLangMapEntryDao_0', {configurable: true, get: function () { return this._XLangMapEntryDao_lbg3az$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'xLangMapEntryDao', {configurable: true, get: function () { return this._XLangMapEntryDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'locallyAvailableContainerDao', {configurable: true, get: function () { throw IllegalStateException_init('LocallyAvailableContainerDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_SchoolMemberDao_0', {configurable: true, get: function () { return this._SchoolMemberDao_l0miut$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'schoolMemberDao', {configurable: true, get: function () { return this._SchoolMemberDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzAssignmentDao_0', {configurable: true, get: function () { return this._ClazzAssignmentDao_l1mez6$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzAssignmentDao', {configurable: true, get: function () { return this._ClazzAssignmentDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzAssignmentContentJoinDao_0', {configurable: true, get: function () { return this._ClazzAssignmentContentJoinDao_1c2tvf$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzAssignmentContentJoinDao', {configurable: true, get: function () { return this._ClazzAssignmentContentJoinDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ClazzAssignmentRollUpDao_0', {configurable: true, get: function () { return this._ClazzAssignmentRollUpDao_2f8am2$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'clazzAssignmentRollUpDao', {configurable: true, get: function () { return this._ClazzAssignmentRollUpDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseAssignmentSubmissionDao_0', {configurable: true, get: function () { return this._CourseAssignmentSubmissionDao_9kuy85$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseAssignmentSubmissionDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseAssignmentSubmissionAttachmentDao_0', {configurable: true, get: function () { return this._CourseAssignmentSubmissionAttachmentDao_68jpoi$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseAssignmentSubmissionAttachmentDao', {configurable: true, get: function () { return this._CourseAssignmentSubmissionAttachmentDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseAssignmentMarkDao_0', {configurable: true, get: function () { return this._CourseAssignmentMarkDao_7honss$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseAssignmentMarkDao', {configurable: true, get: function () { return this._CourseAssignmentMarkDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CommentsDao_0', {configurable: true, get: function () { return this._CommentsDao_7ok0mz$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'commentsDao', {configurable: true, get: function () { return this._CommentsDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'syncNodeDao', {configurable: true, get: function () { throw IllegalStateException_init('SyncNodeDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_SiteDao_0', {configurable: true, get: function () { return this._SiteDao_35ern6$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'siteDao', {configurable: true, get: function () { return this._SiteDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_SiteTermsDao_0', {configurable: true, get: function () { return this._SiteTermsDao_u5navr$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'siteTermsDao', {configurable: true, get: function () { return this._SiteTermsDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_PersonParentJoinDao_0', {configurable: true, get: function () { return this._PersonParentJoinDao_saaols$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personParentJoinDao', {configurable: true, get: function () { return this._PersonParentJoinDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ScopedGrantDao_0', {configurable: true, get: function () { return this._ScopedGrantDao_3r6sr$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'scopedGrantDao', {configurable: true, get: function () { return this._ScopedGrantDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ErrorReportDao_0', {configurable: true, get: function () { return this._ErrorReportDao_3fz6m3$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'errorReportDao', {configurable: true, get: function () { return this._ErrorReportDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_PersonAuth2Dao_0', {configurable: true, get: function () { return this._PersonAuth2Dao_uo70te$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'personAuth2Dao', {configurable: true, get: function () { return this._PersonAuth2Dao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_UserSessionDao_0', {configurable: true, get: function () { return this._UserSessionDao_svxsy4$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'userSessionDao', {configurable: true, get: function () { return this._UserSessionDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentJobItemDao', {configurable: true, get: function () { throw IllegalStateException_init('ContentJobItemDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentJobDao', {configurable: true, get: function () { throw IllegalStateException_init('ContentJobDao is not annotated with @Repository'); }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CoursePictureDao_0', {configurable: true, get: function () { return this._CoursePictureDao_cwo2r8$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'coursePictureDao', {configurable: true, get: function () { return this._CoursePictureDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ContentEntryPictureDao_0', {configurable: true, get: function () { return this._ContentEntryPictureDao_6clelq$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'contentEntryPictureDao', {configurable: true, get: function () { return this._ContentEntryPictureDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ChatDao_0', {configurable: true, get: function () { return this._ChatDao_9gdue7$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'chatDao', {configurable: true, get: function () { return this._ChatDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_ChatMemberDao_0', {configurable: true, get: function () { return this._ChatMemberDao_8nduuf$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'chatMemberDao', {configurable: true, get: function () { return this._ChatMemberDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_MessageDao_0', {configurable: true, get: function () { return this._MessageDao_uo7ouo$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'messageDao', {configurable: true, get: function () { return this._MessageDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_MessageReadDao_0', {configurable: true, get: function () { return this._MessageReadDao_9pyt5y$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'messageReadDao', {configurable: true, get: function () { return this._MessageReadDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_CourseDiscussionDao_0', {configurable: true, get: function () { return this._CourseDiscussionDao_zc4gve$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'courseDiscussionDao', {configurable: true, get: function () { return this._CourseDiscussionDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_DiscussionTopicDao_0', {configurable: true, get: function () { return this._DiscussionTopicDao_cb2wmo$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'discussionTopicDao', {configurable: true, get: function () { return this._DiscussionTopicDao_0; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, '_DiscussionPostDao_0', {configurable: true, get: function () { return this._DiscussionPostDao_xx2rrl$_0.value; }}); Object.defineProperty(UmAppDatabase_Repo.prototype, 'discussionPostDao', {configurable: true, get: function () { return this._DiscussionPostDao_0; }}); UmAppDatabase_Repo.prototype.clearAllTables = function () { throw IllegalStateException_init('Cannot use a repository to clearAllTables!'); }; UmAppDatabase_Repo.prototype.clearAllTablesAsync = function (continuation) { throw IllegalStateException_init('Cannot use this to run clearAllTablesAsync'); }; UmAppDatabase_Repo.prototype.addWeakConnectivityListener_r5hok5$ = function (listener) { this._repositoryHelper.addWeakConnectivityListener_r5hok5$(listener); }; UmAppDatabase_Repo.prototype.removeWeakConnectivityListener_r5hok5$ = function (listener) { this._repositoryHelper.removeWeakConnectivityListener_r5hok5$(listener); }; UmAppDatabase_Repo.prototype.createAllTables = function () { throw IllegalStateException_init('Cannot use a repository to createAllTables!'); }; UmAppDatabase_Repo.prototype.getInvalidationTracker = function () { return this._db_0.getInvalidationTracker(); }; function UmAppDatabase_Repo$Companion() { UmAppDatabase_Repo$Companion_instance = this; this._DB_NAME = 'UmAppDatabase'; } UmAppDatabase_Repo$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var UmAppDatabase_Repo$Companion_instance = null; function UmAppDatabase_Repo$Companion_getInstance() { if (UmAppDatabase_Repo$Companion_instance === null) { new UmAppDatabase_Repo$Companion(); } return UmAppDatabase_Repo$Companion_instance; } function UmAppDatabase_Repo$_PersonDao$lambda(this$UmAppDatabase_Repo) { return function () { return new PersonDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.personDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseBlockDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseBlockDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseBlockDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseTerminologyDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseTerminologyDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseTerminologyDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseGroupSetDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseGroupSetDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseGroupSetDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseGroupMemberDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseGroupMemberDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseGroupMemberDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzEnrolmentDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzEnrolmentDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzEnrolmentDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_LeavingReasonDao$lambda(this$UmAppDatabase_Repo) { return function () { return new LeavingReasonDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.leavingReasonDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentEntryDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentEntryDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentEntryDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentEntryContentCategoryJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentEntryContentCategoryJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentEntryContentCategoryJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentEntryParentChildJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentEntryParentChildJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentEntryParentChildJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentEntryRelatedEntryJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentEntryRelatedEntryJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentEntryRelatedEntryJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzContentJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzContentJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzContentJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentCategorySchemaDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentCategorySchemaDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentCategorySchemaDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentCategoryDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentCategoryDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentCategoryDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_LanguageDao$lambda(this$UmAppDatabase_Repo) { return function () { return new LanguageDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.languageDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_LanguageVariantDao$lambda(this$UmAppDatabase_Repo) { return function () { return new LanguageVariantDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.languageVariantDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_PersonGroupDao$lambda(this$UmAppDatabase_Repo) { return function () { return new PersonGroupDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.personGroupDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_PersonGroupMemberDao$lambda(this$UmAppDatabase_Repo) { return function () { return new PersonGroupMemberDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.personGroupMemberDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_EntityRoleDao$lambda(this$UmAppDatabase_Repo) { return function () { return new EntityRoleDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.entityRoleDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_PersonPictureDao$lambda(this$UmAppDatabase_Repo) { return function () { return new PersonPictureDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.personPictureDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContainerDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContainerDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.containerDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_VerbDao$lambda(this$UmAppDatabase_Repo) { return function () { return new VerbDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.verbDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_XObjectDao$lambda(this$UmAppDatabase_Repo) { return function () { return new XObjectDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.xObjectDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ReportDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ReportDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.reportDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_StatementDao$lambda(this$UmAppDatabase_Repo) { return function () { return new StatementDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.statementDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContextXObjectStatementJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContextXObjectStatementJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contextXObjectStatementJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_StateDao$lambda(this$UmAppDatabase_Repo) { return function () { return new StateDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.stateDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_StateContentDao$lambda(this$UmAppDatabase_Repo) { return function () { return new StateContentDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.stateContentDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_AgentDao$lambda(this$UmAppDatabase_Repo) { return function () { return new AgentDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.agentDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_LearnerGroupDao$lambda(this$UmAppDatabase_Repo) { return function () { return new LearnerGroupDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.learnerGroupDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_LearnerGroupMemberDao$lambda(this$UmAppDatabase_Repo) { return function () { return new LearnerGroupMemberDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.learnerGroupMemberDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_GroupLearningSessionDao$lambda(this$UmAppDatabase_Repo) { return function () { return new GroupLearningSessionDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.groupLearningSessionDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzLogAttendanceRecordDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzLogAttendanceRecordDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzLogAttendanceRecordDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzLogDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzLogDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzLogDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ScheduleDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ScheduleDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.scheduleDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_HolidayCalendarDao$lambda(this$UmAppDatabase_Repo) { return function () { return new HolidayCalendarDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.holidayCalendarDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_HolidayDao$lambda(this$UmAppDatabase_Repo) { return function () { return new HolidayDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.holidayDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_SchoolDao$lambda(this$UmAppDatabase_Repo) { return function () { return new SchoolDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.schoolDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_XLangMapEntryDao$lambda(this$UmAppDatabase_Repo) { return function () { return new XLangMapEntryDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.xLangMapEntryDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_SchoolMemberDao$lambda(this$UmAppDatabase_Repo) { return function () { return new SchoolMemberDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.schoolMemberDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzAssignmentDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzAssignmentDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzAssignmentDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzAssignmentContentJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzAssignmentContentJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzAssignmentContentJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ClazzAssignmentRollUpDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ClazzAssignmentRollUpDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.clazzAssignmentRollUpDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseAssignmentSubmissionDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseAssignmentSubmissionDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseAssignmentSubmissionDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseAssignmentSubmissionAttachmentDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseAssignmentSubmissionAttachmentDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseAssignmentSubmissionAttachmentDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseAssignmentMarkDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseAssignmentMarkDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseAssignmentMarkDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CommentsDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CommentsDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.commentsDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_SiteDao$lambda(this$UmAppDatabase_Repo) { return function () { return new SiteDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.siteDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_SiteTermsDao$lambda(this$UmAppDatabase_Repo) { return function () { return new SiteTermsDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.siteTermsDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_PersonParentJoinDao$lambda(this$UmAppDatabase_Repo) { return function () { return new PersonParentJoinDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.personParentJoinDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ScopedGrantDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ScopedGrantDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.scopedGrantDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ErrorReportDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ErrorReportDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.errorReportDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_PersonAuth2Dao$lambda(this$UmAppDatabase_Repo) { return function () { return new PersonAuth2Dao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.personAuth2Dao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_UserSessionDao$lambda(this$UmAppDatabase_Repo) { return function () { return new UserSessionDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.userSessionDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CoursePictureDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CoursePictureDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.coursePictureDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ContentEntryPictureDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ContentEntryPictureDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.contentEntryPictureDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ChatDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ChatDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.chatDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_ChatMemberDao$lambda(this$UmAppDatabase_Repo) { return function () { return new ChatMemberDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.chatMemberDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_MessageDao$lambda(this$UmAppDatabase_Repo) { return function () { return new MessageDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.messageDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_MessageReadDao$lambda(this$UmAppDatabase_Repo) { return function () { return new MessageReadDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.messageReadDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_CourseDiscussionDao$lambda(this$UmAppDatabase_Repo) { return function () { return new CourseDiscussionDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.courseDiscussionDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_DiscussionTopicDao$lambda(this$UmAppDatabase_Repo) { return function () { return new DiscussionTopicDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.discussionTopicDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } function UmAppDatabase_Repo$_DiscussionPostDao$lambda(this$UmAppDatabase_Repo) { return function () { return new DiscussionPostDao_Repo(this$UmAppDatabase_Repo.db, this$UmAppDatabase_Repo, this$UmAppDatabase_Repo.db.discussionPostDao, this$UmAppDatabase_Repo._httpClient, this$UmAppDatabase_Repo.clientId, this$UmAppDatabase_Repo._endpoint_0); }; } UmAppDatabase_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'UmAppDatabase_Repo', interfaces: [DoorDatabaseRepository, UmAppDatabase]}; function AgentDao() { } AgentDao.prototype.getAgentByAnyId_t5gqrj$ = function (openId, mbox, account, homepage, sha1, callback$default) { if (openId === void 0) openId = ''; if (mbox === void 0) mbox = ''; if (account === void 0) account = ''; if (homepage === void 0) homepage = ''; if (sha1 === void 0) sha1 = ''; return callback$default ? callback$default(openId, mbox, account, homepage, sha1) : this.getAgentByAnyId_t5gqrj$$default(openId, mbox, account, homepage, sha1); }; AgentDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'AgentDao', interfaces: [BaseDao]}; function AgentDao_JdbcKt(_db) { AgentDao.call(this); this._db = _db; this._insertAdapterAgentEntity_ = new AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral(this._db); } AgentDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterAgentEntity_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync.prototype.constructor = Coroutine$insertAsync; Coroutine$insertAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterAgentEntity_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; AgentDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterAgentEntity_.insertList_4ezy5m$(entityList); }; function AgentDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.agentMbox); _stmt.setString_vqvrqt$(2, _entity.agentMbox_sha1sum); _stmt.setString_vqvrqt$(3, _entity.agentOpenid); _stmt.setString_vqvrqt$(4, _entity.agentAccountName); _stmt.setString_vqvrqt$(5, _entity.agentHomePage); _stmt.setLong_6svq3l$(6, _entity.agentPersonUid); _stmt.setLong_6svq3l$(7, _entity.statementMasterChangeSeqNum); _stmt.setLong_6svq3l$(8, _entity.statementLocalChangeSeqNum); _stmt.setInt_vux9f0$(9, _entity.statementLastChangedBy); _stmt.setLong_6svq3l$(10, _entity.agentLct); _stmt.setLong_6svq3l$(11, _entity.agentUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } AgentDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE AgentEntity SET agentMbox = ?, agentMbox_sha1sum = ?, agentOpenid = ?, agentAccountName = ?, agentHomePage = ?, agentPersonUid = ?, statementMasterChangeSeqNum = ?, statementLocalChangeSeqNum = ?, statementLastChangedBy = ?, agentLct = ? WHERE agentUid = ?'; prepareAndUseStatement(this._db, _sql, AgentDao_JdbcKt$updateList$lambda(entityList)); }; function AgentDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.agentMbox); _stmt.setString_vqvrqt$(2, closure$entity.agentMbox_sha1sum); _stmt.setString_vqvrqt$(3, closure$entity.agentOpenid); _stmt.setString_vqvrqt$(4, closure$entity.agentAccountName); _stmt.setString_vqvrqt$(5, closure$entity.agentHomePage); _stmt.setLong_6svq3l$(6, closure$entity.agentPersonUid); _stmt.setLong_6svq3l$(7, closure$entity.statementMasterChangeSeqNum); _stmt.setLong_6svq3l$(8, closure$entity.statementLocalChangeSeqNum); _stmt.setInt_vux9f0$(9, closure$entity.statementLastChangedBy); _stmt.setLong_6svq3l$(10, closure$entity.agentLct); _stmt.setLong_6svq3l$(11, closure$entity.agentUid); return _stmt.executeUpdate(); }; } AgentDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE AgentEntity SET agentMbox = ?, agentMbox_sha1sum = ?, agentOpenid = ?, agentAccountName = ?, agentHomePage = ?, agentPersonUid = ?, statementMasterChangeSeqNum = ?, statementLocalChangeSeqNum = ?, statementLastChangedBy = ?, agentLct = ? WHERE agentUid = ?'; prepareAndUseStatement(this._db, _sql, AgentDao_JdbcKt$update$lambda(entity)); }; function Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function AgentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$AgentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$; Coroutine$replicateOnNewNode_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO AgentEntityReplicate(aePk, aeDestination)\n | SELECT DISTINCT AgentEntity.agentUid AS aeUid,\n | ? AS aeDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN AgentEntity \n | ON AgentEntity.agentPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | --notpsql \n | AND AgentEntity.agentLct != COALESCE(\n | (SELECT aeVersionId\n | FROM AgentEntityReplicate\n | WHERE aePk = AgentEntity.agentUid\n | AND aeDestination = UserSession.usClientNodeId), 0) \n | --endnotpsql \n | /*psql ON CONFLICT(aePk, aeDestination) DO UPDATE\n | SET aePending = (SELECT AgentEntity.agentLct\n | FROM AgentEntity\n | WHERE AgentEntity.agentUid = EXCLUDED.aePk ) \n | != AgentEntityReplicate.aePk\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO AgentEntityReplicate(aePk, aeDestination)\n | SELECT DISTINCT AgentEntity.agentUid AS aeUid,\n | ? AS aeDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN AgentEntity \n | ON AgentEntity.agentPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | ON CONFLICT(aePk, aeDestination) DO UPDATE\n | SET aePending = (SELECT AgentEntity.agentLct\n | FROM AgentEntity\n | WHERE AgentEntity.agentUid = EXCLUDED.aePk ) \n | != AgentEntityReplicate.aePk\n | \n | \n |')), AgentDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda; Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function AgentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$AgentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange.prototype.constructor = Coroutine$replicateOnChange; Coroutine$replicateOnChange.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO AgentEntityReplicate(aePk, aeDestination)\n | SELECT DISTINCT AgentEntity.agentUid AS aeUid,\n | UserSession.usClientNodeId AS aeDestination\n | FROM ChangeLog\n | JOIN AgentEntity\n | ON ChangeLog.chTableId = 68\n | AND ChangeLog.chEntityPk = AgentEntity.agentUid\n | JOIN Person \n | ON Person.personUid = AgentEntity.agentPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | --notpsql \n | AND AgentEntity.agentLct != COALESCE(\n | (SELECT aeVersionId\n | FROM AgentEntityReplicate\n | WHERE aePk = AgentEntity.agentUid\n | AND aeDestination = UserSession.usClientNodeId), 0) \n | --endnotpsql \n | /*psql ON CONFLICT(aePk, aeDestination) DO UPDATE\n | SET aePending = (SELECT AgentEntity.agentLct\n | FROM AgentEntity\n | WHERE AgentEntity.agentUid = EXCLUDED.aePk ) \n | != AgentEntityReplicate.aePk\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO AgentEntityReplicate(aePk, aeDestination)\n | SELECT DISTINCT AgentEntity.agentUid AS aeUid,\n | UserSession.usClientNodeId AS aeDestination\n | FROM ChangeLog\n | JOIN AgentEntity\n | ON ChangeLog.chTableId = 68\n | AND ChangeLog.chEntityPk = AgentEntity.agentUid\n | JOIN Person \n | ON Person.personUid = AgentEntity.agentPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | ON CONFLICT(aePk, aeDestination) DO UPDATE\n | SET aePending = (SELECT AgentEntity.agentLct\n | FROM AgentEntity\n | WHERE AgentEntity.agentUid = EXCLUDED.aePk ) \n | != AgentEntityReplicate.aePk\n | \n | \n |')), AgentDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function AgentDao_JdbcKt$getAgentByAnyId$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_agentUid = closure$_result.getLong_61zpoe$('agentUid'); var _tmp_agentMbox = closure$_result.getString_61zpoe$('agentMbox'); var _tmp_agentMbox_sha1sum = closure$_result.getString_61zpoe$('agentMbox_sha1sum'); var _tmp_agentOpenid = closure$_result.getString_61zpoe$('agentOpenid'); var _tmp_agentAccountName = closure$_result.getString_61zpoe$('agentAccountName'); var _tmp_agentHomePage = closure$_result.getString_61zpoe$('agentHomePage'); var _tmp_agentPersonUid = closure$_result.getLong_61zpoe$('agentPersonUid'); var _tmp_statementMasterChangeSeqNum = closure$_result.getLong_61zpoe$('statementMasterChangeSeqNum'); var _tmp_statementLocalChangeSeqNum = closure$_result.getLong_61zpoe$('statementLocalChangeSeqNum'); var _tmp_statementLastChangedBy = closure$_result.getInt_61zpoe$('statementLastChangedBy'); var _tmp_agentLct = closure$_result.getLong_61zpoe$('agentLct'); var $receiver = new AgentEntity(); $receiver.agentUid = _tmp_agentUid; $receiver.agentMbox = _tmp_agentMbox; $receiver.agentMbox_sha1sum = _tmp_agentMbox_sha1sum; $receiver.agentOpenid = _tmp_agentOpenid; $receiver.agentAccountName = _tmp_agentAccountName; $receiver.agentHomePage = _tmp_agentHomePage; $receiver.agentPersonUid = _tmp_agentPersonUid; $receiver.statementMasterChangeSeqNum = _tmp_statementMasterChangeSeqNum; $receiver.statementLocalChangeSeqNum = _tmp_statementLocalChangeSeqNum; $receiver.statementLastChangedBy = _tmp_statementLastChangedBy; $receiver.agentLct = _tmp_agentLct; return $receiver; }; } function AgentDao_JdbcKt$getAgentByAnyId$lambda$lambda(_result) { return mapNextRow(_result, null, AgentDao_JdbcKt$getAgentByAnyId$lambda$lambda$lambda(_result)); } function AgentDao_JdbcKt$getAgentByAnyId$lambda(closure$openId, closure$mbox, closure$sha1, closure$account, closure$homepage) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$openId); _stmt.setString_vqvrqt$(2, closure$mbox); _stmt.setString_vqvrqt$(3, closure$sha1); _stmt.setString_vqvrqt$(4, closure$account); _stmt.setString_vqvrqt$(5, closure$homepage); return useResults(_stmt.executeQuery(), AgentDao_JdbcKt$getAgentByAnyId$lambda$lambda); }; } AgentDao_JdbcKt.prototype.getAgentByAnyId_t5gqrj$$default = function (openId, mbox, account, homepage, sha1) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM AgentEntity WHERE agentOpenId = ? OR agentMbox = ? OR agentMbox_sha1sum = ? OR (agentAccountName = ? AND agentHomePage = ?)'), AgentDao_JdbcKt$getAgentByAnyId$lambda(openId, mbox, sha1, account, homepage)); }; function AgentDao_JdbcKt$getAgentFromPersonUsername$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_agentUid = closure$_result.getLong_61zpoe$('agentUid'); var _tmp_agentMbox = closure$_result.getString_61zpoe$('agentMbox'); var _tmp_agentMbox_sha1sum = closure$_result.getString_61zpoe$('agentMbox_sha1sum'); var _tmp_agentOpenid = closure$_result.getString_61zpoe$('agentOpenid'); var _tmp_agentAccountName = closure$_result.getString_61zpoe$('agentAccountName'); var _tmp_agentHomePage = closure$_result.getString_61zpoe$('agentHomePage'); var _tmp_agentPersonUid = closure$_result.getLong_61zpoe$('agentPersonUid'); var _tmp_statementMasterChangeSeqNum = closure$_result.getLong_61zpoe$('statementMasterChangeSeqNum'); var _tmp_statementLocalChangeSeqNum = closure$_result.getLong_61zpoe$('statementLocalChangeSeqNum'); var _tmp_statementLastChangedBy = closure$_result.getInt_61zpoe$('statementLastChangedBy'); var _tmp_agentLct = closure$_result.getLong_61zpoe$('agentLct'); var $receiver = new AgentEntity(); $receiver.agentUid = _tmp_agentUid; $receiver.agentMbox = _tmp_agentMbox; $receiver.agentMbox_sha1sum = _tmp_agentMbox_sha1sum; $receiver.agentOpenid = _tmp_agentOpenid; $receiver.agentAccountName = _tmp_agentAccountName; $receiver.agentHomePage = _tmp_agentHomePage; $receiver.agentPersonUid = _tmp_agentPersonUid; $receiver.statementMasterChangeSeqNum = _tmp_statementMasterChangeSeqNum; $receiver.statementLocalChangeSeqNum = _tmp_statementLocalChangeSeqNum; $receiver.statementLastChangedBy = _tmp_statementLastChangedBy; $receiver.agentLct = _tmp_agentLct; return $receiver; }; } function AgentDao_JdbcKt$getAgentFromPersonUsername$lambda$lambda(_result) { return mapNextRow(_result, null, AgentDao_JdbcKt$getAgentFromPersonUsername$lambda$lambda$lambda(_result)); } function Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda(closure$username_0, closure$endpoint_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$username = closure$username_0; this.local$closure$endpoint = closure$endpoint_0; this.local$_stmt = _stmt_0; } Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda.prototype.constructor = Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda; Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$username); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$endpoint); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, AgentDao_JdbcKt$getAgentFromPersonUsername$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function AgentDao_JdbcKt$getAgentFromPersonUsername$lambda(closure$username_0, closure$endpoint_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$AgentDao_JdbcKt$getAgentFromPersonUsername$lambda(closure$username_0, closure$endpoint_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } AgentDao_JdbcKt.prototype.getAgentFromPersonUsername_puj7f4$ = function (endpoint, username, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT *\n | FROM AgentEntity\n | WHERE agentAccountName = ? \n | AND agentHomePage = ?\n | \n ')), AgentDao_JdbcKt$getAgentFromPersonUsername$lambda(username, endpoint), continuation); }; function AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO AgentEntity (agentUid, agentMbox, agentMbox_sha1sum, agentOpenid, agentAccountName, agentHomePage, agentPersonUid, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, agentLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.agentUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.agentUid); } stmt.setString_vqvrqt$(2, entity.agentMbox); stmt.setString_vqvrqt$(3, entity.agentMbox_sha1sum); stmt.setString_vqvrqt$(4, entity.agentOpenid); stmt.setString_vqvrqt$(5, entity.agentAccountName); stmt.setString_vqvrqt$(6, entity.agentHomePage); stmt.setLong_6svq3l$(7, entity.agentPersonUid); stmt.setLong_6svq3l$(8, entity.statementMasterChangeSeqNum); stmt.setLong_6svq3l$(9, entity.statementLocalChangeSeqNum); stmt.setInt_vux9f0$(10, entity.statementLastChangedBy); stmt.setLong_6svq3l$(11, entity.agentLct); }; AgentDao_JdbcKt$_insertAdapterAgentEntity_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; AgentDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'AgentDao_JdbcKt', interfaces: [AgentDao]}; function AgentDao_ReplicateWrapper(_db, _dao) { AgentDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_0; Coroutine$replicateOnNewNode_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_0.prototype.constructor = Coroutine$replicateOnChange_0; Coroutine$replicateOnChange_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; AgentDao_ReplicateWrapper.prototype.getAgentByAnyId_t5gqrj$$default = function (openId, mbox, account, homepage, sha1) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; AgentDao_ReplicateWrapper.prototype.getAgentFromPersonUsername_puj7f4$ = function (endpoint, username, continuation) { return this._dao_0.getAgentFromPersonUsername_puj7f4$(endpoint, username, continuation); }; AgentDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_0.prototype.constructor = Coroutine$insertAsync_0; Coroutine$insertAsync_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.agentUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(68, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.agentUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.agentLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.agentUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; AgentDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; AgentDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; AgentDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; AgentDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'AgentDao_ReplicateWrapper', interfaces: [AgentDao]}; function AgentDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { AgentDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_1; Coroutine$replicateOnNewNode_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_1.prototype.constructor = Coroutine$replicateOnChange_1; Coroutine$replicateOnChange_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; AgentDao_Repo.prototype.getAgentByAnyId_t5gqrj$$default = function (openId, mbox, account, homepage, sha1) { var _result = this._dao.getAgentByAnyId_t5gqrj$(openId, mbox, account, homepage, sha1); return _result; }; function Coroutine$getAgentFromPersonUsername_puj7f4$($this, endpoint_0, username_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$endpoint = endpoint_0; this.local$username = username_0; } Coroutine$getAgentFromPersonUsername_puj7f4$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getAgentFromPersonUsername_puj7f4$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getAgentFromPersonUsername_puj7f4$.prototype.constructor = Coroutine$getAgentFromPersonUsername_puj7f4$; Coroutine$getAgentFromPersonUsername_puj7f4$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getAgentFromPersonUsername_puj7f4$(this.local$endpoint, this.local$username, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_Repo.prototype.getAgentFromPersonUsername_puj7f4$ = function (endpoint_0, username_0, continuation_0, suspended) { var instance = new Coroutine$getAgentFromPersonUsername_puj7f4$(this, endpoint_0, username_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; AgentDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_1($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_1.prototype.constructor = Coroutine$insertAsync_1; Coroutine$insertAsync_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; AgentDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_1(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; AgentDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; AgentDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; AgentDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; AgentDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'AgentDao_Repo', interfaces: [AgentDao]}; function ChatDao() { } ChatDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatDao', interfaces: [BaseDao]}; function ChatDao_JdbcKt(_db) { ChatDao.call(this); this._db = _db; this._insertAdapterChat_ = new ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral(this._db); } ChatDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterChat_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_2($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_2.prototype.constructor = Coroutine$insertAsync_2; Coroutine$insertAsync_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterChat_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_2(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterChat_.insertList_4ezy5m$(entityList); }; function ChatDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.chatStartDate); _stmt.setString_vqvrqt$(2, _entity.chatTitle); _stmt.setBoolean_fzusl$(3, _entity.chatGroup); _stmt.setLong_6svq3l$(4, _entity.chatLct); _stmt.setLong_6svq3l$(5, _entity.chatUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ChatDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Chat SET chatStartDate = ?, chatTitle = ?, chatGroup = ?, chatLct = ? WHERE chatUid = ?'; prepareAndUseStatement(this._db, _sql, ChatDao_JdbcKt$updateList$lambda(entityList)); }; function ChatDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.chatStartDate); _stmt.setString_vqvrqt$(2, closure$entity.chatTitle); _stmt.setBoolean_fzusl$(3, closure$entity.chatGroup); _stmt.setLong_6svq3l$(4, closure$entity.chatLct); _stmt.setLong_6svq3l$(5, closure$entity.chatUid); return _stmt.executeUpdate(); }; } ChatDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Chat SET chatStartDate = ?, chatTitle = ?, chatGroup = ?, chatLct = ? WHERE chatUid = ?'; prepareAndUseStatement(this._db, _sql, ChatDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_2($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_2.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_2; Coroutine$replicateOnNewNode_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO chatReplicate(chatPk, chatDestination)\n | SELECT DISTINCT Chat.chatUid AS chatPk,\n | ? AS chatDestination\n | FROM UserSession \n | JOIN Chat ON \n | ((Chat.chatUid IN \n | (SELECT ChatMember.chatMemberChatUid \n | FROM ChatMember\n | WHERE ChatMember.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | AND UserSession.usStatus = 1 \n | WHERE UserSession.usClientNodeId = ?\n | AND Chat.chatLct != COALESCE(\n | (SELECT chatVersionId\n | FROM chatReplicate\n | WHERE chatPk = Chat.chatUid\n | AND chatDestination = ?), 0) \n | /*psql ON CONFLICT(chatPk, chatDestination) DO UPDATE\n | SET chatPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO chatReplicate(chatPk, chatDestination)\n | SELECT DISTINCT Chat.chatUid AS chatPk,\n | ? AS chatDestination\n | FROM UserSession \n | JOIN Chat ON \n | ((Chat.chatUid IN \n | (SELECT ChatMember.chatMemberChatUid \n | FROM ChatMember\n | WHERE ChatMember.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | AND UserSession.usStatus = 1 \n | WHERE UserSession.usClientNodeId = ?\n | AND Chat.chatLct != COALESCE(\n | (SELECT chatVersionId\n | FROM chatReplicate\n | WHERE chatPk = Chat.chatUid\n | AND chatDestination = ?), 0) \n | ON CONFLICT(chatPk, chatDestination) DO UPDATE\n | SET chatPending = true\n | \n | \n |')), ChatDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_2(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda; Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_2($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_2.prototype.constructor = Coroutine$replicateOnChange_2; Coroutine$replicateOnChange_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO chatReplicate(chatPk, chatDestination)\n | SELECT DISTINCT Chat.chatUid AS chatUid,\n | UserSession.usClientNodeId AS chatDestination\n | FROM ChangeLog\n | JOIN Chat\n | ON ChangeLog.chTableId = 127\n | AND ChangeLog.chEntityPk = Chat.chatUid\n | JOIN UserSession ON \n | ((UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid \n | FROM ChatMember \n | WHERE ChatMember.chatMemberChatUid = Chat.chatUid))\n | OR UserSession.usSessionType = 2 )\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Chat.chatLct != COALESCE(\n | (SELECT chatVersionId\n | FROM chatReplicate\n | WHERE chatPk = Chat.chatUid\n | AND chatDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(chatPk, chatDestination) DO UPDATE\n | SET chatPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO chatReplicate(chatPk, chatDestination)\n | SELECT DISTINCT Chat.chatUid AS chatUid,\n | UserSession.usClientNodeId AS chatDestination\n | FROM ChangeLog\n | JOIN Chat\n | ON ChangeLog.chTableId = 127\n | AND ChangeLog.chEntityPk = Chat.chatUid\n | JOIN UserSession ON \n | ((UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid \n | FROM ChatMember \n | WHERE ChatMember.chatMemberChatUid = Chat.chatUid))\n | OR UserSession.usSessionType = 2 )\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Chat.chatLct != COALESCE(\n | (SELECT chatVersionId\n | FROM chatReplicate\n | WHERE chatPk = Chat.chatUid\n | AND chatDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(chatPk, chatDestination) DO UPDATE\n | SET chatPending = true\n | \n | \n |')), ChatDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_2(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral(this$ChatDao_JdbcKt, closure$personUid, closure$searchBit) { this.this$ChatDao_JdbcKt = this$ChatDao_JdbcKt; this.closure$personUid = closure$personUid; this.closure$searchBit = closure$searchBit; DataSourceFactory.call(this); } function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_unreadMessageCount = closure$_result.getInt_61zpoe$('unreadMessageCount'); var _tmp_latestMessage = closure$_result.getString_61zpoe$('latestMessage'); var _tmp_latestMessageTimestamp = closure$_result.getLong_61zpoe$('latestMessageTimestamp'); var _tmp_otherPersonUid = closure$_result.getLong_61zpoe$('otherPersonUid'); var _tmp_otherPersonFirstNames = closure$_result.getString_61zpoe$('otherPersonFirstNames'); var _tmp_otherPersonLastName = closure$_result.getString_61zpoe$('otherPersonLastName'); var _tmp_chatUid = closure$_result.getLong_61zpoe$('chatUid'); var _tmp_chatStartDate = closure$_result.getLong_61zpoe$('chatStartDate'); var _tmp_chatTitle = closure$_result.getString_61zpoe$('chatTitle'); var _tmp_chatGroup = closure$_result.getBoolean_61zpoe$('chatGroup'); var _tmp_chatLct = closure$_result.getLong_61zpoe$('chatLct'); var $receiver = new ChatWithLatestMessageAndCount(); $receiver.unreadMessageCount = _tmp_unreadMessageCount; $receiver.latestMessage = _tmp_latestMessage; $receiver.latestMessageTimestamp = _tmp_latestMessageTimestamp; $receiver.otherPersonUid = _tmp_otherPersonUid; $receiver.otherPersonFirstNames = _tmp_otherPersonFirstNames; $receiver.otherPersonLastName = _tmp_otherPersonLastName; $receiver.chatUid = _tmp_chatUid; $receiver.chatStartDate = _tmp_chatStartDate; $receiver.chatTitle = _tmp_chatTitle; $receiver.chatGroup = _tmp_chatGroup; $receiver.chatLct = _tmp_chatLct; return $receiver; }; } function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$searchBit_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$searchBit); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$searchBit); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(11, this.local$closure$searchBit); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(13, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$searchBit_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$searchBit_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda(this$ChatDao_JdbcKt_0, closure$personUid_0, closure$searchBit_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ChatDao_JdbcKt = this$ChatDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ChatDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT Chat.*,\n | Message.messageText AS latestMessage,\n | Message.messageTimestamp AS latestMessageTimestamp,\n | op.personUid AS otherPersonUid,\n | op.firstNames AS otherPersonFirstNames,\n | op.lastName AS otherPersonLastName,\n | (\n |\t\t\t\tSELECT COUNT(*) \n |\t\t\t\t FROM Message \n |\t\t\t\t WHERE Message.messageTableId = 127 \n |\t\t\t\t AND Message.messageEntityUid = Chat.chatUid \n |\t\t\t\t AND Message.messageSenderPersonUid != ?\n |\t\t\t\t AND Message.messageTimestamp > coalesce((\n |\t\t\t\t\t\tSELECT MessageRead.messageReadLct FROM MessageRead \n |\t\t\t\t\t\tWHERE MessageRead.messageReadPersonUid = ?\n |\t\t\t\t\t\tAND MessageRead.messageReadMessageUid = Message.messageUid \n |\t\t\t\t ), 0)\n |\t\t\t\t\t\n |\t\t\t\t\n |\t\t\t ) AS unreadMessageCount,\n | \n | (SELECT COUNT(*)\n | FROM ChatMember mm\n | WHERE mm.chatMemberChatUid = Chat.chatUid ) AS numMembers\n | FROM ChatMember\n | LEFT JOIN Chat \n | ON Chat.chatUid = ChatMember.chatMemberChatUid\n | LEFT JOIN Message \n | ON Message.messageUid =\n | (SELECT messageUid\n | FROM Message\n | WHERE messageEntityUid = Chat.chatUid\n | AND messageTableId = 127\n | ORDER BY messageTimestamp DESC\n | LIMIT 1)\n | LEFT JOIN Person op \n | ON op.personUid =\n | (SELECT pp.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person pp \n | ON pp.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = Chat.chatUid\n | AND cm.chatMemberPersonUid != ?\n | AND cm.chatMemberLeftDate = 9223372036854775807\n | LIMIT 1)\n | WHERE ChatMember.chatMemberPersonUid = ?\n | AND ChatMember.chatMemberLeftDate = 9223372036854775807\n | AND Chat.chatUid != 0 \n | AND op.firstNames||' '||op.lastName LIKE ? \n | -- When in search mode we need to add all Persons who match the search to the list, even if\n | -- no chat has started\n | UNION\n | SELECT Chat.*,\n | '' AS latestMessage,\n | 0 AS latestMessageTimestamp,\n | Person.personUid AS otherPersonUid,\n | Person.firstNames AS otherPersonFirstNames,\n | Person.lastName AS otherPersonLastName,\n | 0 AS unreadMessageCount,\n | 0 AS numMembers\n | \n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n |\t\t \n | LEFT JOIN Chat\n | ON Chat.chatUid = 0\n | WHERE ? != '%'\n | AND PersonGroupMember.groupMemberPersonUid = ?\n | AND Person.personUid != ?\n | \n | AND Person.personUid NOT IN\n |\t\t\t (\n |\t\t\t\tSELECT chatpeople.personUid \n |\t\t\t\t FROM ChatMember cmm\n |\t\t\t\t\t LEFT JOIN Chat cc \n |\t\t\t\t\t\t\t ON cc.chatUid = cmm.chatMemberChatUid \n |\t\t\t \n |\t\t\t\t LEFT JOIN Person chatpeople \n | ON chatpeople.personUid =\n | (SELECT chatpeopleother.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person chatpeopleother \n | ON chatpeopleother.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = cc.chatUid\n | AND cm.chatMemberPersonUid != ?\n | LIMIT 1)\n |\t\t\t\t\t\t \n |\t\t\t\t WHERE cc.chatUid != 0 \n |\t\t\t\t AND cmm.chatMemberPersonUid = ?\n |\t\t\t\t )\n | \n | AND Person.firstNames||' '||Person.lastName LIKE ? \n | ORDER BY latestMessageTimestamp DESC\n | ) LIMIT ? OFFSET ?\n ")), ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$searchBit, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda(this$ChatDao_JdbcKt_0, closure$personUid_0, closure$searchBit_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda(this$ChatDao_JdbcKt_0, closure$personUid_0, closure$searchBit_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ChatDao_JdbcKt._db, listOf(['Message', 'MessageRead', 'ChatMember', 'Chat', 'Person', 'PersonGroupMember', 'ScopedGrant']), ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getData$lambda(this.this$ChatDao_JdbcKt, this.closure$personUid, this.closure$searchBit, _limit, _offset)); }; function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$searchBit_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$_stmt = _stmt_0; } Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$searchBit); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$searchBit); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(11, this.local$closure$searchBit); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$searchBit_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$searchBit_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda(this$ChatDao_JdbcKt_0, closure$personUid_0, closure$searchBit_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ChatDao_JdbcKt = this$ChatDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; } Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda; Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ChatDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Chat.*,\n | Message.messageText AS latestMessage,\n | Message.messageTimestamp AS latestMessageTimestamp,\n | op.personUid AS otherPersonUid,\n | op.firstNames AS otherPersonFirstNames,\n | op.lastName AS otherPersonLastName,\n | (\n |\t\t\t\tSELECT COUNT(*) \n |\t\t\t\t FROM Message \n |\t\t\t\t WHERE Message.messageTableId = 127 \n |\t\t\t\t AND Message.messageEntityUid = Chat.chatUid \n |\t\t\t\t AND Message.messageSenderPersonUid != ?\n |\t\t\t\t AND Message.messageTimestamp > coalesce((\n |\t\t\t\t\t\tSELECT MessageRead.messageReadLct FROM MessageRead \n |\t\t\t\t\t\tWHERE MessageRead.messageReadPersonUid = ?\n |\t\t\t\t\t\tAND MessageRead.messageReadMessageUid = Message.messageUid \n |\t\t\t\t ), 0)\n |\t\t\t\t\t\n |\t\t\t\t\n |\t\t\t ) AS unreadMessageCount,\n | \n | (SELECT COUNT(*)\n | FROM ChatMember mm\n | WHERE mm.chatMemberChatUid = Chat.chatUid ) AS numMembers\n | FROM ChatMember\n | LEFT JOIN Chat \n | ON Chat.chatUid = ChatMember.chatMemberChatUid\n | LEFT JOIN Message \n | ON Message.messageUid =\n | (SELECT messageUid\n | FROM Message\n | WHERE messageEntityUid = Chat.chatUid\n | AND messageTableId = 127\n | ORDER BY messageTimestamp DESC\n | LIMIT 1)\n | LEFT JOIN Person op \n | ON op.personUid =\n | (SELECT pp.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person pp \n | ON pp.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = Chat.chatUid\n | AND cm.chatMemberPersonUid != ?\n | AND cm.chatMemberLeftDate = 9223372036854775807\n | LIMIT 1)\n | WHERE ChatMember.chatMemberPersonUid = ?\n | AND ChatMember.chatMemberLeftDate = 9223372036854775807\n | AND Chat.chatUid != 0 \n | AND op.firstNames||' '||op.lastName LIKE ? \n | -- When in search mode we need to add all Persons who match the search to the list, even if\n | -- no chat has started\n | UNION\n | SELECT Chat.*,\n | '' AS latestMessage,\n | 0 AS latestMessageTimestamp,\n | Person.personUid AS otherPersonUid,\n | Person.firstNames AS otherPersonFirstNames,\n | Person.lastName AS otherPersonLastName,\n | 0 AS unreadMessageCount,\n | 0 AS numMembers\n | \n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n |\t\t \n | LEFT JOIN Chat\n | ON Chat.chatUid = 0\n | WHERE ? != '%'\n | AND PersonGroupMember.groupMemberPersonUid = ?\n | AND Person.personUid != ?\n | \n | AND Person.personUid NOT IN\n |\t\t\t (\n |\t\t\t\tSELECT chatpeople.personUid \n |\t\t\t\t FROM ChatMember cmm\n |\t\t\t\t\t LEFT JOIN Chat cc \n |\t\t\t\t\t\t\t ON cc.chatUid = cmm.chatMemberChatUid \n |\t\t\t \n |\t\t\t\t LEFT JOIN Person chatpeople \n | ON chatpeople.personUid =\n | (SELECT chatpeopleother.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person chatpeopleother \n | ON chatpeopleother.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = cc.chatUid\n | AND cm.chatMemberPersonUid != ?\n | LIMIT 1)\n |\t\t\t\t\t\t \n |\t\t\t\t WHERE cc.chatUid != 0 \n |\t\t\t\t AND cmm.chatMemberPersonUid = ?\n |\t\t\t\t )\n | \n | AND Person.firstNames||' '||Person.lastName LIKE ? \n | ORDER BY latestMessageTimestamp DESC\n | ) \n ")), ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid, this.local$closure$searchBit), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda(this$ChatDao_JdbcKt_0, closure$personUid_0, closure$searchBit_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda(this$ChatDao_JdbcKt_0, closure$personUid_0, closure$searchBit_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ChatDao_JdbcKt._db, listOf(['Message', 'MessageRead', 'ChatMember', 'Chat', 'Person', 'PersonGroupMember', 'ScopedGrant']), ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral$getLength$lambda(this.this$ChatDao_JdbcKt, this.closure$personUid, this.closure$searchBit)); }; ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ChatDao_JdbcKt.prototype.findAllChatsForUser_4wgjuj$ = function (searchBit, personUid) { return new ChatDao_JdbcKt$findAllChatsForUser$ObjectLiteral(this, personUid, searchBit); }; function ChatDao_JdbcKt$getTitleChat$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getString_za3lpa$(1); }; } function ChatDao_JdbcKt$getTitleChat$lambda$lambda(_result) { return mapNextRow(_result, null, ChatDao_JdbcKt$getTitleChat$lambda$lambda$lambda(_result)); } function Coroutine$ChatDao_JdbcKt$getTitleChat$lambda(closure$personUid_0, closure$chatUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$chatUid = closure$chatUid_0; this.local$_stmt = _stmt_0; } Coroutine$ChatDao_JdbcKt$getTitleChat$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$getTitleChat$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$getTitleChat$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$getTitleChat$lambda; Coroutine$ChatDao_JdbcKt$getTitleChat$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$chatUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ChatDao_JdbcKt$getTitleChat$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$getTitleChat$lambda(closure$personUid_0, closure$chatUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$getTitleChat$lambda(closure$personUid_0, closure$chatUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ChatDao_JdbcKt.prototype.getTitleChat_3pjtqy$ = function (chatUid, personUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin("\n |\n | SELECT CASE\n | WHEN Chat.chatGroup THEN Chat.chatTitle\n | ELSE Person.firstNames||' '||Person.lastName\n | END AS title\n | FROM Chat\n | LEFT JOIN Person \n | ON CAST(Chat.chatGroup AS INTEGER) = 0\n | AND Person.personUid =\n | (SELECT pp.personUid\n | FROM ChatMember cm\n | LEFT JOIN Person pp ON pp.personUid = cm.chatMemberPersonUid\n | WHERE cm.chatMemberChatUid = Chat.chatUid\n | AND cm.chatMemberPersonUid != ?\n | AND cm.chatMemberLeftDate = 9223372036854775807\n | LIMIT 1)\n | WHERE Chat.chatUid = ?\n | \n ")), ChatDao_JdbcKt$getTitleChat$lambda(personUid, chatUid), continuation); }; function ChatDao_JdbcKt$getChatByOtherPerson$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_chatUid = closure$_result.getLong_61zpoe$('chatUid'); var _tmp_chatStartDate = closure$_result.getLong_61zpoe$('chatStartDate'); var _tmp_chatTitle = closure$_result.getString_61zpoe$('chatTitle'); var _tmp_chatGroup = closure$_result.getBoolean_61zpoe$('chatGroup'); var _tmp_chatLct = closure$_result.getLong_61zpoe$('chatLct'); var $receiver = new Chat(); $receiver.chatUid = _tmp_chatUid; $receiver.chatStartDate = _tmp_chatStartDate; $receiver.chatTitle = _tmp_chatTitle; $receiver.chatGroup = _tmp_chatGroup; $receiver.chatLct = _tmp_chatLct; return $receiver; }; } function ChatDao_JdbcKt$getChatByOtherPerson$lambda$lambda(_result) { return mapNextRow(_result, null, ChatDao_JdbcKt$getChatByOtherPerson$lambda$lambda$lambda(_result)); } function Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda(closure$otherPersonUid_0, closure$loggedInPersonUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$otherPersonUid = closure$otherPersonUid_0; this.local$closure$loggedInPersonUid = closure$loggedInPersonUid_0; this.local$_stmt = _stmt_0; } Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda.prototype.constructor = Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda; Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$otherPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$loggedInPersonUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$otherPersonUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$loggedInPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ChatDao_JdbcKt$getChatByOtherPerson$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatDao_JdbcKt$getChatByOtherPerson$lambda(closure$otherPersonUid_0, closure$loggedInPersonUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatDao_JdbcKt$getChatByOtherPerson$lambda(closure$otherPersonUid_0, closure$loggedInPersonUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ChatDao_JdbcKt.prototype.getChatByOtherPerson_3pjtqy$ = function (otherPersonUid, loggedInPersonUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Chat.*\n | FROM ChatMember\n | LEFT JOIN Chat ON Chat.chatUid = ChatMember.chatMemberChatUid\n | WHERE ChatMember.chatMemberPersonUid = ?\n | AND CAST(Chat.chatGroup AS INTEGER) = 0\n | AND Chat.chatUid IN \n | (\n | SELECT ChatMember.chatMemberChatUid\n | FROM ChatMember\n | WHERE ChatMember.chatMemberChatUid = Chat.chatUid\n | AND ChatMember.chatMemberPersonUid = ? \n | ) \n | AND ? != ?\n | \n ')), ChatDao_JdbcKt$getChatByOtherPerson$lambda(otherPersonUid, loggedInPersonUid), continuation); }; function ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO Chat (chatUid, chatStartDate, chatTitle, chatGroup, chatLct) VALUES(?, ?, ?, ?, ?)'; }; ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.chatUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.chatUid); } stmt.setLong_6svq3l$(2, entity.chatStartDate); stmt.setString_vqvrqt$(3, entity.chatTitle); stmt.setBoolean_fzusl$(4, entity.chatGroup); stmt.setLong_6svq3l$(5, entity.chatLct); }; ChatDao_JdbcKt$_insertAdapterChat_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ChatDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatDao_JdbcKt', interfaces: [ChatDao]}; function ChatDao_ReplicateWrapper(_db, _dao) { ChatDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_3($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_3.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_3; Coroutine$replicateOnNewNode_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_3(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_3($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_3.prototype.constructor = Coroutine$replicateOnChange_3; Coroutine$replicateOnChange_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_3(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatDao_ReplicateWrapper.prototype.findAllChatsForUser_4wgjuj$ = function (searchBit, personUid) { return this._dao_0.findAllChatsForUser_4wgjuj$(searchBit, personUid); }; ChatDao_ReplicateWrapper.prototype.getTitleChat_3pjtqy$ = function (chatUid, personUid, continuation) { return this._dao_0.getTitleChat_3pjtqy$(chatUid, personUid, continuation); }; ChatDao_ReplicateWrapper.prototype.getChatByOtherPerson_3pjtqy$ = function (otherPersonUid, loggedInPersonUid, continuation) { return this._dao_0.getChatByOtherPerson_3pjtqy$(otherPersonUid, loggedInPersonUid, continuation); }; ChatDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_3($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_3.prototype.constructor = Coroutine$insertAsync_3; Coroutine$insertAsync_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.chatUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(127, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.chatUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.chatLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.chatUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_3(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ChatDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ChatDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ChatDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatDao_ReplicateWrapper', interfaces: [ChatDao]}; function ChatDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ChatDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_4($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_4.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_4; Coroutine$replicateOnNewNode_s8cxhz$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_4(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_4($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_4.prototype.constructor = Coroutine$replicateOnChange_4; Coroutine$replicateOnChange_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_4(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatDao_Repo.prototype.findAllChatsForUser_4wgjuj$ = function (searchBit, personUid) { var _result = this._dao.findAllChatsForUser_4wgjuj$(searchBit, personUid); return _result; }; function Coroutine$getTitleChat_3pjtqy$($this, chatUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$chatUid = chatUid_0; this.local$personUid = personUid_0; } Coroutine$getTitleChat_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getTitleChat_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getTitleChat_3pjtqy$.prototype.constructor = Coroutine$getTitleChat_3pjtqy$; Coroutine$getTitleChat_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getTitleChat_3pjtqy$(this.local$chatUid, this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_Repo.prototype.getTitleChat_3pjtqy$ = function (chatUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$getTitleChat_3pjtqy$(this, chatUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getChatByOtherPerson_3pjtqy$($this, otherPersonUid_0, loggedInPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$otherPersonUid = otherPersonUid_0; this.local$loggedInPersonUid = loggedInPersonUid_0; } Coroutine$getChatByOtherPerson_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getChatByOtherPerson_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getChatByOtherPerson_3pjtqy$.prototype.constructor = Coroutine$getChatByOtherPerson_3pjtqy$; Coroutine$getChatByOtherPerson_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getChatByOtherPerson_3pjtqy$(this.local$otherPersonUid, this.local$loggedInPersonUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_Repo.prototype.getChatByOtherPerson_3pjtqy$ = function (otherPersonUid_0, loggedInPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$getChatByOtherPerson_3pjtqy$(this, otherPersonUid_0, loggedInPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_4($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_4.prototype.constructor = Coroutine$insertAsync_4; Coroutine$insertAsync_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_4(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ChatDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ChatDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ChatDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatDao_Repo', interfaces: [ChatDao]}; function ChatMemberDao() { } ChatMemberDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatMemberDao', interfaces: [BaseDao]}; function ChatMemberDao_JdbcKt(_db) { ChatMemberDao.call(this); this._db = _db; this._insertAdapterChatMember_ = new ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral(this._db); } ChatMemberDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterChatMember_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_5($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_5.prototype.constructor = Coroutine$insertAsync_5; Coroutine$insertAsync_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterChatMember_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_5(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatMemberDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterChatMember_.insertList_4ezy5m$(entityList); }; function ChatMemberDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.chatMemberChatUid); _stmt.setLong_6svq3l$(2, _entity.chatMemberPersonUid); _stmt.setLong_6svq3l$(3, _entity.chatMemberJoinedDate); _stmt.setLong_6svq3l$(4, _entity.chatMemberLeftDate); _stmt.setLong_6svq3l$(5, _entity.chatMemberLct); _stmt.setLong_6svq3l$(6, _entity.chatMemberUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ChatMemberDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ChatMember SET chatMemberChatUid = ?, chatMemberPersonUid = ?, chatMemberJoinedDate = ?, chatMemberLeftDate = ?, chatMemberLct = ? WHERE chatMemberUid = ?'; prepareAndUseStatement(this._db, _sql, ChatMemberDao_JdbcKt$updateList$lambda(entityList)); }; function ChatMemberDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.chatMemberChatUid); _stmt.setLong_6svq3l$(2, closure$entity.chatMemberPersonUid); _stmt.setLong_6svq3l$(3, closure$entity.chatMemberJoinedDate); _stmt.setLong_6svq3l$(4, closure$entity.chatMemberLeftDate); _stmt.setLong_6svq3l$(5, closure$entity.chatMemberLct); _stmt.setLong_6svq3l$(6, closure$entity.chatMemberUid); return _stmt.executeUpdate(); }; } ChatMemberDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ChatMember SET chatMemberChatUid = ?, chatMemberPersonUid = ?, chatMemberJoinedDate = ?, chatMemberLeftDate = ?, chatMemberLct = ? WHERE chatMemberUid = ?'; prepareAndUseStatement(this._db, _sql, ChatMemberDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_5($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_5.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_5; Coroutine$replicateOnNewNode_s8cxhz$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO chatMemberReplicate(chatMemberPk, chatMemberDestination)\n | SELECT DISTINCT ChatMember.chatMemberUid AS chatMemberPk,\n | ? AS chatMemberDestination\n | \n | FROM UserSession\n | JOIN ChatMember \n | ON ((ChatMember.chatMemberChatUid IN\n | (SELECT chatMemberInternal.chatMemberChatUid \n | FROM ChatMember chatMemberInternal\n | WHERE chatMemberInternal.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | AND UserSession.usStatus = 1 \n | WHERE ChatMember.chatMemberLct != COALESCE(\n | (SELECT chatMemberVersionId\n | FROM chatMemberReplicate\n | WHERE chatMemberPk = ChatMember.chatMemberUid\n | AND chatMemberDestination = ?), 0) \n | /*psql ON CONFLICT(chatMemberPk, chatMemberDestination) DO UPDATE\n | SET chatMemberPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO chatMemberReplicate(chatMemberPk, chatMemberDestination)\n | SELECT DISTINCT ChatMember.chatMemberUid AS chatMemberPk,\n | ? AS chatMemberDestination\n | \n | FROM UserSession\n | JOIN ChatMember \n | ON ((ChatMember.chatMemberChatUid IN\n | (SELECT chatMemberInternal.chatMemberChatUid \n | FROM ChatMember chatMemberInternal\n | WHERE chatMemberInternal.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | AND UserSession.usStatus = 1 \n | WHERE ChatMember.chatMemberLct != COALESCE(\n | (SELECT chatMemberVersionId\n | FROM chatMemberReplicate\n | WHERE chatMemberPk = ChatMember.chatMemberUid\n | AND chatMemberDestination = ?), 0) \n | ON CONFLICT(chatMemberPk, chatMemberDestination) DO UPDATE\n | SET chatMemberPending = true\n | \n | \n |')), ChatMemberDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_5(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda; Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ChatMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ChatMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_5($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_5.prototype.constructor = Coroutine$replicateOnChange_5; Coroutine$replicateOnChange_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO chatMemberReplicate(chatMemberPk, chatMemberDestination)\n | SELECT DISTINCT ChatMember.chatMemberUid AS chatMemberUid,\n | UserSession.usClientNodeId AS chatMemberDestination\n | FROM ChangeLog\n | JOIN chatMember\n | ON ChangeLog.chTableId = 128\n | AND ChangeLog.chEntityPk = ChatMember.chatMemberUid\n | \n | JOIN UserSession ON \n | (UserSession.usSessionType = 2\n | OR (UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid \n | FROM ChatMember \n | WHERE ChatMember.chatMemberChatUid IN \n | (SELECT ChatMemberInternal.chatMemberChatUid \n | FROM ChatMember ChatMemberInternal\n | WHERE ChatMemberInternal.chatMemberPersonUid = \n | UserSession.usPersonUid))))\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ChatMember.chatMemberLct != COALESCE(\n | (SELECT chatMemberVersionId\n | FROM chatMemberReplicate\n | WHERE chatMemberPk = ChatMember.chatMemberUid\n | AND chatMemberDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(chatMemberPk, chatMemberDestination) DO UPDATE\n | SET chatMemberPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO chatMemberReplicate(chatMemberPk, chatMemberDestination)\n | SELECT DISTINCT ChatMember.chatMemberUid AS chatMemberUid,\n | UserSession.usClientNodeId AS chatMemberDestination\n | FROM ChangeLog\n | JOIN chatMember\n | ON ChangeLog.chTableId = 128\n | AND ChangeLog.chEntityPk = ChatMember.chatMemberUid\n | \n | JOIN UserSession ON \n | (UserSession.usSessionType = 2\n | OR (UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid \n | FROM ChatMember \n | WHERE ChatMember.chatMemberChatUid IN \n | (SELECT ChatMemberInternal.chatMemberChatUid \n | FROM ChatMember ChatMemberInternal\n | WHERE ChatMemberInternal.chatMemberPersonUid = \n | UserSession.usPersonUid))))\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ChatMember.chatMemberLct != COALESCE(\n | (SELECT chatMemberVersionId\n | FROM chatMemberReplicate\n | WHERE chatMemberPk = ChatMember.chatMemberUid\n | AND chatMemberDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(chatMemberPk, chatMemberDestination) DO UPDATE\n | SET chatMemberPending = true\n | \n | \n |')), ChatMemberDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_5(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ChatMember (chatMemberUid, chatMemberChatUid, chatMemberPersonUid, chatMemberJoinedDate, chatMemberLeftDate, chatMemberLct) VALUES(?, ?, ?, ?, ?, ?)'; }; ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.chatMemberUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.chatMemberUid); } stmt.setLong_6svq3l$(2, entity.chatMemberChatUid); stmt.setLong_6svq3l$(3, entity.chatMemberPersonUid); stmt.setLong_6svq3l$(4, entity.chatMemberJoinedDate); stmt.setLong_6svq3l$(5, entity.chatMemberLeftDate); stmt.setLong_6svq3l$(6, entity.chatMemberLct); }; ChatMemberDao_JdbcKt$_insertAdapterChatMember_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ChatMemberDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatMemberDao_JdbcKt', interfaces: [ChatMemberDao]}; function ChatMemberDao_ReplicateWrapper(_db, _dao) { ChatMemberDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_6($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_6.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_6; Coroutine$replicateOnNewNode_s8cxhz$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_6(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_6($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_6.prototype.constructor = Coroutine$replicateOnChange_6; Coroutine$replicateOnChange_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_6(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatMemberDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_6($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_6.prototype.constructor = Coroutine$insertAsync_6; Coroutine$insertAsync_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.chatMemberUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(128, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.chatMemberUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.chatMemberLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.chatMemberUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_6(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatMemberDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ChatMemberDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ChatMemberDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ChatMemberDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatMemberDao_ReplicateWrapper', interfaces: [ChatMemberDao]}; function ChatMemberDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ChatMemberDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_7($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_7.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_7; Coroutine$replicateOnNewNode_s8cxhz$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_7(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_7($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_7.prototype.constructor = Coroutine$replicateOnChange_7; Coroutine$replicateOnChange_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_7(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatMemberDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_7($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_7.prototype.constructor = Coroutine$insertAsync_7; Coroutine$insertAsync_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ChatMemberDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_7(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ChatMemberDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ChatMemberDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ChatMemberDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ChatMemberDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatMemberDao_Repo', interfaces: [ChatMemberDao]}; function ClazzAssignmentContentJoinDao() { } ClazzAssignmentContentJoinDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentContentJoinDao', interfaces: [BaseDao]}; function ClazzAssignmentContentJoinDao_JdbcKt(_db) { ClazzAssignmentContentJoinDao.call(this); this._db = _db; this._insertAdapterClazzAssignmentContentJoin_ = new ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral(this._db); } ClazzAssignmentContentJoinDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzAssignmentContentJoin_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_8($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_8.prototype.constructor = Coroutine$insertAsync_8; Coroutine$insertAsync_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzAssignmentContentJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_8(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentContentJoinDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzAssignmentContentJoin_.insertList_4ezy5m$(entityList); }; function ClazzAssignmentContentJoinDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cacjContentUid); _stmt.setLong_6svq3l$(2, _entity.cacjAssignmentUid); _stmt.setBoolean_fzusl$(3, _entity.cacjActive); _stmt.setInt_vux9f0$(4, _entity.cacjWeight); _stmt.setLong_6svq3l$(5, _entity.cacjMCSN); _stmt.setLong_6svq3l$(6, _entity.cacjLCSN); _stmt.setInt_vux9f0$(7, _entity.cacjLCB); _stmt.setLong_6svq3l$(8, _entity.cacjLct); _stmt.setLong_6svq3l$(9, _entity.cacjUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzAssignmentContentJoinDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzAssignmentContentJoin SET cacjContentUid = ?, cacjAssignmentUid = ?, cacjActive = ?, cacjWeight = ?, cacjMCSN = ?, cacjLCSN = ?, cacjLCB = ?, cacjLct = ? WHERE cacjUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzAssignmentContentJoinDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzAssignmentContentJoinDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cacjContentUid); _stmt.setLong_6svq3l$(2, closure$entity.cacjAssignmentUid); _stmt.setBoolean_fzusl$(3, closure$entity.cacjActive); _stmt.setInt_vux9f0$(4, closure$entity.cacjWeight); _stmt.setLong_6svq3l$(5, closure$entity.cacjMCSN); _stmt.setLong_6svq3l$(6, closure$entity.cacjLCSN); _stmt.setInt_vux9f0$(7, closure$entity.cacjLCB); _stmt.setLong_6svq3l$(8, closure$entity.cacjLct); _stmt.setLong_6svq3l$(9, closure$entity.cacjUid); return _stmt.executeUpdate(); }; } ClazzAssignmentContentJoinDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzAssignmentContentJoin SET cacjContentUid = ?, cacjAssignmentUid = ?, cacjActive = ?, cacjWeight = ?, cacjMCSN = ?, cacjLCSN = ?, cacjLCB = ?, cacjLct = ? WHERE cacjUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzAssignmentContentJoinDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_8($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_8.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_8; Coroutine$replicateOnNewNode_s8cxhz$_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzAssignmentContentJoinReplicate(cacjPk, cacjDestination)\n | SELECT DISTINCT ClazzAssignmentContentJoin.cacjUid AS cacjUid,\n | ? AS cacjDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid\n | JOIN ClazzAssignmentContentJoin\n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND ClazzAssignmentContentJoin.cacjLct != COALESCE(\n | (SELECT cacjVersionId\n | FROM ClazzAssignmentContentJoinReplicate\n | WHERE cacjPk = ClazzAssignmentContentJoin.cacjUid\n | AND cacjDestination = ?), 0) \n | /*psql ON CONFLICT(cacjPk, cacjDestination) DO UPDATE\n | SET cacjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzAssignmentContentJoinReplicate(cacjPk, cacjDestination)\n | SELECT DISTINCT ClazzAssignmentContentJoin.cacjUid AS cacjUid,\n | ? AS cacjDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid\n | JOIN ClazzAssignmentContentJoin\n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND ClazzAssignmentContentJoin.cacjLct != COALESCE(\n | (SELECT cacjVersionId\n | FROM ClazzAssignmentContentJoinReplicate\n | WHERE cacjPk = ClazzAssignmentContentJoin.cacjUid\n | AND cacjDestination = ?), 0) \n | ON CONFLICT(cacjPk, cacjDestination) DO UPDATE\n | SET cacjPending = true\n | \n | \n |')), ClazzAssignmentContentJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_8(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_8($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_8.prototype.constructor = Coroutine$replicateOnChange_8; Coroutine$replicateOnChange_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzAssignmentContentJoinReplicate(cacjPk, cacjDestination)\n | SELECT DISTINCT ClazzAssignmentContentJoin.cacjUid AS cacjUid,\n | UserSession.usClientNodeId AS cacjDestination\n | FROM ChangeLog\n | JOIN ClazzAssignmentContentJoin\n | ON ChangeLog.chTableId = 521\n | AND ChangeLog.chEntityPk = ClazzAssignmentContentJoin.cacjUid\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzAssignmentContentJoin.cacjLct != COALESCE(\n | (SELECT cacjVersionId\n | FROM ClazzAssignmentContentJoinReplicate\n | WHERE cacjPk = ClazzAssignmentContentJoin.cacjUid\n | AND cacjDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cacjPk, cacjDestination) DO UPDATE\n | SET cacjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzAssignmentContentJoinReplicate(cacjPk, cacjDestination)\n | SELECT DISTINCT ClazzAssignmentContentJoin.cacjUid AS cacjUid,\n | UserSession.usClientNodeId AS cacjDestination\n | FROM ChangeLog\n | JOIN ClazzAssignmentContentJoin\n | ON ChangeLog.chTableId = 521\n | AND ChangeLog.chEntityPk = ClazzAssignmentContentJoin.cacjUid\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzAssignmentContentJoin.cacjLct != COALESCE(\n | (SELECT cacjVersionId\n | FROM ClazzAssignmentContentJoinReplicate\n | WHERE cacjPk = ClazzAssignmentContentJoin.cacjUid\n | AND cacjDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cacjPk, cacjDestination) DO UPDATE\n | SET cacjPending = true\n | \n | \n |')), ClazzAssignmentContentJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_8(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_assignmentContentWeight = closure$_result.getInt_61zpoe$('assignmentContentWeight'); var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var _tmp_Container_nullCount = 0; var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_Container_isAllNull = _tmp_Container_nullCount === 12; var _tmp_ContentEntryParentChildJoin_nullCount = 0; var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_ContentEntryParentChildJoin_isAllNull = _tmp_ContentEntryParentChildJoin_nullCount === 8; var _tmp_ContentEntryStatementScoreProgress_nullCount = 0; var _tmp_resultScore = closure$_result.getInt_61zpoe$('resultScore'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultMax = closure$_result.getInt_61zpoe$('resultMax'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultScaled = closure$_result.getFloat_61zpoe$('resultScaled'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultWeight = closure$_result.getInt_61zpoe$('resultWeight'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_contentComplete = closure$_result.getBoolean_61zpoe$('contentComplete'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_progress = closure$_result.getInt_61zpoe$('progress'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_success = closure$_result.getByte_61zpoe$('success'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_penalty = closure$_result.getInt_61zpoe$('penalty'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalContent = closure$_result.getInt_61zpoe$('totalContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalCompletedContent = closure$_result.getInt_61zpoe$('totalCompletedContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_ContentEntryStatementScoreProgress_isAllNull = _tmp_ContentEntryStatementScoreProgress_nullCount === 10; var $receiver = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); $receiver.assignmentContentWeight = _tmp_assignmentContentWeight; $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Container_isAllNull) { var $receiver_0 = new Container(); $receiver_0.containerUid = _tmp_containerUid; $receiver_0.cntLocalCsn = _tmp_cntLocalCsn; $receiver_0.cntMasterCsn = _tmp_cntMasterCsn; $receiver_0.cntLastModBy = _tmp_cntLastModBy; $receiver_0.cntLct = _tmp_cntLct; $receiver_0.fileSize = _tmp_fileSize; $receiver_0.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver_0.cntLastModified = _tmp_cntLastModified; $receiver_0.mimeType = _tmp_mimeType; $receiver_0.remarks = _tmp_remarks; $receiver_0.mobileOptimized = _tmp_mobileOptimized; $receiver_0.cntNumEntries = _tmp_cntNumEntries; $receiver.mostRecentContainer = $receiver_0; } if (!_tmp_ContentEntryParentChildJoin_isAllNull) { var $receiver_1 = new ContentEntryParentChildJoin(); $receiver_1.cepcjUid = _tmp_cepcjUid; $receiver_1.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver_1.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver_1.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver_1.cepcjLct = _tmp_cepcjLct; $receiver_1.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver_1.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver_1.childIndex = _tmp_childIndex; $receiver.contentEntryParentChildJoin = $receiver_1; } if (!_tmp_ContentEntryStatementScoreProgress_isAllNull) { var $receiver_2 = new ContentEntryStatementScoreProgress(); $receiver_2.resultScore = _tmp_resultScore; $receiver_2.resultMax = _tmp_resultMax; $receiver_2.resultScaled = _tmp_resultScaled; $receiver_2.resultWeight = _tmp_resultWeight; $receiver_2.contentComplete = _tmp_contentComplete; $receiver_2.progress = _tmp_progress; $receiver_2.success = _tmp_success; $receiver_2.penalty = _tmp_penalty; $receiver_2.totalContent = _tmp_totalContent; $receiver_2.totalCompletedContent = _tmp_totalCompletedContent; $receiver.scoreProgress = $receiver_2; } return $receiver; }; } function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda$lambda(_result) { return mapRows(_result, ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzAssignmentUid = closure$clazzAssignmentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzAssignmentUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzAssignmentUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda(closure$personUid_0, closure$clazzAssignmentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentContentJoinDao_JdbcKt.prototype.findAllContentByClazzAssignmentUidAsync_3pjtqy$ = function (clazzAssignmentUid, personUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin("\n |\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, \n | Container.*, \n | COALESCE(ClazzAssignmentRollUp.cacheStudentScore,0) AS resultScore,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheMaxScore,0) AS resultMax,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheProgress,0) AS progress, \n | \n | COALESCE(ClazzAssignmentRollUp.cacheContentComplete,'FALSE') AS contentComplete,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheSuccess,0) AS success,\n | \n | COALESCE(ClazzAssignmentRollUp.cachePenalty,0) AS penalty,\n | \n | COALESCE((CASE WHEN ClazzAssignmentRollUp.cacheContentComplete \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 as assignmentContentWeight,\n | 1 as totalContent\n | \n | \n | FROM ClazzAssignmentContentJoin\n | LEFT JOIN ContentEntry \n | ON ContentEntry.contentEntryUid = cacjContentUid \n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN ClazzAssignmentRollUp\n | ON cacheContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid\n | AND cachePersonUid = ?\n | AND cacheClazzAssignmentUid = ?\n | \n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | WHERE ClazzAssignmentContentJoin.cacjAssignmentUid = ?\n | AND ClazzAssignmentContentJoin.cacjActive\n | AND NOT ContentEntry.ceInactive\n | AND (ContentEntry.publik OR ? != 0)\n | ORDER BY ContentEntry.title ASC , \n | ContentEntryParentChildJoin.childIndex, ContentEntry.contentEntryUid\n | \n ")), ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidAsync$lambda(personUid, clazzAssignmentUid), continuation); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral(this$ClazzAssignmentContentJoinDao_JdbcKt, closure$personUid, closure$clazzAssignmentUid) { this.this$ClazzAssignmentContentJoinDao_JdbcKt = this$ClazzAssignmentContentJoinDao_JdbcKt; this.closure$personUid = closure$personUid; this.closure$clazzAssignmentUid = closure$clazzAssignmentUid; DataSourceFactory.call(this); } function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_assignmentContentWeight = closure$_result.getInt_61zpoe$('assignmentContentWeight'); var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var _tmp_Container_nullCount = 0; var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_Container_isAllNull = _tmp_Container_nullCount === 12; var _tmp_ContentEntryParentChildJoin_nullCount = 0; var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_ContentEntryParentChildJoin_isAllNull = _tmp_ContentEntryParentChildJoin_nullCount === 8; var _tmp_ContentEntryStatementScoreProgress_nullCount = 0; var _tmp_resultScore = closure$_result.getInt_61zpoe$('resultScore'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultMax = closure$_result.getInt_61zpoe$('resultMax'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultScaled = closure$_result.getFloat_61zpoe$('resultScaled'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultWeight = closure$_result.getInt_61zpoe$('resultWeight'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_contentComplete = closure$_result.getBoolean_61zpoe$('contentComplete'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_progress = closure$_result.getInt_61zpoe$('progress'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_success = closure$_result.getByte_61zpoe$('success'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_penalty = closure$_result.getInt_61zpoe$('penalty'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalContent = closure$_result.getInt_61zpoe$('totalContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalCompletedContent = closure$_result.getInt_61zpoe$('totalCompletedContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_ContentEntryStatementScoreProgress_isAllNull = _tmp_ContentEntryStatementScoreProgress_nullCount === 10; var $receiver = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); $receiver.assignmentContentWeight = _tmp_assignmentContentWeight; $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Container_isAllNull) { var $receiver_0 = new Container(); $receiver_0.containerUid = _tmp_containerUid; $receiver_0.cntLocalCsn = _tmp_cntLocalCsn; $receiver_0.cntMasterCsn = _tmp_cntMasterCsn; $receiver_0.cntLastModBy = _tmp_cntLastModBy; $receiver_0.cntLct = _tmp_cntLct; $receiver_0.fileSize = _tmp_fileSize; $receiver_0.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver_0.cntLastModified = _tmp_cntLastModified; $receiver_0.mimeType = _tmp_mimeType; $receiver_0.remarks = _tmp_remarks; $receiver_0.mobileOptimized = _tmp_mobileOptimized; $receiver_0.cntNumEntries = _tmp_cntNumEntries; $receiver.mostRecentContainer = $receiver_0; } if (!_tmp_ContentEntryParentChildJoin_isAllNull) { var $receiver_1 = new ContentEntryParentChildJoin(); $receiver_1.cepcjUid = _tmp_cepcjUid; $receiver_1.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver_1.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver_1.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver_1.cepcjLct = _tmp_cepcjLct; $receiver_1.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver_1.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver_1.childIndex = _tmp_childIndex; $receiver.contentEntryParentChildJoin = $receiver_1; } if (!_tmp_ContentEntryStatementScoreProgress_isAllNull) { var $receiver_2 = new ContentEntryStatementScoreProgress(); $receiver_2.resultScore = _tmp_resultScore; $receiver_2.resultMax = _tmp_resultMax; $receiver_2.resultScaled = _tmp_resultScaled; $receiver_2.resultWeight = _tmp_resultWeight; $receiver_2.contentComplete = _tmp_contentComplete; $receiver_2.progress = _tmp_progress; $receiver_2.success = _tmp_success; $receiver_2.penalty = _tmp_penalty; $receiver_2.totalContent = _tmp_totalContent; $receiver_2.totalCompletedContent = _tmp_totalCompletedContent; $receiver.scoreProgress = $receiver_2; } return $receiver; }; } function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzAssignmentUid = closure$clazzAssignmentUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzAssignmentUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzAssignmentUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda(this$ClazzAssignmentContentJoinDao_JdbcKt_0, closure$personUid_0, closure$clazzAssignmentUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzAssignmentContentJoinDao_JdbcKt = this$ClazzAssignmentContentJoinDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzAssignmentUid = closure$clazzAssignmentUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzAssignmentContentJoinDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, \n | Container.*, \n | COALESCE(ClazzAssignmentRollUp.cacheStudentScore,0) AS resultScore,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheMaxScore,0) AS resultMax,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheProgress,0) AS progress, \n | \n | COALESCE(ClazzAssignmentRollUp.cacheContentComplete,'FALSE') AS contentComplete,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheSuccess,0) AS success,\n | \n | COALESCE(ClazzAssignmentRollUp.cachePenalty,0) AS penalty,\n | \n | COALESCE((CASE WHEN ClazzAssignmentRollUp.cacheContentComplete \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 as assignmentContentWeight,\n | 1 as totalContent\n | \n | \n | FROM ClazzAssignmentContentJoin\n | LEFT JOIN ContentEntry \n | ON ContentEntry.contentEntryUid = cacjContentUid \n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN ClazzAssignmentRollUp\n | ON cacheContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid\n | AND cachePersonUid = ?\n | AND cacheClazzAssignmentUid = ?\n | \n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | WHERE ClazzAssignmentContentJoin.cacjAssignmentUid = ?\n | AND ClazzAssignmentContentJoin.cacjActive\n | AND NOT ContentEntry.ceInactive\n | AND (ContentEntry.publik OR ? != 0)\n | ORDER BY ContentEntry.title ASC , \n | ContentEntryParentChildJoin.childIndex, ContentEntry.contentEntryUid\n | ) LIMIT ? OFFSET ?\n ")), ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$clazzAssignmentUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda(this$ClazzAssignmentContentJoinDao_JdbcKt_0, closure$personUid_0, closure$clazzAssignmentUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda(this$ClazzAssignmentContentJoinDao_JdbcKt_0, closure$personUid_0, closure$clazzAssignmentUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ClazzAssignmentContentJoinDao_JdbcKt._db, listOf(['ClazzAssignmentContentJoin', 'ContentEntry', 'ContentEntryParentChildJoin', 'ClazzAssignmentRollUp', 'Container']), ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getData$lambda(this.this$ClazzAssignmentContentJoinDao_JdbcKt, this.closure$personUid, this.closure$clazzAssignmentUid, _limit, _offset)); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzAssignmentUid = closure$clazzAssignmentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzAssignmentUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzAssignmentUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$clazzAssignmentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$clazzAssignmentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda(this$ClazzAssignmentContentJoinDao_JdbcKt_0, closure$personUid_0, closure$clazzAssignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzAssignmentContentJoinDao_JdbcKt = this$ClazzAssignmentContentJoinDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzAssignmentUid = closure$clazzAssignmentUid_0; } Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda; Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzAssignmentContentJoinDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, \n | Container.*, \n | COALESCE(ClazzAssignmentRollUp.cacheStudentScore,0) AS resultScore,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheMaxScore,0) AS resultMax,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheProgress,0) AS progress, \n | \n | COALESCE(ClazzAssignmentRollUp.cacheContentComplete,'FALSE') AS contentComplete,\n | \n | COALESCE(ClazzAssignmentRollUp.cacheSuccess,0) AS success,\n | \n | COALESCE(ClazzAssignmentRollUp.cachePenalty,0) AS penalty,\n | \n | COALESCE((CASE WHEN ClazzAssignmentRollUp.cacheContentComplete \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 as assignmentContentWeight,\n | 1 as totalContent\n | \n | \n | FROM ClazzAssignmentContentJoin\n | LEFT JOIN ContentEntry \n | ON ContentEntry.contentEntryUid = cacjContentUid \n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN ClazzAssignmentRollUp\n | ON cacheContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid\n | AND cachePersonUid = ?\n | AND cacheClazzAssignmentUid = ?\n | \n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | WHERE ClazzAssignmentContentJoin.cacjAssignmentUid = ?\n | AND ClazzAssignmentContentJoin.cacjActive\n | AND NOT ContentEntry.ceInactive\n | AND (ContentEntry.publik OR ? != 0)\n | ORDER BY ContentEntry.title ASC , \n | ContentEntryParentChildJoin.childIndex, ContentEntry.contentEntryUid\n | ) \n ")), ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid, this.local$closure$clazzAssignmentUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda(this$ClazzAssignmentContentJoinDao_JdbcKt_0, closure$personUid_0, closure$clazzAssignmentUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda(this$ClazzAssignmentContentJoinDao_JdbcKt_0, closure$personUid_0, closure$clazzAssignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ClazzAssignmentContentJoinDao_JdbcKt._db, listOf(['ClazzAssignmentContentJoin', 'ContentEntry', 'ContentEntryParentChildJoin', 'ClazzAssignmentRollUp', 'Container']), ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral$getLength$lambda(this.this$ClazzAssignmentContentJoinDao_JdbcKt, this.closure$personUid, this.closure$clazzAssignmentUid)); }; ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ClazzAssignmentContentJoinDao_JdbcKt.prototype.findAllContentByClazzAssignmentUidDF_3pjtqy$ = function (clazzAssignmentUid, personUid) { return new ClazzAssignmentContentJoinDao_JdbcKt$findAllContentByClazzAssignmentUidDF$ObjectLiteral(this, personUid, clazzAssignmentUid); }; function ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ClazzAssignmentContentJoin (cacjUid, cacjContentUid, cacjAssignmentUid, cacjActive, cacjWeight, cacjMCSN, cacjLCSN, cacjLCB, cacjLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cacjUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cacjUid); } stmt.setLong_6svq3l$(2, entity.cacjContentUid); stmt.setLong_6svq3l$(3, entity.cacjAssignmentUid); stmt.setBoolean_fzusl$(4, entity.cacjActive); stmt.setInt_vux9f0$(5, entity.cacjWeight); stmt.setLong_6svq3l$(6, entity.cacjMCSN); stmt.setLong_6svq3l$(7, entity.cacjLCSN); stmt.setInt_vux9f0$(8, entity.cacjLCB); stmt.setLong_6svq3l$(9, entity.cacjLct); }; ClazzAssignmentContentJoinDao_JdbcKt$_insertAdapterClazzAssignmentContentJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzAssignmentContentJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentContentJoinDao_JdbcKt', interfaces: [ClazzAssignmentContentJoinDao]}; function ClazzAssignmentContentJoinDao_ReplicateWrapper(_db, _dao) { ClazzAssignmentContentJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_9($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_9.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_9; Coroutine$replicateOnNewNode_s8cxhz$_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_9(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_9($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_9.prototype.constructor = Coroutine$replicateOnChange_9; Coroutine$replicateOnChange_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_9(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.findAllContentByClazzAssignmentUidAsync_3pjtqy$ = function (clazzAssignmentUid, personUid, continuation) { return this._dao_0.findAllContentByClazzAssignmentUidAsync_3pjtqy$(clazzAssignmentUid, personUid, continuation); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.findAllContentByClazzAssignmentUidDF_3pjtqy$ = function (clazzAssignmentUid, personUid) { return this._dao_0.findAllContentByClazzAssignmentUidDF_3pjtqy$(clazzAssignmentUid, personUid); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_9($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_9.prototype.constructor = Coroutine$insertAsync_9; Coroutine$insertAsync_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cacjUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(521, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.cacjUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cacjLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.cacjUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_9(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzAssignmentContentJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentContentJoinDao_ReplicateWrapper', interfaces: [ClazzAssignmentContentJoinDao]}; function ClazzAssignmentContentJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzAssignmentContentJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_10($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_10.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_10; Coroutine$replicateOnNewNode_s8cxhz$_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_10(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_10($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_10.prototype.constructor = Coroutine$replicateOnChange_10; Coroutine$replicateOnChange_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_10(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$($this, clazzAssignmentUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzAssignmentUid = clazzAssignmentUid_0; this.local$personUid = personUid_0; } Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$.prototype.constructor = Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$; Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllContentByClazzAssignmentUidAsync_3pjtqy$(this.local$clazzAssignmentUid, this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_Repo.prototype.findAllContentByClazzAssignmentUidAsync_3pjtqy$ = function (clazzAssignmentUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllContentByClazzAssignmentUidAsync_3pjtqy$(this, clazzAssignmentUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentContentJoinDao_Repo.prototype.findAllContentByClazzAssignmentUidDF_3pjtqy$ = function (clazzAssignmentUid, personUid) { var _result = this._dao.findAllContentByClazzAssignmentUidDF_3pjtqy$(clazzAssignmentUid, personUid); return _result; }; ClazzAssignmentContentJoinDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_10($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_10.prototype.constructor = Coroutine$insertAsync_10; Coroutine$insertAsync_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentContentJoinDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_10(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentContentJoinDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzAssignmentContentJoinDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzAssignmentContentJoinDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzAssignmentContentJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentContentJoinDao_Repo', interfaces: [ClazzAssignmentContentJoinDao]}; function ClazzAssignmentDao() { } ClazzAssignmentDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentDao', interfaces: [OneToManyJoinDao, BaseDao]}; function ClazzAssignmentDao_JdbcKt(_db) { ClazzAssignmentDao.call(this); this._db = _db; this._insertAdapterClazzAssignment_ = new ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral(this._db); } ClazzAssignmentDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzAssignment_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_11($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_11.prototype.constructor = Coroutine$insertAsync_11; Coroutine$insertAsync_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzAssignment_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_11(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzAssignment_.insertList_4ezy5m$(entityList); }; function Coroutine$insertListAsync_4ezy5m$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$.prototype.constructor = Coroutine$insertListAsync_4ezy5m$; Coroutine$insertListAsync_4ezy5m$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzAssignment_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda(closure$clazzAssignment_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzAssignment = closure$clazzAssignment_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$clazzAssignment.caTitle); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$clazzAssignment.caDescription); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzAssignment.caGroupUid); this.local$_stmt.setBoolean_fzusl$(4, this.local$closure$clazzAssignment.caActive); this.local$_stmt.setBoolean_fzusl$(5, this.local$closure$clazzAssignment.caClassCommentEnabled); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$clazzAssignment.caPrivateCommentsEnabled); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$clazzAssignment.caCompletionCriteria); this.local$_stmt.setBoolean_fzusl$(8, this.local$closure$clazzAssignment.caRequireFileSubmission); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$clazzAssignment.caFileType); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$clazzAssignment.caSizeLimit); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$clazzAssignment.caNumberOfFiles); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$clazzAssignment.caSubmissionPolicy); this.local$_stmt.setInt_vux9f0$(13, this.local$closure$clazzAssignment.caMarkingType); this.local$_stmt.setBoolean_fzusl$(14, this.local$closure$clazzAssignment.caRequireTextSubmission); this.local$_stmt.setInt_vux9f0$(15, this.local$closure$clazzAssignment.caTextLimitType); this.local$_stmt.setInt_vux9f0$(16, this.local$closure$clazzAssignment.caTextLimit); this.local$_stmt.setLong_6svq3l$(17, this.local$closure$clazzAssignment.caXObjectUid); this.local$_stmt.setLong_6svq3l$(18, this.local$closure$clazzAssignment.caClazzUid); this.local$_stmt.setLong_6svq3l$(19, this.local$closure$clazzAssignment.caLocalChangeSeqNum); this.local$_stmt.setLong_6svq3l$(20, this.local$closure$clazzAssignment.caMasterChangeSeqNum); this.local$_stmt.setInt_vux9f0$(21, this.local$closure$clazzAssignment.caLastChangedBy); this.local$_stmt.setLong_6svq3l$(22, this.local$closure$clazzAssignment.caLct); this.local$_stmt.setLong_6svq3l$(23, this.local$closure$clazzAssignment.caUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$updateAsync$lambda(closure$clazzAssignment_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$updateAsync$lambda(closure$clazzAssignment_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_etrmwv$($this, clazzAssignment_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzAssignment = clazzAssignment_0; } Coroutine$updateAsync_etrmwv$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_etrmwv$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_etrmwv$.prototype.constructor = Coroutine$updateAsync_etrmwv$; Coroutine$updateAsync_etrmwv$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ClazzAssignment SET caTitle = ?, caDescription = ?, caGroupUid = ?, caActive = ?, caClassCommentEnabled = ?, caPrivateCommentsEnabled = ?, caCompletionCriteria = ?, caRequireFileSubmission = ?, caFileType = ?, caSizeLimit = ?, caNumberOfFiles = ?, caSubmissionPolicy = ?, caMarkingType = ?, caRequireTextSubmission = ?, caTextLimitType = ?, caTextLimit = ?, caXObjectUid = ?, caClazzUid = ?, caLocalChangeSeqNum = ?, caMasterChangeSeqNum = ?, caLastChangedBy = ?, caLct = ? WHERE caUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ClazzAssignmentDao_JdbcKt$updateAsync$lambda(this.local$clazzAssignment), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.updateAsync_etrmwv$ = function (clazzAssignment_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_etrmwv$(this, clazzAssignment_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.caTitle); _stmt.setString_vqvrqt$(2, _entity.caDescription); _stmt.setLong_6svq3l$(3, _entity.caGroupUid); _stmt.setBoolean_fzusl$(4, _entity.caActive); _stmt.setBoolean_fzusl$(5, _entity.caClassCommentEnabled); _stmt.setBoolean_fzusl$(6, _entity.caPrivateCommentsEnabled); _stmt.setInt_vux9f0$(7, _entity.caCompletionCriteria); _stmt.setBoolean_fzusl$(8, _entity.caRequireFileSubmission); _stmt.setInt_vux9f0$(9, _entity.caFileType); _stmt.setInt_vux9f0$(10, _entity.caSizeLimit); _stmt.setInt_vux9f0$(11, _entity.caNumberOfFiles); _stmt.setInt_vux9f0$(12, _entity.caSubmissionPolicy); _stmt.setInt_vux9f0$(13, _entity.caMarkingType); _stmt.setBoolean_fzusl$(14, _entity.caRequireTextSubmission); _stmt.setInt_vux9f0$(15, _entity.caTextLimitType); _stmt.setInt_vux9f0$(16, _entity.caTextLimit); _stmt.setLong_6svq3l$(17, _entity.caXObjectUid); _stmt.setLong_6svq3l$(18, _entity.caClazzUid); _stmt.setLong_6svq3l$(19, _entity.caLocalChangeSeqNum); _stmt.setLong_6svq3l$(20, _entity.caMasterChangeSeqNum); _stmt.setInt_vux9f0$(21, _entity.caLastChangedBy); _stmt.setLong_6svq3l$(22, _entity.caLct); _stmt.setLong_6svq3l$(23, _entity.caUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzAssignmentDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzAssignment SET caTitle = ?, caDescription = ?, caGroupUid = ?, caActive = ?, caClassCommentEnabled = ?, caPrivateCommentsEnabled = ?, caCompletionCriteria = ?, caRequireFileSubmission = ?, caFileType = ?, caSizeLimit = ?, caNumberOfFiles = ?, caSubmissionPolicy = ?, caMarkingType = ?, caRequireTextSubmission = ?, caTextLimitType = ?, caTextLimit = ?, caXObjectUid = ?, caClazzUid = ?, caLocalChangeSeqNum = ?, caMasterChangeSeqNum = ?, caLastChangedBy = ?, caLct = ? WHERE caUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzAssignmentDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzAssignmentDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.caTitle); _stmt.setString_vqvrqt$(2, closure$entity.caDescription); _stmt.setLong_6svq3l$(3, closure$entity.caGroupUid); _stmt.setBoolean_fzusl$(4, closure$entity.caActive); _stmt.setBoolean_fzusl$(5, closure$entity.caClassCommentEnabled); _stmt.setBoolean_fzusl$(6, closure$entity.caPrivateCommentsEnabled); _stmt.setInt_vux9f0$(7, closure$entity.caCompletionCriteria); _stmt.setBoolean_fzusl$(8, closure$entity.caRequireFileSubmission); _stmt.setInt_vux9f0$(9, closure$entity.caFileType); _stmt.setInt_vux9f0$(10, closure$entity.caSizeLimit); _stmt.setInt_vux9f0$(11, closure$entity.caNumberOfFiles); _stmt.setInt_vux9f0$(12, closure$entity.caSubmissionPolicy); _stmt.setInt_vux9f0$(13, closure$entity.caMarkingType); _stmt.setBoolean_fzusl$(14, closure$entity.caRequireTextSubmission); _stmt.setInt_vux9f0$(15, closure$entity.caTextLimitType); _stmt.setInt_vux9f0$(16, closure$entity.caTextLimit); _stmt.setLong_6svq3l$(17, closure$entity.caXObjectUid); _stmt.setLong_6svq3l$(18, closure$entity.caClazzUid); _stmt.setLong_6svq3l$(19, closure$entity.caLocalChangeSeqNum); _stmt.setLong_6svq3l$(20, closure$entity.caMasterChangeSeqNum); _stmt.setInt_vux9f0$(21, closure$entity.caLastChangedBy); _stmt.setLong_6svq3l$(22, closure$entity.caLct); _stmt.setLong_6svq3l$(23, closure$entity.caUid); return _stmt.executeUpdate(); }; } ClazzAssignmentDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzAssignment SET caTitle = ?, caDescription = ?, caGroupUid = ?, caActive = ?, caClassCommentEnabled = ?, caPrivateCommentsEnabled = ?, caCompletionCriteria = ?, caRequireFileSubmission = ?, caFileType = ?, caSizeLimit = ?, caNumberOfFiles = ?, caSubmissionPolicy = ?, caMarkingType = ?, caRequireTextSubmission = ?, caTextLimitType = ?, caTextLimit = ?, caXObjectUid = ?, caClazzUid = ?, caLocalChangeSeqNum = ?, caMasterChangeSeqNum = ?, caLastChangedBy = ?, caLct = ? WHERE caUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzAssignmentDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setString_vqvrqt$(1, _entity.caTitle); this.local$_stmt.setString_vqvrqt$(2, _entity.caDescription); this.local$_stmt.setLong_6svq3l$(3, _entity.caGroupUid); this.local$_stmt.setBoolean_fzusl$(4, _entity.caActive); this.local$_stmt.setBoolean_fzusl$(5, _entity.caClassCommentEnabled); this.local$_stmt.setBoolean_fzusl$(6, _entity.caPrivateCommentsEnabled); this.local$_stmt.setInt_vux9f0$(7, _entity.caCompletionCriteria); this.local$_stmt.setBoolean_fzusl$(8, _entity.caRequireFileSubmission); this.local$_stmt.setInt_vux9f0$(9, _entity.caFileType); this.local$_stmt.setInt_vux9f0$(10, _entity.caSizeLimit); this.local$_stmt.setInt_vux9f0$(11, _entity.caNumberOfFiles); this.local$_stmt.setInt_vux9f0$(12, _entity.caSubmissionPolicy); this.local$_stmt.setInt_vux9f0$(13, _entity.caMarkingType); this.local$_stmt.setBoolean_fzusl$(14, _entity.caRequireTextSubmission); this.local$_stmt.setInt_vux9f0$(15, _entity.caTextLimitType); this.local$_stmt.setInt_vux9f0$(16, _entity.caTextLimit); this.local$_stmt.setLong_6svq3l$(17, _entity.caXObjectUid); this.local$_stmt.setLong_6svq3l$(18, _entity.caClazzUid); this.local$_stmt.setLong_6svq3l$(19, _entity.caLocalChangeSeqNum); this.local$_stmt.setLong_6svq3l$(20, _entity.caMasterChangeSeqNum); this.local$_stmt.setInt_vux9f0$(21, _entity.caLastChangedBy); this.local$_stmt.setLong_6svq3l$(22, _entity.caLct); this.local$_stmt.setLong_6svq3l$(23, _entity.caUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$.prototype.constructor = Coroutine$updateListAsync_4ezy5m$; Coroutine$updateListAsync_4ezy5m$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ClazzAssignment SET caTitle = ?, caDescription = ?, caGroupUid = ?, caActive = ?, caClassCommentEnabled = ?, caPrivateCommentsEnabled = ?, caCompletionCriteria = ?, caRequireFileSubmission = ?, caFileType = ?, caSizeLimit = ?, caNumberOfFiles = ?, caSubmissionPolicy = ?, caMarkingType = ?, caRequireTextSubmission = ?, caTextLimitType = ?, caTextLimit = ?, caXObjectUid = ?, caClazzUid = ?, caLocalChangeSeqNum = ?, caMasterChangeSeqNum = ?, caLastChangedBy = ?, caLct = ? WHERE caUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ClazzAssignmentDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_11($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_11.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_11; Coroutine$replicateOnNewNode_s8cxhz$_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzAssignmentReplicate(caPk, caDestination)\n | SELECT DISTINCT ClazzAssignment.caUid AS caUid,\n | ? AS caDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ClazzAssignment.caLct != COALESCE(\n | (SELECT caVersionId\n | FROM ClazzAssignmentReplicate\n | WHERE caPk = ClazzAssignment.caUid\n | AND caDestination = ?), 0) \n | /*psql ON CONFLICT(caPk, caDestination) DO UPDATE\n | SET caPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzAssignmentReplicate(caPk, caDestination)\n | SELECT DISTINCT ClazzAssignment.caUid AS caUid,\n | ? AS caDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ClazzAssignment.caLct != COALESCE(\n | (SELECT caVersionId\n | FROM ClazzAssignmentReplicate\n | WHERE caPk = ClazzAssignment.caUid\n | AND caDestination = ?), 0) \n | ON CONFLICT(caPk, caDestination) DO UPDATE\n | SET caPending = true\n | \n | \n |')), ClazzAssignmentDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_11(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_11($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_11.prototype.constructor = Coroutine$replicateOnChange_11; Coroutine$replicateOnChange_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzAssignmentReplicate(caPk, caDestination)\n | SELECT DISTINCT ClazzAssignment.caUid AS caUid,\n | UserSession.usClientNodeId AS caDestination\n | FROM ChangeLog\n | JOIN ClazzAssignment\n | ON ChangeLog.chTableId = 520\n | AND ChangeLog.chEntityPk = ClazzAssignment.caUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzAssignment.caLct != COALESCE(\n | (SELECT caVersionId\n | FROM ClazzAssignmentReplicate\n | WHERE caPk = ClazzAssignment.caUid\n | AND caDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(caPk, caDestination) DO UPDATE\n | SET caPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzAssignmentReplicate(caPk, caDestination)\n | SELECT DISTINCT ClazzAssignment.caUid AS caUid,\n | UserSession.usClientNodeId AS caDestination\n | FROM ChangeLog\n | JOIN ClazzAssignment\n | ON ChangeLog.chTableId = 520\n | AND ChangeLog.chEntityPk = ClazzAssignment.caUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzAssignment.caLct != COALESCE(\n | (SELECT caVersionId\n | FROM ClazzAssignmentReplicate\n | WHERE caPk = ClazzAssignment.caUid\n | AND caDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(caPk, caDestination) DO UPDATE\n | SET caPending = true\n | \n | \n |')), ClazzAssignmentDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_11(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_caUid = closure$_result.getLong_61zpoe$('caUid'); var _tmp_caTitle = closure$_result.getString_61zpoe$('caTitle'); var _tmp_caDescription = closure$_result.getString_61zpoe$('caDescription'); var _tmp_caGroupUid = closure$_result.getLong_61zpoe$('caGroupUid'); var _tmp_caActive = closure$_result.getBoolean_61zpoe$('caActive'); var _tmp_caClassCommentEnabled = closure$_result.getBoolean_61zpoe$('caClassCommentEnabled'); var _tmp_caPrivateCommentsEnabled = closure$_result.getBoolean_61zpoe$('caPrivateCommentsEnabled'); var _tmp_caCompletionCriteria = closure$_result.getInt_61zpoe$('caCompletionCriteria'); var _tmp_caRequireFileSubmission = closure$_result.getBoolean_61zpoe$('caRequireFileSubmission'); var _tmp_caFileType = closure$_result.getInt_61zpoe$('caFileType'); var _tmp_caSizeLimit = closure$_result.getInt_61zpoe$('caSizeLimit'); var _tmp_caNumberOfFiles = closure$_result.getInt_61zpoe$('caNumberOfFiles'); var _tmp_caSubmissionPolicy = closure$_result.getInt_61zpoe$('caSubmissionPolicy'); var _tmp_caMarkingType = closure$_result.getInt_61zpoe$('caMarkingType'); var _tmp_caRequireTextSubmission = closure$_result.getBoolean_61zpoe$('caRequireTextSubmission'); var _tmp_caTextLimitType = closure$_result.getInt_61zpoe$('caTextLimitType'); var _tmp_caTextLimit = closure$_result.getInt_61zpoe$('caTextLimit'); var _tmp_caXObjectUid = closure$_result.getLong_61zpoe$('caXObjectUid'); var _tmp_caClazzUid = closure$_result.getLong_61zpoe$('caClazzUid'); var _tmp_caLocalChangeSeqNum = closure$_result.getLong_61zpoe$('caLocalChangeSeqNum'); var _tmp_caMasterChangeSeqNum = closure$_result.getLong_61zpoe$('caMasterChangeSeqNum'); var _tmp_caLastChangedBy = closure$_result.getInt_61zpoe$('caLastChangedBy'); var _tmp_caLct = closure$_result.getLong_61zpoe$('caLct'); var $receiver = new ClazzAssignment(); $receiver.caUid = _tmp_caUid; $receiver.caTitle = _tmp_caTitle; $receiver.caDescription = _tmp_caDescription; $receiver.caGroupUid = _tmp_caGroupUid; $receiver.caActive = _tmp_caActive; $receiver.caClassCommentEnabled = _tmp_caClassCommentEnabled; $receiver.caPrivateCommentsEnabled = _tmp_caPrivateCommentsEnabled; $receiver.caCompletionCriteria = _tmp_caCompletionCriteria; $receiver.caRequireFileSubmission = _tmp_caRequireFileSubmission; $receiver.caFileType = _tmp_caFileType; $receiver.caSizeLimit = _tmp_caSizeLimit; $receiver.caNumberOfFiles = _tmp_caNumberOfFiles; $receiver.caSubmissionPolicy = _tmp_caSubmissionPolicy; $receiver.caMarkingType = _tmp_caMarkingType; $receiver.caRequireTextSubmission = _tmp_caRequireTextSubmission; $receiver.caTextLimitType = _tmp_caTextLimitType; $receiver.caTextLimit = _tmp_caTextLimit; $receiver.caXObjectUid = _tmp_caXObjectUid; $receiver.caClazzUid = _tmp_caClazzUid; $receiver.caLocalChangeSeqNum = _tmp_caLocalChangeSeqNum; $receiver.caMasterChangeSeqNum = _tmp_caMasterChangeSeqNum; $receiver.caLastChangedBy = _tmp_caLastChangedBy; $receiver.caLct = _tmp_caLct; return $receiver; }; } function ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda$lambda(_result) { return mapRows(_result, ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda(closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda(closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda(closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentDao_JdbcKt.prototype.getAllAssignmentsByClazzUidAsync_s8cxhz$ = function (clazzUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ClazzAssignment\n | WHERE ClazzAssignment.caClazzUid = ?\n | \n ')), ClazzAssignmentDao_JdbcKt$getAllAssignmentsByClazzUidAsync$lambda(clazzUid), continuation); }; function Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$cbUid = closure$cbUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$cbUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateActiveByUid_zaz62j$($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$; Coroutine$updateActiveByUid_zaz62j$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzAssignment \n | SET caActive = ?, \n | caLct = ?\n | WHERE caUid = ?\n ')), ClazzAssignmentDao_JdbcKt$updateActiveByUid$lambda(this.local$active, this.local$changeTime, this.local$cbUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_JdbcKt.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_notSubmittedStudents = closure$_result.getInt_61zpoe$('notSubmittedStudents'); var _tmp_submittedStudents = closure$_result.getInt_61zpoe$('submittedStudents'); var _tmp_totalStudents = closure$_result.getInt_61zpoe$('totalStudents'); var _tmp_markedStudents = closure$_result.getInt_61zpoe$('markedStudents'); var _tmp_hasMetricsPermission = closure$_result.getBoolean_61zpoe$('hasMetricsPermission'); var $receiver = new AssignmentProgressSummary(); $receiver.notSubmittedStudents = _tmp_notSubmittedStudents; $receiver.submittedStudents = _tmp_submittedStudents; $receiver.totalStudents = _tmp_totalStudents; $receiver.markedStudents = _tmp_markedStudents; $receiver.hasMetricsPermission = _tmp_hasMetricsPermission; return $receiver; }; } function ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$group = closure$group_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$group); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$assignmentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzAssignmentDao_JdbcKt = this$ClazzAssignmentDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$group = closure$group_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzAssignmentDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |\n | \n | WITH SubmitterList (submitterId, name)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId, \n | Person.firstNames || ' ' || Person.lastName AS name\n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, name\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ? || ' ' || CourseGroupMember.cgmGroupNumber AS name \n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, name\n | )\n | \n | \n | SELECT (SELECT COUNT(*) FROM SubmitterList) AS totalStudents,\n | \n | 0 as notSubmittedStudents,\n | \n | (SELECT COUNT(DISTINCT CourseAssignmentSubmission.casSubmitterUid) \n | FROM CourseAssignmentSubmission\n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentMark.camAssignmentUid = CourseAssignmentSubmission.casAssignmentUid\n | WHERE CourseAssignmentSubmission.casAssignmentUid = ?\n | AND CourseAssignmentMark.camUid IS NULL\n | AND CourseAssignmentSubmission.casSubmitterUid IN (SELECT submitterId \n | FROM SubmitterList))\n | AS submittedStudents,\n | \n | \n | (SELECT COUNT(DISTINCT CourseAssignmentMark.camSubmitterUid) \n | FROM CourseAssignmentMark\n | \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentSubmission.casAssignmentUid = CourseAssignmentMark.camAssignmentUid\n | \n | WHERE CourseAssignmentMark.camAssignmentUid = ?\n | AND CourseAssignmentMark.camSubmitterUid IN (SELECT submitterId \n | FROM SubmitterList))\n | AS markedStudents, \n | \n | 'TRUE' AS hasMetricsPermission\n | \n | FROM ClazzAssignment\n | WHERE caActive\n | AND caClazzUid = ? \n | AND caUid = ? \n | \n ")), ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$clazzUid, this.local$closure$group), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentDao_JdbcKt.prototype.getProgressSummaryForAssignment_jl0yiw$ = function (assignmentUid, clazzUid, group) { return new LiveDataImpl(this._db, listOf(['ClazzEnrolment', 'Person', 'ClazzAssignment', 'CourseBlock', 'CourseGroupMember', 'CourseAssignmentSubmission', 'CourseAssignmentMark']), ClazzAssignmentDao_JdbcKt$getProgressSummaryForAssignment$lambda(this, assignmentUid, clazzUid, group)); }; function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral(this$ClazzAssignmentDao_JdbcKt, closure$assignmentUid, closure$clazzUid, closure$group, closure$searchText) { this.this$ClazzAssignmentDao_JdbcKt = this$ClazzAssignmentDao_JdbcKt; this.closure$assignmentUid = closure$assignmentUid; this.closure$clazzUid = closure$clazzUid; this.closure$group = closure$group; this.closure$searchText = closure$searchText; DataSourceFactory.call(this); } function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_submitterUid = closure$_result.getLong_61zpoe$('submitterUid'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_latestPrivateComment = closure$_result.getString_61zpoe$('latestPrivateComment'); var _tmp_fileSubmissionStatus = closure$_result.getInt_61zpoe$('fileSubmissionStatus'); var _tmp_isGroupAssignment = closure$_result.getBoolean_61zpoe$('isGroupAssignment'); var $receiver = new PersonGroupAssignmentSummary(); $receiver.submitterUid = _tmp_submitterUid; $receiver.name = _tmp_name; $receiver.latestPrivateComment = _tmp_latestPrivateComment; $receiver.fileSubmissionStatus = _tmp_fileSubmissionStatus; $receiver.isGroupAssignment = _tmp_isGroupAssignment; return $receiver; }; } function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$group = closure$group_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$group); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$assignmentUid); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzAssignmentDao_JdbcKt = this$ClazzAssignmentDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$group = closure$group_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzAssignmentDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | \n | WITH SubmitterList (submitterId, name)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId, \n | Person.firstNames || ' ' || Person.lastName AS name\n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, name\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ? || ' ' || CourseGroupMember.cgmGroupNumber AS name \n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, name\n | )\n | \n | \n | SELECT submitterId AS submitterUid,\n | name, \n | \n | COALESCE((CASE WHEN CourseAssignmentMark.camUid IS NOT NULL \n | THEN 2 \n | WHEN CourseAssignmentSubmission.casUid IS NOT NULL \n | THEN 1 \n | ELSE 0 END), \n | 0) AS fileSubmissionStatus,\n | \n | (CASE WHEN ClazzAssignment.caGroupUid = 0 \n | THEN 'TRUE' \n | ELSE 'FALSE' END) AS isGroupAssignment,\n | \n | cm.commentsText AS latestPrivateComment \n |\n | FROM SubmitterList\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | \n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camUid = (SELECT camUid\n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ?\n | AND camSubmitterUid = SubmitterList.submitterId\n | ORDER BY camLct DESC \n | LIMIT 1)\n | \n | LEFT JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casUid = (SELECT casUid\n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = SubmitterList.submitterId\n | ORDER BY casTimestamp DESC \n | LIMIT 1)\n | LEFT JOIN Comments AS cm \n | ON cm.commentsUid = (\n | SELECT Comments.commentsUid \n | FROM Comments \n | WHERE Comments.commentsEntityType = 520\n | AND commentsEntityUid = ?\n | AND NOT commentsInActive\n | AND NOT commentsPublic\n | AND (CASE WHEN ClazzAssignment.caGroupUid = 0\n | THEN commentsPersonUid = SubmitterList.submitterId\n | ELSE commentSubmitterUid = SubmitterList.submitterId END)\n | ORDER BY commentsDateTimeAdded DESC LIMIT 1) \n | \n | WHERE name LIKE ?\n | ORDER BY name \n | ) LIMIT ? OFFSET ?\n ")), ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$clazzUid, this.local$closure$group, this.local$closure$searchText, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ClazzAssignmentDao_JdbcKt._db, listOf(['ClazzEnrolment', 'Person', 'ClazzAssignment', 'CourseBlock', 'CourseGroupMember', 'CourseAssignmentMark', 'CourseAssignmentSubmission', 'Comments']), ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getData$lambda(this.this$ClazzAssignmentDao_JdbcKt, this.closure$assignmentUid, this.closure$clazzUid, this.closure$group, this.closure$searchText, _limit, _offset)); }; function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$group = closure$group_0; this.local$closure$searchText = closure$searchText_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$group); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$assignmentUid); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$searchText); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda(closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzAssignmentDao_JdbcKt = this$ClazzAssignmentDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$group = closure$group_0; this.local$closure$searchText = closure$searchText_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzAssignmentDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | \n | WITH SubmitterList (submitterId, name)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId, \n | Person.firstNames || ' ' || Person.lastName AS name\n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, name\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ? || ' ' || CourseGroupMember.cgmGroupNumber AS name \n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, name\n | )\n | \n | \n | SELECT submitterId AS submitterUid,\n | name, \n | \n | COALESCE((CASE WHEN CourseAssignmentMark.camUid IS NOT NULL \n | THEN 2 \n | WHEN CourseAssignmentSubmission.casUid IS NOT NULL \n | THEN 1 \n | ELSE 0 END), \n | 0) AS fileSubmissionStatus,\n | \n | (CASE WHEN ClazzAssignment.caGroupUid = 0 \n | THEN 'TRUE' \n | ELSE 'FALSE' END) AS isGroupAssignment,\n | \n | cm.commentsText AS latestPrivateComment \n |\n | FROM SubmitterList\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = ?\n | \n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camUid = (SELECT camUid\n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ?\n | AND camSubmitterUid = SubmitterList.submitterId\n | ORDER BY camLct DESC \n | LIMIT 1)\n | \n | LEFT JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casUid = (SELECT casUid\n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = SubmitterList.submitterId\n | ORDER BY casTimestamp DESC \n | LIMIT 1)\n | LEFT JOIN Comments AS cm \n | ON cm.commentsUid = (\n | SELECT Comments.commentsUid \n | FROM Comments \n | WHERE Comments.commentsEntityType = 520\n | AND commentsEntityUid = ?\n | AND NOT commentsInActive\n | AND NOT commentsPublic\n | AND (CASE WHEN ClazzAssignment.caGroupUid = 0\n | THEN commentsPersonUid = SubmitterList.submitterId\n | ELSE commentSubmitterUid = SubmitterList.submitterId END)\n | ORDER BY commentsDateTimeAdded DESC LIMIT 1) \n | \n | WHERE name LIKE ?\n | ORDER BY name \n | ) \n ")), ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$clazzUid, this.local$closure$group, this.local$closure$searchText), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$assignmentUid_0, closure$clazzUid_0, closure$group_0, closure$searchText_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ClazzAssignmentDao_JdbcKt._db, listOf(['ClazzEnrolment', 'Person', 'ClazzAssignment', 'CourseBlock', 'CourseGroupMember', 'CourseAssignmentMark', 'CourseAssignmentSubmission', 'Comments']), ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral$getLength$lambda(this.this$ClazzAssignmentDao_JdbcKt, this.closure$assignmentUid, this.closure$clazzUid, this.closure$group, this.closure$searchText)); }; ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ClazzAssignmentDao_JdbcKt.prototype.getSubmitterListForAssignment_gi085m$ = function (assignmentUid, clazzUid, group, searchText) { return new ClazzAssignmentDao_JdbcKt$getSubmitterListForAssignment$ObjectLiteral(this, assignmentUid, clazzUid, group, searchText); }; function ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda$lambda(_result) { return mapNextRow(_result, L0, ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda$lambda$lambda(_result)); } function Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda(closure$personUid_0, closure$assignmentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$assignmentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda(closure$personUid_0, closure$assignmentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda(closure$personUid_0, closure$assignmentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentDao_JdbcKt.prototype.getSubmitterUid_3pjtqy$ = function (assignmentUid, personUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT (CASE WHEN ClazzAssignment.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber END) as submitterUid\n | FROM ClazzAssignment\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE caUid = ?\n | \n ')), ClazzAssignmentDao_JdbcKt$getSubmitterUid$lambda(personUid, assignmentUid), continuation); }; function ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_caUid = closure$_result.getLong_61zpoe$('caUid'); var _tmp_caTitle = closure$_result.getString_61zpoe$('caTitle'); var _tmp_caDescription = closure$_result.getString_61zpoe$('caDescription'); var _tmp_caGroupUid = closure$_result.getLong_61zpoe$('caGroupUid'); var _tmp_caActive = closure$_result.getBoolean_61zpoe$('caActive'); var _tmp_caClassCommentEnabled = closure$_result.getBoolean_61zpoe$('caClassCommentEnabled'); var _tmp_caPrivateCommentsEnabled = closure$_result.getBoolean_61zpoe$('caPrivateCommentsEnabled'); var _tmp_caCompletionCriteria = closure$_result.getInt_61zpoe$('caCompletionCriteria'); var _tmp_caRequireFileSubmission = closure$_result.getBoolean_61zpoe$('caRequireFileSubmission'); var _tmp_caFileType = closure$_result.getInt_61zpoe$('caFileType'); var _tmp_caSizeLimit = closure$_result.getInt_61zpoe$('caSizeLimit'); var _tmp_caNumberOfFiles = closure$_result.getInt_61zpoe$('caNumberOfFiles'); var _tmp_caSubmissionPolicy = closure$_result.getInt_61zpoe$('caSubmissionPolicy'); var _tmp_caMarkingType = closure$_result.getInt_61zpoe$('caMarkingType'); var _tmp_caRequireTextSubmission = closure$_result.getBoolean_61zpoe$('caRequireTextSubmission'); var _tmp_caTextLimitType = closure$_result.getInt_61zpoe$('caTextLimitType'); var _tmp_caTextLimit = closure$_result.getInt_61zpoe$('caTextLimit'); var _tmp_caXObjectUid = closure$_result.getLong_61zpoe$('caXObjectUid'); var _tmp_caClazzUid = closure$_result.getLong_61zpoe$('caClazzUid'); var _tmp_caLocalChangeSeqNum = closure$_result.getLong_61zpoe$('caLocalChangeSeqNum'); var _tmp_caMasterChangeSeqNum = closure$_result.getLong_61zpoe$('caMasterChangeSeqNum'); var _tmp_caLastChangedBy = closure$_result.getInt_61zpoe$('caLastChangedBy'); var _tmp_caLct = closure$_result.getLong_61zpoe$('caLct'); var $receiver = new ClazzAssignment(); $receiver.caUid = _tmp_caUid; $receiver.caTitle = _tmp_caTitle; $receiver.caDescription = _tmp_caDescription; $receiver.caGroupUid = _tmp_caGroupUid; $receiver.caActive = _tmp_caActive; $receiver.caClassCommentEnabled = _tmp_caClassCommentEnabled; $receiver.caPrivateCommentsEnabled = _tmp_caPrivateCommentsEnabled; $receiver.caCompletionCriteria = _tmp_caCompletionCriteria; $receiver.caRequireFileSubmission = _tmp_caRequireFileSubmission; $receiver.caFileType = _tmp_caFileType; $receiver.caSizeLimit = _tmp_caSizeLimit; $receiver.caNumberOfFiles = _tmp_caNumberOfFiles; $receiver.caSubmissionPolicy = _tmp_caSubmissionPolicy; $receiver.caMarkingType = _tmp_caMarkingType; $receiver.caRequireTextSubmission = _tmp_caRequireTextSubmission; $receiver.caTextLimitType = _tmp_caTextLimitType; $receiver.caTextLimit = _tmp_caTextLimit; $receiver.caXObjectUid = _tmp_caXObjectUid; $receiver.caClazzUid = _tmp_caClazzUid; $receiver.caLocalChangeSeqNum = _tmp_caLocalChangeSeqNum; $receiver.caMasterChangeSeqNum = _tmp_caMasterChangeSeqNum; $receiver.caLastChangedBy = _tmp_caLastChangedBy; $receiver.caLct = _tmp_caLct; return $receiver; }; } function ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ClazzAssignment \n | WHERE caUid = ?\n | \n ')), ClazzAssignmentDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda$lambda(_result) { return mapNextRow(_result, L0, ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda$lambda$lambda(_result)); } function Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentDao_JdbcKt.prototype.getGroupUidFromAssignment_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((\n | SELECT caGroupUid\n | FROM ClazzAssignment\n | WHERE caUid = ?),-1)\n | \n ')), ClazzAssignmentDao_JdbcKt$getGroupUidFromAssignment$lambda(uid), continuation); }; function ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_caUid = closure$_result.getLong_61zpoe$('caUid'); var _tmp_caTitle = closure$_result.getString_61zpoe$('caTitle'); var _tmp_caDescription = closure$_result.getString_61zpoe$('caDescription'); var _tmp_caGroupUid = closure$_result.getLong_61zpoe$('caGroupUid'); var _tmp_caActive = closure$_result.getBoolean_61zpoe$('caActive'); var _tmp_caClassCommentEnabled = closure$_result.getBoolean_61zpoe$('caClassCommentEnabled'); var _tmp_caPrivateCommentsEnabled = closure$_result.getBoolean_61zpoe$('caPrivateCommentsEnabled'); var _tmp_caCompletionCriteria = closure$_result.getInt_61zpoe$('caCompletionCriteria'); var _tmp_caRequireFileSubmission = closure$_result.getBoolean_61zpoe$('caRequireFileSubmission'); var _tmp_caFileType = closure$_result.getInt_61zpoe$('caFileType'); var _tmp_caSizeLimit = closure$_result.getInt_61zpoe$('caSizeLimit'); var _tmp_caNumberOfFiles = closure$_result.getInt_61zpoe$('caNumberOfFiles'); var _tmp_caSubmissionPolicy = closure$_result.getInt_61zpoe$('caSubmissionPolicy'); var _tmp_caMarkingType = closure$_result.getInt_61zpoe$('caMarkingType'); var _tmp_caRequireTextSubmission = closure$_result.getBoolean_61zpoe$('caRequireTextSubmission'); var _tmp_caTextLimitType = closure$_result.getInt_61zpoe$('caTextLimitType'); var _tmp_caTextLimit = closure$_result.getInt_61zpoe$('caTextLimit'); var _tmp_caXObjectUid = closure$_result.getLong_61zpoe$('caXObjectUid'); var _tmp_caClazzUid = closure$_result.getLong_61zpoe$('caClazzUid'); var _tmp_caLocalChangeSeqNum = closure$_result.getLong_61zpoe$('caLocalChangeSeqNum'); var _tmp_caMasterChangeSeqNum = closure$_result.getLong_61zpoe$('caMasterChangeSeqNum'); var _tmp_caLastChangedBy = closure$_result.getInt_61zpoe$('caLastChangedBy'); var _tmp_caLct = closure$_result.getLong_61zpoe$('caLct'); var _tmp_CourseBlock_nullCount = 0; var _tmp_cbUid = closure$_result.getLong_61zpoe$('cbUid'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbType = closure$_result.getInt_61zpoe$('cbType'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbIndentLevel = closure$_result.getInt_61zpoe$('cbIndentLevel'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbModuleParentBlockUid = closure$_result.getLong_61zpoe$('cbModuleParentBlockUid'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbTitle = closure$_result.getString_61zpoe$('cbTitle'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbDescription = closure$_result.getString_61zpoe$('cbDescription'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbCompletionCriteria = closure$_result.getInt_61zpoe$('cbCompletionCriteria'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbHideUntilDate = closure$_result.getLong_61zpoe$('cbHideUntilDate'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbDeadlineDate = closure$_result.getLong_61zpoe$('cbDeadlineDate'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbLateSubmissionPenalty = closure$_result.getInt_61zpoe$('cbLateSubmissionPenalty'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbGracePeriodDate = closure$_result.getLong_61zpoe$('cbGracePeriodDate'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbMaxPoints = closure$_result.getInt_61zpoe$('cbMaxPoints'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbMinPoints = closure$_result.getInt_61zpoe$('cbMinPoints'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbIndex = closure$_result.getInt_61zpoe$('cbIndex'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbClazzUid = closure$_result.getLong_61zpoe$('cbClazzUid'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbActive = closure$_result.getBoolean_61zpoe$('cbActive'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbHidden = closure$_result.getBoolean_61zpoe$('cbHidden'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbEntityUid = closure$_result.getLong_61zpoe$('cbEntityUid'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbLct = closure$_result.getLong_61zpoe$('cbLct'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_CourseBlock_isAllNull = _tmp_CourseBlock_nullCount === 19; var $receiver = new ClazzAssignmentWithCourseBlock(); $receiver.caUid = _tmp_caUid; $receiver.caTitle = _tmp_caTitle; $receiver.caDescription = _tmp_caDescription; $receiver.caGroupUid = _tmp_caGroupUid; $receiver.caActive = _tmp_caActive; $receiver.caClassCommentEnabled = _tmp_caClassCommentEnabled; $receiver.caPrivateCommentsEnabled = _tmp_caPrivateCommentsEnabled; $receiver.caCompletionCriteria = _tmp_caCompletionCriteria; $receiver.caRequireFileSubmission = _tmp_caRequireFileSubmission; $receiver.caFileType = _tmp_caFileType; $receiver.caSizeLimit = _tmp_caSizeLimit; $receiver.caNumberOfFiles = _tmp_caNumberOfFiles; $receiver.caSubmissionPolicy = _tmp_caSubmissionPolicy; $receiver.caMarkingType = _tmp_caMarkingType; $receiver.caRequireTextSubmission = _tmp_caRequireTextSubmission; $receiver.caTextLimitType = _tmp_caTextLimitType; $receiver.caTextLimit = _tmp_caTextLimit; $receiver.caXObjectUid = _tmp_caXObjectUid; $receiver.caClazzUid = _tmp_caClazzUid; $receiver.caLocalChangeSeqNum = _tmp_caLocalChangeSeqNum; $receiver.caMasterChangeSeqNum = _tmp_caMasterChangeSeqNum; $receiver.caLastChangedBy = _tmp_caLastChangedBy; $receiver.caLct = _tmp_caLct; if (!_tmp_CourseBlock_isAllNull) { var $receiver_0 = new CourseBlock(); $receiver_0.cbUid = _tmp_cbUid; $receiver_0.cbType = _tmp_cbType; $receiver_0.cbIndentLevel = _tmp_cbIndentLevel; $receiver_0.cbModuleParentBlockUid = _tmp_cbModuleParentBlockUid; $receiver_0.cbTitle = _tmp_cbTitle; $receiver_0.cbDescription = _tmp_cbDescription; $receiver_0.cbCompletionCriteria = _tmp_cbCompletionCriteria; $receiver_0.cbHideUntilDate = _tmp_cbHideUntilDate; $receiver_0.cbDeadlineDate = _tmp_cbDeadlineDate; $receiver_0.cbLateSubmissionPenalty = _tmp_cbLateSubmissionPenalty; $receiver_0.cbGracePeriodDate = _tmp_cbGracePeriodDate; $receiver_0.cbMaxPoints = _tmp_cbMaxPoints; $receiver_0.cbMinPoints = _tmp_cbMinPoints; $receiver_0.cbIndex = _tmp_cbIndex; $receiver_0.cbClazzUid = _tmp_cbClazzUid; $receiver_0.cbActive = _tmp_cbActive; $receiver_0.cbHidden = _tmp_cbHidden; $receiver_0.cbEntityUid = _tmp_cbEntityUid; $receiver_0.cbLct = _tmp_cbLct; $receiver.block = $receiver_0; } return $receiver; }; } function ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda$lambda$lambda(_result)); } function Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentDao_JdbcKt.prototype.findByUidWithBlockAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ClazzAssignment\n | LEFT JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | WHERE caUid = ?\n | \n ')), ClazzAssignmentDao_JdbcKt$findByUidWithBlockAsync$lambda(uid), continuation); }; function ClazzAssignmentDao_JdbcKt$findClazzAssignment$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_caUid = closure$_result.getLong_61zpoe$('caUid'); var _tmp_caTitle = closure$_result.getString_61zpoe$('caTitle'); var _tmp_caDescription = closure$_result.getString_61zpoe$('caDescription'); var _tmp_caGroupUid = closure$_result.getLong_61zpoe$('caGroupUid'); var _tmp_caActive = closure$_result.getBoolean_61zpoe$('caActive'); var _tmp_caClassCommentEnabled = closure$_result.getBoolean_61zpoe$('caClassCommentEnabled'); var _tmp_caPrivateCommentsEnabled = closure$_result.getBoolean_61zpoe$('caPrivateCommentsEnabled'); var _tmp_caCompletionCriteria = closure$_result.getInt_61zpoe$('caCompletionCriteria'); var _tmp_caRequireFileSubmission = closure$_result.getBoolean_61zpoe$('caRequireFileSubmission'); var _tmp_caFileType = closure$_result.getInt_61zpoe$('caFileType'); var _tmp_caSizeLimit = closure$_result.getInt_61zpoe$('caSizeLimit'); var _tmp_caNumberOfFiles = closure$_result.getInt_61zpoe$('caNumberOfFiles'); var _tmp_caSubmissionPolicy = closure$_result.getInt_61zpoe$('caSubmissionPolicy'); var _tmp_caMarkingType = closure$_result.getInt_61zpoe$('caMarkingType'); var _tmp_caRequireTextSubmission = closure$_result.getBoolean_61zpoe$('caRequireTextSubmission'); var _tmp_caTextLimitType = closure$_result.getInt_61zpoe$('caTextLimitType'); var _tmp_caTextLimit = closure$_result.getInt_61zpoe$('caTextLimit'); var _tmp_caXObjectUid = closure$_result.getLong_61zpoe$('caXObjectUid'); var _tmp_caClazzUid = closure$_result.getLong_61zpoe$('caClazzUid'); var _tmp_caLocalChangeSeqNum = closure$_result.getLong_61zpoe$('caLocalChangeSeqNum'); var _tmp_caMasterChangeSeqNum = closure$_result.getLong_61zpoe$('caMasterChangeSeqNum'); var _tmp_caLastChangedBy = closure$_result.getInt_61zpoe$('caLastChangedBy'); var _tmp_caLct = closure$_result.getLong_61zpoe$('caLct'); var $receiver = new ClazzAssignment(); $receiver.caUid = _tmp_caUid; $receiver.caTitle = _tmp_caTitle; $receiver.caDescription = _tmp_caDescription; $receiver.caGroupUid = _tmp_caGroupUid; $receiver.caActive = _tmp_caActive; $receiver.caClassCommentEnabled = _tmp_caClassCommentEnabled; $receiver.caPrivateCommentsEnabled = _tmp_caPrivateCommentsEnabled; $receiver.caCompletionCriteria = _tmp_caCompletionCriteria; $receiver.caRequireFileSubmission = _tmp_caRequireFileSubmission; $receiver.caFileType = _tmp_caFileType; $receiver.caSizeLimit = _tmp_caSizeLimit; $receiver.caNumberOfFiles = _tmp_caNumberOfFiles; $receiver.caSubmissionPolicy = _tmp_caSubmissionPolicy; $receiver.caMarkingType = _tmp_caMarkingType; $receiver.caRequireTextSubmission = _tmp_caRequireTextSubmission; $receiver.caTextLimitType = _tmp_caTextLimitType; $receiver.caTextLimit = _tmp_caTextLimit; $receiver.caXObjectUid = _tmp_caXObjectUid; $receiver.caClazzUid = _tmp_caClazzUid; $receiver.caLocalChangeSeqNum = _tmp_caLocalChangeSeqNum; $receiver.caMasterChangeSeqNum = _tmp_caMasterChangeSeqNum; $receiver.caLastChangedBy = _tmp_caLastChangedBy; $receiver.caLct = _tmp_caLct; return $receiver; }; } function ClazzAssignmentDao_JdbcKt$findClazzAssignment$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzAssignmentDao_JdbcKt$findClazzAssignment$lambda$lambda$lambda(_result)); } function ClazzAssignmentDao_JdbcKt$findClazzAssignment$lambda(_stmt) { return useResults(_stmt.executeQuery(), ClazzAssignmentDao_JdbcKt$findClazzAssignment$lambda$lambda); } ClazzAssignmentDao_JdbcKt.prototype.findClazzAssignment = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ClazzAssignment LIMIT 1\n | \n ')), ClazzAssignmentDao_JdbcKt$findClazzAssignment$lambda); }; function ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_caUid = closure$_result.getLong_61zpoe$('caUid'); var _tmp_caTitle = closure$_result.getString_61zpoe$('caTitle'); var _tmp_caDescription = closure$_result.getString_61zpoe$('caDescription'); var _tmp_caGroupUid = closure$_result.getLong_61zpoe$('caGroupUid'); var _tmp_caActive = closure$_result.getBoolean_61zpoe$('caActive'); var _tmp_caClassCommentEnabled = closure$_result.getBoolean_61zpoe$('caClassCommentEnabled'); var _tmp_caPrivateCommentsEnabled = closure$_result.getBoolean_61zpoe$('caPrivateCommentsEnabled'); var _tmp_caCompletionCriteria = closure$_result.getInt_61zpoe$('caCompletionCriteria'); var _tmp_caRequireFileSubmission = closure$_result.getBoolean_61zpoe$('caRequireFileSubmission'); var _tmp_caFileType = closure$_result.getInt_61zpoe$('caFileType'); var _tmp_caSizeLimit = closure$_result.getInt_61zpoe$('caSizeLimit'); var _tmp_caNumberOfFiles = closure$_result.getInt_61zpoe$('caNumberOfFiles'); var _tmp_caSubmissionPolicy = closure$_result.getInt_61zpoe$('caSubmissionPolicy'); var _tmp_caMarkingType = closure$_result.getInt_61zpoe$('caMarkingType'); var _tmp_caRequireTextSubmission = closure$_result.getBoolean_61zpoe$('caRequireTextSubmission'); var _tmp_caTextLimitType = closure$_result.getInt_61zpoe$('caTextLimitType'); var _tmp_caTextLimit = closure$_result.getInt_61zpoe$('caTextLimit'); var _tmp_caXObjectUid = closure$_result.getLong_61zpoe$('caXObjectUid'); var _tmp_caClazzUid = closure$_result.getLong_61zpoe$('caClazzUid'); var _tmp_caLocalChangeSeqNum = closure$_result.getLong_61zpoe$('caLocalChangeSeqNum'); var _tmp_caMasterChangeSeqNum = closure$_result.getLong_61zpoe$('caMasterChangeSeqNum'); var _tmp_caLastChangedBy = closure$_result.getInt_61zpoe$('caLastChangedBy'); var _tmp_caLct = closure$_result.getLong_61zpoe$('caLct'); var $receiver = new ClazzAssignment(); $receiver.caUid = _tmp_caUid; $receiver.caTitle = _tmp_caTitle; $receiver.caDescription = _tmp_caDescription; $receiver.caGroupUid = _tmp_caGroupUid; $receiver.caActive = _tmp_caActive; $receiver.caClassCommentEnabled = _tmp_caClassCommentEnabled; $receiver.caPrivateCommentsEnabled = _tmp_caPrivateCommentsEnabled; $receiver.caCompletionCriteria = _tmp_caCompletionCriteria; $receiver.caRequireFileSubmission = _tmp_caRequireFileSubmission; $receiver.caFileType = _tmp_caFileType; $receiver.caSizeLimit = _tmp_caSizeLimit; $receiver.caNumberOfFiles = _tmp_caNumberOfFiles; $receiver.caSubmissionPolicy = _tmp_caSubmissionPolicy; $receiver.caMarkingType = _tmp_caMarkingType; $receiver.caRequireTextSubmission = _tmp_caRequireTextSubmission; $receiver.caTextLimitType = _tmp_caTextLimitType; $receiver.caTextLimit = _tmp_caTextLimit; $receiver.caXObjectUid = _tmp_caXObjectUid; $receiver.caClazzUid = _tmp_caClazzUid; $receiver.caLocalChangeSeqNum = _tmp_caLocalChangeSeqNum; $receiver.caMasterChangeSeqNum = _tmp_caMasterChangeSeqNum; $receiver.caLastChangedBy = _tmp_caLastChangedBy; $receiver.caLct = _tmp_caLct; return $receiver; }; } function ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzAssignmentDao_JdbcKt = this$ClazzAssignmentDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; } Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda; Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzAssignmentDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * \n | FROM ClazzAssignment \n | WHERE caUid = ?\n ')), ClazzAssignmentDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentDao_JdbcKt$findByUidLive$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentDao_JdbcKt$findByUidLive$lambda(this$ClazzAssignmentDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzAssignmentDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { return new LiveDataImpl(this._db, listOf_0('ClazzAssignment'), ClazzAssignmentDao_JdbcKt$findByUidLive$lambda(this, uid)); }; function ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ClazzAssignment (caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caCompletionCriteria, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.caUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.caUid); } stmt.setString_vqvrqt$(2, entity.caTitle); stmt.setString_vqvrqt$(3, entity.caDescription); stmt.setLong_6svq3l$(4, entity.caGroupUid); stmt.setBoolean_fzusl$(5, entity.caActive); stmt.setBoolean_fzusl$(6, entity.caClassCommentEnabled); stmt.setBoolean_fzusl$(7, entity.caPrivateCommentsEnabled); stmt.setInt_vux9f0$(8, entity.caCompletionCriteria); stmt.setBoolean_fzusl$(9, entity.caRequireFileSubmission); stmt.setInt_vux9f0$(10, entity.caFileType); stmt.setInt_vux9f0$(11, entity.caSizeLimit); stmt.setInt_vux9f0$(12, entity.caNumberOfFiles); stmt.setInt_vux9f0$(13, entity.caSubmissionPolicy); stmt.setInt_vux9f0$(14, entity.caMarkingType); stmt.setBoolean_fzusl$(15, entity.caRequireTextSubmission); stmt.setInt_vux9f0$(16, entity.caTextLimitType); stmt.setInt_vux9f0$(17, entity.caTextLimit); stmt.setLong_6svq3l$(18, entity.caXObjectUid); stmt.setLong_6svq3l$(19, entity.caClazzUid); stmt.setLong_6svq3l$(20, entity.caLocalChangeSeqNum); stmt.setLong_6svq3l$(21, entity.caMasterChangeSeqNum); stmt.setInt_vux9f0$(22, entity.caLastChangedBy); stmt.setLong_6svq3l$(23, entity.caLct); }; ClazzAssignmentDao_JdbcKt$_insertAdapterClazzAssignment_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzAssignmentDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentDao_JdbcKt', interfaces: [ClazzAssignmentDao]}; function ClazzAssignmentDao_ReplicateWrapper(_db, _dao) { ClazzAssignmentDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_12($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_12.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_12; Coroutine$replicateOnNewNode_s8cxhz$_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_12(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_12($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_12.prototype.constructor = Coroutine$replicateOnChange_12; Coroutine$replicateOnChange_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_12(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_ReplicateWrapper.prototype.getAllAssignmentsByClazzUidAsync_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.getAllAssignmentsByClazzUidAsync_s8cxhz$(clazzUid, continuation); }; function Coroutine$updateActiveByUid_zaz62j$_0($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_0.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_0; Coroutine$updateActiveByUid_zaz62j$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateActiveByUid_zaz62j$(this.local$cbUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_0(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_ReplicateWrapper.prototype.getProgressSummaryForAssignment_jl0yiw$ = function (assignmentUid, clazzUid, group) { return this._dao_0.getProgressSummaryForAssignment_jl0yiw$(assignmentUid, clazzUid, group); }; ClazzAssignmentDao_ReplicateWrapper.prototype.getSubmitterListForAssignment_gi085m$ = function (assignmentUid, clazzUid, group, searchText) { return this._dao_0.getSubmitterListForAssignment_gi085m$(assignmentUid, clazzUid, group, searchText); }; ClazzAssignmentDao_ReplicateWrapper.prototype.getSubmitterUid_3pjtqy$ = function (assignmentUid, personUid, continuation) { return this._dao_0.getSubmitterUid_3pjtqy$(assignmentUid, personUid, continuation); }; function Coroutine$updateAsync_etrmwv$_0($this, clazzAssignment_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzAssignment = clazzAssignment_0; } Coroutine$updateAsync_etrmwv$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_etrmwv$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_etrmwv$_0.prototype.constructor = Coroutine$updateAsync_etrmwv$_0; Coroutine$updateAsync_etrmwv$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$clazzAssignment.caLct = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.$this._dao_0.updateAsync_etrmwv$(this.local$clazzAssignment, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.updateAsync_etrmwv$ = function (clazzAssignment_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_etrmwv$_0(this, clazzAssignment_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; ClazzAssignmentDao_ReplicateWrapper.prototype.getGroupUidFromAssignment_s8cxhz$ = function (uid, continuation) { return this._dao_0.getGroupUidFromAssignment_s8cxhz$(uid, continuation); }; ClazzAssignmentDao_ReplicateWrapper.prototype.findByUidWithBlockAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidWithBlockAsync_s8cxhz$(uid, continuation); }; ClazzAssignmentDao_ReplicateWrapper.prototype.findClazzAssignment = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzAssignmentDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; ClazzAssignmentDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_12($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_12.prototype.constructor = Coroutine$insertAsync_12; Coroutine$insertAsync_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.caUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(520, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.caUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.caLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.caUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_12(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzAssignmentDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzAssignmentDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_0.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_0; Coroutine$insertListAsync_4ezy5m$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.caUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(520, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.caUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.caLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_0.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_0; Coroutine$updateListAsync_4ezy5m$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.caLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentDao_ReplicateWrapper', interfaces: [ClazzAssignmentDao]}; function ClazzAssignmentDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzAssignmentDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_13($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_13.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_13; Coroutine$replicateOnNewNode_s8cxhz$_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_13(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_13($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_13.prototype.constructor = Coroutine$replicateOnChange_13; Coroutine$replicateOnChange_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_13(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$.prototype.constructor = Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$; Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getAllAssignmentsByClazzUidAsync_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.getAllAssignmentsByClazzUidAsync_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$getAllAssignmentsByClazzUidAsync_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateActiveByUid_zaz62j$_1($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_1.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_1; Coroutine$updateActiveByUid_zaz62j$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateActiveByUid_zaz62j$(this.local$cbUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_1(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_Repo.prototype.getProgressSummaryForAssignment_jl0yiw$ = function (assignmentUid, clazzUid, group) { var _result = this._dao.getProgressSummaryForAssignment_jl0yiw$(assignmentUid, clazzUid, group); return _result; }; ClazzAssignmentDao_Repo.prototype.getSubmitterListForAssignment_gi085m$ = function (assignmentUid, clazzUid, group, searchText) { var _result = this._dao.getSubmitterListForAssignment_gi085m$(assignmentUid, clazzUid, group, searchText); return _result; }; function Coroutine$getSubmitterUid_3pjtqy$($this, assignmentUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$assignmentUid = assignmentUid_0; this.local$personUid = personUid_0; } Coroutine$getSubmitterUid_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getSubmitterUid_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getSubmitterUid_3pjtqy$.prototype.constructor = Coroutine$getSubmitterUid_3pjtqy$; Coroutine$getSubmitterUid_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getSubmitterUid_3pjtqy$(this.local$assignmentUid, this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.getSubmitterUid_3pjtqy$ = function (assignmentUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$getSubmitterUid_3pjtqy$(this, assignmentUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_etrmwv$_1($this, clazzAssignment_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzAssignment = clazzAssignment_0; } Coroutine$updateAsync_etrmwv$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_etrmwv$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_etrmwv$_1.prototype.constructor = Coroutine$updateAsync_etrmwv$_1; Coroutine$updateAsync_etrmwv$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_etrmwv$(this.local$clazzAssignment, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.updateAsync_etrmwv$ = function (clazzAssignment_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_etrmwv$_1(this, clazzAssignment_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$; Coroutine$findByUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getGroupUidFromAssignment_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$getGroupUidFromAssignment_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getGroupUidFromAssignment_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getGroupUidFromAssignment_s8cxhz$.prototype.constructor = Coroutine$getGroupUidFromAssignment_s8cxhz$; Coroutine$getGroupUidFromAssignment_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getGroupUidFromAssignment_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.getGroupUidFromAssignment_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$getGroupUidFromAssignment_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidWithBlockAsync_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidWithBlockAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithBlockAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithBlockAsync_s8cxhz$.prototype.constructor = Coroutine$findByUidWithBlockAsync_s8cxhz$; Coroutine$findByUidWithBlockAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidWithBlockAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.findByUidWithBlockAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithBlockAsync_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_Repo.prototype.findClazzAssignment = function () { var _result = this._dao.findClazzAssignment(); return _result; }; ClazzAssignmentDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; ClazzAssignmentDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_13($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_13.prototype.constructor = Coroutine$insertAsync_13; Coroutine$insertAsync_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_13(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzAssignmentDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzAssignmentDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_1.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_1; Coroutine$insertListAsync_4ezy5m$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_1.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_1; Coroutine$updateListAsync_4ezy5m$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentDao_Repo', interfaces: [ClazzAssignmentDao]}; function ClazzAssignmentRollUpDao() { } ClazzAssignmentRollUpDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentRollUpDao', interfaces: [BaseDao]}; function ClazzAssignmentRollUpDao_JdbcKt(_db) { ClazzAssignmentRollUpDao.call(this); this._db = _db; this._insertAdapterClazzAssignmentRollUp_ = new ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral(this._db); } ClazzAssignmentRollUpDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzAssignmentRollUp_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_14($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_14.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_14.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_14.prototype.constructor = Coroutine$insertAsync_14; Coroutine$insertAsync_14.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzAssignmentRollUp_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_14(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentRollUpDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzAssignmentRollUp_.insertList_4ezy5m$(entityList); }; function ClazzAssignmentRollUpDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cachePersonUid); _stmt.setLong_6svq3l$(2, _entity.cacheContentEntryUid); _stmt.setLong_6svq3l$(3, _entity.cacheClazzAssignmentUid); _stmt.setInt_vux9f0$(4, _entity.cacheStudentScore); _stmt.setInt_vux9f0$(5, _entity.cacheMaxScore); _stmt.setFloat_24o109$(6, _entity.cacheFinalWeightScoreWithPenalty); _stmt.setInt_vux9f0$(7, _entity.cacheWeight); _stmt.setInt_vux9f0$(8, _entity.cacheProgress); _stmt.setBoolean_fzusl$(9, _entity.cacheContentComplete); _stmt.setByte_6t1wet$(10, _entity.cacheSuccess); _stmt.setInt_vux9f0$(11, _entity.cachePenalty); _stmt.setLong_6svq3l$(12, _entity.lastCsnChecked); _stmt.setLong_6svq3l$(13, _entity.cacheUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzAssignmentRollUpDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzAssignmentRollUp SET cachePersonUid = ?, cacheContentEntryUid = ?, cacheClazzAssignmentUid = ?, cacheStudentScore = ?, cacheMaxScore = ?, cacheFinalWeightScoreWithPenalty = ?, cacheWeight = ?, cacheProgress = ?, cacheContentComplete = ?, cacheSuccess = ?, cachePenalty = ?, lastCsnChecked = ? WHERE cacheUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzAssignmentRollUpDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzAssignmentRollUpDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cachePersonUid); _stmt.setLong_6svq3l$(2, closure$entity.cacheContentEntryUid); _stmt.setLong_6svq3l$(3, closure$entity.cacheClazzAssignmentUid); _stmt.setInt_vux9f0$(4, closure$entity.cacheStudentScore); _stmt.setInt_vux9f0$(5, closure$entity.cacheMaxScore); _stmt.setFloat_24o109$(6, closure$entity.cacheFinalWeightScoreWithPenalty); _stmt.setInt_vux9f0$(7, closure$entity.cacheWeight); _stmt.setInt_vux9f0$(8, closure$entity.cacheProgress); _stmt.setBoolean_fzusl$(9, closure$entity.cacheContentComplete); _stmt.setByte_6t1wet$(10, closure$entity.cacheSuccess); _stmt.setInt_vux9f0$(11, closure$entity.cachePenalty); _stmt.setLong_6svq3l$(12, closure$entity.lastCsnChecked); _stmt.setLong_6svq3l$(13, closure$entity.cacheUid); return _stmt.executeUpdate(); }; } ClazzAssignmentRollUpDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzAssignmentRollUp SET cachePersonUid = ?, cacheContentEntryUid = ?, cacheClazzAssignmentUid = ?, cacheStudentScore = ?, cacheMaxScore = ?, cacheFinalWeightScoreWithPenalty = ?, cacheWeight = ?, cacheProgress = ?, cacheContentComplete = ?, cacheSuccess = ?, cachePenalty = ?, lastCsnChecked = ? WHERE cacheUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzAssignmentRollUpDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda(closure$clazzUid_0, closure$assignmentUid_0, closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda.prototype.constructor = Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda(closure$clazzUid_0, closure$assignmentUid_0, closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda(closure$clazzUid_0, closure$assignmentUid_0, closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$cacheBestStatements_b9bd0d$($this, clazzUid_0, assignmentUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$assignmentUid = assignmentUid_0; this.local$personUid = personUid_0; } Coroutine$cacheBestStatements_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$cacheBestStatements_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$cacheBestStatements_b9bd0d$.prototype.constructor = Coroutine$cacheBestStatements_b9bd0d$; Coroutine$cacheBestStatements_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin("\n | \n | REPLACE INTO ClazzAssignmentRollUp \n | (cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid, \n | cacheStudentScore, cacheMaxScore, cacheWeight, cacheProgress,\n | cacheContentComplete, cacheSuccess,cachePenalty, cacheFinalWeightScoreWithPenalty, lastCsnChecked)\n | \n | WITH MaxScoreTable (maxScore, maxScoreContentEntryUid) \n | AS (SELECT MAX(resultScoreMax), statementContentEntryUid \n | FROM StatementEntity\n | WHERE contentEntryRoot \n | GROUP BY statementContentEntryUid) \n |\n | SELECT clazzEnrolmentPersonUid AS cachePersonUid, \n | COALESCE(cacjContentUid,0) AS cacheContentEntryUid, caUid AS cacheClazzAssignmentUid, \n | COALESCE(resultScoreRaw,0) AS cacheStudentScore, \n | \n | \n | COALESCE((SELECT maxScore \n | FROM MaxScoreTable \n | WHERE cacjContentUid = maxScoreContentEntryUid), 0) AS cacheMaxScore,\n | \n | COALESCE(cacjWeight, 0) AS cacheWeight,\n | \n | \n | COALESCE(StatementEntity.extensionProgress,0) AS cacheProgress,\n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS cacheContentComplete, \n | COALESCE(StatementEntity.resultSuccess,0) AS cacheSuccess,\n | (CASE WHEN StatementEntity.timestamp > CourseBlock.cbDeadlineDate\n | THEN CourseBlock.cbLateSubmissionPenalty \n | ELSE 0 END) AS cachePenalty,\n | \n | (CASE WHEN StatementEntity.timestamp > CourseBlock.cbDeadlineDate \n | THEN (COALESCE(CAST(resultScoreRaw AS REAL),0) / COALESCE((SELECT maxScore \n | FROM MaxScoreTable WHERE cacjContentUid = maxScoreContentEntryUid),0) * 100 * cacjWeight * (1 - (CAST(cbLateSubmissionPenalty AS REAL)/100)))\n | ELSE (COALESCE(CAST(resultScoreRaw AS REAL),0) / COALESCE((SELECT maxScore \n | FROM MaxScoreTable WHERE cacjContentUid = maxScoreContentEntryUid),0) * 100 * cacjWeight) END) AS cacheFinalWeightScoreWithPenalty, \n | \n | 0 AS lastCsnChecked\n | FROM ClazzAssignmentContentJoin\n |\t JOIN ClazzAssignment \n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid\n | \n | JOIN ClazzEnrolment\n | ON ClazzEnrolment.clazzEnrolmentClazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103 \n |\t\t\t\t\t \t \n |\t\t\t LEFT JOIN StatementEntity \n |\t ON statementUid = (SELECT statementUid \n | FROM StatementEntity \n | LEFT JOIN ClazzAssignment \n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103 \n | WHERE StatementEntity.statementContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid\n | AND StatementEntity.statementPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND StatementEntity.contentEntryRoot \n | AND StatementEntity.timestamp \n | BETWEEN CourseBlock.cbHideUntilDate\n | AND CourseBlock.cbGracePeriodDate\n | ORDER BY CASE WHEN StatementEntity.timestamp > CourseBlock.cbDeadlineDate \n | THEN StatementEntity.resultScoreScaled * (1 - (CAST(CourseBlock.cbLateSubmissionPenalty AS REAL)/100))\n | ELSE StatementEntity.resultScoreScaled END DESC, \n | StatementEntity.extensionProgress DESC, \n | StatementEntity.resultSuccess DESC LIMIT 1) \n | LEFT JOIN ClazzAssignmentRollUp\n | ON ClazzAssignmentRollUp.cacheContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid \n | AND ClazzAssignmentRollUp.cachePersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND ClazzAssignmentRollUp.cacheClazzAssignmentUid = ClazzAssignment.caUid\n | \n | \n |\t WHERE ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzAssignment.caActive\n | AND ClazzAssignmentContentJoin.cacjActive\n | AND (? = 0 OR ClazzAssignment.caClazzUid = ?)\n | AND (? = 0 OR ClazzAssignment.caUid = ?)\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | AND (COALESCE(StatementEntity.resultScoreRaw,0) >= COALESCE(ClazzAssignmentRollUp.cacheStudentScore,0)\n | AND COALESCE(StatementEntity.extensionProgress,0) >= COALESCE(ClazzAssignmentRollUp.cacheProgress,0)\n | AND COALESCE(StatementEntity.resultSuccess,0) >= COALESCE(ClazzAssignmentRollUp.cacheSuccess,0))\n | GROUP BY cacheClazzAssignmentUid, cacheContentEntryUid, cachePersonUid\n | UNION \n | SELECT clazzEnrolmentPersonUid AS cachePersonUid, \n | 0 AS cacheContentEntryUid, \n | caUid AS cacheClazzAssignmentUid, \n | COALESCE(MarkingStatement.resultScoreRaw,0) AS cacheStudentScore, \n | COALESCE(cbMaxPoints,0) AS cacheMaxScore,\n | 0 AS cacheWeight,\n | \n | COALESCE(MarkingStatement.extensionProgress,0) AS cacheProgress,\n | COALESCE(MarkingStatement.resultCompletion,'FALSE') AS cacheContentComplete, \n | COALESCE(MarkingStatement.resultSuccess,0) AS cacheSuccess,\n | (CASE WHEN SubmissionStatement.timestamp > CourseBlock.cbDeadlineDate \n | THEN CourseBlock.cbLateSubmissionPenalty \n | ELSE 0 END) AS cachePenalty,\n | \n | (CASE WHEN SubmissionStatement.timestamp > CourseBlock.cbDeadlineDate \n | THEN (COALESCE(CAST(MarkingStatement.resultScoreRaw AS REAL),0) / COALESCE(CourseBlock.cbMaxPoints,0) * \n | 100 * (1 - (CAST(cbLateSubmissionPenalty AS REAL)/100)))\n | ELSE (COALESCE(CAST(MarkingStatement.resultScoreRaw AS REAL),0) / COALESCE(cbMaxPoints,0) * \n | 100) END) AS cacheFinalWeightScoreWithPenalty, \n | \n | \n | 0 AS lastCsnChecked\n | FROM ClazzAssignment\n | JOIN ClazzEnrolment\n | ON ClazzEnrolment.clazzEnrolmentClazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103 \n | \n | LEFT JOIN StatementEntity AS SubmissionStatement\n |\t ON SubmissionStatement.statementUid = (SELECT statementUid \n | FROM StatementEntity\n | WHERE StatementEntity.statementContentEntryUid = 0\n | AND xObjectUid = ClazzAssignment.caXObjectUid\n | AND StatementEntity.statementPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND StatementEntity.timestamp \n | BETWEEN CourseBlock.cbHideUntilDate\n | AND CourseBlock.cbGracePeriodDate\n | ORDER BY timestamp DESC LIMIT 1\n | )\n | LEFT JOIN XObjectEntity AS ObjectStatementRef\n | ON ObjectStatementRef.objectStatementRefUid = SubmissionStatement.statementUid \n | \n | LEFT JOIN StatementEntity AS MarkingStatement\n | ON MarkingStatement.timestamp = (SELECT timestamp \n | FROM StatementEntity \n | WHERE xObjectUid = ObjectStatementRef.xObjectUid \n | ORDER BY timestamp DESC \n | LIMIT 1)\n | \n | WHERE ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzAssignment.caActive\n | AND ClazzAssignment.caRequireFileSubmission\n | AND (? = 0 OR ClazzAssignment.caClazzUid = ?)\n | AND (? = 0 OR ClazzAssignment.caUid = ?)\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | GROUP BY cacheClazzAssignmentUid, cacheContentEntryUid, cachePersonUid \n | \n "), void 0, void 0, void 0, trimMargin("\n |INSERT INTO ClazzAssignmentRollUp \n | (cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid, \n | cacheStudentScore, cacheMaxScore, cacheWeight, cacheProgress,\n | cacheContentComplete, cacheSuccess,cachePenalty, cacheFinalWeightScoreWithPenalty, lastCsnChecked)\n | \n | WITH MaxScoreTable (maxScore, maxScoreContentEntryUid) \n | AS (SELECT MAX(resultScoreMax), statementContentEntryUid \n | FROM StatementEntity\n | WHERE contentEntryRoot \n | GROUP BY statementContentEntryUid) \n |\n | SELECT clazzEnrolmentPersonUid AS cachePersonUid, \n | COALESCE(cacjContentUid,0) AS cacheContentEntryUid, caUid AS cacheClazzAssignmentUid, \n | COALESCE(resultScoreRaw,0) AS cacheStudentScore, \n | \n | \n | COALESCE((SELECT maxScore \n | FROM MaxScoreTable \n | WHERE cacjContentUid = maxScoreContentEntryUid), 0) AS cacheMaxScore,\n | \n | COALESCE(cacjWeight, 0) AS cacheWeight,\n | \n | \n | COALESCE(StatementEntity.extensionProgress,0) AS cacheProgress,\n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS cacheContentComplete, \n | COALESCE(StatementEntity.resultSuccess,0) AS cacheSuccess,\n | (CASE WHEN StatementEntity.timestamp > CourseBlock.cbDeadlineDate\n | THEN CourseBlock.cbLateSubmissionPenalty \n | ELSE 0 END) AS cachePenalty,\n | \n | (CASE WHEN StatementEntity.timestamp > CourseBlock.cbDeadlineDate \n | THEN (COALESCE(CAST(resultScoreRaw AS REAL),0) / COALESCE((SELECT maxScore \n | FROM MaxScoreTable WHERE cacjContentUid = maxScoreContentEntryUid),0) * 100 * cacjWeight * (1 - (CAST(cbLateSubmissionPenalty AS REAL)/100)))\n | ELSE (COALESCE(CAST(resultScoreRaw AS REAL),0) / COALESCE((SELECT maxScore \n | FROM MaxScoreTable WHERE cacjContentUid = maxScoreContentEntryUid),0) * 100 * cacjWeight) END) AS cacheFinalWeightScoreWithPenalty, \n | \n | 0 AS lastCsnChecked\n | FROM ClazzAssignmentContentJoin\n |\t JOIN ClazzAssignment \n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid\n | \n | JOIN ClazzEnrolment\n | ON ClazzEnrolment.clazzEnrolmentClazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103 \n |\t\t\t\t\t \t \n |\t\t\t LEFT JOIN StatementEntity \n |\t ON statementUid = (SELECT statementUid \n | FROM StatementEntity \n | LEFT JOIN ClazzAssignment \n | ON ClazzAssignment.caUid = ClazzAssignmentContentJoin.cacjAssignmentUid \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103 \n | WHERE StatementEntity.statementContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid\n | AND StatementEntity.statementPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND StatementEntity.contentEntryRoot \n | AND StatementEntity.timestamp \n | BETWEEN CourseBlock.cbHideUntilDate\n | AND CourseBlock.cbGracePeriodDate\n | ORDER BY CASE WHEN StatementEntity.timestamp > CourseBlock.cbDeadlineDate \n | THEN StatementEntity.resultScoreScaled * (1 - (CAST(CourseBlock.cbLateSubmissionPenalty AS REAL)/100))\n | ELSE StatementEntity.resultScoreScaled END DESC, \n | StatementEntity.extensionProgress DESC, \n | StatementEntity.resultSuccess DESC LIMIT 1) \n | LEFT JOIN ClazzAssignmentRollUp\n | ON ClazzAssignmentRollUp.cacheContentEntryUid = ClazzAssignmentContentJoin.cacjContentUid \n | AND ClazzAssignmentRollUp.cachePersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND ClazzAssignmentRollUp.cacheClazzAssignmentUid = ClazzAssignment.caUid\n | \n | \n |\t WHERE ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzAssignment.caActive\n | AND ClazzAssignmentContentJoin.cacjActive\n | AND (? = 0 OR ClazzAssignment.caClazzUid = ?)\n | AND (? = 0 OR ClazzAssignment.caUid = ?)\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | AND (COALESCE(StatementEntity.resultScoreRaw,0) >= COALESCE(ClazzAssignmentRollUp.cacheStudentScore,0)\n | AND COALESCE(StatementEntity.extensionProgress,0) >= COALESCE(ClazzAssignmentRollUp.cacheProgress,0)\n | AND COALESCE(StatementEntity.resultSuccess,0) >= COALESCE(ClazzAssignmentRollUp.cacheSuccess,0))\n | GROUP BY cacheClazzAssignmentUid, cacheContentEntryUid, cachePersonUid\n | UNION \n | SELECT clazzEnrolmentPersonUid AS cachePersonUid, \n | 0 AS cacheContentEntryUid, \n | caUid AS cacheClazzAssignmentUid, \n | COALESCE(MarkingStatement.resultScoreRaw,0) AS cacheStudentScore, \n | COALESCE(cbMaxPoints,0) AS cacheMaxScore,\n | 0 AS cacheWeight,\n | \n | COALESCE(MarkingStatement.extensionProgress,0) AS cacheProgress,\n | COALESCE(MarkingStatement.resultCompletion,'FALSE') AS cacheContentComplete, \n | COALESCE(MarkingStatement.resultSuccess,0) AS cacheSuccess,\n | (CASE WHEN SubmissionStatement.timestamp > CourseBlock.cbDeadlineDate \n | THEN CourseBlock.cbLateSubmissionPenalty \n | ELSE 0 END) AS cachePenalty,\n | \n | (CASE WHEN SubmissionStatement.timestamp > CourseBlock.cbDeadlineDate \n | THEN (COALESCE(CAST(MarkingStatement.resultScoreRaw AS REAL),0) / COALESCE(CourseBlock.cbMaxPoints,0) * \n | 100 * (1 - (CAST(cbLateSubmissionPenalty AS REAL)/100)))\n | ELSE (COALESCE(CAST(MarkingStatement.resultScoreRaw AS REAL),0) / COALESCE(cbMaxPoints,0) * \n | 100) END) AS cacheFinalWeightScoreWithPenalty, \n | \n | \n | 0 AS lastCsnChecked\n | FROM ClazzAssignment\n | JOIN ClazzEnrolment\n | ON ClazzEnrolment.clazzEnrolmentClazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103 \n | \n | LEFT JOIN StatementEntity AS SubmissionStatement\n |\t ON SubmissionStatement.statementUid = (SELECT statementUid \n | FROM StatementEntity\n | WHERE StatementEntity.statementContentEntryUid = 0\n | AND xObjectUid = ClazzAssignment.caXObjectUid\n | AND StatementEntity.statementPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND StatementEntity.timestamp \n | BETWEEN CourseBlock.cbHideUntilDate\n | AND CourseBlock.cbGracePeriodDate\n | ORDER BY timestamp DESC LIMIT 1\n | )\n | LEFT JOIN XObjectEntity AS ObjectStatementRef\n | ON ObjectStatementRef.objectStatementRefUid = SubmissionStatement.statementUid \n | \n | LEFT JOIN StatementEntity AS MarkingStatement\n | ON MarkingStatement.timestamp = (SELECT timestamp \n | FROM StatementEntity \n | WHERE xObjectUid = ObjectStatementRef.xObjectUid \n | ORDER BY timestamp DESC \n | LIMIT 1)\n | \n | WHERE ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzAssignment.caActive\n | AND ClazzAssignment.caRequireFileSubmission\n | AND (? = 0 OR ClazzAssignment.caClazzUid = ?)\n | AND (? = 0 OR ClazzAssignment.caUid = ?)\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | GROUP BY cacheClazzAssignmentUid, cacheContentEntryUid, cachePersonUid \n | \n |")), ClazzAssignmentRollUpDao_JdbcKt$cacheBestStatements$lambda(this.local$clazzUid, this.local$assignmentUid, this.local$personUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_JdbcKt.prototype.cacheBestStatements_b9bd0d$ = function (clazzUid_0, assignmentUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$cacheBestStatements_b9bd0d$(this, clazzUid_0, assignmentUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda(closure$caUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$caUid = closure$caUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda.prototype.constructor = Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$caUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda(closure$caUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda(closure$caUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$deleteCachedInactiveContent_s8cxhz$($this, caUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$caUid = caUid_0; } Coroutine$deleteCachedInactiveContent_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deleteCachedInactiveContent_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deleteCachedInactiveContent_s8cxhz$.prototype.constructor = Coroutine$deleteCachedInactiveContent_s8cxhz$; Coroutine$deleteCachedInactiveContent_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | DELETE\n | FROM ClazzAssignmentRollUp\n | WHERE cacheContentEntryUid \n | IN (SELECT cacjContentUid \n | FROM ClazzAssignmentContentJoin\n | WHERE NOT cacjActive)\n | OR (cacheClazzAssignmentUid \n | IN (SELECT caUid \n | FROM ClazzAssignment\n | WHERE caUid = ?\n | AND NOT caRequireFileSubmission) \n | AND cacheContentEntryUid = 0) \n | \n ')), ClazzAssignmentRollUpDao_JdbcKt$deleteCachedInactiveContent$lambda(this.local$caUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_JdbcKt.prototype.deleteCachedInactiveContent_s8cxhz$ = function (caUid_0, continuation_0, suspended) { var instance = new Coroutine$deleteCachedInactiveContent_s8cxhz$(this, caUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda(closure$changedAssignmentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$changedAssignmentUid = closure$changedAssignmentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda.prototype.constructor = Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$changedAssignmentUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda(closure$changedAssignmentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda(closure$changedAssignmentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$invalidateCacheByAssignment_s8cxhz$($this, changedAssignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$changedAssignmentUid = changedAssignmentUid_0; } Coroutine$invalidateCacheByAssignment_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$invalidateCacheByAssignment_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$invalidateCacheByAssignment_s8cxhz$.prototype.constructor = Coroutine$invalidateCacheByAssignment_s8cxhz$; Coroutine$invalidateCacheByAssignment_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzAssignmentRollUp \n | SET lastCsnChecked = 0\n | WHERE cacheClazzAssignmentUid = ?\n | \n ')), ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignment$lambda(this.local$changedAssignmentUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_JdbcKt.prototype.invalidateCacheByAssignment_s8cxhz$ = function (changedAssignmentUid_0, continuation_0, suspended) { var instance = new Coroutine$invalidateCacheByAssignment_s8cxhz$(this, changedAssignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda(closure$changedAssignmentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$changedAssignmentUid = closure$changedAssignmentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda.prototype.constructor = Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda; Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$changedAssignmentUid))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda(closure$changedAssignmentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda(closure$changedAssignmentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$invalidateCacheByAssignmentList_gox9k8$($this, changedAssignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$changedAssignmentUid = changedAssignmentUid_0; } Coroutine$invalidateCacheByAssignmentList_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$invalidateCacheByAssignmentList_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$invalidateCacheByAssignmentList_gox9k8$.prototype.constructor = Coroutine$invalidateCacheByAssignmentList_gox9k8$; Coroutine$invalidateCacheByAssignmentList_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzAssignmentRollUp \n | SET lastCsnChecked = 0\n | WHERE cacheClazzAssignmentUid IN (?)\n | \n '), true), ClazzAssignmentRollUpDao_JdbcKt$invalidateCacheByAssignmentList$lambda(this.local$changedAssignmentUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_JdbcKt.prototype.invalidateCacheByAssignmentList_gox9k8$ = function (changedAssignmentUid_0, continuation_0, suspended) { var instance = new Coroutine$invalidateCacheByAssignmentList_gox9k8$(this, changedAssignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ClazzAssignmentRollUp (cacheUid, cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid, cacheStudentScore, cacheMaxScore, cacheFinalWeightScoreWithPenalty, cacheWeight, cacheProgress, cacheContentComplete, cacheSuccess, cachePenalty, lastCsnChecked) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cacheUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cacheUid); } stmt.setLong_6svq3l$(2, entity.cachePersonUid); stmt.setLong_6svq3l$(3, entity.cacheContentEntryUid); stmt.setLong_6svq3l$(4, entity.cacheClazzAssignmentUid); stmt.setInt_vux9f0$(5, entity.cacheStudentScore); stmt.setInt_vux9f0$(6, entity.cacheMaxScore); stmt.setFloat_24o109$(7, entity.cacheFinalWeightScoreWithPenalty); stmt.setInt_vux9f0$(8, entity.cacheWeight); stmt.setInt_vux9f0$(9, entity.cacheProgress); stmt.setBoolean_fzusl$(10, entity.cacheContentComplete); stmt.setByte_6t1wet$(11, entity.cacheSuccess); stmt.setInt_vux9f0$(12, entity.cachePenalty); stmt.setLong_6svq3l$(13, entity.lastCsnChecked); }; ClazzAssignmentRollUpDao_JdbcKt$_insertAdapterClazzAssignmentRollUp_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzAssignmentRollUpDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentRollUpDao_JdbcKt', interfaces: [ClazzAssignmentRollUpDao]}; function ClazzAssignmentRollUpDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzAssignmentRollUpDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$cacheBestStatements_b9bd0d$_0($this, clazzUid_0, assignmentUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$assignmentUid = assignmentUid_0; this.local$personUid = personUid_0; } Coroutine$cacheBestStatements_b9bd0d$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$cacheBestStatements_b9bd0d$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$cacheBestStatements_b9bd0d$_0.prototype.constructor = Coroutine$cacheBestStatements_b9bd0d$_0; Coroutine$cacheBestStatements_b9bd0d$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.cacheBestStatements_b9bd0d$(this.local$clazzUid, this.local$assignmentUid, this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_Repo.prototype.cacheBestStatements_b9bd0d$ = function (clazzUid_0, assignmentUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$cacheBestStatements_b9bd0d$_0(this, clazzUid_0, assignmentUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$deleteCachedInactiveContent_s8cxhz$_0($this, caUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$caUid = caUid_0; } Coroutine$deleteCachedInactiveContent_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deleteCachedInactiveContent_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deleteCachedInactiveContent_s8cxhz$_0.prototype.constructor = Coroutine$deleteCachedInactiveContent_s8cxhz$_0; Coroutine$deleteCachedInactiveContent_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.deleteCachedInactiveContent_s8cxhz$(this.local$caUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_Repo.prototype.deleteCachedInactiveContent_s8cxhz$ = function (caUid_0, continuation_0, suspended) { var instance = new Coroutine$deleteCachedInactiveContent_s8cxhz$_0(this, caUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$invalidateCacheByAssignment_s8cxhz$_0($this, changedAssignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$changedAssignmentUid = changedAssignmentUid_0; } Coroutine$invalidateCacheByAssignment_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$invalidateCacheByAssignment_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$invalidateCacheByAssignment_s8cxhz$_0.prototype.constructor = Coroutine$invalidateCacheByAssignment_s8cxhz$_0; Coroutine$invalidateCacheByAssignment_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.invalidateCacheByAssignment_s8cxhz$(this.local$changedAssignmentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_Repo.prototype.invalidateCacheByAssignment_s8cxhz$ = function (changedAssignmentUid_0, continuation_0, suspended) { var instance = new Coroutine$invalidateCacheByAssignment_s8cxhz$_0(this, changedAssignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$invalidateCacheByAssignmentList_gox9k8$_0($this, changedAssignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$changedAssignmentUid = changedAssignmentUid_0; } Coroutine$invalidateCacheByAssignmentList_gox9k8$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$invalidateCacheByAssignmentList_gox9k8$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$invalidateCacheByAssignmentList_gox9k8$_0.prototype.constructor = Coroutine$invalidateCacheByAssignmentList_gox9k8$_0; Coroutine$invalidateCacheByAssignmentList_gox9k8$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.invalidateCacheByAssignmentList_gox9k8$(this.local$changedAssignmentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_Repo.prototype.invalidateCacheByAssignmentList_gox9k8$ = function (changedAssignmentUid_0, continuation_0, suspended) { var instance = new Coroutine$invalidateCacheByAssignmentList_gox9k8$_0(this, changedAssignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentRollUpDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_15($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_15.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_15.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_15.prototype.constructor = Coroutine$insertAsync_15; Coroutine$insertAsync_15.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzAssignmentRollUpDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_15(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzAssignmentRollUpDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzAssignmentRollUpDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzAssignmentRollUpDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzAssignmentRollUpDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentRollUpDao_Repo', interfaces: [ClazzAssignmentRollUpDao]}; function ClazzContentJoinDao() { } ClazzContentJoinDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzContentJoinDao', interfaces: [BaseDao]}; function ClazzContentJoinDao_JdbcKt(_db) { ClazzContentJoinDao.call(this); this._db = _db; this._insertAdapterClazzContentJoin_ = new ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral(this._db); } ClazzContentJoinDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzContentJoin_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_16($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_16.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_16.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_16.prototype.constructor = Coroutine$insertAsync_16; Coroutine$insertAsync_16.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzContentJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_16(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzContentJoinDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzContentJoin_.insertList_4ezy5m$(entityList); }; function ClazzContentJoinDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.ccjContentEntryUid); _stmt.setLong_6svq3l$(2, _entity.ccjClazzUid); _stmt.setBoolean_fzusl$(3, _entity.ccjActive); _stmt.setLong_6svq3l$(4, _entity.ccjLocalChangeSeqNum); _stmt.setLong_6svq3l$(5, _entity.ccjMasterChangeSeqNum); _stmt.setInt_vux9f0$(6, _entity.ccjLastChangedBy); _stmt.setLong_6svq3l$(7, _entity.ccjLct); _stmt.setLong_6svq3l$(8, _entity.ccjUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzContentJoinDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzContentJoin SET ccjContentEntryUid = ?, ccjClazzUid = ?, ccjActive = ?, ccjLocalChangeSeqNum = ?, ccjMasterChangeSeqNum = ?, ccjLastChangedBy = ?, ccjLct = ? WHERE ccjUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzContentJoinDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzContentJoinDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.ccjContentEntryUid); _stmt.setLong_6svq3l$(2, closure$entity.ccjClazzUid); _stmt.setBoolean_fzusl$(3, closure$entity.ccjActive); _stmt.setLong_6svq3l$(4, closure$entity.ccjLocalChangeSeqNum); _stmt.setLong_6svq3l$(5, closure$entity.ccjMasterChangeSeqNum); _stmt.setInt_vux9f0$(6, closure$entity.ccjLastChangedBy); _stmt.setLong_6svq3l$(7, closure$entity.ccjLct); _stmt.setLong_6svq3l$(8, closure$entity.ccjUid); return _stmt.executeUpdate(); }; } ClazzContentJoinDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzContentJoin SET ccjContentEntryUid = ?, ccjClazzUid = ?, ccjActive = ?, ccjLocalChangeSeqNum = ?, ccjMasterChangeSeqNum = ?, ccjLastChangedBy = ?, ccjLct = ? WHERE ccjUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzContentJoinDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_14($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_14.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_14.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_14.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_14; Coroutine$replicateOnNewNode_s8cxhz$_14.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzContentJoinReplicate(ccjPk, ccjDestination)\n | SELECT DISTINCT ClazzContentJoin.ccjUid AS ccjUid,\n | ? AS ccjDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 4398046511104 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzContentJoin \n | ON Clazz.clazzUid = ClazzContentJoin.ccjClazzUid\n | WHERE UserSession.usClientNodeId = ? \n | AND UserSession.usStatus = 1 \n | AND ClazzContentJoin.ccjLct != COALESCE(\n | (SELECT ccjVersionId\n | FROM ClazzContentJoinReplicate\n | WHERE ccjPk = ClazzContentJoin.ccjUid\n | AND ccjDestination = ?), 0) \n | /*psql ON CONFLICT(ccjPk, ccjDestination) DO UPDATE\n | SET ccjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzContentJoinReplicate(ccjPk, ccjDestination)\n | SELECT DISTINCT ClazzContentJoin.ccjUid AS ccjUid,\n | ? AS ccjDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 4398046511104 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzContentJoin \n | ON Clazz.clazzUid = ClazzContentJoin.ccjClazzUid\n | WHERE UserSession.usClientNodeId = ? \n | AND UserSession.usStatus = 1 \n | AND ClazzContentJoin.ccjLct != COALESCE(\n | (SELECT ccjVersionId\n | FROM ClazzContentJoinReplicate\n | WHERE ccjPk = ClazzContentJoin.ccjUid\n | AND ccjDestination = ?), 0) \n | ON CONFLICT(ccjPk, ccjDestination) DO UPDATE\n | SET ccjPending = true\n | \n | \n |')), ClazzContentJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_14(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_14($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_14.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_14.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_14.prototype.constructor = Coroutine$replicateOnChange_14; Coroutine$replicateOnChange_14.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzContentJoinReplicate(ccjPk, ccjDestination)\n | SELECT DISTINCT ClazzContentJoin.ccjUid AS ccjUid,\n | UserSession.usClientNodeId AS ccjDestination\n | FROM ChangeLog\n | JOIN ClazzContentJoin\n | ON ChangeLog.chTableId = 134\n | AND ChangeLog.chEntityPk = ClazzContentJoin.ccjUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzContentJoin.ccjClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 4398046511104\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzContentJoin.ccjLct != COALESCE(\n | (SELECT ccjVersionId\n | FROM ClazzContentJoinReplicate\n | WHERE ccjPk = ClazzContentJoin.ccjUid\n | AND ccjDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ccjPk, ccjDestination) DO UPDATE\n | SET ccjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzContentJoinReplicate(ccjPk, ccjDestination)\n | SELECT DISTINCT ClazzContentJoin.ccjUid AS ccjUid,\n | UserSession.usClientNodeId AS ccjDestination\n | FROM ChangeLog\n | JOIN ClazzContentJoin\n | ON ChangeLog.chTableId = 134\n | AND ChangeLog.chEntityPk = ClazzContentJoin.ccjUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzContentJoin.ccjClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 4398046511104\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzContentJoin.ccjLct != COALESCE(\n | (SELECT ccjVersionId\n | FROM ClazzContentJoinReplicate\n | WHERE ccjPk = ClazzContentJoin.ccjUid\n | AND ccjDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ccjPk, ccjDestination) DO UPDATE\n | SET ccjPending = true\n | \n | \n |')), ClazzContentJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_14(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda(closure$toggleVisibility_0, closure$changedTime_0, closure$selectedItem_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$toggleVisibility = closure$toggleVisibility_0; this.local$closure$changedTime = closure$changedTime_0; this.local$closure$selectedItem = closure$selectedItem_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda.prototype.constructor = Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda; Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$toggleVisibility); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changedTime); this.local$_stmt.setArray_wqp8hw$(3, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$selectedItem))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda(closure$toggleVisibility_0, closure$changedTime_0, closure$selectedItem_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda(closure$toggleVisibility_0, closure$changedTime_0, closure$selectedItem_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$toggleVisibilityClazzContent_cbj1f0$($this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$changedTime = changedTime_0; } Coroutine$toggleVisibilityClazzContent_cbj1f0$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityClazzContent_cbj1f0$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityClazzContent_cbj1f0$.prototype.constructor = Coroutine$toggleVisibilityClazzContent_cbj1f0$; Coroutine$toggleVisibilityClazzContent_cbj1f0$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |UPDATE ClazzContentJoin \n | SET ccjActive = ?, \n | ccjLct = ? \n | WHERE ccjContentEntryUid IN (?)\n '), true), ClazzContentJoinDao_JdbcKt$toggleVisibilityClazzContent$lambda(this.local$toggleVisibility, this.local$changedTime, this.local$selectedItem), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_JdbcKt.prototype.toggleVisibilityClazzContent_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityClazzContent_cbj1f0$(this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda$lambda(_result) { return mapRows(_result, ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda$lambda$lambda(_result)); } function Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda(closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda.prototype.constructor = Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda; Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda(closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda(closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzContentJoinDao_JdbcKt.prototype.listOfEntriesInClazz_s8cxhz$ = function (clazzUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ccjContentEntryUid \n | FROM ClazzContentJoin\n | WHERE ccjClazzUid = ?\n | AND ccjActive\n | \n ')), ClazzContentJoinDao_JdbcKt$listOfEntriesInClazz$lambda(clazzUid), continuation); }; function ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ClazzContentJoin (ccjUid, ccjContentEntryUid, ccjClazzUid, ccjActive, ccjLocalChangeSeqNum, ccjMasterChangeSeqNum, ccjLastChangedBy, ccjLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.ccjUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.ccjUid); } stmt.setLong_6svq3l$(2, entity.ccjContentEntryUid); stmt.setLong_6svq3l$(3, entity.ccjClazzUid); stmt.setBoolean_fzusl$(4, entity.ccjActive); stmt.setLong_6svq3l$(5, entity.ccjLocalChangeSeqNum); stmt.setLong_6svq3l$(6, entity.ccjMasterChangeSeqNum); stmt.setInt_vux9f0$(7, entity.ccjLastChangedBy); stmt.setLong_6svq3l$(8, entity.ccjLct); }; ClazzContentJoinDao_JdbcKt$_insertAdapterClazzContentJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzContentJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzContentJoinDao_JdbcKt', interfaces: [ClazzContentJoinDao]}; function ClazzContentJoinDao_ReplicateWrapper(_db, _dao) { ClazzContentJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_15($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_15.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_15.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_15.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_15; Coroutine$replicateOnNewNode_s8cxhz$_15.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_15(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_15($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_15.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_15.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_15.prototype.constructor = Coroutine$replicateOnChange_15; Coroutine$replicateOnChange_15.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_15(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$toggleVisibilityClazzContent_cbj1f0$_0($this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$changedTime = changedTime_0; } Coroutine$toggleVisibilityClazzContent_cbj1f0$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityClazzContent_cbj1f0$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityClazzContent_cbj1f0$_0.prototype.constructor = Coroutine$toggleVisibilityClazzContent_cbj1f0$_0; Coroutine$toggleVisibilityClazzContent_cbj1f0$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.toggleVisibilityClazzContent_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$changedTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_ReplicateWrapper.prototype.toggleVisibilityClazzContent_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityClazzContent_cbj1f0$_0(this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzContentJoinDao_ReplicateWrapper.prototype.listOfEntriesInClazz_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.listOfEntriesInClazz_s8cxhz$(clazzUid, continuation); }; ClazzContentJoinDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_17($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_17.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_17.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_17.prototype.constructor = Coroutine$insertAsync_17; Coroutine$insertAsync_17.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.ccjUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(134, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.ccjUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.ccjLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.ccjUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_17(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzContentJoinDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzContentJoinDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzContentJoinDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzContentJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzContentJoinDao_ReplicateWrapper', interfaces: [ClazzContentJoinDao]}; function ClazzContentJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzContentJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_16($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_16.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_16.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_16.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_16; Coroutine$replicateOnNewNode_s8cxhz$_16.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_16(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_16($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_16.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_16.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_16.prototype.constructor = Coroutine$replicateOnChange_16; Coroutine$replicateOnChange_16.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_16(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$toggleVisibilityClazzContent_cbj1f0$_1($this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$changedTime = changedTime_0; } Coroutine$toggleVisibilityClazzContent_cbj1f0$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityClazzContent_cbj1f0$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityClazzContent_cbj1f0$_1.prototype.constructor = Coroutine$toggleVisibilityClazzContent_cbj1f0$_1; Coroutine$toggleVisibilityClazzContent_cbj1f0$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.toggleVisibilityClazzContent_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$changedTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_Repo.prototype.toggleVisibilityClazzContent_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityClazzContent_cbj1f0$_1(this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$listOfEntriesInClazz_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$listOfEntriesInClazz_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$listOfEntriesInClazz_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$listOfEntriesInClazz_s8cxhz$.prototype.constructor = Coroutine$listOfEntriesInClazz_s8cxhz$; Coroutine$listOfEntriesInClazz_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.listOfEntriesInClazz_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_Repo.prototype.listOfEntriesInClazz_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$listOfEntriesInClazz_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzContentJoinDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_18($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_18.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_18.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_18.prototype.constructor = Coroutine$insertAsync_18; Coroutine$insertAsync_18.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzContentJoinDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_18(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzContentJoinDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzContentJoinDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzContentJoinDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzContentJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzContentJoinDao_Repo', interfaces: [ClazzContentJoinDao]}; function ClazzDao() { } ClazzDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzDao', interfaces: [BaseDao]}; function ClazzDao_JdbcKt(_db) { ClazzDao.call(this); this._db = _db; this._insertAdapterClazz_ = new ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral(this._db); } ClazzDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazz_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_19($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_19.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_19.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_19.prototype.constructor = Coroutine$insertAsync_19; Coroutine$insertAsync_19.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazz_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_19(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazz_.insertList_4ezy5m$(entityList); }; function Coroutine$ClazzDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$updateAsync$lambda; Coroutine$ClazzDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.clazzName); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.clazzDesc); this.local$_stmt.setFloat_24o109$(3, this.local$closure$entity.attendanceAverage); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.clazzHolidayUMCalendarUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$entity.clazzScheuleUMCalendarUid); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$entity.isClazzActive); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.clazzLocationUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.clazzStartTime); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$entity.clazzEndTime); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.clazzFeatures); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$entity.clazzSchoolUid); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$entity.clazzEnrolmentPolicy); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$entity.clazzTerminologyUid); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$entity.clazzMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(15, this.local$closure$entity.clazzLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(16, this.local$closure$entity.clazzLastChangedBy); this.local$_stmt.setLong_6svq3l$(17, this.local$closure$entity.clazzLct); this.local$_stmt.setString_vqvrqt$(18, this.local$closure$entity.clazzTimeZone); this.local$_stmt.setLong_6svq3l$(19, this.local$closure$entity.clazzStudentsPersonGroupUid); this.local$_stmt.setLong_6svq3l$(20, this.local$closure$entity.clazzTeachersPersonGroupUid); this.local$_stmt.setLong_6svq3l$(21, this.local$closure$entity.clazzPendingStudentsPersonGroupUid); this.local$_stmt.setLong_6svq3l$(22, this.local$closure$entity.clazzParentsPersonGroupUid); this.local$_stmt.setString_vqvrqt$(23, this.local$closure$entity.clazzCode); this.local$_stmt.setLong_6svq3l$(24, this.local$closure$entity.clazzUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_yczdf2$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_yczdf2$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_yczdf2$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_yczdf2$.prototype.constructor = Coroutine$updateAsync_yczdf2$; Coroutine$updateAsync_yczdf2$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE Clazz SET clazzName = ?, clazzDesc = ?, attendanceAverage = ?, clazzHolidayUMCalendarUid = ?, clazzScheuleUMCalendarUid = ?, isClazzActive = ?, clazzLocationUid = ?, clazzStartTime = ?, clazzEndTime = ?, clazzFeatures = ?, clazzSchoolUid = ?, clazzEnrolmentPolicy = ?, clazzTerminologyUid = ?, clazzMasterChangeSeqNum = ?, clazzLocalChangeSeqNum = ?, clazzLastChangedBy = ?, clazzLct = ?, clazzTimeZone = ?, clazzStudentsPersonGroupUid = ?, clazzTeachersPersonGroupUid = ?, clazzPendingStudentsPersonGroupUid = ?, clazzParentsPersonGroupUid = ?, clazzCode = ? WHERE clazzUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ClazzDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.updateAsync_yczdf2$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_yczdf2$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.clazzName); _stmt.setString_vqvrqt$(2, _entity.clazzDesc); _stmt.setFloat_24o109$(3, _entity.attendanceAverage); _stmt.setLong_6svq3l$(4, _entity.clazzHolidayUMCalendarUid); _stmt.setLong_6svq3l$(5, _entity.clazzScheuleUMCalendarUid); _stmt.setBoolean_fzusl$(6, _entity.isClazzActive); _stmt.setLong_6svq3l$(7, _entity.clazzLocationUid); _stmt.setLong_6svq3l$(8, _entity.clazzStartTime); _stmt.setLong_6svq3l$(9, _entity.clazzEndTime); _stmt.setLong_6svq3l$(10, _entity.clazzFeatures); _stmt.setLong_6svq3l$(11, _entity.clazzSchoolUid); _stmt.setInt_vux9f0$(12, _entity.clazzEnrolmentPolicy); _stmt.setLong_6svq3l$(13, _entity.clazzTerminologyUid); _stmt.setLong_6svq3l$(14, _entity.clazzMasterChangeSeqNum); _stmt.setLong_6svq3l$(15, _entity.clazzLocalChangeSeqNum); _stmt.setInt_vux9f0$(16, _entity.clazzLastChangedBy); _stmt.setLong_6svq3l$(17, _entity.clazzLct); _stmt.setString_vqvrqt$(18, _entity.clazzTimeZone); _stmt.setLong_6svq3l$(19, _entity.clazzStudentsPersonGroupUid); _stmt.setLong_6svq3l$(20, _entity.clazzTeachersPersonGroupUid); _stmt.setLong_6svq3l$(21, _entity.clazzPendingStudentsPersonGroupUid); _stmt.setLong_6svq3l$(22, _entity.clazzParentsPersonGroupUid); _stmt.setString_vqvrqt$(23, _entity.clazzCode); _stmt.setLong_6svq3l$(24, _entity.clazzUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Clazz SET clazzName = ?, clazzDesc = ?, attendanceAverage = ?, clazzHolidayUMCalendarUid = ?, clazzScheuleUMCalendarUid = ?, isClazzActive = ?, clazzLocationUid = ?, clazzStartTime = ?, clazzEndTime = ?, clazzFeatures = ?, clazzSchoolUid = ?, clazzEnrolmentPolicy = ?, clazzTerminologyUid = ?, clazzMasterChangeSeqNum = ?, clazzLocalChangeSeqNum = ?, clazzLastChangedBy = ?, clazzLct = ?, clazzTimeZone = ?, clazzStudentsPersonGroupUid = ?, clazzTeachersPersonGroupUid = ?, clazzPendingStudentsPersonGroupUid = ?, clazzParentsPersonGroupUid = ?, clazzCode = ? WHERE clazzUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.clazzName); _stmt.setString_vqvrqt$(2, closure$entity.clazzDesc); _stmt.setFloat_24o109$(3, closure$entity.attendanceAverage); _stmt.setLong_6svq3l$(4, closure$entity.clazzHolidayUMCalendarUid); _stmt.setLong_6svq3l$(5, closure$entity.clazzScheuleUMCalendarUid); _stmt.setBoolean_fzusl$(6, closure$entity.isClazzActive); _stmt.setLong_6svq3l$(7, closure$entity.clazzLocationUid); _stmt.setLong_6svq3l$(8, closure$entity.clazzStartTime); _stmt.setLong_6svq3l$(9, closure$entity.clazzEndTime); _stmt.setLong_6svq3l$(10, closure$entity.clazzFeatures); _stmt.setLong_6svq3l$(11, closure$entity.clazzSchoolUid); _stmt.setInt_vux9f0$(12, closure$entity.clazzEnrolmentPolicy); _stmt.setLong_6svq3l$(13, closure$entity.clazzTerminologyUid); _stmt.setLong_6svq3l$(14, closure$entity.clazzMasterChangeSeqNum); _stmt.setLong_6svq3l$(15, closure$entity.clazzLocalChangeSeqNum); _stmt.setInt_vux9f0$(16, closure$entity.clazzLastChangedBy); _stmt.setLong_6svq3l$(17, closure$entity.clazzLct); _stmt.setString_vqvrqt$(18, closure$entity.clazzTimeZone); _stmt.setLong_6svq3l$(19, closure$entity.clazzStudentsPersonGroupUid); _stmt.setLong_6svq3l$(20, closure$entity.clazzTeachersPersonGroupUid); _stmt.setLong_6svq3l$(21, closure$entity.clazzPendingStudentsPersonGroupUid); _stmt.setLong_6svq3l$(22, closure$entity.clazzParentsPersonGroupUid); _stmt.setString_vqvrqt$(23, closure$entity.clazzCode); _stmt.setLong_6svq3l$(24, closure$entity.clazzUid); return _stmt.executeUpdate(); }; } ClazzDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Clazz SET clazzName = ?, clazzDesc = ?, attendanceAverage = ?, clazzHolidayUMCalendarUid = ?, clazzScheuleUMCalendarUid = ?, isClazzActive = ?, clazzLocationUid = ?, clazzStartTime = ?, clazzEndTime = ?, clazzFeatures = ?, clazzSchoolUid = ?, clazzEnrolmentPolicy = ?, clazzTerminologyUid = ?, clazzMasterChangeSeqNum = ?, clazzLocalChangeSeqNum = ?, clazzLastChangedBy = ?, clazzLct = ?, clazzTimeZone = ?, clazzStudentsPersonGroupUid = ?, clazzTeachersPersonGroupUid = ?, clazzPendingStudentsPersonGroupUid = ?, clazzParentsPersonGroupUid = ?, clazzCode = ? WHERE clazzUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_17($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_17.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_17.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_17.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_17; Coroutine$replicateOnNewNode_s8cxhz$_17.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzReplicate(clazzPk, clazzDestination)\n | SELECT DISTINCT Clazz.clazzUid AS clazzUid,\n | ? AS clazzDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | WHERE UserSession.usClientNodeId = ? \n | AND Clazz.clazzLct != COALESCE(\n | (SELECT clazzVersionId\n | FROM ClazzReplicate\n | WHERE clazzPk = Clazz.clazzUid\n | AND clazzDestination = ?), 0) \n | /*psql ON CONFLICT(clazzPk, clazzDestination) DO UPDATE\n | SET clazzPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzReplicate(clazzPk, clazzDestination)\n | SELECT DISTINCT Clazz.clazzUid AS clazzUid,\n | ? AS clazzDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | WHERE UserSession.usClientNodeId = ? \n | AND Clazz.clazzLct != COALESCE(\n | (SELECT clazzVersionId\n | FROM ClazzReplicate\n | WHERE clazzPk = Clazz.clazzUid\n | AND clazzDestination = ?), 0) \n | ON CONFLICT(clazzPk, clazzDestination) DO UPDATE\n | SET clazzPending = true\n | \n | \n |')), ClazzDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_17(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda; Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_17($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_17.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_17.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_17.prototype.constructor = Coroutine$replicateOnChange_17; Coroutine$replicateOnChange_17.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzReplicate(clazzPk, clazzDestination)\n | SELECT DISTINCT Clazz.clazzUid AS clazzUid,\n | UserSession.usClientNodeId AS clazzDestination\n | FROM ChangeLog\n | JOIN Clazz\n | ON ChangeLog.chTableId = 6\n | AND ChangeLog.chEntityPk = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Clazz.clazzLct != COALESCE(\n | (SELECT clazzVersionId\n | FROM ClazzReplicate\n | WHERE clazzPk = Clazz.clazzUid\n | AND clazzDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(clazzPk, clazzDestination) DO UPDATE\n | SET clazzPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzReplicate(clazzPk, clazzDestination)\n | SELECT DISTINCT Clazz.clazzUid AS clazzUid,\n | UserSession.usClientNodeId AS clazzDestination\n | FROM ChangeLog\n | JOIN Clazz\n | ON ChangeLog.chTableId = 6\n | AND ChangeLog.chEntityPk = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Clazz.clazzLct != COALESCE(\n | (SELECT clazzVersionId\n | FROM ClazzReplicate\n | WHERE clazzPk = Clazz.clazzUid\n | AND clazzDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(clazzPk, clazzDestination) DO UPDATE\n | SET clazzPending = true\n | \n | \n |')), ClazzDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_17(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var $receiver = new Clazz(); $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; return $receiver; }; } function ClazzDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function ClazzDao_JdbcKt$findByUid$lambda(closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); return useResults(_stmt.executeQuery(), ClazzDao_JdbcKt$findByUid$lambda$lambda); }; } ClazzDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Clazz WHERE clazzUid = ?'), ClazzDao_JdbcKt$findByUid$lambda(uid)); }; function ClazzDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var $receiver = new Clazz(); $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; return $receiver; }; } function ClazzDao_JdbcKt$findByUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findByUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda(this$ClazzDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; } Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda; Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, new PreparedStatementConfig('SELECT * From Clazz WHERE clazzUid = ?'), ClazzDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findByUidLive$lambda(this$ClazzDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findByUidLive$lambda(this$ClazzDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { return new LiveDataImpl(this._db, listOf_0('Clazz'), ClazzDao_JdbcKt$findByUidLive$lambda(this, uid)); }; function ClazzDao_JdbcKt$findByClazzCode$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var $receiver = new Clazz(); $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; return $receiver; }; } function ClazzDao_JdbcKt$findByClazzCode$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzDao_JdbcKt$findByClazzCode$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda(closure$code_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$code = closure$code_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda; Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$code); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findByClazzCode$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findByClazzCode$lambda(closure$code_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findByClazzCode$lambda(closure$code_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.findByClazzCode_61zpoe$ = function (code, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM Clazz WHERE clazzCode = ?'), ClazzDao_JdbcKt$findByClazzCode$lambda(code), continuation); }; function ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var $receiver = new Clazz(); $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; return $receiver; }; } function ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda(closure$code_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$code = closure$code_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda; Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$code); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda(closure$code_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda(closure$code_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.findByClazzCodeFromWeb_61zpoe$ = function (code, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM Clazz WHERE clazzCode = ?'), ClazzDao_JdbcKt$findByClazzCodeFromWeb$lambda(code), continuation); }; function ClazzDao_JdbcKt$findAllLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var $receiver = new Clazz(); $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; return $receiver; }; } function ClazzDao_JdbcKt$findAllLive$lambda$lambda$lambda(_result) { return mapRows(_result, ClazzDao_JdbcKt$findAllLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda; Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findAllLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllLive$lambda$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllLive$lambda$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$ClazzDao_JdbcKt$findAllLive$lambda(this$ClazzDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; } Coroutine$ClazzDao_JdbcKt$findAllLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllLive$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllLive$lambda; Coroutine$ClazzDao_JdbcKt$findAllLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM Clazz WHERE CAST(isClazzActive AS INTEGER) = 1'), ClazzDao_JdbcKt$findAllLive$lambda$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllLive$lambda(this$ClazzDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllLive$lambda(this$ClazzDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.findAllLive = function () { return new LiveDataImpl(this._db, listOf_0('Clazz'), ClazzDao_JdbcKt$findAllLive$lambda(this)); }; function ClazzDao_JdbcKt$findAll$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var $receiver = new Clazz(); $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; return $receiver; }; } function ClazzDao_JdbcKt$findAll$lambda$lambda(_result) { return mapRows(_result, ClazzDao_JdbcKt$findAll$lambda$lambda$lambda(_result)); } function ClazzDao_JdbcKt$findAll$lambda(_stmt) { return useResults(_stmt.executeQuery(), ClazzDao_JdbcKt$findAll$lambda$lambda); } ClazzDao_JdbcKt.prototype.findAll = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Clazz WHERE CAST(isClazzActive AS INTEGER) = 1'), ClazzDao_JdbcKt$findAll$lambda); }; function ClazzDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var $receiver = new Clazz(); $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; return $receiver; }; } function ClazzDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda; Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM Clazz WHERE clazzUid = ?'), ClazzDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var _tmp_HolidayCalendar_nullCount = 0; var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarName = closure$_result.getString_61zpoe$('umCalendarName'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarCategory = closure$_result.getInt_61zpoe$('umCalendarCategory'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarActive = closure$_result.getBoolean_61zpoe$('umCalendarActive'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarMasterChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarLocalChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarLastChangedBy = closure$_result.getInt_61zpoe$('umCalendarLastChangedBy'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarLct = closure$_result.getLong_61zpoe$('umCalendarLct'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_HolidayCalendar_isAllNull = _tmp_HolidayCalendar_nullCount === 8; var _tmp_School_nullCount = 0; var _tmp_schoolUid = closure$_result.getLong_61zpoe$('schoolUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolName = closure$_result.getString_61zpoe$('schoolName'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolDesc = closure$_result.getString_61zpoe$('schoolDesc'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolAddress = closure$_result.getString_61zpoe$('schoolAddress'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolActive = closure$_result.getBoolean_61zpoe$('schoolActive'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolPhoneNumber = closure$_result.getString_61zpoe$('schoolPhoneNumber'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolGender = closure$_result.getInt_61zpoe$('schoolGender'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolHolidayCalendarUid = closure$_result.getLong_61zpoe$('schoolHolidayCalendarUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolFeatures = closure$_result.getLong_61zpoe$('schoolFeatures'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLocationLong = closure$_result.getDouble_61zpoe$('schoolLocationLong'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLocationLatt = closure$_result.getDouble_61zpoe$('schoolLocationLatt'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolEmailAddress = closure$_result.getString_61zpoe$('schoolEmailAddress'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('schoolTeachersPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolStudentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolCode = closure$_result.getString_61zpoe$('schoolCode'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolMasterChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLocalChangeSeqNum = closure$_result.getLong_61zpoe$('schoolLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLastChangedBy = closure$_result.getInt_61zpoe$('schoolLastChangedBy'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLct = closure$_result.getLong_61zpoe$('schoolLct'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolTimeZone = closure$_result.getString_61zpoe$('schoolTimeZone'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_School_isAllNull = _tmp_School_nullCount === 21; var _tmp_CourseTerminology_nullCount = 0; var _tmp_ctUid = closure$_result.getLong_61zpoe$('ctUid'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_ctTitle = closure$_result.getString_61zpoe$('ctTitle'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_ctTerminology = closure$_result.getString_61zpoe$('ctTerminology'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_ctLct = closure$_result.getLong_61zpoe$('ctLct'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_CourseTerminology_isAllNull = _tmp_CourseTerminology_nullCount === 4; var $receiver = new ClazzWithHolidayCalendarAndSchoolAndTerminology(); $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; if (!_tmp_HolidayCalendar_isAllNull) { var $receiver_0 = new HolidayCalendar(); $receiver_0.umCalendarUid = _tmp_umCalendarUid; $receiver_0.umCalendarName = _tmp_umCalendarName; $receiver_0.umCalendarCategory = _tmp_umCalendarCategory; $receiver_0.umCalendarActive = _tmp_umCalendarActive; $receiver_0.umCalendarMasterChangeSeqNum = _tmp_umCalendarMasterChangeSeqNum; $receiver_0.umCalendarLocalChangeSeqNum = _tmp_umCalendarLocalChangeSeqNum; $receiver_0.umCalendarLastChangedBy = _tmp_umCalendarLastChangedBy; $receiver_0.umCalendarLct = _tmp_umCalendarLct; $receiver.holidayCalendar = $receiver_0; } if (!_tmp_School_isAllNull) { var $receiver_1 = new School(); $receiver_1.schoolUid = _tmp_schoolUid; $receiver_1.schoolName = _tmp_schoolName; $receiver_1.schoolDesc = _tmp_schoolDesc; $receiver_1.schoolAddress = _tmp_schoolAddress; $receiver_1.schoolActive = _tmp_schoolActive; $receiver_1.schoolPhoneNumber = _tmp_schoolPhoneNumber; $receiver_1.schoolGender = _tmp_schoolGender; $receiver_1.schoolHolidayCalendarUid = _tmp_schoolHolidayCalendarUid; $receiver_1.schoolFeatures = _tmp_schoolFeatures; $receiver_1.schoolLocationLong = _tmp_schoolLocationLong; $receiver_1.schoolLocationLatt = _tmp_schoolLocationLatt; $receiver_1.schoolEmailAddress = _tmp_schoolEmailAddress; $receiver_1.schoolTeachersPersonGroupUid = _tmp_schoolTeachersPersonGroupUid; $receiver_1.schoolStudentsPersonGroupUid = _tmp_schoolStudentsPersonGroupUid; $receiver_1.schoolPendingStudentsPersonGroupUid = _tmp_schoolPendingStudentsPersonGroupUid; $receiver_1.schoolCode = _tmp_schoolCode; $receiver_1.schoolMasterChangeSeqNum = _tmp_schoolMasterChangeSeqNum; $receiver_1.schoolLocalChangeSeqNum = _tmp_schoolLocalChangeSeqNum; $receiver_1.schoolLastChangedBy = _tmp_schoolLastChangedBy; $receiver_1.schoolLct = _tmp_schoolLct; $receiver_1.schoolTimeZone = _tmp_schoolTimeZone; $receiver.school = $receiver_1; } if (!_tmp_CourseTerminology_isAllNull) { var $receiver_2 = new CourseTerminology(); $receiver_2.ctUid = _tmp_ctUid; $receiver_2.ctTitle = _tmp_ctTitle; $receiver_2.ctTerminology = _tmp_ctTerminology; $receiver_2.ctLct = _tmp_ctLct; $receiver.terminology = $receiver_2; } return $receiver; }; } function ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda; Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.findByUidWithHolidayCalendarAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Clazz.*, \n | HolidayCalendar.*, \n | School.*,\n | CourseTerminology.*\n | FROM Clazz \n | LEFT JOIN HolidayCalendar \n | ON Clazz.clazzHolidayUMCalendarUid = HolidayCalendar.umCalendarUid\n | \n | LEFT JOIN School \n | ON School.schoolUid = Clazz.clazzSchoolUid\n | \n | LEFT JOIN CourseTerminology\n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid\n | WHERE Clazz.clazzUid = ?\n ')), ClazzDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(uid), continuation); }; function ClazzDao_JdbcKt$findAllClazzesBySchool$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var $receiver = new Clazz(); $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; return $receiver; }; } function ClazzDao_JdbcKt$findAllClazzesBySchool$lambda$lambda(_result) { return mapRows(_result, ClazzDao_JdbcKt$findAllClazzesBySchool$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda(closure$schoolUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$schoolUid = closure$schoolUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$schoolUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findAllClazzesBySchool$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllClazzesBySchool$lambda(closure$schoolUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchool$lambda(closure$schoolUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.findAllClazzesBySchool_s8cxhz$ = function (schoolUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM Clazz WHERE clazzSchoolUid = ? AND CAST(isClazzActive AS INTEGER) = 1 '), ClazzDao_JdbcKt$findAllClazzesBySchool$lambda(schoolUid), continuation); }; function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral(this$ClazzDao_JdbcKt, closure$schoolUid) { this.this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt; this.closure$schoolUid = closure$schoolUid; DataSourceFactory.call(this); } function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var $receiver = new Clazz(); $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; return $receiver; }; } function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda(closure$schoolUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$schoolUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda(closure$schoolUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda(closure$schoolUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda(this$ClazzDao_JdbcKt_0, closure$schoolUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM (SELECT * FROM Clazz WHERE clazzSchoolUid = ? AND CAST(isClazzActive AS INTEGER) = 1 ) LIMIT ? OFFSET ?'), ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda$lambda(this.local$closure$schoolUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda(this$ClazzDao_JdbcKt_0, closure$schoolUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda(this$ClazzDao_JdbcKt_0, closure$schoolUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ClazzDao_JdbcKt._db, listOf_0('Clazz'), ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getData$lambda(this.this$ClazzDao_JdbcKt, this.closure$schoolUid, _limit, _offset)); }; function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda(closure$schoolUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$schoolUid = closure$schoolUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$schoolUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda(closure$schoolUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda(closure$schoolUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda(this$ClazzDao_JdbcKt_0, closure$schoolUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$schoolUid = closure$schoolUid_0; } Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda; Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, new PreparedStatementConfig('SELECT COUNT(*) FROM (SELECT * FROM Clazz WHERE clazzSchoolUid = ? AND CAST(isClazzActive AS INTEGER) = 1 ) '), ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda$lambda(this.local$closure$schoolUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda(this$ClazzDao_JdbcKt_0, closure$schoolUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda(this$ClazzDao_JdbcKt_0, closure$schoolUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ClazzDao_JdbcKt._db, listOf_0('Clazz'), ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral$getLength$lambda(this.this$ClazzDao_JdbcKt, this.closure$schoolUid)); }; ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ClazzDao_JdbcKt.prototype.findAllClazzesBySchoolLive_s8cxhz$ = function (schoolUid) { return new ClazzDao_JdbcKt$findAllClazzesBySchoolLive$ObjectLiteral(this, schoolUid); }; function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral(this$ClazzDao_JdbcKt, closure$currentTime, closure$permission, closure$accountPersonUid, closure$searchQuery, closure$excludeSelectedClazzList, closure$excludeSchoolUid, closure$filter, closure$selectedSchool, closure$sortOrder) { this.this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt; this.closure$currentTime = closure$currentTime; this.closure$permission = closure$permission; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$searchQuery = closure$searchQuery; this.closure$excludeSelectedClazzList = closure$excludeSelectedClazzList; this.closure$excludeSchoolUid = closure$excludeSchoolUid; this.closure$filter = closure$filter; this.closure$selectedSchool = closure$selectedSchool; this.closure$sortOrder = closure$sortOrder; DataSourceFactory.call(this); } function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_numStudents = closure$_result.getInt_61zpoe$('numStudents'); var _tmp_numTeachers = closure$_result.getInt_61zpoe$('numTeachers'); var _tmp_teacherNames = closure$_result.getString_61zpoe$('teacherNames'); var _tmp_lastRecorded = closure$_result.getLong_61zpoe$('lastRecorded'); var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var _tmp_ClazzEnrolment_nullCount = 0; var _tmp_clazzEnrolmentUid = closure$_result.getLong_61zpoe$('clazzEnrolmentUid'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_clazzEnrolmentPersonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentPersonUid'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_clazzEnrolmentClazzUid = closure$_result.getLong_61zpoe$('clazzEnrolmentClazzUid'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_clazzEnrolmentDateJoined = closure$_result.getLong_61zpoe$('clazzEnrolmentDateJoined'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_clazzEnrolmentDateLeft = closure$_result.getLong_61zpoe$('clazzEnrolmentDateLeft'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_clazzEnrolmentRole = closure$_result.getInt_61zpoe$('clazzEnrolmentRole'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_clazzEnrolmentAttendancePercentage = closure$_result.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_clazzEnrolmentActive = closure$_result.getBoolean_61zpoe$('clazzEnrolmentActive'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_clazzEnrolmentLeavingReasonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_clazzEnrolmentOutcome = closure$_result.getInt_61zpoe$('clazzEnrolmentOutcome'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_clazzEnrolmentLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_clazzEnrolmentMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_clazzEnrolmentLastChangedBy = closure$_result.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_clazzEnrolmentLct = closure$_result.getLong_61zpoe$('clazzEnrolmentLct'); if (closure$_result.wasNull()) { _tmp_ClazzEnrolment_nullCount = _tmp_ClazzEnrolment_nullCount + 1 | 0; } var _tmp_ClazzEnrolment_isAllNull = _tmp_ClazzEnrolment_nullCount === 14; var _tmp_CourseTerminology_nullCount = 0; var _tmp_ctUid = closure$_result.getLong_61zpoe$('ctUid'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_ctTitle = closure$_result.getString_61zpoe$('ctTitle'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_ctTerminology = closure$_result.getString_61zpoe$('ctTerminology'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_ctLct = closure$_result.getLong_61zpoe$('ctLct'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_CourseTerminology_isAllNull = _tmp_CourseTerminology_nullCount === 4; var $receiver = new ClazzWithListDisplayDetails(); $receiver.numStudents = _tmp_numStudents; $receiver.numTeachers = _tmp_numTeachers; $receiver.teacherNames = _tmp_teacherNames; $receiver.lastRecorded = _tmp_lastRecorded; $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; if (!_tmp_ClazzEnrolment_isAllNull) { var $receiver_0 = new ClazzEnrolment(); $receiver_0.clazzEnrolmentUid = _tmp_clazzEnrolmentUid; $receiver_0.clazzEnrolmentPersonUid = _tmp_clazzEnrolmentPersonUid; $receiver_0.clazzEnrolmentClazzUid = _tmp_clazzEnrolmentClazzUid; $receiver_0.clazzEnrolmentDateJoined = _tmp_clazzEnrolmentDateJoined; $receiver_0.clazzEnrolmentDateLeft = _tmp_clazzEnrolmentDateLeft; $receiver_0.clazzEnrolmentRole = _tmp_clazzEnrolmentRole; $receiver_0.clazzEnrolmentAttendancePercentage = _tmp_clazzEnrolmentAttendancePercentage; $receiver_0.clazzEnrolmentActive = _tmp_clazzEnrolmentActive; $receiver_0.clazzEnrolmentLeavingReasonUid = _tmp_clazzEnrolmentLeavingReasonUid; $receiver_0.clazzEnrolmentOutcome = _tmp_clazzEnrolmentOutcome; $receiver_0.clazzEnrolmentLocalChangeSeqNum = _tmp_clazzEnrolmentLocalChangeSeqNum; $receiver_0.clazzEnrolmentMasterChangeSeqNum = _tmp_clazzEnrolmentMasterChangeSeqNum; $receiver_0.clazzEnrolmentLastChangedBy = _tmp_clazzEnrolmentLastChangedBy; $receiver_0.clazzEnrolmentLct = _tmp_clazzEnrolmentLct; $receiver.clazzActiveEnrolment = $receiver_0; } if (!_tmp_CourseTerminology_isAllNull) { var $receiver_1 = new CourseTerminology(); $receiver_1.ctUid = _tmp_ctUid; $receiver_1.ctTitle = _tmp_ctTitle; $receiver_1.ctTerminology = _tmp_ctTerminology; $receiver_1.ctLct = _tmp_ctLct; $receiver.terminology = $receiver_1; } return $receiver; }; } function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda(closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$permission = closure$permission_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$excludeSelectedClazzList = closure$excludeSelectedClazzList_0; this.local$closure$excludeSchoolUid = closure$excludeSchoolUid_0; this.local$closure$filter = closure$filter_0; this.local$closure$selectedSchool = closure$selectedSchool_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$accountPersonUid); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$searchQuery); this.local$_stmt.setArray_wqp8hw$(7, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$excludeSelectedClazzList))); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$excludeSchoolUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$excludeSchoolUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$excludeSchoolUid); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$filter); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$filter); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(15, this.local$closure$selectedSchool); this.local$_stmt.setLong_6svq3l$(16, this.local$closure$selectedSchool); this.local$_stmt.setInt_vux9f0$(17, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(18, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(19, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(20, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(21, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(22, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda(closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda(closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$permission = closure$permission_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$excludeSelectedClazzList = closure$excludeSelectedClazzList_0; this.local$closure$excludeSchoolUid = closure$excludeSchoolUid_0; this.local$closure$filter = closure$filter_0; this.local$closure$selectedSchool = closure$selectedSchool_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT Clazz.*, ClazzEnrolment.*,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1000 \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numStudents,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1001\n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numTeachers,\n | '' AS teacherNames,\n | 0 AS lastRecorded,\n | CourseTerminology.*\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | ?\n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | LEFT JOIN ClazzEnrolment \n | ON ClazzEnrolment.clazzEnrolmentUid =\n | COALESCE(\n | (SELECT ClazzEnrolment.clazzEnrolmentUid \n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid LIMIT 1), 0)\n | LEFT JOIN CourseTerminology \n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid \n |\n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND CAST(Clazz.isClazzActive AS INTEGER) = 1\n | AND Clazz.clazzName like ?\n | AND (Clazz.clazzUid NOT IN (?))\n | AND ( ? = 0 OR Clazz.clazzUid NOT IN (SELECT cl.clazzUid FROM Clazz AS cl WHERE cl.clazzSchoolUid = ?) ) \n | AND ( ? = 0 OR Clazz.clazzSchoolUid = 0 )\n | AND ( ? = 0 OR (CASE WHEN ? = 5 \n | THEN ? BETWEEN Clazz.clazzStartTime AND Clazz.clazzEndTime\n | ELSE ? > Clazz.clazzEndTime \n | END))\n | AND ( ? = 0 OR Clazz.clazzSchoolUid = ?)\n | GROUP BY Clazz.clazzUid, ClazzEnrolment.clazzEnrolmentUid, CourseTerminology.ctUid\n | ORDER BY CASE ?\n | WHEN 3 THEN Clazz.attendanceAverage\n | ELSE 0\n | END ASC,\n | CASE ?\n | WHEN 1 THEN Clazz.clazzName\n | ELSE ''\n | END ASC,\n | CASE ?\n | WHEN 4 THEN Clazz.attendanceAverage\n | ELSE 0\n | END DESC,\n | CASE ?\n | WHEN 2 THEN clazz.Clazzname\n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ?\n "), true), ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda$lambda(this.local$closure$currentTime, this.local$closure$permission, this.local$closure$accountPersonUid, this.local$closure$searchQuery, this.local$closure$excludeSelectedClazzList, this.local$closure$excludeSchoolUid, this.local$closure$filter, this.local$closure$selectedSchool, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ClazzDao_JdbcKt._db, listOf(['Clazz', 'ClazzEnrolment', 'ScopedGrant', 'PersonGroupMember', 'CourseTerminology']), ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getData$lambda(this.this$ClazzDao_JdbcKt, this.closure$currentTime, this.closure$permission, this.closure$accountPersonUid, this.closure$searchQuery, this.closure$excludeSelectedClazzList, this.closure$excludeSchoolUid, this.closure$filter, this.closure$selectedSchool, this.closure$sortOrder, _limit, _offset)); }; function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda(closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$permission = closure$permission_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$excludeSelectedClazzList = closure$excludeSelectedClazzList_0; this.local$closure$excludeSchoolUid = closure$excludeSchoolUid_0; this.local$closure$filter = closure$filter_0; this.local$closure$selectedSchool = closure$selectedSchool_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$accountPersonUid); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$searchQuery); this.local$_stmt.setArray_wqp8hw$(7, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$excludeSelectedClazzList))); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$excludeSchoolUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$excludeSchoolUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$excludeSchoolUid); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$filter); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$filter); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(15, this.local$closure$selectedSchool); this.local$_stmt.setLong_6svq3l$(16, this.local$closure$selectedSchool); this.local$_stmt.setInt_vux9f0$(17, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(18, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(19, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(20, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda(closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda(closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$permission = closure$permission_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$excludeSelectedClazzList = closure$excludeSelectedClazzList_0; this.local$closure$excludeSchoolUid = closure$excludeSchoolUid_0; this.local$closure$filter = closure$filter_0; this.local$closure$selectedSchool = closure$selectedSchool_0; this.local$closure$sortOrder = closure$sortOrder_0; } Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda; Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Clazz.*, ClazzEnrolment.*,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1000 \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numStudents,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1001\n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numTeachers,\n | '' AS teacherNames,\n | 0 AS lastRecorded,\n | CourseTerminology.*\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | ?\n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | LEFT JOIN ClazzEnrolment \n | ON ClazzEnrolment.clazzEnrolmentUid =\n | COALESCE(\n | (SELECT ClazzEnrolment.clazzEnrolmentUid \n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid LIMIT 1), 0)\n | LEFT JOIN CourseTerminology \n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid \n |\n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND CAST(Clazz.isClazzActive AS INTEGER) = 1\n | AND Clazz.clazzName like ?\n | AND (Clazz.clazzUid NOT IN (?))\n | AND ( ? = 0 OR Clazz.clazzUid NOT IN (SELECT cl.clazzUid FROM Clazz AS cl WHERE cl.clazzSchoolUid = ?) ) \n | AND ( ? = 0 OR Clazz.clazzSchoolUid = 0 )\n | AND ( ? = 0 OR (CASE WHEN ? = 5 \n | THEN ? BETWEEN Clazz.clazzStartTime AND Clazz.clazzEndTime\n | ELSE ? > Clazz.clazzEndTime \n | END))\n | AND ( ? = 0 OR Clazz.clazzSchoolUid = ?)\n | GROUP BY Clazz.clazzUid, ClazzEnrolment.clazzEnrolmentUid, CourseTerminology.ctUid\n | ORDER BY CASE ?\n | WHEN 3 THEN Clazz.attendanceAverage\n | ELSE 0\n | END ASC,\n | CASE ?\n | WHEN 1 THEN Clazz.clazzName\n | ELSE ''\n | END ASC,\n | CASE ?\n | WHEN 4 THEN Clazz.attendanceAverage\n | ELSE 0\n | END DESC,\n | CASE ?\n | WHEN 2 THEN clazz.Clazzname\n | ELSE ''\n | END DESC\n | ) \n "), true), ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda$lambda(this.local$closure$currentTime, this.local$closure$permission, this.local$closure$accountPersonUid, this.local$closure$searchQuery, this.local$closure$excludeSelectedClazzList, this.local$closure$excludeSchoolUid, this.local$closure$filter, this.local$closure$selectedSchool, this.local$closure$sortOrder), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$permission_0, closure$accountPersonUid_0, closure$searchQuery_0, closure$excludeSelectedClazzList_0, closure$excludeSchoolUid_0, closure$filter_0, closure$selectedSchool_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ClazzDao_JdbcKt._db, listOf(['Clazz', 'ClazzEnrolment', 'ScopedGrant', 'PersonGroupMember', 'CourseTerminology']), ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral$getLength$lambda(this.this$ClazzDao_JdbcKt, this.closure$currentTime, this.closure$permission, this.closure$accountPersonUid, this.closure$searchQuery, this.closure$excludeSelectedClazzList, this.closure$excludeSchoolUid, this.closure$filter, this.closure$selectedSchool, this.closure$sortOrder)); }; ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ClazzDao_JdbcKt.prototype.findClazzesWithPermission_dchjmd$ = function (searchQuery, accountPersonUid, excludeSelectedClazzList, excludeSchoolUid, sortOrder, filter, currentTime, permission, selectedSchool) { return new ClazzDao_JdbcKt$findClazzesWithPermission$ObjectLiteral(this, currentTime, permission, accountPersonUid, searchQuery, excludeSelectedClazzList, excludeSchoolUid, filter, selectedSchool, sortOrder); }; function ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_uid = closure$_result.getLong_61zpoe$('uid'); var _tmp_labelName = closure$_result.getString_61zpoe$('labelName'); var $receiver = new UidAndLabel(); $receiver.uid = _tmp_uid; $receiver.labelName = _tmp_labelName; return $receiver; }; } function ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda$lambda(_result) { return mapRows(_result, ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda(closure$ids_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$ids = closure$ids_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda; Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$ids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda(closure$ids_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda(closure$ids_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.getClassNamesFromListOfIds_gox9k8$ = function (ids, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT Clazz.clazzUid AS uid, Clazz.clazzName AS labelName From Clazz WHERE clazzUid IN (?)', true), ClazzDao_JdbcKt$getClassNamesFromListOfIds$lambda(ids), continuation); }; function ClazzDao_JdbcKt$findByClazzName$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var $receiver = new Clazz(); $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; return $receiver; }; } function ClazzDao_JdbcKt$findByClazzName$lambda$lambda(_result) { return mapRows(_result, ClazzDao_JdbcKt$findByClazzName$lambda$lambda$lambda(_result)); } function ClazzDao_JdbcKt$findByClazzName$lambda(closure$name) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$name); return useResults(_stmt.executeQuery(), ClazzDao_JdbcKt$findByClazzName$lambda$lambda); }; } ClazzDao_JdbcKt.prototype.findByClazzName_61zpoe$ = function (name) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Clazz WHERE clazzName = ? and CAST(isClazzActive AS INTEGER) = 1'), ClazzDao_JdbcKt$findByClazzName$lambda(name)); }; function Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda(closure$clazzUid_0, closure$timeChanged_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$timeChanged = closure$timeChanged_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda; Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$timeChanged); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda(closure$clazzUid_0, closure$timeChanged_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda(closure$clazzUid_0, closure$timeChanged_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$($this, clazzUid_0, timeChanged_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$timeChanged = timeChanged_0; } Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$.prototype.constructor = Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$; Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Clazz \n | SET attendanceAverage = \n | COALESCE(CAST(\n | (SELECT SUM(clazzLogNumPresent) \n | FROM ClazzLog \n | WHERE clazzLogClazzUid = ?\n | AND clazzLogStatusFlag = 4) AS REAL) /\n | \n | CAST(MAX(1.0, \n | (SELECT SUM(clazzLogNumPresent) + SUM(clazzLogNumPartial) + SUM(clazzLogNumAbsent)\n | FROM ClazzLog \n | WHERE clazzLogClazzUid = ? \n | AND clazzLogStatusFlag = 4)) AS REAL), 0),\n | clazzLct = ? \n | WHERE clazzUid = ?\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | UPDATE Clazz \n | SET attendanceAverage = \n | COALESCE(CAST(\n | (SELECT SUM(clazzLogNumPresent) \n | FROM ClazzLog \n | WHERE clazzLogClazzUid = ?\n | AND clazzLogStatusFlag = 4) AS REAL) /\n | \n | CAST(GREATEST(1.0, \n | (SELECT SUM(clazzLogNumPresent) + SUM(clazzLogNumPartial) + SUM(clazzLogNumAbsent)\n | FROM ClazzLog \n | WHERE clazzLogClazzUid = ? \n | AND clazzLogStatusFlag = 4)) AS REAL), 0),\n | clazzLct = ? \n | WHERE clazzUid = ?\n | \n ')), ClazzDao_JdbcKt$updateClazzAttendanceAverageAsync$lambda(this.local$clazzUid, this.local$timeChanged), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_JdbcKt.prototype.updateClazzAttendanceAverageAsync_3pjtqy$ = function (clazzUid_0, timeChanged_0, continuation_0, suspended) { var instance = new Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$(this, clazzUid_0, timeChanged_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda$lambda(_result) { return mapNextRow(_result, false, ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda(closure$permission_0, closure$clazzUid_0, closure$accountPersonUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$permission = closure$permission_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda; Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$accountPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda(closure$permission_0, closure$clazzUid_0, closure$accountPersonUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda(closure$permission_0, closure$clazzUid_0, closure$accountPersonUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.personHasPermissionWithClazz_b9bd0d$ = function (accountPersonUid, clazzUid, permission, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT EXISTS( \n | SELECT PrsGrpMbr.groupMemberPersonUid\n | FROM Clazz\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | ?\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | WHERE Clazz.clazzUid = ?\n | AND PrsGrpMbr.groupMemberPersonUid = ?)\n | \n ')), ClazzDao_JdbcKt$personHasPermissionWithClazz$lambda(permission, clazzUid, accountPersonUid), continuation); }; function ClazzDao_JdbcKt$selectDelegatablePermissions$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ClazzDao_JdbcKt$selectDelegatablePermissions$lambda$lambda(_result) { return mapRows(_result, ClazzDao_JdbcKt$selectDelegatablePermissions$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda(closure$clazzUid_0, closure$accountPersonUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda; Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$accountPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$selectDelegatablePermissions$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$selectDelegatablePermissions$lambda(closure$clazzUid_0, closure$accountPersonUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$selectDelegatablePermissions$lambda(closure$clazzUid_0, closure$accountPersonUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.selectDelegatablePermissions_3pjtqy$ = function (accountPersonUid, clazzUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ScopedGrant.sgPermissions\n | FROM Clazz\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | WHERE Clazz.clazzUid = ?\n | AND (ScopedGrant.sgPermissions & 4294967296) > 0\n | AND PrsGrpMbr.groupMemberPersonUid = ?\n | \n ')), ClazzDao_JdbcKt$selectDelegatablePermissions$lambda(clazzUid, accountPersonUid), continuation); }; function ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_numStudents = closure$_result.getInt_61zpoe$('numStudents'); var _tmp_numTeachers = closure$_result.getInt_61zpoe$('numTeachers'); var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var _tmp_HolidayCalendar_nullCount = 0; var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarName = closure$_result.getString_61zpoe$('umCalendarName'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarCategory = closure$_result.getInt_61zpoe$('umCalendarCategory'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarActive = closure$_result.getBoolean_61zpoe$('umCalendarActive'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarMasterChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarLocalChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarLastChangedBy = closure$_result.getInt_61zpoe$('umCalendarLastChangedBy'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarLct = closure$_result.getLong_61zpoe$('umCalendarLct'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_HolidayCalendar_isAllNull = _tmp_HolidayCalendar_nullCount === 8; var _tmp_School_nullCount = 0; var _tmp_schoolUid = closure$_result.getLong_61zpoe$('schoolUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolName = closure$_result.getString_61zpoe$('schoolName'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolDesc = closure$_result.getString_61zpoe$('schoolDesc'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolAddress = closure$_result.getString_61zpoe$('schoolAddress'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolActive = closure$_result.getBoolean_61zpoe$('schoolActive'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolPhoneNumber = closure$_result.getString_61zpoe$('schoolPhoneNumber'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolGender = closure$_result.getInt_61zpoe$('schoolGender'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolHolidayCalendarUid = closure$_result.getLong_61zpoe$('schoolHolidayCalendarUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolFeatures = closure$_result.getLong_61zpoe$('schoolFeatures'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLocationLong = closure$_result.getDouble_61zpoe$('schoolLocationLong'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLocationLatt = closure$_result.getDouble_61zpoe$('schoolLocationLatt'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolEmailAddress = closure$_result.getString_61zpoe$('schoolEmailAddress'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('schoolTeachersPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolStudentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolCode = closure$_result.getString_61zpoe$('schoolCode'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolMasterChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLocalChangeSeqNum = closure$_result.getLong_61zpoe$('schoolLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLastChangedBy = closure$_result.getInt_61zpoe$('schoolLastChangedBy'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLct = closure$_result.getLong_61zpoe$('schoolLct'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolTimeZone = closure$_result.getString_61zpoe$('schoolTimeZone'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_School_isAllNull = _tmp_School_nullCount === 21; var _tmp_CourseTerminology_nullCount = 0; var _tmp_ctUid = closure$_result.getLong_61zpoe$('ctUid'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_ctTitle = closure$_result.getString_61zpoe$('ctTitle'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_ctTerminology = closure$_result.getString_61zpoe$('ctTerminology'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_ctLct = closure$_result.getLong_61zpoe$('ctLct'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_CourseTerminology_isAllNull = _tmp_CourseTerminology_nullCount === 4; var $receiver = new ClazzWithDisplayDetails(); $receiver.numStudents = _tmp_numStudents; $receiver.numTeachers = _tmp_numTeachers; $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; if (!_tmp_HolidayCalendar_isAllNull) { var $receiver_0 = new HolidayCalendar(); $receiver_0.umCalendarUid = _tmp_umCalendarUid; $receiver_0.umCalendarName = _tmp_umCalendarName; $receiver_0.umCalendarCategory = _tmp_umCalendarCategory; $receiver_0.umCalendarActive = _tmp_umCalendarActive; $receiver_0.umCalendarMasterChangeSeqNum = _tmp_umCalendarMasterChangeSeqNum; $receiver_0.umCalendarLocalChangeSeqNum = _tmp_umCalendarLocalChangeSeqNum; $receiver_0.umCalendarLastChangedBy = _tmp_umCalendarLastChangedBy; $receiver_0.umCalendarLct = _tmp_umCalendarLct; $receiver.clazzHolidayCalendar = $receiver_0; } if (!_tmp_School_isAllNull) { var $receiver_1 = new School(); $receiver_1.schoolUid = _tmp_schoolUid; $receiver_1.schoolName = _tmp_schoolName; $receiver_1.schoolDesc = _tmp_schoolDesc; $receiver_1.schoolAddress = _tmp_schoolAddress; $receiver_1.schoolActive = _tmp_schoolActive; $receiver_1.schoolPhoneNumber = _tmp_schoolPhoneNumber; $receiver_1.schoolGender = _tmp_schoolGender; $receiver_1.schoolHolidayCalendarUid = _tmp_schoolHolidayCalendarUid; $receiver_1.schoolFeatures = _tmp_schoolFeatures; $receiver_1.schoolLocationLong = _tmp_schoolLocationLong; $receiver_1.schoolLocationLatt = _tmp_schoolLocationLatt; $receiver_1.schoolEmailAddress = _tmp_schoolEmailAddress; $receiver_1.schoolTeachersPersonGroupUid = _tmp_schoolTeachersPersonGroupUid; $receiver_1.schoolStudentsPersonGroupUid = _tmp_schoolStudentsPersonGroupUid; $receiver_1.schoolPendingStudentsPersonGroupUid = _tmp_schoolPendingStudentsPersonGroupUid; $receiver_1.schoolCode = _tmp_schoolCode; $receiver_1.schoolMasterChangeSeqNum = _tmp_schoolMasterChangeSeqNum; $receiver_1.schoolLocalChangeSeqNum = _tmp_schoolLocalChangeSeqNum; $receiver_1.schoolLastChangedBy = _tmp_schoolLastChangedBy; $receiver_1.schoolLct = _tmp_schoolLct; $receiver_1.schoolTimeZone = _tmp_schoolTimeZone; $receiver.clazzSchool = $receiver_1; } if (!_tmp_CourseTerminology_isAllNull) { var $receiver_2 = new CourseTerminology(); $receiver_2.ctUid = _tmp_ctUid; $receiver_2.ctTitle = _tmp_ctTitle; $receiver_2.ctTerminology = _tmp_ctTerminology; $receiver_2.ctLct = _tmp_ctLct; $receiver.terminology = $receiver_2; } return $receiver; }; } function ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda(closure$currentTime_0, closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda; Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda(closure$currentTime_0, closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda(closure$currentTime_0, closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzDao_JdbcKt = this$ClazzDao_JdbcKt_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$clazzUid = closure$clazzUid_0; } Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda; Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Clazz.*, \n | HolidayCalendar.*, \n | School.*,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1000 \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numStudents,\n | (SELECT COUNT(*) \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | AND clazzEnrolmentRole = 1001 \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft) AS numTeachers,\n | CourseTerminology.* \n | FROM Clazz \n | LEFT JOIN HolidayCalendar \n | ON Clazz.clazzHolidayUMCalendarUid = HolidayCalendar.umCalendarUid\n | LEFT JOIN School \n | ON School.schoolUid = Clazz.clazzSchoolUid\n | LEFT JOIN CourseTerminology\n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid\n | WHERE Clazz.clazzUid = ?\n ')), ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda$lambda(this.local$closure$currentTime, this.local$closure$clazzUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$clazzUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda(this$ClazzDao_JdbcKt_0, closure$currentTime_0, closure$clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.getClazzWithDisplayDetails_3pjtqy$ = function (clazzUid, currentTime) { return new LiveDataImpl(this._db, listOf(['ClazzEnrolment', 'Clazz', 'HolidayCalendar', 'School', 'CourseTerminology']), ClazzDao_JdbcKt$getClazzWithDisplayDetails$lambda(this, currentTime, clazzUid)); }; function ClazzDao_JdbcKt$findClazzesWithEffectiveHolidayCalendarAndFilter$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var _tmp_HolidayCalendar_nullCount = 0; var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarName = closure$_result.getString_61zpoe$('umCalendarName'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarCategory = closure$_result.getInt_61zpoe$('umCalendarCategory'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarActive = closure$_result.getBoolean_61zpoe$('umCalendarActive'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarMasterChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarLocalChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarLastChangedBy = closure$_result.getInt_61zpoe$('umCalendarLastChangedBy'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarLct = closure$_result.getLong_61zpoe$('umCalendarLct'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_HolidayCalendar_isAllNull = _tmp_HolidayCalendar_nullCount === 8; var _tmp_School_nullCount = 0; var _tmp_schoolUid = closure$_result.getLong_61zpoe$('schoolUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolName = closure$_result.getString_61zpoe$('schoolName'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolDesc = closure$_result.getString_61zpoe$('schoolDesc'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolAddress = closure$_result.getString_61zpoe$('schoolAddress'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolActive = closure$_result.getBoolean_61zpoe$('schoolActive'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolPhoneNumber = closure$_result.getString_61zpoe$('schoolPhoneNumber'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolGender = closure$_result.getInt_61zpoe$('schoolGender'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolHolidayCalendarUid = closure$_result.getLong_61zpoe$('schoolHolidayCalendarUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolFeatures = closure$_result.getLong_61zpoe$('schoolFeatures'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLocationLong = closure$_result.getDouble_61zpoe$('schoolLocationLong'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLocationLatt = closure$_result.getDouble_61zpoe$('schoolLocationLatt'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolEmailAddress = closure$_result.getString_61zpoe$('schoolEmailAddress'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('schoolTeachersPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolStudentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolCode = closure$_result.getString_61zpoe$('schoolCode'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolMasterChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLocalChangeSeqNum = closure$_result.getLong_61zpoe$('schoolLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLastChangedBy = closure$_result.getInt_61zpoe$('schoolLastChangedBy'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLct = closure$_result.getLong_61zpoe$('schoolLct'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolTimeZone = closure$_result.getString_61zpoe$('schoolTimeZone'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_School_isAllNull = _tmp_School_nullCount === 21; var _tmp_CourseTerminology_nullCount = 0; var _tmp_ctUid = closure$_result.getLong_61zpoe$('ctUid'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_ctTitle = closure$_result.getString_61zpoe$('ctTitle'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_ctTerminology = closure$_result.getString_61zpoe$('ctTerminology'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_ctLct = closure$_result.getLong_61zpoe$('ctLct'); if (closure$_result.wasNull()) { _tmp_CourseTerminology_nullCount = _tmp_CourseTerminology_nullCount + 1 | 0; } var _tmp_CourseTerminology_isAllNull = _tmp_CourseTerminology_nullCount === 4; var $receiver = new ClazzWithHolidayCalendarAndSchoolAndTerminology(); $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; if (!_tmp_HolidayCalendar_isAllNull) { var $receiver_0 = new HolidayCalendar(); $receiver_0.umCalendarUid = _tmp_umCalendarUid; $receiver_0.umCalendarName = _tmp_umCalendarName; $receiver_0.umCalendarCategory = _tmp_umCalendarCategory; $receiver_0.umCalendarActive = _tmp_umCalendarActive; $receiver_0.umCalendarMasterChangeSeqNum = _tmp_umCalendarMasterChangeSeqNum; $receiver_0.umCalendarLocalChangeSeqNum = _tmp_umCalendarLocalChangeSeqNum; $receiver_0.umCalendarLastChangedBy = _tmp_umCalendarLastChangedBy; $receiver_0.umCalendarLct = _tmp_umCalendarLct; $receiver.holidayCalendar = $receiver_0; } if (!_tmp_School_isAllNull) { var $receiver_1 = new School(); $receiver_1.schoolUid = _tmp_schoolUid; $receiver_1.schoolName = _tmp_schoolName; $receiver_1.schoolDesc = _tmp_schoolDesc; $receiver_1.schoolAddress = _tmp_schoolAddress; $receiver_1.schoolActive = _tmp_schoolActive; $receiver_1.schoolPhoneNumber = _tmp_schoolPhoneNumber; $receiver_1.schoolGender = _tmp_schoolGender; $receiver_1.schoolHolidayCalendarUid = _tmp_schoolHolidayCalendarUid; $receiver_1.schoolFeatures = _tmp_schoolFeatures; $receiver_1.schoolLocationLong = _tmp_schoolLocationLong; $receiver_1.schoolLocationLatt = _tmp_schoolLocationLatt; $receiver_1.schoolEmailAddress = _tmp_schoolEmailAddress; $receiver_1.schoolTeachersPersonGroupUid = _tmp_schoolTeachersPersonGroupUid; $receiver_1.schoolStudentsPersonGroupUid = _tmp_schoolStudentsPersonGroupUid; $receiver_1.schoolPendingStudentsPersonGroupUid = _tmp_schoolPendingStudentsPersonGroupUid; $receiver_1.schoolCode = _tmp_schoolCode; $receiver_1.schoolMasterChangeSeqNum = _tmp_schoolMasterChangeSeqNum; $receiver_1.schoolLocalChangeSeqNum = _tmp_schoolLocalChangeSeqNum; $receiver_1.schoolLastChangedBy = _tmp_schoolLastChangedBy; $receiver_1.schoolLct = _tmp_schoolLct; $receiver_1.schoolTimeZone = _tmp_schoolTimeZone; $receiver.school = $receiver_1; } if (!_tmp_CourseTerminology_isAllNull) { var $receiver_2 = new CourseTerminology(); $receiver_2.ctUid = _tmp_ctUid; $receiver_2.ctTitle = _tmp_ctTitle; $receiver_2.ctTerminology = _tmp_ctTerminology; $receiver_2.ctLct = _tmp_ctLct; $receiver.terminology = $receiver_2; } return $receiver; }; } function ClazzDao_JdbcKt$findClazzesWithEffectiveHolidayCalendarAndFilter$lambda$lambda(_result) { return mapRows(_result, ClazzDao_JdbcKt$findClazzesWithEffectiveHolidayCalendarAndFilter$lambda$lambda$lambda(_result)); } function ClazzDao_JdbcKt$findClazzesWithEffectiveHolidayCalendarAndFilter$lambda(closure$filterUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$filterUid); _stmt.setLong_6svq3l$(2, closure$filterUid); return useResults(_stmt.executeQuery(), ClazzDao_JdbcKt$findClazzesWithEffectiveHolidayCalendarAndFilter$lambda$lambda); }; } ClazzDao_JdbcKt.prototype.findClazzesWithEffectiveHolidayCalendarAndFilter_s8cxhz$ = function (filterUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Clazz.*, \n | HolidayCalendar.*, \n | School.*,\n | CourseTerminology.*\n | FROM Clazz \n | LEFT JOIN HolidayCalendar \n | ON ((clazz.clazzHolidayUMCalendarUid != 0 \n | AND HolidayCalendar.umCalendarUid = clazz.clazzHolidayUMCalendarUid)\n | OR clazz.clazzHolidayUMCalendarUid = 0 AND clazz.clazzSchoolUid = 0 \n | AND HolidayCalendar.umCalendarUid = (SELECT schoolHolidayCalendarUid \n | FROM School \n | WHERE schoolUid = clazz.clazzSchoolUid))\n | LEFT JOIN School \n | ON School.schoolUid = Clazz.clazzSchoolUid\n | \n | LEFT JOIN CourseTerminology\n | ON CourseTerminology.ctUid = Clazz.clazzTerminologyUid\n | \n | WHERE ? = 0 \n | OR Clazz.clazzUid = ?\n | \n ')), ClazzDao_JdbcKt$findClazzesWithEffectiveHolidayCalendarAndFilter$lambda(filterUid)); }; function ClazzDao_JdbcKt$getClazzWithSchool$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); var _tmp_School_nullCount = 0; var _tmp_schoolUid = closure$_result.getLong_61zpoe$('schoolUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolName = closure$_result.getString_61zpoe$('schoolName'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolDesc = closure$_result.getString_61zpoe$('schoolDesc'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolAddress = closure$_result.getString_61zpoe$('schoolAddress'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolActive = closure$_result.getBoolean_61zpoe$('schoolActive'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolPhoneNumber = closure$_result.getString_61zpoe$('schoolPhoneNumber'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolGender = closure$_result.getInt_61zpoe$('schoolGender'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolHolidayCalendarUid = closure$_result.getLong_61zpoe$('schoolHolidayCalendarUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolFeatures = closure$_result.getLong_61zpoe$('schoolFeatures'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLocationLong = closure$_result.getDouble_61zpoe$('schoolLocationLong'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLocationLatt = closure$_result.getDouble_61zpoe$('schoolLocationLatt'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolEmailAddress = closure$_result.getString_61zpoe$('schoolEmailAddress'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('schoolTeachersPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolStudentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolCode = closure$_result.getString_61zpoe$('schoolCode'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolMasterChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLocalChangeSeqNum = closure$_result.getLong_61zpoe$('schoolLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLastChangedBy = closure$_result.getInt_61zpoe$('schoolLastChangedBy'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolLct = closure$_result.getLong_61zpoe$('schoolLct'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_schoolTimeZone = closure$_result.getString_61zpoe$('schoolTimeZone'); if (closure$_result.wasNull()) { _tmp_School_nullCount = _tmp_School_nullCount + 1 | 0; } var _tmp_School_isAllNull = _tmp_School_nullCount === 21; var $receiver = new ClazzWithSchool(); $receiver.clazzUid = _tmp_clazzUid; $receiver.clazzName = _tmp_clazzName; $receiver.clazzDesc = _tmp_clazzDesc; $receiver.attendanceAverage = _tmp_attendanceAverage; $receiver.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver.isClazzActive = _tmp_isClazzActive; $receiver.clazzLocationUid = _tmp_clazzLocationUid; $receiver.clazzStartTime = _tmp_clazzStartTime; $receiver.clazzEndTime = _tmp_clazzEndTime; $receiver.clazzFeatures = _tmp_clazzFeatures; $receiver.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver.clazzLct = _tmp_clazzLct; $receiver.clazzTimeZone = _tmp_clazzTimeZone; $receiver.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver.clazzCode = _tmp_clazzCode; if (!_tmp_School_isAllNull) { var $receiver_0 = new School(); $receiver_0.schoolUid = _tmp_schoolUid; $receiver_0.schoolName = _tmp_schoolName; $receiver_0.schoolDesc = _tmp_schoolDesc; $receiver_0.schoolAddress = _tmp_schoolAddress; $receiver_0.schoolActive = _tmp_schoolActive; $receiver_0.schoolPhoneNumber = _tmp_schoolPhoneNumber; $receiver_0.schoolGender = _tmp_schoolGender; $receiver_0.schoolHolidayCalendarUid = _tmp_schoolHolidayCalendarUid; $receiver_0.schoolFeatures = _tmp_schoolFeatures; $receiver_0.schoolLocationLong = _tmp_schoolLocationLong; $receiver_0.schoolLocationLatt = _tmp_schoolLocationLatt; $receiver_0.schoolEmailAddress = _tmp_schoolEmailAddress; $receiver_0.schoolTeachersPersonGroupUid = _tmp_schoolTeachersPersonGroupUid; $receiver_0.schoolStudentsPersonGroupUid = _tmp_schoolStudentsPersonGroupUid; $receiver_0.schoolPendingStudentsPersonGroupUid = _tmp_schoolPendingStudentsPersonGroupUid; $receiver_0.schoolCode = _tmp_schoolCode; $receiver_0.schoolMasterChangeSeqNum = _tmp_schoolMasterChangeSeqNum; $receiver_0.schoolLocalChangeSeqNum = _tmp_schoolLocalChangeSeqNum; $receiver_0.schoolLastChangedBy = _tmp_schoolLastChangedBy; $receiver_0.schoolLct = _tmp_schoolLct; $receiver_0.schoolTimeZone = _tmp_schoolTimeZone; $receiver.school = $receiver_0; } return $receiver; }; } function ClazzDao_JdbcKt$getClazzWithSchool$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzDao_JdbcKt$getClazzWithSchool$lambda$lambda$lambda(_result)); } function Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda(closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda.prototype.constructor = Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda; Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzDao_JdbcKt$getClazzWithSchool$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzDao_JdbcKt$getClazzWithSchool$lambda(closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzDao_JdbcKt$getClazzWithSchool$lambda(closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzDao_JdbcKt.prototype.getClazzWithSchool_s8cxhz$ = function (clazzUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT Clazz.*, School.* FROM Clazz LEFT JOIN School ON School.schoolUid = Clazz.clazzSchoolUid WHERE clazz.clazzUid = ?'), ClazzDao_JdbcKt$getClazzWithSchool$lambda(clazzUid), continuation); }; function ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO Clazz (clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.clazzUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.clazzUid); } stmt.setString_vqvrqt$(2, entity.clazzName); stmt.setString_vqvrqt$(3, entity.clazzDesc); stmt.setFloat_24o109$(4, entity.attendanceAverage); stmt.setLong_6svq3l$(5, entity.clazzHolidayUMCalendarUid); stmt.setLong_6svq3l$(6, entity.clazzScheuleUMCalendarUid); stmt.setBoolean_fzusl$(7, entity.isClazzActive); stmt.setLong_6svq3l$(8, entity.clazzLocationUid); stmt.setLong_6svq3l$(9, entity.clazzStartTime); stmt.setLong_6svq3l$(10, entity.clazzEndTime); stmt.setLong_6svq3l$(11, entity.clazzFeatures); stmt.setLong_6svq3l$(12, entity.clazzSchoolUid); stmt.setInt_vux9f0$(13, entity.clazzEnrolmentPolicy); stmt.setLong_6svq3l$(14, entity.clazzTerminologyUid); stmt.setLong_6svq3l$(15, entity.clazzMasterChangeSeqNum); stmt.setLong_6svq3l$(16, entity.clazzLocalChangeSeqNum); stmt.setInt_vux9f0$(17, entity.clazzLastChangedBy); stmt.setLong_6svq3l$(18, entity.clazzLct); stmt.setString_vqvrqt$(19, entity.clazzTimeZone); stmt.setLong_6svq3l$(20, entity.clazzStudentsPersonGroupUid); stmt.setLong_6svq3l$(21, entity.clazzTeachersPersonGroupUid); stmt.setLong_6svq3l$(22, entity.clazzPendingStudentsPersonGroupUid); stmt.setLong_6svq3l$(23, entity.clazzParentsPersonGroupUid); stmt.setString_vqvrqt$(24, entity.clazzCode); }; ClazzDao_JdbcKt$_insertAdapterClazz_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzDao_JdbcKt', interfaces: [ClazzDao]}; function ClazzDao_ReplicateWrapper(_db, _dao) { ClazzDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_18($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_18.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_18.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_18.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_18; Coroutine$replicateOnNewNode_s8cxhz$_18.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_18(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_18($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_18.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_18.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_18.prototype.constructor = Coroutine$replicateOnChange_18; Coroutine$replicateOnChange_18.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_18(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; ClazzDao_ReplicateWrapper.prototype.findByClazzCode_61zpoe$ = function (code, continuation) { return this._dao_0.findByClazzCode_61zpoe$(code, continuation); }; ClazzDao_ReplicateWrapper.prototype.findByClazzCodeFromWeb_61zpoe$ = function (code, continuation) { return this._dao_0.findByClazzCodeFromWeb_61zpoe$(code, continuation); }; ClazzDao_ReplicateWrapper.prototype.findAllLive = function () { return this._dao_0.findAllLive(); }; ClazzDao_ReplicateWrapper.prototype.findAll = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; ClazzDao_ReplicateWrapper.prototype.findByUidWithHolidayCalendarAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidWithHolidayCalendarAsync_s8cxhz$(uid, continuation); }; ClazzDao_ReplicateWrapper.prototype.updateAsync_yczdf2$ = function (entity, continuation) { entity.clazzLct = systemTimeInMillis(); return this._dao_0.updateAsync_yczdf2$(entity, continuation); }; ClazzDao_ReplicateWrapper.prototype.findAllClazzesBySchool_s8cxhz$ = function (schoolUid, continuation) { return this._dao_0.findAllClazzesBySchool_s8cxhz$(schoolUid, continuation); }; ClazzDao_ReplicateWrapper.prototype.findAllClazzesBySchoolLive_s8cxhz$ = function (schoolUid) { return this._dao_0.findAllClazzesBySchoolLive_s8cxhz$(schoolUid); }; ClazzDao_ReplicateWrapper.prototype.findClazzesWithPermission_dchjmd$ = function (searchQuery, accountPersonUid, excludeSelectedClazzList, excludeSchoolUid, sortOrder, filter, currentTime, permission, selectedSchool) { return this._dao_0.findClazzesWithPermission_dchjmd$(searchQuery, accountPersonUid, excludeSelectedClazzList, excludeSchoolUid, sortOrder, filter, currentTime, permission, selectedSchool); }; ClazzDao_ReplicateWrapper.prototype.getClassNamesFromListOfIds_gox9k8$ = function (ids, continuation) { return this._dao_0.getClassNamesFromListOfIds_gox9k8$(ids, continuation); }; ClazzDao_ReplicateWrapper.prototype.findByClazzName_61zpoe$ = function (name) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0($this, clazzUid_0, timeChanged_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$timeChanged = timeChanged_0; } Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0.prototype.constructor = Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0; Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateClazzAttendanceAverageAsync_3pjtqy$(this.local$clazzUid, this.local$timeChanged, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_ReplicateWrapper.prototype.updateClazzAttendanceAverageAsync_3pjtqy$ = function (clazzUid_0, timeChanged_0, continuation_0, suspended) { var instance = new Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_0(this, clazzUid_0, timeChanged_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_ReplicateWrapper.prototype.personHasPermissionWithClazz_b9bd0d$ = function (accountPersonUid, clazzUid, permission, continuation) { return this._dao_0.personHasPermissionWithClazz_b9bd0d$(accountPersonUid, clazzUid, permission, continuation); }; ClazzDao_ReplicateWrapper.prototype.selectDelegatablePermissions_3pjtqy$ = function (accountPersonUid, clazzUid, continuation) { return this._dao_0.selectDelegatablePermissions_3pjtqy$(accountPersonUid, clazzUid, continuation); }; ClazzDao_ReplicateWrapper.prototype.getClazzWithDisplayDetails_3pjtqy$ = function (clazzUid, currentTime) { return this._dao_0.getClazzWithDisplayDetails_3pjtqy$(clazzUid, currentTime); }; ClazzDao_ReplicateWrapper.prototype.findClazzesWithEffectiveHolidayCalendarAndFilter_s8cxhz$ = function (filterUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzDao_ReplicateWrapper.prototype.getClazzWithSchool_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.getClazzWithSchool_s8cxhz$(clazzUid, continuation); }; ClazzDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_20($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_20.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_20.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_20.prototype.constructor = Coroutine$insertAsync_20; Coroutine$insertAsync_20.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.clazzUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(6, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.clazzUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.clazzLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.clazzUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_20(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzDao_ReplicateWrapper', interfaces: [ClazzDao]}; function ClazzDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_19($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_19.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_19.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_19.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_19; Coroutine$replicateOnNewNode_s8cxhz$_19.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_19(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_19($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_19.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_19.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_19.prototype.constructor = Coroutine$replicateOnChange_19; Coroutine$replicateOnChange_19.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_19(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.findByUid_s8cxhz$ = function (uid) { var _result = this._dao.findByUid_s8cxhz$(uid); return _result; }; ClazzDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$findByClazzCode_61zpoe$($this, code_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$code = code_0; } Coroutine$findByClazzCode_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzCode_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzCode_61zpoe$.prototype.constructor = Coroutine$findByClazzCode_61zpoe$; Coroutine$findByClazzCode_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByClazzCode_61zpoe$(this.local$code, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.findByClazzCode_61zpoe$ = function (code_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzCode_61zpoe$(this, code_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.findByClazzCodeFromWeb_61zpoe$ = function (code, continuation) { throw IllegalStateException_init('Synchronous HTTP is not supported on Door/Javascript!'); }; ClazzDao_Repo.prototype.findAllLive = function () { var _result = this._dao.findAllLive(); return _result; }; ClazzDao_Repo.prototype.findAll = function () { var _result = this._dao.findAll(); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_0.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_0; Coroutine$findByUidAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$.prototype.constructor = Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$; Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidWithHolidayCalendarAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.findByUidWithHolidayCalendarAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_yczdf2$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_yczdf2$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_yczdf2$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_yczdf2$_0.prototype.constructor = Coroutine$updateAsync_yczdf2$_0; Coroutine$updateAsync_yczdf2$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_yczdf2$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.updateAsync_yczdf2$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_yczdf2$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllClazzesBySchool_s8cxhz$($this, schoolUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$schoolUid = schoolUid_0; } Coroutine$findAllClazzesBySchool_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllClazzesBySchool_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllClazzesBySchool_s8cxhz$.prototype.constructor = Coroutine$findAllClazzesBySchool_s8cxhz$; Coroutine$findAllClazzesBySchool_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllClazzesBySchool_s8cxhz$(this.local$schoolUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.findAllClazzesBySchool_s8cxhz$ = function (schoolUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllClazzesBySchool_s8cxhz$(this, schoolUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.findAllClazzesBySchoolLive_s8cxhz$ = function (schoolUid) { var _result = this._dao.findAllClazzesBySchoolLive_s8cxhz$(schoolUid); return _result; }; ClazzDao_Repo.prototype.findClazzesWithPermission_dchjmd$ = function (searchQuery, accountPersonUid, excludeSelectedClazzList, excludeSchoolUid, sortOrder, filter, currentTime, permission, selectedSchool) { var _result = this._dao.findClazzesWithPermission_dchjmd$(searchQuery, accountPersonUid, excludeSelectedClazzList, excludeSchoolUid, sortOrder, filter, currentTime, permission, selectedSchool); return _result; }; function Coroutine$getClassNamesFromListOfIds_gox9k8$($this, ids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$ids = ids_0; } Coroutine$getClassNamesFromListOfIds_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getClassNamesFromListOfIds_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getClassNamesFromListOfIds_gox9k8$.prototype.constructor = Coroutine$getClassNamesFromListOfIds_gox9k8$; Coroutine$getClassNamesFromListOfIds_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getClassNamesFromListOfIds_gox9k8$(this.local$ids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.getClassNamesFromListOfIds_gox9k8$ = function (ids_0, continuation_0, suspended) { var instance = new Coroutine$getClassNamesFromListOfIds_gox9k8$(this, ids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.findByClazzName_61zpoe$ = function (name) { var _result = this._dao.findByClazzName_61zpoe$(name); return _result; }; function Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1($this, clazzUid_0, timeChanged_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$timeChanged = timeChanged_0; } Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1.prototype.constructor = Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1; Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateClazzAttendanceAverageAsync_3pjtqy$(this.local$clazzUid, this.local$timeChanged, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.updateClazzAttendanceAverageAsync_3pjtqy$ = function (clazzUid_0, timeChanged_0, continuation_0, suspended) { var instance = new Coroutine$updateClazzAttendanceAverageAsync_3pjtqy$_1(this, clazzUid_0, timeChanged_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$personHasPermissionWithClazz_b9bd0d$($this, accountPersonUid_0, clazzUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$clazzUid = clazzUid_0; this.local$permission = permission_0; } Coroutine$personHasPermissionWithClazz_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personHasPermissionWithClazz_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personHasPermissionWithClazz_b9bd0d$.prototype.constructor = Coroutine$personHasPermissionWithClazz_b9bd0d$; Coroutine$personHasPermissionWithClazz_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.personHasPermissionWithClazz_b9bd0d$(this.local$accountPersonUid, this.local$clazzUid, this.local$permission, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.personHasPermissionWithClazz_b9bd0d$ = function (accountPersonUid_0, clazzUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$personHasPermissionWithClazz_b9bd0d$(this, accountPersonUid_0, clazzUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$selectDelegatablePermissions_3pjtqy$($this, accountPersonUid_0, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$clazzUid = clazzUid_0; } Coroutine$selectDelegatablePermissions_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$selectDelegatablePermissions_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$selectDelegatablePermissions_3pjtqy$.prototype.constructor = Coroutine$selectDelegatablePermissions_3pjtqy$; Coroutine$selectDelegatablePermissions_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.selectDelegatablePermissions_3pjtqy$(this.local$accountPersonUid, this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.selectDelegatablePermissions_3pjtqy$ = function (accountPersonUid_0, clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$selectDelegatablePermissions_3pjtqy$(this, accountPersonUid_0, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.getClazzWithDisplayDetails_3pjtqy$ = function (clazzUid, currentTime) { var _result = this._dao.getClazzWithDisplayDetails_3pjtqy$(clazzUid, currentTime); return _result; }; ClazzDao_Repo.prototype.findClazzesWithEffectiveHolidayCalendarAndFilter_s8cxhz$ = function (filterUid) { var _result = this._dao.findClazzesWithEffectiveHolidayCalendarAndFilter_s8cxhz$(filterUid); return _result; }; function Coroutine$getClazzWithSchool_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$getClazzWithSchool_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getClazzWithSchool_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getClazzWithSchool_s8cxhz$.prototype.constructor = Coroutine$getClazzWithSchool_s8cxhz$; Coroutine$getClazzWithSchool_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getClazzWithSchool_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.getClazzWithSchool_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$getClazzWithSchool_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_21($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_21.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_21.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_21.prototype.constructor = Coroutine$insertAsync_21; Coroutine$insertAsync_21.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_21(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzDao_Repo', interfaces: [ClazzDao]}; function ClazzEnrolmentDao() { } ClazzEnrolmentDao.prototype.getAllClazzEnrolledAtTimeAsync_6qtc6d$ = function (clazzUid, date, roleFilter, personUidFilter, continuation, callback$default) { if (personUidFilter === void 0) personUidFilter = L0; return callback$default ? callback$default(clazzUid, date, roleFilter, personUidFilter, continuation) : this.getAllClazzEnrolledAtTimeAsync_6qtc6d$$default(clazzUid, date, roleFilter, personUidFilter, continuation); }; ClazzEnrolmentDao.prototype.findByClazzUidAndRole_i7yiqk$ = function (clazzUid, roleId, sortOrder, searchText, filter, accountPersonUid, currentTime, callback$default) { if (searchText === void 0) searchText = '%'; return callback$default ? callback$default(clazzUid, roleId, sortOrder, searchText, filter, accountPersonUid, currentTime) : this.findByClazzUidAndRole_i7yiqk$$default(clazzUid, roleId, sortOrder, searchText, filter, accountPersonUid, currentTime); }; ClazzEnrolmentDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzEnrolmentDao', interfaces: [BaseDao]}; function ClazzEnrolmentDao_JdbcKt(_db) { ClazzEnrolmentDao.call(this); this._db = _db; this._insertAdapterClazzEnrolment_ = new ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral(this._db); } ClazzEnrolmentDao_JdbcKt.prototype.insertListAsync_9f9sqv$ = function (entityList) { this._insertAdapterClazzEnrolment_.insertList_4ezy5m$(entityList); }; ClazzEnrolmentDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzEnrolment_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_22($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_22.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_22.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_22.prototype.constructor = Coroutine$insertAsync_22; Coroutine$insertAsync_22.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzEnrolment_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_22(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzEnrolment_.insertList_4ezy5m$(entityList); }; function Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entity.clazzEnrolmentPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entity.clazzEnrolmentClazzUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.clazzEnrolmentDateJoined); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.clazzEnrolmentDateLeft); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$entity.clazzEnrolmentRole); this.local$_stmt.setFloat_24o109$(6, this.local$closure$entity.clazzEnrolmentAttendancePercentage); this.local$_stmt.setBoolean_fzusl$(7, this.local$closure$entity.clazzEnrolmentActive); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.clazzEnrolmentLeavingReasonUid); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$entity.clazzEnrolmentOutcome); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.clazzEnrolmentLocalChangeSeqNum); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$entity.clazzEnrolmentMasterChangeSeqNum); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$entity.clazzEnrolmentLastChangedBy); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$entity.clazzEnrolmentLct); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$entity.clazzEnrolmentUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_95p8s2$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_95p8s2$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_95p8s2$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_95p8s2$.prototype.constructor = Coroutine$updateAsync_95p8s2$; Coroutine$updateAsync_95p8s2$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE ClazzEnrolment SET clazzEnrolmentPersonUid = ?, clazzEnrolmentClazzUid = ?, clazzEnrolmentDateJoined = ?, clazzEnrolmentDateLeft = ?, clazzEnrolmentRole = ?, clazzEnrolmentAttendancePercentage = ?, clazzEnrolmentActive = ?, clazzEnrolmentLeavingReasonUid = ?, clazzEnrolmentOutcome = ?, clazzEnrolmentLocalChangeSeqNum = ?, clazzEnrolmentMasterChangeSeqNum = ?, clazzEnrolmentLastChangedBy = ?, clazzEnrolmentLct = ? WHERE clazzEnrolmentUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ClazzEnrolmentDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.updateAsync_95p8s2$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_95p8s2$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzEnrolmentDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.clazzEnrolmentPersonUid); _stmt.setLong_6svq3l$(2, _entity.clazzEnrolmentClazzUid); _stmt.setLong_6svq3l$(3, _entity.clazzEnrolmentDateJoined); _stmt.setLong_6svq3l$(4, _entity.clazzEnrolmentDateLeft); _stmt.setInt_vux9f0$(5, _entity.clazzEnrolmentRole); _stmt.setFloat_24o109$(6, _entity.clazzEnrolmentAttendancePercentage); _stmt.setBoolean_fzusl$(7, _entity.clazzEnrolmentActive); _stmt.setLong_6svq3l$(8, _entity.clazzEnrolmentLeavingReasonUid); _stmt.setInt_vux9f0$(9, _entity.clazzEnrolmentOutcome); _stmt.setLong_6svq3l$(10, _entity.clazzEnrolmentLocalChangeSeqNum); _stmt.setLong_6svq3l$(11, _entity.clazzEnrolmentMasterChangeSeqNum); _stmt.setInt_vux9f0$(12, _entity.clazzEnrolmentLastChangedBy); _stmt.setLong_6svq3l$(13, _entity.clazzEnrolmentLct); _stmt.setLong_6svq3l$(14, _entity.clazzEnrolmentUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzEnrolmentDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzEnrolment SET clazzEnrolmentPersonUid = ?, clazzEnrolmentClazzUid = ?, clazzEnrolmentDateJoined = ?, clazzEnrolmentDateLeft = ?, clazzEnrolmentRole = ?, clazzEnrolmentAttendancePercentage = ?, clazzEnrolmentActive = ?, clazzEnrolmentLeavingReasonUid = ?, clazzEnrolmentOutcome = ?, clazzEnrolmentLocalChangeSeqNum = ?, clazzEnrolmentMasterChangeSeqNum = ?, clazzEnrolmentLastChangedBy = ?, clazzEnrolmentLct = ? WHERE clazzEnrolmentUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzEnrolmentDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzEnrolmentDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.clazzEnrolmentPersonUid); _stmt.setLong_6svq3l$(2, closure$entity.clazzEnrolmentClazzUid); _stmt.setLong_6svq3l$(3, closure$entity.clazzEnrolmentDateJoined); _stmt.setLong_6svq3l$(4, closure$entity.clazzEnrolmentDateLeft); _stmt.setInt_vux9f0$(5, closure$entity.clazzEnrolmentRole); _stmt.setFloat_24o109$(6, closure$entity.clazzEnrolmentAttendancePercentage); _stmt.setBoolean_fzusl$(7, closure$entity.clazzEnrolmentActive); _stmt.setLong_6svq3l$(8, closure$entity.clazzEnrolmentLeavingReasonUid); _stmt.setInt_vux9f0$(9, closure$entity.clazzEnrolmentOutcome); _stmt.setLong_6svq3l$(10, closure$entity.clazzEnrolmentLocalChangeSeqNum); _stmt.setLong_6svq3l$(11, closure$entity.clazzEnrolmentMasterChangeSeqNum); _stmt.setInt_vux9f0$(12, closure$entity.clazzEnrolmentLastChangedBy); _stmt.setLong_6svq3l$(13, closure$entity.clazzEnrolmentLct); _stmt.setLong_6svq3l$(14, closure$entity.clazzEnrolmentUid); return _stmt.executeUpdate(); }; } ClazzEnrolmentDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzEnrolment SET clazzEnrolmentPersonUid = ?, clazzEnrolmentClazzUid = ?, clazzEnrolmentDateJoined = ?, clazzEnrolmentDateLeft = ?, clazzEnrolmentRole = ?, clazzEnrolmentAttendancePercentage = ?, clazzEnrolmentActive = ?, clazzEnrolmentLeavingReasonUid = ?, clazzEnrolmentOutcome = ?, clazzEnrolmentLocalChangeSeqNum = ?, clazzEnrolmentMasterChangeSeqNum = ?, clazzEnrolmentLastChangedBy = ?, clazzEnrolmentLct = ? WHERE clazzEnrolmentUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzEnrolmentDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_20($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_20.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_20.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_20.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_20; Coroutine$replicateOnNewNode_s8cxhz$_20.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzEnrolmentReplicate(cePk, ceDestination)\n | SELECT DISTINCT ClazzEnrolment.clazzEnrolmentUid AS ceUid,\n | ? AS ceDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 64 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzEnrolment \n | ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ClazzEnrolment.clazzEnrolmentLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ClazzEnrolmentReplicate\n | WHERE cePk = ClazzEnrolment.clazzEnrolmentUid\n | AND ceDestination = ?), 0) \n | /*psql ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzEnrolmentReplicate(cePk, ceDestination)\n | SELECT DISTINCT ClazzEnrolment.clazzEnrolmentUid AS ceUid,\n | ? AS ceDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 64 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzEnrolment \n | ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ClazzEnrolment.clazzEnrolmentLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ClazzEnrolmentReplicate\n | WHERE cePk = ClazzEnrolment.clazzEnrolmentUid\n | AND ceDestination = ?), 0) \n | ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | \n | \n |')), ClazzEnrolmentDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_20(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateClazzEnrolmentOnChange($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateClazzEnrolmentOnChange.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateClazzEnrolmentOnChange.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateClazzEnrolmentOnChange.prototype.constructor = Coroutine$replicateClazzEnrolmentOnChange; Coroutine$replicateClazzEnrolmentOnChange.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzEnrolmentReplicate(cePk, ceDestination)\n | SELECT DISTINCT ClazzEnrolment.clazzEnrolmentUid AS ceUid,\n | UserSession.usClientNodeId AS ceDestination\n | FROM ChangeLog\n | JOIN ClazzEnrolment\n | ON ChangeLog.chTableId = 65\n | AND ChangeLog.chEntityPk = ClazzEnrolment.clazzEnrolmentUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzEnrolment.clazzEnrolmentClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzEnrolment.clazzEnrolmentLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ClazzEnrolmentReplicate\n | WHERE cePk = ClazzEnrolment.clazzEnrolmentUid\n | AND ceDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzEnrolmentReplicate(cePk, ceDestination)\n | SELECT DISTINCT ClazzEnrolment.clazzEnrolmentUid AS ceUid,\n | UserSession.usClientNodeId AS ceDestination\n | FROM ChangeLog\n | JOIN ClazzEnrolment\n | ON ChangeLog.chTableId = 65\n | AND ChangeLog.chEntityPk = ClazzEnrolment.clazzEnrolmentUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzEnrolment.clazzEnrolmentClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzEnrolment.clazzEnrolmentLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ClazzEnrolmentReplicate\n | WHERE cePk = ClazzEnrolment.clazzEnrolmentUid\n | AND ceDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | \n | \n |')), ClazzEnrolmentDao_JdbcKt$replicateClazzEnrolmentOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.replicateClazzEnrolmentOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateClazzEnrolmentOnChange(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzEnrolmentUid = closure$_result.getLong_61zpoe$('clazzEnrolmentUid'); var _tmp_clazzEnrolmentPersonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentPersonUid'); var _tmp_clazzEnrolmentClazzUid = closure$_result.getLong_61zpoe$('clazzEnrolmentClazzUid'); var _tmp_clazzEnrolmentDateJoined = closure$_result.getLong_61zpoe$('clazzEnrolmentDateJoined'); var _tmp_clazzEnrolmentDateLeft = closure$_result.getLong_61zpoe$('clazzEnrolmentDateLeft'); var _tmp_clazzEnrolmentRole = closure$_result.getInt_61zpoe$('clazzEnrolmentRole'); var _tmp_clazzEnrolmentAttendancePercentage = closure$_result.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var _tmp_clazzEnrolmentActive = closure$_result.getBoolean_61zpoe$('clazzEnrolmentActive'); var _tmp_clazzEnrolmentLeavingReasonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var _tmp_clazzEnrolmentOutcome = closure$_result.getInt_61zpoe$('clazzEnrolmentOutcome'); var _tmp_clazzEnrolmentLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var _tmp_clazzEnrolmentMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var _tmp_clazzEnrolmentLastChangedBy = closure$_result.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var _tmp_clazzEnrolmentLct = closure$_result.getLong_61zpoe$('clazzEnrolmentLct'); var $receiver = new ClazzEnrolment(); $receiver.clazzEnrolmentUid = _tmp_clazzEnrolmentUid; $receiver.clazzEnrolmentPersonUid = _tmp_clazzEnrolmentPersonUid; $receiver.clazzEnrolmentClazzUid = _tmp_clazzEnrolmentClazzUid; $receiver.clazzEnrolmentDateJoined = _tmp_clazzEnrolmentDateJoined; $receiver.clazzEnrolmentDateLeft = _tmp_clazzEnrolmentDateLeft; $receiver.clazzEnrolmentRole = _tmp_clazzEnrolmentRole; $receiver.clazzEnrolmentAttendancePercentage = _tmp_clazzEnrolmentAttendancePercentage; $receiver.clazzEnrolmentActive = _tmp_clazzEnrolmentActive; $receiver.clazzEnrolmentLeavingReasonUid = _tmp_clazzEnrolmentLeavingReasonUid; $receiver.clazzEnrolmentOutcome = _tmp_clazzEnrolmentOutcome; $receiver.clazzEnrolmentLocalChangeSeqNum = _tmp_clazzEnrolmentLocalChangeSeqNum; $receiver.clazzEnrolmentMasterChangeSeqNum = _tmp_clazzEnrolmentMasterChangeSeqNum; $receiver.clazzEnrolmentLastChangedBy = _tmp_clazzEnrolmentLastChangedBy; $receiver.clazzEnrolmentLct = _tmp_clazzEnrolmentLct; return $receiver; }; } function ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda(closure$personUid_0, closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda(closure$personUid_0, closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda(closure$personUid_0, closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt.prototype.findByPersonUidAndClazzUidAsync_3pjtqy$ = function (personUid, clazzUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM ClazzEnrolment WHERE clazzEnrolmentPersonUid = ? \n | AND clazzEnrolmentClazzUid = ? \n | AND clazzEnrolmentOutcome = 200 LIMIT 1\n ')), ClazzEnrolmentDao_JdbcKt$findByPersonUidAndClazzUidAsync$lambda(personUid, clazzUid), continuation); }; function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral(this$ClazzEnrolmentDao_JdbcKt, closure$personUid, closure$clazzUid) { this.this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt; this.closure$personUid = closure$personUid; this.closure$clazzUid = closure$clazzUid; DataSourceFactory.call(this); } function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_timeZone = closure$_result.getString_61zpoe$('timeZone'); var _tmp_clazzEnrolmentUid = closure$_result.getLong_61zpoe$('clazzEnrolmentUid'); var _tmp_clazzEnrolmentPersonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentPersonUid'); var _tmp_clazzEnrolmentClazzUid = closure$_result.getLong_61zpoe$('clazzEnrolmentClazzUid'); var _tmp_clazzEnrolmentDateJoined = closure$_result.getLong_61zpoe$('clazzEnrolmentDateJoined'); var _tmp_clazzEnrolmentDateLeft = closure$_result.getLong_61zpoe$('clazzEnrolmentDateLeft'); var _tmp_clazzEnrolmentRole = closure$_result.getInt_61zpoe$('clazzEnrolmentRole'); var _tmp_clazzEnrolmentAttendancePercentage = closure$_result.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var _tmp_clazzEnrolmentActive = closure$_result.getBoolean_61zpoe$('clazzEnrolmentActive'); var _tmp_clazzEnrolmentLeavingReasonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var _tmp_clazzEnrolmentOutcome = closure$_result.getInt_61zpoe$('clazzEnrolmentOutcome'); var _tmp_clazzEnrolmentLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var _tmp_clazzEnrolmentMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var _tmp_clazzEnrolmentLastChangedBy = closure$_result.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var _tmp_clazzEnrolmentLct = closure$_result.getLong_61zpoe$('clazzEnrolmentLct'); var _tmp_LeavingReason_nullCount = 0; var _tmp_leavingReasonUid = closure$_result.getLong_61zpoe$('leavingReasonUid'); if (closure$_result.wasNull()) { _tmp_LeavingReason_nullCount = _tmp_LeavingReason_nullCount + 1 | 0; } var _tmp_leavingReasonTitle = closure$_result.getString_61zpoe$('leavingReasonTitle'); if (closure$_result.wasNull()) { _tmp_LeavingReason_nullCount = _tmp_LeavingReason_nullCount + 1 | 0; } var _tmp_leavingReasonMCSN = closure$_result.getLong_61zpoe$('leavingReasonMCSN'); if (closure$_result.wasNull()) { _tmp_LeavingReason_nullCount = _tmp_LeavingReason_nullCount + 1 | 0; } var _tmp_leavingReasonCSN = closure$_result.getLong_61zpoe$('leavingReasonCSN'); if (closure$_result.wasNull()) { _tmp_LeavingReason_nullCount = _tmp_LeavingReason_nullCount + 1 | 0; } var _tmp_leavingReasonLCB = closure$_result.getInt_61zpoe$('leavingReasonLCB'); if (closure$_result.wasNull()) { _tmp_LeavingReason_nullCount = _tmp_LeavingReason_nullCount + 1 | 0; } var _tmp_leavingReasonLct = closure$_result.getLong_61zpoe$('leavingReasonLct'); if (closure$_result.wasNull()) { _tmp_LeavingReason_nullCount = _tmp_LeavingReason_nullCount + 1 | 0; } var _tmp_LeavingReason_isAllNull = _tmp_LeavingReason_nullCount === 6; var $receiver = new ClazzEnrolmentWithLeavingReason(); $receiver.timeZone = _tmp_timeZone; $receiver.clazzEnrolmentUid = _tmp_clazzEnrolmentUid; $receiver.clazzEnrolmentPersonUid = _tmp_clazzEnrolmentPersonUid; $receiver.clazzEnrolmentClazzUid = _tmp_clazzEnrolmentClazzUid; $receiver.clazzEnrolmentDateJoined = _tmp_clazzEnrolmentDateJoined; $receiver.clazzEnrolmentDateLeft = _tmp_clazzEnrolmentDateLeft; $receiver.clazzEnrolmentRole = _tmp_clazzEnrolmentRole; $receiver.clazzEnrolmentAttendancePercentage = _tmp_clazzEnrolmentAttendancePercentage; $receiver.clazzEnrolmentActive = _tmp_clazzEnrolmentActive; $receiver.clazzEnrolmentLeavingReasonUid = _tmp_clazzEnrolmentLeavingReasonUid; $receiver.clazzEnrolmentOutcome = _tmp_clazzEnrolmentOutcome; $receiver.clazzEnrolmentLocalChangeSeqNum = _tmp_clazzEnrolmentLocalChangeSeqNum; $receiver.clazzEnrolmentMasterChangeSeqNum = _tmp_clazzEnrolmentMasterChangeSeqNum; $receiver.clazzEnrolmentLastChangedBy = _tmp_clazzEnrolmentLastChangedBy; $receiver.clazzEnrolmentLct = _tmp_clazzEnrolmentLct; if (!_tmp_LeavingReason_isAllNull) { var $receiver_0 = new LeavingReason(); $receiver_0.leavingReasonUid = _tmp_leavingReasonUid; $receiver_0.leavingReasonTitle = _tmp_leavingReasonTitle; $receiver_0.leavingReasonMCSN = _tmp_leavingReasonMCSN; $receiver_0.leavingReasonCSN = _tmp_leavingReasonCSN; $receiver_0.leavingReasonLCB = _tmp_leavingReasonLCB; $receiver_0.leavingReasonLct = _tmp_leavingReasonLct; $receiver.leavingReason = $receiver_0; } return $receiver; }; } function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (SELECT ClazzEnrolment.*, LeavingReason.*, \n | COALESCE(Clazz.clazzTimeZone, COALESCE(School.schoolTimeZone, 'UTC')) as timeZone\n | FROM ClazzEnrolment LEFT JOIN\n | LeavingReason ON LeavingReason.leavingReasonUid = ClazzEnrolment.clazzEnrolmentLeavingReasonUid\n | LEFT JOIN Clazz ON Clazz.clazzUid = ClazzEnrolment.clazzEnrolmentClazzUid\n | LEFT JOIN School ON School.schoolUid = Clazz.clazzSchoolUid\n | WHERE clazzEnrolmentPersonUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND clazzEnrolmentClazzUid = ? ORDER BY clazzEnrolmentDateLeft DESC) LIMIT ? OFFSET ?\n ")), ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$clazzUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ClazzEnrolmentDao_JdbcKt._db, listOf(['ClazzEnrolment', 'LeavingReason', 'Clazz', 'School']), ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getData$lambda(this.this$ClazzEnrolmentDao_JdbcKt, this.closure$personUid, this.closure$clazzUid, _limit, _offset)); }; function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (SELECT ClazzEnrolment.*, LeavingReason.*, \n | COALESCE(Clazz.clazzTimeZone, COALESCE(School.schoolTimeZone, 'UTC')) as timeZone\n | FROM ClazzEnrolment LEFT JOIN\n | LeavingReason ON LeavingReason.leavingReasonUid = ClazzEnrolment.clazzEnrolmentLeavingReasonUid\n | LEFT JOIN Clazz ON Clazz.clazzUid = ClazzEnrolment.clazzEnrolmentClazzUid\n | LEFT JOIN School ON School.schoolUid = Clazz.clazzSchoolUid\n | WHERE clazzEnrolmentPersonUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND clazzEnrolmentClazzUid = ? ORDER BY clazzEnrolmentDateLeft DESC) \n ")), ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid, this.local$closure$clazzUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$clazzUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ClazzEnrolmentDao_JdbcKt._db, listOf(['ClazzEnrolment', 'LeavingReason', 'Clazz', 'School']), ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral$getLength$lambda(this.this$ClazzEnrolmentDao_JdbcKt, this.closure$personUid, this.closure$clazzUid)); }; ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ClazzEnrolmentDao_JdbcKt.prototype.findAllEnrolmentsByPersonAndClazzUid_3pjtqy$ = function (personUid, clazzUid) { return new ClazzEnrolmentDao_JdbcKt$findAllEnrolmentsByPersonAndClazzUid$ObjectLiteral(this, personUid, clazzUid); }; function ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_timeZone = closure$_result.getString_61zpoe$('timeZone'); var _tmp_clazzEnrolmentUid = closure$_result.getLong_61zpoe$('clazzEnrolmentUid'); var _tmp_clazzEnrolmentPersonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentPersonUid'); var _tmp_clazzEnrolmentClazzUid = closure$_result.getLong_61zpoe$('clazzEnrolmentClazzUid'); var _tmp_clazzEnrolmentDateJoined = closure$_result.getLong_61zpoe$('clazzEnrolmentDateJoined'); var _tmp_clazzEnrolmentDateLeft = closure$_result.getLong_61zpoe$('clazzEnrolmentDateLeft'); var _tmp_clazzEnrolmentRole = closure$_result.getInt_61zpoe$('clazzEnrolmentRole'); var _tmp_clazzEnrolmentAttendancePercentage = closure$_result.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var _tmp_clazzEnrolmentActive = closure$_result.getBoolean_61zpoe$('clazzEnrolmentActive'); var _tmp_clazzEnrolmentLeavingReasonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var _tmp_clazzEnrolmentOutcome = closure$_result.getInt_61zpoe$('clazzEnrolmentOutcome'); var _tmp_clazzEnrolmentLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var _tmp_clazzEnrolmentMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var _tmp_clazzEnrolmentLastChangedBy = closure$_result.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var _tmp_clazzEnrolmentLct = closure$_result.getLong_61zpoe$('clazzEnrolmentLct'); var _tmp_LeavingReason_nullCount = 0; var _tmp_leavingReasonUid = closure$_result.getLong_61zpoe$('leavingReasonUid'); if (closure$_result.wasNull()) { _tmp_LeavingReason_nullCount = _tmp_LeavingReason_nullCount + 1 | 0; } var _tmp_leavingReasonTitle = closure$_result.getString_61zpoe$('leavingReasonTitle'); if (closure$_result.wasNull()) { _tmp_LeavingReason_nullCount = _tmp_LeavingReason_nullCount + 1 | 0; } var _tmp_leavingReasonMCSN = closure$_result.getLong_61zpoe$('leavingReasonMCSN'); if (closure$_result.wasNull()) { _tmp_LeavingReason_nullCount = _tmp_LeavingReason_nullCount + 1 | 0; } var _tmp_leavingReasonCSN = closure$_result.getLong_61zpoe$('leavingReasonCSN'); if (closure$_result.wasNull()) { _tmp_LeavingReason_nullCount = _tmp_LeavingReason_nullCount + 1 | 0; } var _tmp_leavingReasonLCB = closure$_result.getInt_61zpoe$('leavingReasonLCB'); if (closure$_result.wasNull()) { _tmp_LeavingReason_nullCount = _tmp_LeavingReason_nullCount + 1 | 0; } var _tmp_leavingReasonLct = closure$_result.getLong_61zpoe$('leavingReasonLct'); if (closure$_result.wasNull()) { _tmp_LeavingReason_nullCount = _tmp_LeavingReason_nullCount + 1 | 0; } var _tmp_LeavingReason_isAllNull = _tmp_LeavingReason_nullCount === 6; var $receiver = new ClazzEnrolmentWithLeavingReason(); $receiver.timeZone = _tmp_timeZone; $receiver.clazzEnrolmentUid = _tmp_clazzEnrolmentUid; $receiver.clazzEnrolmentPersonUid = _tmp_clazzEnrolmentPersonUid; $receiver.clazzEnrolmentClazzUid = _tmp_clazzEnrolmentClazzUid; $receiver.clazzEnrolmentDateJoined = _tmp_clazzEnrolmentDateJoined; $receiver.clazzEnrolmentDateLeft = _tmp_clazzEnrolmentDateLeft; $receiver.clazzEnrolmentRole = _tmp_clazzEnrolmentRole; $receiver.clazzEnrolmentAttendancePercentage = _tmp_clazzEnrolmentAttendancePercentage; $receiver.clazzEnrolmentActive = _tmp_clazzEnrolmentActive; $receiver.clazzEnrolmentLeavingReasonUid = _tmp_clazzEnrolmentLeavingReasonUid; $receiver.clazzEnrolmentOutcome = _tmp_clazzEnrolmentOutcome; $receiver.clazzEnrolmentLocalChangeSeqNum = _tmp_clazzEnrolmentLocalChangeSeqNum; $receiver.clazzEnrolmentMasterChangeSeqNum = _tmp_clazzEnrolmentMasterChangeSeqNum; $receiver.clazzEnrolmentLastChangedBy = _tmp_clazzEnrolmentLastChangedBy; $receiver.clazzEnrolmentLct = _tmp_clazzEnrolmentLct; if (!_tmp_LeavingReason_isAllNull) { var $receiver_0 = new LeavingReason(); $receiver_0.leavingReasonUid = _tmp_leavingReasonUid; $receiver_0.leavingReasonTitle = _tmp_leavingReasonTitle; $receiver_0.leavingReasonMCSN = _tmp_leavingReasonMCSN; $receiver_0.leavingReasonCSN = _tmp_leavingReasonCSN; $receiver_0.leavingReasonLCB = _tmp_leavingReasonLCB; $receiver_0.leavingReasonLct = _tmp_leavingReasonLct; $receiver.leavingReason = $receiver_0; } return $receiver; }; } function ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda$lambda$lambda(_result)); } function Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda(closure$enrolmentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$enrolmentUid = closure$enrolmentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$enrolmentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda(closure$enrolmentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda(closure$enrolmentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt.prototype.findEnrolmentWithLeavingReason_s8cxhz$ = function (enrolmentUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin("\n |SELECT ClazzEnrolment.*, LeavingReason.*,\n | COALESCE(Clazz.clazzTimeZone, COALESCE(School.schoolTimeZone, 'UTC')) as timeZone\n | FROM ClazzEnrolment LEFT JOIN\n | LeavingReason ON LeavingReason.leavingReasonUid = ClazzEnrolment.clazzEnrolmentLeavingReasonUid\n | LEFT JOIN Clazz ON Clazz.clazzUid = ClazzEnrolment.clazzEnrolmentClazzUid\n | LEFT JOIN School ON School.schoolUid = Clazz.clazzSchoolUid\n | WHERE ClazzEnrolment.clazzEnrolmentUid = ?\n ")), ClazzEnrolmentDao_JdbcKt$findEnrolmentWithLeavingReason$lambda(enrolmentUid), continuation); }; function Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda(closure$endDate_0, closure$updateTime_0, closure$clazzEnrolmentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$endDate = closure$endDate_0; this.local$closure$updateTime = closure$updateTime_0; this.local$closure$clazzEnrolmentUid = closure$clazzEnrolmentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$endDate); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$updateTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzEnrolmentUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda(closure$endDate_0, closure$updateTime_0, closure$clazzEnrolmentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda(closure$endDate_0, closure$updateTime_0, closure$clazzEnrolmentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateDateLeftByUid_b9bd0d$($this, clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzEnrolmentUid = clazzEnrolmentUid_0; this.local$endDate = endDate_0; this.local$updateTime = updateTime_0; } Coroutine$updateDateLeftByUid_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateDateLeftByUid_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateDateLeftByUid_b9bd0d$.prototype.constructor = Coroutine$updateDateLeftByUid_b9bd0d$; Coroutine$updateDateLeftByUid_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzEnrolment \n | SET clazzEnrolmentDateLeft = ?,\n | clazzEnrolmentLct = ?\n | WHERE clazzEnrolmentUid = ?\n ')), ClazzEnrolmentDao_JdbcKt$updateDateLeftByUid$lambda(this.local$endDate, this.local$updateTime, this.local$clazzEnrolmentUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_JdbcKt.prototype.updateDateLeftByUid_b9bd0d$ = function (clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateDateLeftByUid_b9bd0d$(this, clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral(this$ClazzEnrolmentDao_JdbcKt, closure$personUid) { this.this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt; this.closure$personUid = closure$personUid; DataSourceFactory.call(this); } function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_attendance = closure$_result.getFloat_61zpoe$('attendance'); var _tmp_clazzEnrolmentUid = closure$_result.getLong_61zpoe$('clazzEnrolmentUid'); var _tmp_clazzEnrolmentPersonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentPersonUid'); var _tmp_clazzEnrolmentClazzUid = closure$_result.getLong_61zpoe$('clazzEnrolmentClazzUid'); var _tmp_clazzEnrolmentDateJoined = closure$_result.getLong_61zpoe$('clazzEnrolmentDateJoined'); var _tmp_clazzEnrolmentDateLeft = closure$_result.getLong_61zpoe$('clazzEnrolmentDateLeft'); var _tmp_clazzEnrolmentRole = closure$_result.getInt_61zpoe$('clazzEnrolmentRole'); var _tmp_clazzEnrolmentAttendancePercentage = closure$_result.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var _tmp_clazzEnrolmentActive = closure$_result.getBoolean_61zpoe$('clazzEnrolmentActive'); var _tmp_clazzEnrolmentLeavingReasonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var _tmp_clazzEnrolmentOutcome = closure$_result.getInt_61zpoe$('clazzEnrolmentOutcome'); var _tmp_clazzEnrolmentLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var _tmp_clazzEnrolmentMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var _tmp_clazzEnrolmentLastChangedBy = closure$_result.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var _tmp_clazzEnrolmentLct = closure$_result.getLong_61zpoe$('clazzEnrolmentLct'); var _tmp_Clazz_nullCount = 0; var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_Clazz_isAllNull = _tmp_Clazz_nullCount === 24; var $receiver = new ClazzEnrolmentWithClazzAndAttendance(); $receiver.attendance = _tmp_attendance; $receiver.clazzEnrolmentUid = _tmp_clazzEnrolmentUid; $receiver.clazzEnrolmentPersonUid = _tmp_clazzEnrolmentPersonUid; $receiver.clazzEnrolmentClazzUid = _tmp_clazzEnrolmentClazzUid; $receiver.clazzEnrolmentDateJoined = _tmp_clazzEnrolmentDateJoined; $receiver.clazzEnrolmentDateLeft = _tmp_clazzEnrolmentDateLeft; $receiver.clazzEnrolmentRole = _tmp_clazzEnrolmentRole; $receiver.clazzEnrolmentAttendancePercentage = _tmp_clazzEnrolmentAttendancePercentage; $receiver.clazzEnrolmentActive = _tmp_clazzEnrolmentActive; $receiver.clazzEnrolmentLeavingReasonUid = _tmp_clazzEnrolmentLeavingReasonUid; $receiver.clazzEnrolmentOutcome = _tmp_clazzEnrolmentOutcome; $receiver.clazzEnrolmentLocalChangeSeqNum = _tmp_clazzEnrolmentLocalChangeSeqNum; $receiver.clazzEnrolmentMasterChangeSeqNum = _tmp_clazzEnrolmentMasterChangeSeqNum; $receiver.clazzEnrolmentLastChangedBy = _tmp_clazzEnrolmentLastChangedBy; $receiver.clazzEnrolmentLct = _tmp_clazzEnrolmentLct; if (!_tmp_Clazz_isAllNull) { var $receiver_0 = new Clazz(); $receiver_0.clazzUid = _tmp_clazzUid; $receiver_0.clazzName = _tmp_clazzName; $receiver_0.clazzDesc = _tmp_clazzDesc; $receiver_0.attendanceAverage = _tmp_attendanceAverage; $receiver_0.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver_0.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver_0.isClazzActive = _tmp_isClazzActive; $receiver_0.clazzLocationUid = _tmp_clazzLocationUid; $receiver_0.clazzStartTime = _tmp_clazzStartTime; $receiver_0.clazzEndTime = _tmp_clazzEndTime; $receiver_0.clazzFeatures = _tmp_clazzFeatures; $receiver_0.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver_0.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver_0.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver_0.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver_0.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver_0.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver_0.clazzLct = _tmp_clazzLct; $receiver_0.clazzTimeZone = _tmp_clazzTimeZone; $receiver_0.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver_0.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver_0.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver_0.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver_0.clazzCode = _tmp_clazzCode; $receiver.clazz = $receiver_0; } return $receiver; }; } function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT ClazzEnrolment.*, Clazz.*, (SELECT ((CAST(COUNT(DISTINCT CASE WHEN \n | ClazzLogAttendanceRecord.attendanceStatus = 1 THEN \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid ELSE NULL END) AS REAL) / \n | MAX(COUNT(ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid),1)) * 100) \n | FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLog ON \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid WHERE \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = ? \n | AND ClazzLog.clazzLogClazzUid = Clazz.clazzUid AND ClazzLog.logDate \n | BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined AND ClazzEnrolment.clazzEnrolmentDateLeft) \n | as attendance\n | FROM ClazzEnrolment\n | LEFT JOIN Clazz ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?\n | AND ClazzEnrolment.clazzEnrolmentActive\n | ORDER BY ClazzEnrolment.clazzEnrolmentDateLeft DESC\n | ) LIMIT ? OFFSET ?\n '), void 0, void 0, void 0, trimMargin('\n |SELECT ClazzEnrolment.*, Clazz.*, (SELECT ((CAST(COUNT(DISTINCT CASE WHEN \n | ClazzLogAttendanceRecord.attendanceStatus = 1 THEN \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid ELSE NULL END) AS REAL) / \n | GREATEST(COUNT(ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid),1)) * 100) \n | FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLog ON \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid WHERE \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = ? \n | AND ClazzLog.clazzLogClazzUid = Clazz.clazzUid AND ClazzLog.logDate \n | BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined AND ClazzEnrolment.clazzEnrolmentDateLeft) \n | as attendance\n | FROM ClazzEnrolment\n | LEFT JOIN Clazz ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?\n | AND ClazzEnrolment.clazzEnrolmentActive\n | ORDER BY ClazzEnrolment.clazzEnrolmentDateLeft DESC\n | \n ')), ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ClazzEnrolmentDao_JdbcKt._db, listOf(['ClazzLogAttendanceRecord', 'ClazzLog', 'ClazzEnrolment', 'Clazz']), ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getData$lambda(this.this$ClazzEnrolmentDao_JdbcKt, this.closure$personUid, _limit, _offset)); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT ClazzEnrolment.*, Clazz.*, (SELECT ((CAST(COUNT(DISTINCT CASE WHEN \n | ClazzLogAttendanceRecord.attendanceStatus = 1 THEN \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid ELSE NULL END) AS REAL) / \n | MAX(COUNT(ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid),1)) * 100) \n | FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLog ON \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid WHERE \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = ? \n | AND ClazzLog.clazzLogClazzUid = Clazz.clazzUid AND ClazzLog.logDate \n | BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined AND ClazzEnrolment.clazzEnrolmentDateLeft) \n | as attendance\n | FROM ClazzEnrolment\n | LEFT JOIN Clazz ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?\n | AND ClazzEnrolment.clazzEnrolmentActive\n | ORDER BY ClazzEnrolment.clazzEnrolmentDateLeft DESC\n | ) \n '), void 0, void 0, void 0, trimMargin('\n |SELECT ClazzEnrolment.*, Clazz.*, (SELECT ((CAST(COUNT(DISTINCT CASE WHEN \n | ClazzLogAttendanceRecord.attendanceStatus = 1 THEN \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid ELSE NULL END) AS REAL) / \n | GREATEST(COUNT(ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid),1)) * 100) \n | FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLog ON \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid WHERE \n | ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = ? \n | AND ClazzLog.clazzLogClazzUid = Clazz.clazzUid AND ClazzLog.logDate \n | BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined AND ClazzEnrolment.clazzEnrolmentDateLeft) \n | as attendance\n | FROM ClazzEnrolment\n | LEFT JOIN Clazz ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?\n | AND ClazzEnrolment.clazzEnrolmentActive\n | ORDER BY ClazzEnrolment.clazzEnrolmentDateLeft DESC\n | \n ')), ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ClazzEnrolmentDao_JdbcKt._db, listOf(['ClazzLogAttendanceRecord', 'ClazzLog', 'ClazzEnrolment', 'Clazz']), ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral$getLength$lambda(this.this$ClazzEnrolmentDao_JdbcKt, this.closure$personUid)); }; ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ClazzEnrolmentDao_JdbcKt.prototype.findAllClazzesByPersonWithClazz_s8cxhz$ = function (personUid) { return new ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazz$ObjectLiteral(this, personUid); }; function ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda$lambda(_result) { return mapNextRow(_result, L0, ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda$lambda$lambda(_result)); } function Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda(closure$selectedPerson_0, closure$selectedClazz_0, closure$selectedEnrolment_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$selectedPerson = closure$selectedPerson_0; this.local$closure$selectedClazz = closure$selectedClazz_0; this.local$closure$selectedEnrolment = closure$selectedEnrolment_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$selectedPerson); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$selectedClazz); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$selectedEnrolment); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda(closure$selectedPerson_0, closure$selectedClazz_0, closure$selectedEnrolment_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda(closure$selectedPerson_0, closure$selectedClazz_0, closure$selectedEnrolment_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt.prototype.findMaxEndDateForEnrolment_b9bd0d$ = function (selectedClazz, selectedPerson, selectedEnrolment, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT COALESCE(MAX(clazzEnrolmentDateLeft),0) FROM ClazzEnrolment WHERE \n | ClazzEnrolment.clazzEnrolmentPersonUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND clazzEnrolmentClazzUid = ? AND clazzEnrolmentUid != ?\n | \n ')), ClazzEnrolmentDao_JdbcKt$findMaxEndDateForEnrolment$lambda(selectedPerson, selectedClazz, selectedEnrolment), continuation); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzEnrolmentUid = closure$_result.getLong_61zpoe$('clazzEnrolmentUid'); var _tmp_clazzEnrolmentPersonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentPersonUid'); var _tmp_clazzEnrolmentClazzUid = closure$_result.getLong_61zpoe$('clazzEnrolmentClazzUid'); var _tmp_clazzEnrolmentDateJoined = closure$_result.getLong_61zpoe$('clazzEnrolmentDateJoined'); var _tmp_clazzEnrolmentDateLeft = closure$_result.getLong_61zpoe$('clazzEnrolmentDateLeft'); var _tmp_clazzEnrolmentRole = closure$_result.getInt_61zpoe$('clazzEnrolmentRole'); var _tmp_clazzEnrolmentAttendancePercentage = closure$_result.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var _tmp_clazzEnrolmentActive = closure$_result.getBoolean_61zpoe$('clazzEnrolmentActive'); var _tmp_clazzEnrolmentLeavingReasonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var _tmp_clazzEnrolmentOutcome = closure$_result.getInt_61zpoe$('clazzEnrolmentOutcome'); var _tmp_clazzEnrolmentLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var _tmp_clazzEnrolmentMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var _tmp_clazzEnrolmentLastChangedBy = closure$_result.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var _tmp_clazzEnrolmentLct = closure$_result.getLong_61zpoe$('clazzEnrolmentLct'); var _tmp_Clazz_nullCount = 0; var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzName = closure$_result.getString_61zpoe$('clazzName'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzDesc = closure$_result.getString_61zpoe$('clazzDesc'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_attendanceAverage = closure$_result.getFloat_61zpoe$('attendanceAverage'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzHolidayUMCalendarUid = closure$_result.getLong_61zpoe$('clazzHolidayUMCalendarUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzScheuleUMCalendarUid = closure$_result.getLong_61zpoe$('clazzScheuleUMCalendarUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_isClazzActive = closure$_result.getBoolean_61zpoe$('isClazzActive'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzLocationUid = closure$_result.getLong_61zpoe$('clazzLocationUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzStartTime = closure$_result.getLong_61zpoe$('clazzStartTime'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzEndTime = closure$_result.getLong_61zpoe$('clazzEndTime'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzFeatures = closure$_result.getLong_61zpoe$('clazzFeatures'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzSchoolUid = closure$_result.getLong_61zpoe$('clazzSchoolUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzEnrolmentPolicy = closure$_result.getInt_61zpoe$('clazzEnrolmentPolicy'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzTerminologyUid = closure$_result.getLong_61zpoe$('clazzTerminologyUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzLastChangedBy = closure$_result.getInt_61zpoe$('clazzLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzLct = closure$_result.getLong_61zpoe$('clazzLct'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzTimeZone = closure$_result.getString_61zpoe$('clazzTimeZone'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzStudentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('clazzTeachersPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzPendingStudentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzParentsPersonGroupUid = closure$_result.getLong_61zpoe$('clazzParentsPersonGroupUid'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_clazzCode = closure$_result.getString_61zpoe$('clazzCode'); if (closure$_result.wasNull()) { _tmp_Clazz_nullCount = _tmp_Clazz_nullCount + 1 | 0; } var _tmp_Clazz_isAllNull = _tmp_Clazz_nullCount === 24; var $receiver = new ClazzEnrolmentWithClazz(); $receiver.clazzEnrolmentUid = _tmp_clazzEnrolmentUid; $receiver.clazzEnrolmentPersonUid = _tmp_clazzEnrolmentPersonUid; $receiver.clazzEnrolmentClazzUid = _tmp_clazzEnrolmentClazzUid; $receiver.clazzEnrolmentDateJoined = _tmp_clazzEnrolmentDateJoined; $receiver.clazzEnrolmentDateLeft = _tmp_clazzEnrolmentDateLeft; $receiver.clazzEnrolmentRole = _tmp_clazzEnrolmentRole; $receiver.clazzEnrolmentAttendancePercentage = _tmp_clazzEnrolmentAttendancePercentage; $receiver.clazzEnrolmentActive = _tmp_clazzEnrolmentActive; $receiver.clazzEnrolmentLeavingReasonUid = _tmp_clazzEnrolmentLeavingReasonUid; $receiver.clazzEnrolmentOutcome = _tmp_clazzEnrolmentOutcome; $receiver.clazzEnrolmentLocalChangeSeqNum = _tmp_clazzEnrolmentLocalChangeSeqNum; $receiver.clazzEnrolmentMasterChangeSeqNum = _tmp_clazzEnrolmentMasterChangeSeqNum; $receiver.clazzEnrolmentLastChangedBy = _tmp_clazzEnrolmentLastChangedBy; $receiver.clazzEnrolmentLct = _tmp_clazzEnrolmentLct; if (!_tmp_Clazz_isAllNull) { var $receiver_0 = new Clazz(); $receiver_0.clazzUid = _tmp_clazzUid; $receiver_0.clazzName = _tmp_clazzName; $receiver_0.clazzDesc = _tmp_clazzDesc; $receiver_0.attendanceAverage = _tmp_attendanceAverage; $receiver_0.clazzHolidayUMCalendarUid = _tmp_clazzHolidayUMCalendarUid; $receiver_0.clazzScheuleUMCalendarUid = _tmp_clazzScheuleUMCalendarUid; $receiver_0.isClazzActive = _tmp_isClazzActive; $receiver_0.clazzLocationUid = _tmp_clazzLocationUid; $receiver_0.clazzStartTime = _tmp_clazzStartTime; $receiver_0.clazzEndTime = _tmp_clazzEndTime; $receiver_0.clazzFeatures = _tmp_clazzFeatures; $receiver_0.clazzSchoolUid = _tmp_clazzSchoolUid; $receiver_0.clazzEnrolmentPolicy = _tmp_clazzEnrolmentPolicy; $receiver_0.clazzTerminologyUid = _tmp_clazzTerminologyUid; $receiver_0.clazzMasterChangeSeqNum = _tmp_clazzMasterChangeSeqNum; $receiver_0.clazzLocalChangeSeqNum = _tmp_clazzLocalChangeSeqNum; $receiver_0.clazzLastChangedBy = _tmp_clazzLastChangedBy; $receiver_0.clazzLct = _tmp_clazzLct; $receiver_0.clazzTimeZone = _tmp_clazzTimeZone; $receiver_0.clazzStudentsPersonGroupUid = _tmp_clazzStudentsPersonGroupUid; $receiver_0.clazzTeachersPersonGroupUid = _tmp_clazzTeachersPersonGroupUid; $receiver_0.clazzPendingStudentsPersonGroupUid = _tmp_clazzPendingStudentsPersonGroupUid; $receiver_0.clazzParentsPersonGroupUid = _tmp_clazzParentsPersonGroupUid; $receiver_0.clazzCode = _tmp_clazzCode; $receiver.clazz = $receiver_0; } return $receiver; }; } function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda$lambda(_result) { return mapRows(_result, ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda$lambda$lambda(_result)); } function Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda(closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda(closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda(closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt.prototype.findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$ = function (personUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT ClazzEnrolment.*, Clazz.* \n | FROM ClazzEnrolment \n | LEFT JOIN Clazz ON ClazzEnrolment.clazzEnrolmentClazzUid = Clazz.clazzUid \n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive\n | ORDER BY ClazzEnrolment.clazzEnrolmentDateLeft DESC\n | \n ')), ClazzEnrolmentDao_JdbcKt$findAllClazzesByPersonWithClazzAsListAsync$lambda(personUid), continuation); }; function ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzEnrolmentUid = closure$_result.getLong_61zpoe$('clazzEnrolmentUid'); var _tmp_clazzEnrolmentPersonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentPersonUid'); var _tmp_clazzEnrolmentClazzUid = closure$_result.getLong_61zpoe$('clazzEnrolmentClazzUid'); var _tmp_clazzEnrolmentDateJoined = closure$_result.getLong_61zpoe$('clazzEnrolmentDateJoined'); var _tmp_clazzEnrolmentDateLeft = closure$_result.getLong_61zpoe$('clazzEnrolmentDateLeft'); var _tmp_clazzEnrolmentRole = closure$_result.getInt_61zpoe$('clazzEnrolmentRole'); var _tmp_clazzEnrolmentAttendancePercentage = closure$_result.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var _tmp_clazzEnrolmentActive = closure$_result.getBoolean_61zpoe$('clazzEnrolmentActive'); var _tmp_clazzEnrolmentLeavingReasonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var _tmp_clazzEnrolmentOutcome = closure$_result.getInt_61zpoe$('clazzEnrolmentOutcome'); var _tmp_clazzEnrolmentLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var _tmp_clazzEnrolmentMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var _tmp_clazzEnrolmentLastChangedBy = closure$_result.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var _tmp_clazzEnrolmentLct = closure$_result.getLong_61zpoe$('clazzEnrolmentLct'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new ClazzEnrolmentWithPerson(); $receiver.clazzEnrolmentUid = _tmp_clazzEnrolmentUid; $receiver.clazzEnrolmentPersonUid = _tmp_clazzEnrolmentPersonUid; $receiver.clazzEnrolmentClazzUid = _tmp_clazzEnrolmentClazzUid; $receiver.clazzEnrolmentDateJoined = _tmp_clazzEnrolmentDateJoined; $receiver.clazzEnrolmentDateLeft = _tmp_clazzEnrolmentDateLeft; $receiver.clazzEnrolmentRole = _tmp_clazzEnrolmentRole; $receiver.clazzEnrolmentAttendancePercentage = _tmp_clazzEnrolmentAttendancePercentage; $receiver.clazzEnrolmentActive = _tmp_clazzEnrolmentActive; $receiver.clazzEnrolmentLeavingReasonUid = _tmp_clazzEnrolmentLeavingReasonUid; $receiver.clazzEnrolmentOutcome = _tmp_clazzEnrolmentOutcome; $receiver.clazzEnrolmentLocalChangeSeqNum = _tmp_clazzEnrolmentLocalChangeSeqNum; $receiver.clazzEnrolmentMasterChangeSeqNum = _tmp_clazzEnrolmentMasterChangeSeqNum; $receiver.clazzEnrolmentLastChangedBy = _tmp_clazzEnrolmentLastChangedBy; $receiver.clazzEnrolmentLct = _tmp_clazzEnrolmentLct; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.person = $receiver_0; } return $receiver; }; } function ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda$lambda(_result) { return mapRows(_result, ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda$lambda$lambda(_result)); } function Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda(closure$clazzUid_0, closure$date_0, closure$roleFilter_0, closure$personUidFilter_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$date = closure$date_0; this.local$closure$roleFilter = closure$roleFilter_0; this.local$closure$personUidFilter = closure$personUidFilter_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$date); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$roleFilter); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$roleFilter); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$personUidFilter); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$personUidFilter); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda(closure$clazzUid_0, closure$date_0, closure$roleFilter_0, closure$personUidFilter_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda(closure$clazzUid_0, closure$date_0, closure$roleFilter_0, closure$personUidFilter_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt.prototype.getAllClazzEnrolledAtTimeAsync_6qtc6d$$default = function (clazzUid, date, roleFilter, personUidFilter, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ClazzEnrolment.*, Person.*\n | FROM ClazzEnrolment\n | LEFT JOIN Person ON ClazzEnrolment.clazzEnrolmentPersonUid = Person.personUid\n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = ?\n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft\n | AND CAST(clazzEnrolmentActive AS INTEGER) = 1\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentRole = ?)\n | AND (? = 0 OR ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | \n ')), ClazzEnrolmentDao_JdbcKt$getAllClazzEnrolledAtTimeAsync$lambda(clazzUid, date, roleFilter, personUidFilter), continuation); }; function ClazzEnrolmentDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzEnrolmentUid = closure$_result.getLong_61zpoe$('clazzEnrolmentUid'); var _tmp_clazzEnrolmentPersonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentPersonUid'); var _tmp_clazzEnrolmentClazzUid = closure$_result.getLong_61zpoe$('clazzEnrolmentClazzUid'); var _tmp_clazzEnrolmentDateJoined = closure$_result.getLong_61zpoe$('clazzEnrolmentDateJoined'); var _tmp_clazzEnrolmentDateLeft = closure$_result.getLong_61zpoe$('clazzEnrolmentDateLeft'); var _tmp_clazzEnrolmentRole = closure$_result.getInt_61zpoe$('clazzEnrolmentRole'); var _tmp_clazzEnrolmentAttendancePercentage = closure$_result.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var _tmp_clazzEnrolmentActive = closure$_result.getBoolean_61zpoe$('clazzEnrolmentActive'); var _tmp_clazzEnrolmentLeavingReasonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var _tmp_clazzEnrolmentOutcome = closure$_result.getInt_61zpoe$('clazzEnrolmentOutcome'); var _tmp_clazzEnrolmentLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var _tmp_clazzEnrolmentMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var _tmp_clazzEnrolmentLastChangedBy = closure$_result.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var _tmp_clazzEnrolmentLct = closure$_result.getLong_61zpoe$('clazzEnrolmentLct'); var $receiver = new ClazzEnrolment(); $receiver.clazzEnrolmentUid = _tmp_clazzEnrolmentUid; $receiver.clazzEnrolmentPersonUid = _tmp_clazzEnrolmentPersonUid; $receiver.clazzEnrolmentClazzUid = _tmp_clazzEnrolmentClazzUid; $receiver.clazzEnrolmentDateJoined = _tmp_clazzEnrolmentDateJoined; $receiver.clazzEnrolmentDateLeft = _tmp_clazzEnrolmentDateLeft; $receiver.clazzEnrolmentRole = _tmp_clazzEnrolmentRole; $receiver.clazzEnrolmentAttendancePercentage = _tmp_clazzEnrolmentAttendancePercentage; $receiver.clazzEnrolmentActive = _tmp_clazzEnrolmentActive; $receiver.clazzEnrolmentLeavingReasonUid = _tmp_clazzEnrolmentLeavingReasonUid; $receiver.clazzEnrolmentOutcome = _tmp_clazzEnrolmentOutcome; $receiver.clazzEnrolmentLocalChangeSeqNum = _tmp_clazzEnrolmentLocalChangeSeqNum; $receiver.clazzEnrolmentMasterChangeSeqNum = _tmp_clazzEnrolmentMasterChangeSeqNum; $receiver.clazzEnrolmentLastChangedBy = _tmp_clazzEnrolmentLastChangedBy; $receiver.clazzEnrolmentLct = _tmp_clazzEnrolmentLct; return $receiver; }; } function ClazzEnrolmentDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzEnrolmentDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findByUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByUid$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByUid$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM ClazzEnrolment WHERE clazzEnrolmentUid = ?'), ClazzEnrolmentDao_JdbcKt$findByUid$lambda(uid), continuation); }; function ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzEnrolmentUid = closure$_result.getLong_61zpoe$('clazzEnrolmentUid'); var _tmp_clazzEnrolmentPersonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentPersonUid'); var _tmp_clazzEnrolmentClazzUid = closure$_result.getLong_61zpoe$('clazzEnrolmentClazzUid'); var _tmp_clazzEnrolmentDateJoined = closure$_result.getLong_61zpoe$('clazzEnrolmentDateJoined'); var _tmp_clazzEnrolmentDateLeft = closure$_result.getLong_61zpoe$('clazzEnrolmentDateLeft'); var _tmp_clazzEnrolmentRole = closure$_result.getInt_61zpoe$('clazzEnrolmentRole'); var _tmp_clazzEnrolmentAttendancePercentage = closure$_result.getFloat_61zpoe$('clazzEnrolmentAttendancePercentage'); var _tmp_clazzEnrolmentActive = closure$_result.getBoolean_61zpoe$('clazzEnrolmentActive'); var _tmp_clazzEnrolmentLeavingReasonUid = closure$_result.getLong_61zpoe$('clazzEnrolmentLeavingReasonUid'); var _tmp_clazzEnrolmentOutcome = closure$_result.getInt_61zpoe$('clazzEnrolmentOutcome'); var _tmp_clazzEnrolmentLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentLocalChangeSeqNum'); var _tmp_clazzEnrolmentMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzEnrolmentMasterChangeSeqNum'); var _tmp_clazzEnrolmentLastChangedBy = closure$_result.getInt_61zpoe$('clazzEnrolmentLastChangedBy'); var _tmp_clazzEnrolmentLct = closure$_result.getLong_61zpoe$('clazzEnrolmentLct'); var $receiver = new ClazzEnrolment(); $receiver.clazzEnrolmentUid = _tmp_clazzEnrolmentUid; $receiver.clazzEnrolmentPersonUid = _tmp_clazzEnrolmentPersonUid; $receiver.clazzEnrolmentClazzUid = _tmp_clazzEnrolmentClazzUid; $receiver.clazzEnrolmentDateJoined = _tmp_clazzEnrolmentDateJoined; $receiver.clazzEnrolmentDateLeft = _tmp_clazzEnrolmentDateLeft; $receiver.clazzEnrolmentRole = _tmp_clazzEnrolmentRole; $receiver.clazzEnrolmentAttendancePercentage = _tmp_clazzEnrolmentAttendancePercentage; $receiver.clazzEnrolmentActive = _tmp_clazzEnrolmentActive; $receiver.clazzEnrolmentLeavingReasonUid = _tmp_clazzEnrolmentLeavingReasonUid; $receiver.clazzEnrolmentOutcome = _tmp_clazzEnrolmentOutcome; $receiver.clazzEnrolmentLocalChangeSeqNum = _tmp_clazzEnrolmentLocalChangeSeqNum; $receiver.clazzEnrolmentMasterChangeSeqNum = _tmp_clazzEnrolmentMasterChangeSeqNum; $receiver.clazzEnrolmentLastChangedBy = _tmp_clazzEnrolmentLastChangedBy; $receiver.clazzEnrolmentLct = _tmp_clazzEnrolmentLct; return $receiver; }; } function ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM ClazzEnrolment WHERE clazzEnrolmentUid = ?'), ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { return new LiveDataImpl(this._db, listOf_0('ClazzEnrolment'), ClazzEnrolmentDao_JdbcKt$findByUidLive$lambda(this, uid)); }; function Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda(closure$active_0, closure$changeTime_0, closure$personUid_0, closure$clazzUid_0, closure$roleId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$roleId = closure$roleId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$roleId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda(closure$active_0, closure$changeTime_0, closure$personUid_0, closure$clazzUid_0, closure$roleId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda(closure$active_0, closure$changeTime_0, closure$personUid_0, closure$clazzUid_0, closure$roleId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt.prototype.updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$ = function (personUid, clazzUid, roleId, active, changeTime, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzEnrolment\n | SET clazzEnrolmentActive = ?,\n | clazzEnrolmentLct= ?\n | WHERE clazzEnrolmentPersonUid = ? \n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentRole = ?\n ')), ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForPersonAndClazz$lambda(active, changeTime, personUid, clazzUid, roleId), continuation); }; function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral(this$ClazzEnrolmentDao_JdbcKt, closure$clazzUid, closure$accountPersonUid, closure$roleId, closure$filter, closure$currentTime, closure$searchText, closure$sortOrder) { this.this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt; this.closure$clazzUid = closure$clazzUid; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$roleId = closure$roleId; this.closure$filter = closure$filter; this.closure$currentTime = closure$currentTime; this.closure$searchText = closure$searchText; this.closure$sortOrder = closure$sortOrder; DataSourceFactory.call(this); } function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_attendance = closure$_result.getFloat_61zpoe$('attendance'); var _tmp_earliestJoinDate = closure$_result.getLong_61zpoe$('earliestJoinDate'); var _tmp_latestDateLeft = closure$_result.getLong_61zpoe$('latestDateLeft'); var _tmp_enrolmentRole = closure$_result.getInt_61zpoe$('enrolmentRole'); var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var $receiver = new PersonWithClazzEnrolmentDetails(); $receiver.attendance = _tmp_attendance; $receiver.earliestJoinDate = _tmp_earliestJoinDate; $receiver.latestDateLeft = _tmp_latestDateLeft; $receiver.enrolmentRole = _tmp_enrolmentRole; $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; return $receiver; }; } function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$roleId = closure$roleId_0; this.local$closure$filter = closure$filter_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$roleId); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$filter); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$currentTime); this.local$_stmt.setString_vqvrqt$(8, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(13, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(14, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$roleId = closure$roleId_0; this.local$closure$filter = closure$filter_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT Person.*, \n | (SELECT ((CAST(COUNT(DISTINCT \n | CASE WHEN ClazzLogAttendanceRecord.attendanceStatus = 1 \n | THEN ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid \n | ELSE NULL \n | END) \n | AS REAL) / \n | MAX(COUNT(ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid),1)) * 100) \n | FROM ClazzLogAttendanceRecord \n | JOIN ClazzLog \n | ON ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid \n | WHERE ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = Person.personUid \n | AND ClazzLog.clazzLogClazzUid = ?) AS attendance, \n | \n | \t (SELECT MIN(ClazzEnrolment.clazzEnrolmentDateJoined) \n | FROM ClazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid) AS earliestJoinDate, \n | \n | \t (SELECT MAX(ClazzEnrolment.clazzEnrolmentDateLeft) \n | FROM ClazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid) AS latestDateLeft, \n | \n | (SELECT clazzEnrolmentRole \n | FROM clazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid \n | AND ClazzEnrolment.clazzEnrolmentClazzUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive) AS enrolmentRole\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 64 \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND Person.personUid IN (SELECT clazzEnrolmentPersonUid \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND ClazzEnrolment.clazzEnrolmentRole = ? \n | AND (? != 1 \n | OR (? \n | BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft))) \n | AND Person.firstNames || ' ' || Person.lastName LIKE ?\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC,\n | CASE(?)\n | WHEN 5 THEN attendance\n | WHEN 7 THEN earliestJoinDate\n | WHEN 9 THEN latestDateLeft\n | ELSE 0\n | END ASC,\n | CASE(?)\n | WHEN 6 THEN attendance\n | WHEN 8 THEN earliestJoinDate\n | WHEN 10 THEN latestDateLeft\n | ELSE 0\n | END DESC\n | ) LIMIT ? OFFSET ?\n ")), ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda$lambda(this.local$closure$clazzUid, this.local$closure$accountPersonUid, this.local$closure$roleId, this.local$closure$filter, this.local$closure$currentTime, this.local$closure$searchText, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ClazzEnrolmentDao_JdbcKt._db, listOf(['Clazz', 'Person', 'ClazzEnrolment', 'PersonGroupMember', 'ScopedGrant']), ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getData$lambda(this.this$ClazzEnrolmentDao_JdbcKt, this.closure$clazzUid, this.closure$accountPersonUid, this.closure$roleId, this.closure$filter, this.closure$currentTime, this.closure$searchText, this.closure$sortOrder, _limit, _offset)); }; function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$roleId = closure$roleId_0; this.local$closure$filter = closure$filter_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$roleId); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$filter); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$currentTime); this.local$_stmt.setString_vqvrqt$(8, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzEnrolmentDao_JdbcKt = this$ClazzEnrolmentDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$roleId = closure$roleId_0; this.local$closure$filter = closure$filter_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzEnrolmentDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Person.*, \n | (SELECT ((CAST(COUNT(DISTINCT \n | CASE WHEN ClazzLogAttendanceRecord.attendanceStatus = 1 \n | THEN ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid \n | ELSE NULL \n | END) \n | AS REAL) / \n | MAX(COUNT(ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid),1)) * 100) \n | FROM ClazzLogAttendanceRecord \n | JOIN ClazzLog \n | ON ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid \n | WHERE ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = Person.personUid \n | AND ClazzLog.clazzLogClazzUid = ?) AS attendance, \n | \n | \t (SELECT MIN(ClazzEnrolment.clazzEnrolmentDateJoined) \n | FROM ClazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid) AS earliestJoinDate, \n | \n | \t (SELECT MAX(ClazzEnrolment.clazzEnrolmentDateLeft) \n | FROM ClazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid) AS latestDateLeft, \n | \n | (SELECT clazzEnrolmentRole \n | FROM clazzEnrolment \n | WHERE Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid \n | AND ClazzEnrolment.clazzEnrolmentClazzUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive) AS enrolmentRole\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 64 \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND Person.personUid IN (SELECT clazzEnrolmentPersonUid \n | FROM ClazzEnrolment \n | WHERE ClazzEnrolment.clazzEnrolmentClazzUid = ? \n | AND ClazzEnrolment.clazzEnrolmentActive \n | AND ClazzEnrolment.clazzEnrolmentRole = ? \n | AND (? != 1 \n | OR (? \n | BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft))) \n | AND Person.firstNames || ' ' || Person.lastName LIKE ?\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC,\n | CASE(?)\n | WHEN 5 THEN attendance\n | WHEN 7 THEN earliestJoinDate\n | WHEN 9 THEN latestDateLeft\n | ELSE 0\n | END ASC,\n | CASE(?)\n | WHEN 6 THEN attendance\n | WHEN 8 THEN earliestJoinDate\n | WHEN 10 THEN latestDateLeft\n | ELSE 0\n | END DESC\n | ) \n ")), ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda$lambda(this.local$closure$clazzUid, this.local$closure$accountPersonUid, this.local$closure$roleId, this.local$closure$filter, this.local$closure$currentTime, this.local$closure$searchText, this.local$closure$sortOrder), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda(this$ClazzEnrolmentDao_JdbcKt_0, closure$clazzUid_0, closure$accountPersonUid_0, closure$roleId_0, closure$filter_0, closure$currentTime_0, closure$searchText_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ClazzEnrolmentDao_JdbcKt._db, listOf(['Clazz', 'Person', 'ClazzEnrolment', 'PersonGroupMember', 'ScopedGrant']), ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral$getLength$lambda(this.this$ClazzEnrolmentDao_JdbcKt, this.closure$clazzUid, this.closure$accountPersonUid, this.closure$roleId, this.closure$filter, this.closure$currentTime, this.closure$searchText, this.closure$sortOrder)); }; ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ClazzEnrolmentDao_JdbcKt.prototype.findByClazzUidAndRole_i7yiqk$$default = function (clazzUid, roleId, sortOrder, searchText, filter, accountPersonUid, currentTime) { return new ClazzEnrolmentDao_JdbcKt$findByClazzUidAndRole$ObjectLiteral(this, clazzUid, accountPersonUid, roleId, filter, currentTime, searchText, sortOrder); }; function ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForClazzEnrolment$lambda(closure$enrolled, closure$timeChanged, closure$clazzEnrolmentUid) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$enrolled); _stmt.setLong_6svq3l$(2, closure$timeChanged); _stmt.setLong_6svq3l$(3, closure$clazzEnrolmentUid); return _stmt.executeUpdate(); }; } ClazzEnrolmentDao_JdbcKt.prototype.updateClazzEnrolmentActiveForClazzEnrolment_zaz62j$ = function (clazzEnrolmentUid, enrolled, timeChanged) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzEnrolment \n | SET clazzEnrolmentActive = ?,\n | clazzEnrolmentLct = ?\n | WHERE clazzEnrolmentUid = ?\n ')), ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentActiveForClazzEnrolment$lambda(enrolled, timeChanged, clazzEnrolmentUid)); }; function Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda(closure$newRole_0, closure$updateTime_0, closure$personUid_0, closure$clazzUid_0, closure$oldRole_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newRole = closure$newRole_0; this.local$closure$updateTime = closure$updateTime_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$oldRole = closure$oldRole_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda.prototype.constructor = Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda; Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$newRole); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$updateTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$oldRole); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda(closure$newRole_0, closure$updateTime_0, closure$personUid_0, closure$clazzUid_0, closure$oldRole_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda(closure$newRole_0, closure$updateTime_0, closure$personUid_0, closure$clazzUid_0, closure$oldRole_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzEnrolmentDao_JdbcKt.prototype.updateClazzEnrolmentRole_d2c2sj$ = function (personUid, clazzUid, newRole, oldRole, updateTime, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzEnrolment \n | SET clazzEnrolmentRole = ?,\n | clazzEnrolmentLct = ? \n | -- Avoid potential for duplicate approvals if user was previously refused \n | WHERE clazzEnrolmentUid = COALESCE( \n | (SELECT clazzEnrolmentUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = ? \n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentRole = ?\n | AND CAST(clazzEnrolmentActive AS INTEGER) = 1\n | LIMIT 1), 0)\n ')), ClazzEnrolmentDao_JdbcKt$updateClazzEnrolmentRole$lambda(newRole, updateTime, personUid, clazzUid, oldRole), continuation); }; function ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ClazzEnrolment (clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.clazzEnrolmentUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.clazzEnrolmentUid); } stmt.setLong_6svq3l$(2, entity.clazzEnrolmentPersonUid); stmt.setLong_6svq3l$(3, entity.clazzEnrolmentClazzUid); stmt.setLong_6svq3l$(4, entity.clazzEnrolmentDateJoined); stmt.setLong_6svq3l$(5, entity.clazzEnrolmentDateLeft); stmt.setInt_vux9f0$(6, entity.clazzEnrolmentRole); stmt.setFloat_24o109$(7, entity.clazzEnrolmentAttendancePercentage); stmt.setBoolean_fzusl$(8, entity.clazzEnrolmentActive); stmt.setLong_6svq3l$(9, entity.clazzEnrolmentLeavingReasonUid); stmt.setInt_vux9f0$(10, entity.clazzEnrolmentOutcome); stmt.setLong_6svq3l$(11, entity.clazzEnrolmentLocalChangeSeqNum); stmt.setLong_6svq3l$(12, entity.clazzEnrolmentMasterChangeSeqNum); stmt.setInt_vux9f0$(13, entity.clazzEnrolmentLastChangedBy); stmt.setLong_6svq3l$(14, entity.clazzEnrolmentLct); }; ClazzEnrolmentDao_JdbcKt$_insertAdapterClazzEnrolment_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzEnrolmentDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzEnrolmentDao_JdbcKt', interfaces: [ClazzEnrolmentDao]}; function ClazzEnrolmentDao_ReplicateWrapper(_db, _dao) { ClazzEnrolmentDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_21($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_21.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_21.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_21.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_21; Coroutine$replicateOnNewNode_s8cxhz$_21.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_21(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateClazzEnrolmentOnChange_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateClazzEnrolmentOnChange_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateClazzEnrolmentOnChange_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateClazzEnrolmentOnChange_0.prototype.constructor = Coroutine$replicateClazzEnrolmentOnChange_0; Coroutine$replicateClazzEnrolmentOnChange_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateClazzEnrolmentOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.replicateClazzEnrolmentOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateClazzEnrolmentOnChange_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.insertListAsync_9f9sqv$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findByPersonUidAndClazzUidAsync_3pjtqy$ = function (personUid, clazzUid, continuation) { return this._dao_0.findByPersonUidAndClazzUidAsync_3pjtqy$(personUid, clazzUid, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findAllEnrolmentsByPersonAndClazzUid_3pjtqy$ = function (personUid, clazzUid) { return this._dao_0.findAllEnrolmentsByPersonAndClazzUid_3pjtqy$(personUid, clazzUid); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findEnrolmentWithLeavingReason_s8cxhz$ = function (enrolmentUid, continuation) { return this._dao_0.findEnrolmentWithLeavingReason_s8cxhz$(enrolmentUid, continuation); }; function Coroutine$updateDateLeftByUid_b9bd0d$_0($this, clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzEnrolmentUid = clazzEnrolmentUid_0; this.local$endDate = endDate_0; this.local$updateTime = updateTime_0; } Coroutine$updateDateLeftByUid_b9bd0d$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateDateLeftByUid_b9bd0d$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateDateLeftByUid_b9bd0d$_0.prototype.constructor = Coroutine$updateDateLeftByUid_b9bd0d$_0; Coroutine$updateDateLeftByUid_b9bd0d$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateDateLeftByUid_b9bd0d$(this.local$clazzEnrolmentUid, this.local$endDate, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.updateDateLeftByUid_b9bd0d$ = function (clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateDateLeftByUid_b9bd0d$_0(this, clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.updateAsync_95p8s2$ = function (entity, continuation) { entity.clazzEnrolmentLct = systemTimeInMillis(); return this._dao_0.updateAsync_95p8s2$(entity, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findAllClazzesByPersonWithClazz_s8cxhz$ = function (personUid) { return this._dao_0.findAllClazzesByPersonWithClazz_s8cxhz$(personUid); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findMaxEndDateForEnrolment_b9bd0d$ = function (selectedClazz, selectedPerson, selectedEnrolment, continuation) { return this._dao_0.findMaxEndDateForEnrolment_b9bd0d$(selectedClazz, selectedPerson, selectedEnrolment, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$ = function (personUid, continuation) { return this._dao_0.findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$(personUid, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.getAllClazzEnrolledAtTimeAsync_6qtc6d$$default = function (clazzUid, date, roleFilter, personUidFilter, continuation) { return this._dao_0.getAllClazzEnrolledAtTimeAsync_6qtc6d$(clazzUid, date, roleFilter, personUidFilter, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUid_s8cxhz$(uid, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$ = function (personUid, clazzUid, roleId, active, changeTime, continuation) { return this._dao_0.updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$(personUid, clazzUid, roleId, active, changeTime, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.findByClazzUidAndRole_i7yiqk$$default = function (clazzUid, roleId, sortOrder, searchText, filter, accountPersonUid, currentTime) { return this._dao_0.findByClazzUidAndRole_i7yiqk$(clazzUid, roleId, sortOrder, searchText, filter, accountPersonUid, currentTime); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.updateClazzEnrolmentActiveForClazzEnrolment_zaz62j$ = function (clazzEnrolmentUid, enrolled, timeChanged) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.updateClazzEnrolmentRole_d2c2sj$ = function (personUid, clazzUid, newRole, oldRole, updateTime, continuation) { return this._dao_0.updateClazzEnrolmentRole_d2c2sj$(personUid, clazzUid, newRole, oldRole, updateTime, continuation); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_23($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_23.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_23.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_23.prototype.constructor = Coroutine$insertAsync_23; Coroutine$insertAsync_23.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.clazzEnrolmentUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(65, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.clazzEnrolmentUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.clazzEnrolmentLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.clazzEnrolmentUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_23(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzEnrolmentDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzEnrolmentDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzEnrolmentDao_ReplicateWrapper', interfaces: [ClazzEnrolmentDao]}; function ClazzEnrolmentDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzEnrolmentDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_22($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_22.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_22.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_22.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_22; Coroutine$replicateOnNewNode_s8cxhz$_22.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_22(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateClazzEnrolmentOnChange_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateClazzEnrolmentOnChange_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateClazzEnrolmentOnChange_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateClazzEnrolmentOnChange_1.prototype.constructor = Coroutine$replicateClazzEnrolmentOnChange_1; Coroutine$replicateClazzEnrolmentOnChange_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateClazzEnrolmentOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.replicateClazzEnrolmentOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateClazzEnrolmentOnChange_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.insertListAsync_9f9sqv$ = function (entityList) { this._dao.insertListAsync_9f9sqv$(entityList); }; function Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$($this, personUid_0, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$clazzUid = clazzUid_0; } Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$.prototype.constructor = Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$; Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByPersonUidAndClazzUidAsync_3pjtqy$(this.local$personUid, this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.findByPersonUidAndClazzUidAsync_3pjtqy$ = function (personUid_0, clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUidAndClazzUidAsync_3pjtqy$(this, personUid_0, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.findAllEnrolmentsByPersonAndClazzUid_3pjtqy$ = function (personUid, clazzUid) { var _result = this._dao.findAllEnrolmentsByPersonAndClazzUid_3pjtqy$(personUid, clazzUid); return _result; }; function Coroutine$findEnrolmentWithLeavingReason_s8cxhz$($this, enrolmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$enrolmentUid = enrolmentUid_0; } Coroutine$findEnrolmentWithLeavingReason_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEnrolmentWithLeavingReason_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEnrolmentWithLeavingReason_s8cxhz$.prototype.constructor = Coroutine$findEnrolmentWithLeavingReason_s8cxhz$; Coroutine$findEnrolmentWithLeavingReason_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findEnrolmentWithLeavingReason_s8cxhz$(this.local$enrolmentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.findEnrolmentWithLeavingReason_s8cxhz$ = function (enrolmentUid_0, continuation_0, suspended) { var instance = new Coroutine$findEnrolmentWithLeavingReason_s8cxhz$(this, enrolmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateDateLeftByUid_b9bd0d$_1($this, clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzEnrolmentUid = clazzEnrolmentUid_0; this.local$endDate = endDate_0; this.local$updateTime = updateTime_0; } Coroutine$updateDateLeftByUid_b9bd0d$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateDateLeftByUid_b9bd0d$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateDateLeftByUid_b9bd0d$_1.prototype.constructor = Coroutine$updateDateLeftByUid_b9bd0d$_1; Coroutine$updateDateLeftByUid_b9bd0d$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateDateLeftByUid_b9bd0d$(this.local$clazzEnrolmentUid, this.local$endDate, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.updateDateLeftByUid_b9bd0d$ = function (clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateDateLeftByUid_b9bd0d$_1(this, clazzEnrolmentUid_0, endDate_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_95p8s2$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_95p8s2$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_95p8s2$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_95p8s2$_0.prototype.constructor = Coroutine$updateAsync_95p8s2$_0; Coroutine$updateAsync_95p8s2$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_95p8s2$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.updateAsync_95p8s2$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_95p8s2$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.findAllClazzesByPersonWithClazz_s8cxhz$ = function (personUid) { var _result = this._dao.findAllClazzesByPersonWithClazz_s8cxhz$(personUid); return _result; }; function Coroutine$findMaxEndDateForEnrolment_b9bd0d$($this, selectedClazz_0, selectedPerson_0, selectedEnrolment_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$selectedClazz = selectedClazz_0; this.local$selectedPerson = selectedPerson_0; this.local$selectedEnrolment = selectedEnrolment_0; } Coroutine$findMaxEndDateForEnrolment_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findMaxEndDateForEnrolment_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findMaxEndDateForEnrolment_b9bd0d$.prototype.constructor = Coroutine$findMaxEndDateForEnrolment_b9bd0d$; Coroutine$findMaxEndDateForEnrolment_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findMaxEndDateForEnrolment_b9bd0d$(this.local$selectedClazz, this.local$selectedPerson, this.local$selectedEnrolment, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.findMaxEndDateForEnrolment_b9bd0d$ = function (selectedClazz_0, selectedPerson_0, selectedEnrolment_0, continuation_0, suspended) { var instance = new Coroutine$findMaxEndDateForEnrolment_b9bd0d$(this, selectedClazz_0, selectedPerson_0, selectedEnrolment_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; } Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$.prototype.constructor = Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$; Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$(this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllClazzesByPersonWithClazzAsListAsync_s8cxhz$(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default($this, clazzUid_0, date_0, roleFilter_0, personUidFilter_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$date = date_0; this.local$roleFilter = roleFilter_0; this.local$personUidFilter = personUidFilter_0; } Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default.prototype.constructor = Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default; Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getAllClazzEnrolledAtTimeAsync_6qtc6d$(this.local$clazzUid, this.local$date, this.local$roleFilter, this.local$personUidFilter, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.getAllClazzEnrolledAtTimeAsync_6qtc6d$$default = function (clazzUid_0, date_0, roleFilter_0, personUidFilter_0, continuation_0, suspended) { var instance = new Coroutine$getAllClazzEnrolledAtTimeAsync_6qtc6d$$default(this, clazzUid_0, date_0, roleFilter_0, personUidFilter_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUid_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$.prototype.constructor = Coroutine$findByUid_s8cxhz$; Coroutine$findByUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.findByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$($this, personUid_0, clazzUid_0, roleId_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$clazzUid = clazzUid_0; this.local$roleId = roleId_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$.prototype.constructor = Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$; Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$(this.local$personUid, this.local$clazzUid, this.local$roleId, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$ = function (personUid_0, clazzUid_0, roleId_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateClazzEnrolmentActiveForPersonAndClazz_mpc0bo$(this, personUid_0, clazzUid_0, roleId_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.findByClazzUidAndRole_i7yiqk$$default = function (clazzUid, roleId, sortOrder, searchText, filter, accountPersonUid, currentTime) { var _result = this._dao.findByClazzUidAndRole_i7yiqk$(clazzUid, roleId, sortOrder, searchText, filter, accountPersonUid, currentTime); return _result; }; ClazzEnrolmentDao_Repo.prototype.updateClazzEnrolmentActiveForClazzEnrolment_zaz62j$ = function (clazzEnrolmentUid, enrolled, timeChanged) { var _result = this._dao.updateClazzEnrolmentActiveForClazzEnrolment_zaz62j$(clazzEnrolmentUid, enrolled, timeChanged); return _result; }; function Coroutine$updateClazzEnrolmentRole_d2c2sj$($this, personUid_0, clazzUid_0, newRole_0, oldRole_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$clazzUid = clazzUid_0; this.local$newRole = newRole_0; this.local$oldRole = oldRole_0; this.local$updateTime = updateTime_0; } Coroutine$updateClazzEnrolmentRole_d2c2sj$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateClazzEnrolmentRole_d2c2sj$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateClazzEnrolmentRole_d2c2sj$.prototype.constructor = Coroutine$updateClazzEnrolmentRole_d2c2sj$; Coroutine$updateClazzEnrolmentRole_d2c2sj$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateClazzEnrolmentRole_d2c2sj$(this.local$personUid, this.local$clazzUid, this.local$newRole, this.local$oldRole, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.updateClazzEnrolmentRole_d2c2sj$ = function (personUid_0, clazzUid_0, newRole_0, oldRole_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateClazzEnrolmentRole_d2c2sj$(this, personUid_0, clazzUid_0, newRole_0, oldRole_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_24($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_24.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_24.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_24.prototype.constructor = Coroutine$insertAsync_24; Coroutine$insertAsync_24.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzEnrolmentDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_24(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzEnrolmentDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzEnrolmentDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzEnrolmentDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzEnrolmentDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzEnrolmentDao_Repo', interfaces: [ClazzEnrolmentDao]}; function ClazzLogAttendanceRecordDao() { } ClazzLogAttendanceRecordDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogAttendanceRecordDao', interfaces: [BaseDao]}; function ClazzLogAttendanceRecordDao_JdbcKt(_db) { ClazzLogAttendanceRecordDao.call(this); this._db = _db; this._insertAdapterClazzLogAttendanceRecord_ = new ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral(this._db); } function Coroutine$insertListAsync_7quahr$($this, entities_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entities = entities_0; } Coroutine$insertListAsync_7quahr$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_7quahr$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_7quahr$.prototype.constructor = Coroutine$insertListAsync_7quahr$; Coroutine$insertListAsync_7quahr$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzLogAttendanceRecord_.insertListAsync_4ezy5m$(this.local$entities, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.insertListAsync_7quahr$ = function (entities_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_7quahr$(this, entities_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzLogAttendanceRecord_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_25($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_25.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_25.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_25.prototype.constructor = Coroutine$insertAsync_25; Coroutine$insertAsync_25.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzLogAttendanceRecord_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_25(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzLogAttendanceRecord_.insertList_4ezy5m$(entityList); }; function Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda(closure$entities_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entities = closure$entities_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entities.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setLong_6svq3l$(1, _entity.clazzLogAttendanceRecordClazzLogUid); this.local$_stmt.setLong_6svq3l$(2, _entity.clazzLogAttendanceRecordPersonUid); this.local$_stmt.setInt_vux9f0$(3, _entity.attendanceStatus); this.local$_stmt.setLong_6svq3l$(4, _entity.clazzLogAttendanceRecordMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(5, _entity.clazzLogAttendanceRecordLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(6, _entity.clazzLogAttendanceRecordLastChangedBy); this.local$_stmt.setLong_6svq3l$(7, _entity.clazzLogAttendanceRecordLastChangedTime); this.local$_stmt.setLong_6svq3l$(8, _entity.clazzLogAttendanceRecordUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda(closure$entities_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda(closure$entities_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_7quahr$($this, entities_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entities = entities_0; } Coroutine$updateListAsync_7quahr$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_7quahr$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_7quahr$.prototype.constructor = Coroutine$updateListAsync_7quahr$; Coroutine$updateListAsync_7quahr$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ClazzLogAttendanceRecord SET clazzLogAttendanceRecordClazzLogUid = ?, clazzLogAttendanceRecordPersonUid = ?, attendanceStatus = ?, clazzLogAttendanceRecordMasterChangeSeqNum = ?, clazzLogAttendanceRecordLocalChangeSeqNum = ?, clazzLogAttendanceRecordLastChangedBy = ?, clazzLogAttendanceRecordLastChangedTime = ? WHERE clazzLogAttendanceRecordUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ClazzLogAttendanceRecordDao_JdbcKt$updateListAsync$lambda(this.local$entities), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.updateListAsync_7quahr$ = function (entities_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_7quahr$(this, entities_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzLogAttendanceRecordDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.clazzLogAttendanceRecordClazzLogUid); _stmt.setLong_6svq3l$(2, _entity.clazzLogAttendanceRecordPersonUid); _stmt.setInt_vux9f0$(3, _entity.attendanceStatus); _stmt.setLong_6svq3l$(4, _entity.clazzLogAttendanceRecordMasterChangeSeqNum); _stmt.setLong_6svq3l$(5, _entity.clazzLogAttendanceRecordLocalChangeSeqNum); _stmt.setInt_vux9f0$(6, _entity.clazzLogAttendanceRecordLastChangedBy); _stmt.setLong_6svq3l$(7, _entity.clazzLogAttendanceRecordLastChangedTime); _stmt.setLong_6svq3l$(8, _entity.clazzLogAttendanceRecordUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzLogAttendanceRecordDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzLogAttendanceRecord SET clazzLogAttendanceRecordClazzLogUid = ?, clazzLogAttendanceRecordPersonUid = ?, attendanceStatus = ?, clazzLogAttendanceRecordMasterChangeSeqNum = ?, clazzLogAttendanceRecordLocalChangeSeqNum = ?, clazzLogAttendanceRecordLastChangedBy = ?, clazzLogAttendanceRecordLastChangedTime = ? WHERE clazzLogAttendanceRecordUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzLogAttendanceRecordDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzLogAttendanceRecordDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.clazzLogAttendanceRecordClazzLogUid); _stmt.setLong_6svq3l$(2, closure$entity.clazzLogAttendanceRecordPersonUid); _stmt.setInt_vux9f0$(3, closure$entity.attendanceStatus); _stmt.setLong_6svq3l$(4, closure$entity.clazzLogAttendanceRecordMasterChangeSeqNum); _stmt.setLong_6svq3l$(5, closure$entity.clazzLogAttendanceRecordLocalChangeSeqNum); _stmt.setInt_vux9f0$(6, closure$entity.clazzLogAttendanceRecordLastChangedBy); _stmt.setLong_6svq3l$(7, closure$entity.clazzLogAttendanceRecordLastChangedTime); _stmt.setLong_6svq3l$(8, closure$entity.clazzLogAttendanceRecordUid); return _stmt.executeUpdate(); }; } ClazzLogAttendanceRecordDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzLogAttendanceRecord SET clazzLogAttendanceRecordClazzLogUid = ?, clazzLogAttendanceRecordPersonUid = ?, attendanceStatus = ?, clazzLogAttendanceRecordMasterChangeSeqNum = ?, clazzLogAttendanceRecordLocalChangeSeqNum = ?, clazzLogAttendanceRecordLastChangedBy = ?, clazzLogAttendanceRecordLastChangedTime = ? WHERE clazzLogAttendanceRecordUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzLogAttendanceRecordDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_23($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_23.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_23.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_23.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_23; Coroutine$replicateOnNewNode_s8cxhz$_23.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzLogAttendanceRecordReplicate(clarPk, clarDestination)\n | SELECT DISTINCT ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid AS clarUid,\n | ? AS clarDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2048 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzLog\n | ON ClazzLog.clazzLogClazzUid = Clazz.clazzUid\n | JOIN ClazzLogAttendanceRecord \n | ON ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid\n | WHERE ClazzLogAttendanceRecord.clazzLogAttendanceRecordLastChangedTime != COALESCE(\n | (SELECT clarVersionId\n | FROM ClazzLogAttendanceRecordReplicate\n | WHERE clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid\n | AND clarDestination = ?), 0) \n | /*psql ON CONFLICT(clarPk, clarDestination) DO UPDATE\n | SET clarPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzLogAttendanceRecordReplicate(clarPk, clarDestination)\n | SELECT DISTINCT ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid AS clarUid,\n | ? AS clarDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2048 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzLog\n | ON ClazzLog.clazzLogClazzUid = Clazz.clazzUid\n | JOIN ClazzLogAttendanceRecord \n | ON ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid = ClazzLog.clazzLogUid\n | WHERE ClazzLogAttendanceRecord.clazzLogAttendanceRecordLastChangedTime != COALESCE(\n | (SELECT clarVersionId\n | FROM ClazzLogAttendanceRecordReplicate\n | WHERE clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid\n | AND clarDestination = ?), 0) \n | ON CONFLICT(clarPk, clarDestination) DO UPDATE\n | SET clarPending = true\n | \n | \n |')), ClazzLogAttendanceRecordDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_23(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_20($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_20.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_20.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_20.prototype.constructor = Coroutine$replicateOnChange_20; Coroutine$replicateOnChange_20.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzLogAttendanceRecordReplicate(clarPk, clarDestination)\n | SELECT DISTINCT ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid AS clarUid,\n | UserSession.usClientNodeId AS clarDestination\n | FROM ChangeLog\n | JOIN ClazzLogAttendanceRecord \n | ON ChangeLog.chTableId = 15 \n | AND ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid = ChangeLog.chEntityPk\n | JOIN ClazzLog\n | ON ClazzLog.clazzLogUid = ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzLog.clazzLogClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzLogAttendanceRecord.clazzLogAttendanceRecordLastChangedTime != COALESCE(\n | (SELECT clarVersionId\n | FROM ClazzLogAttendanceRecordReplicate\n | WHERE clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid\n | AND clarDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(clarPk, clarDestination) DO UPDATE\n | SET clarPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzLogAttendanceRecordReplicate(clarPk, clarDestination)\n | SELECT DISTINCT ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid AS clarUid,\n | UserSession.usClientNodeId AS clarDestination\n | FROM ChangeLog\n | JOIN ClazzLogAttendanceRecord \n | ON ChangeLog.chTableId = 15 \n | AND ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid = ChangeLog.chEntityPk\n | JOIN ClazzLog\n | ON ClazzLog.clazzLogUid = ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzLog.clazzLogClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzLogAttendanceRecord.clazzLogAttendanceRecordLastChangedTime != COALESCE(\n | (SELECT clarVersionId\n | FROM ClazzLogAttendanceRecordReplicate\n | WHERE clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid\n | AND clarDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(clarPk, clarDestination) DO UPDATE\n | SET clarPending = true\n | \n | \n |')), ClazzLogAttendanceRecordDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_20(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzLogAttendanceRecordDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzLogAttendanceRecordUid = closure$_result.getLong_61zpoe$('clazzLogAttendanceRecordUid'); var _tmp_clazzLogAttendanceRecordClazzLogUid = closure$_result.getLong_61zpoe$('clazzLogAttendanceRecordClazzLogUid'); var _tmp_clazzLogAttendanceRecordPersonUid = closure$_result.getLong_61zpoe$('clazzLogAttendanceRecordPersonUid'); var _tmp_attendanceStatus = closure$_result.getInt_61zpoe$('attendanceStatus'); var _tmp_clazzLogAttendanceRecordMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLogAttendanceRecordMasterChangeSeqNum'); var _tmp_clazzLogAttendanceRecordLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLogAttendanceRecordLocalChangeSeqNum'); var _tmp_clazzLogAttendanceRecordLastChangedBy = closure$_result.getInt_61zpoe$('clazzLogAttendanceRecordLastChangedBy'); var _tmp_clazzLogAttendanceRecordLastChangedTime = closure$_result.getLong_61zpoe$('clazzLogAttendanceRecordLastChangedTime'); var $receiver = new ClazzLogAttendanceRecord(); $receiver.clazzLogAttendanceRecordUid = _tmp_clazzLogAttendanceRecordUid; $receiver.clazzLogAttendanceRecordClazzLogUid = _tmp_clazzLogAttendanceRecordClazzLogUid; $receiver.clazzLogAttendanceRecordPersonUid = _tmp_clazzLogAttendanceRecordPersonUid; $receiver.attendanceStatus = _tmp_attendanceStatus; $receiver.clazzLogAttendanceRecordMasterChangeSeqNum = _tmp_clazzLogAttendanceRecordMasterChangeSeqNum; $receiver.clazzLogAttendanceRecordLocalChangeSeqNum = _tmp_clazzLogAttendanceRecordLocalChangeSeqNum; $receiver.clazzLogAttendanceRecordLastChangedBy = _tmp_clazzLogAttendanceRecordLastChangedBy; $receiver.clazzLogAttendanceRecordLastChangedTime = _tmp_clazzLogAttendanceRecordLastChangedTime; return $receiver; }; } function ClazzLogAttendanceRecordDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzLogAttendanceRecordDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function ClazzLogAttendanceRecordDao_JdbcKt$findByUid$lambda(closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); return useResults(_stmt.executeQuery(), ClazzLogAttendanceRecordDao_JdbcKt$findByUid$lambda$lambda); }; } ClazzLogAttendanceRecordDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * from ClazzLogAttendanceRecord WHERE clazzLogAttendanceRecordUid = ?'), ClazzLogAttendanceRecordDao_JdbcKt$findByUid$lambda(uid)); }; function ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzLogAttendanceRecordUid = closure$_result.getLong_61zpoe$('clazzLogAttendanceRecordUid'); var _tmp_clazzLogAttendanceRecordClazzLogUid = closure$_result.getLong_61zpoe$('clazzLogAttendanceRecordClazzLogUid'); var _tmp_clazzLogAttendanceRecordPersonUid = closure$_result.getLong_61zpoe$('clazzLogAttendanceRecordPersonUid'); var _tmp_attendanceStatus = closure$_result.getInt_61zpoe$('attendanceStatus'); var _tmp_clazzLogAttendanceRecordMasterChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLogAttendanceRecordMasterChangeSeqNum'); var _tmp_clazzLogAttendanceRecordLocalChangeSeqNum = closure$_result.getLong_61zpoe$('clazzLogAttendanceRecordLocalChangeSeqNum'); var _tmp_clazzLogAttendanceRecordLastChangedBy = closure$_result.getInt_61zpoe$('clazzLogAttendanceRecordLastChangedBy'); var _tmp_clazzLogAttendanceRecordLastChangedTime = closure$_result.getLong_61zpoe$('clazzLogAttendanceRecordLastChangedTime'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new ClazzLogAttendanceRecordWithPerson(); $receiver.clazzLogAttendanceRecordUid = _tmp_clazzLogAttendanceRecordUid; $receiver.clazzLogAttendanceRecordClazzLogUid = _tmp_clazzLogAttendanceRecordClazzLogUid; $receiver.clazzLogAttendanceRecordPersonUid = _tmp_clazzLogAttendanceRecordPersonUid; $receiver.attendanceStatus = _tmp_attendanceStatus; $receiver.clazzLogAttendanceRecordMasterChangeSeqNum = _tmp_clazzLogAttendanceRecordMasterChangeSeqNum; $receiver.clazzLogAttendanceRecordLocalChangeSeqNum = _tmp_clazzLogAttendanceRecordLocalChangeSeqNum; $receiver.clazzLogAttendanceRecordLastChangedBy = _tmp_clazzLogAttendanceRecordLastChangedBy; $receiver.clazzLogAttendanceRecordLastChangedTime = _tmp_clazzLogAttendanceRecordLastChangedTime; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.person = $receiver_0; } return $receiver; }; } function ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda$lambda(_result) { return mapRows(_result, ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda$lambda$lambda(_result)); } function Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda(closure$clazzLogUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzLogUid = closure$clazzLogUid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda.prototype.constructor = Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda; Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzLogUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda(closure$clazzLogUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda(closure$clazzLogUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogAttendanceRecordDao_JdbcKt.prototype.findByClazzLogUid_s8cxhz$ = function (clazzLogUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT ClazzLogAttendanceRecord.*, Person.*\n | FROM ClazzLogAttendanceRecord \n | LEFT JOIN Person ON ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid = Person.personUid\n | WHERE clazzLogAttendanceRecordClazzLogUid = ?\n ')), ClazzLogAttendanceRecordDao_JdbcKt$findByClazzLogUid$lambda(clazzLogUid), continuation); }; function ClazzLogAttendanceRecordDao_JdbcKt$updateRescheduledClazzLogUids$lambda(closure$newClazzLogUid, closure$changedTime, closure$oldClazzLogUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$newClazzLogUid); _stmt.setLong_6svq3l$(2, closure$changedTime); _stmt.setLong_6svq3l$(3, closure$oldClazzLogUid); return _stmt.executeUpdate(); }; } ClazzLogAttendanceRecordDao_JdbcKt.prototype.updateRescheduledClazzLogUids_b9bd0d$ = function (oldClazzLogUid, newClazzLogUid, changedTime) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ClazzLogAttendanceRecord\n | SET clazzLogAttendanceRecordClazzLogUid = ?,\n | clazzLogAttendanceRecordLastChangedTime = ?\n | WHERE clazzLogAttendanceRecordClazzLogUid = ?\n | \n ')), ClazzLogAttendanceRecordDao_JdbcKt$updateRescheduledClazzLogUids$lambda(newClazzLogUid, changedTime, oldClazzLogUid)); }; function ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ClazzLogAttendanceRecord (clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.clazzLogAttendanceRecordUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.clazzLogAttendanceRecordUid); } stmt.setLong_6svq3l$(2, entity.clazzLogAttendanceRecordClazzLogUid); stmt.setLong_6svq3l$(3, entity.clazzLogAttendanceRecordPersonUid); stmt.setInt_vux9f0$(4, entity.attendanceStatus); stmt.setLong_6svq3l$(5, entity.clazzLogAttendanceRecordMasterChangeSeqNum); stmt.setLong_6svq3l$(6, entity.clazzLogAttendanceRecordLocalChangeSeqNum); stmt.setInt_vux9f0$(7, entity.clazzLogAttendanceRecordLastChangedBy); stmt.setLong_6svq3l$(8, entity.clazzLogAttendanceRecordLastChangedTime); }; ClazzLogAttendanceRecordDao_JdbcKt$_insertAdapterClazzLogAttendanceRecord_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzLogAttendanceRecordDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogAttendanceRecordDao_JdbcKt', interfaces: [ClazzLogAttendanceRecordDao]}; function ClazzLogAttendanceRecordDao_ReplicateWrapper(_db, _dao) { ClazzLogAttendanceRecordDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_24($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_24.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_24.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_24.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_24; Coroutine$replicateOnNewNode_s8cxhz$_24.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_24(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_21($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_21.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_21.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_21.prototype.constructor = Coroutine$replicateOnChange_21; Coroutine$replicateOnChange_21.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_21(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_7quahr$_0($this, entities_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entities = entities_0; } Coroutine$insertListAsync_7quahr$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_7quahr$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_7quahr$_0.prototype.constructor = Coroutine$insertListAsync_7quahr$_0; Coroutine$insertListAsync_7quahr$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entities.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.clazzLogAttendanceRecordUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(15, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.clazzLogAttendanceRecordUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.clazzLogAttendanceRecordLastChangedTime = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_7quahr$(this.local$entities, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.insertListAsync_7quahr$ = function (entities_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_7quahr$_0(this, entities_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$updateListAsync_7quahr$_0($this, entities_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entities = entities_0; } Coroutine$updateListAsync_7quahr$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_7quahr$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_7quahr$_0.prototype.constructor = Coroutine$updateListAsync_7quahr$_0; Coroutine$updateListAsync_7quahr$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entities.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.clazzLogAttendanceRecordLastChangedTime = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_7quahr$(this.local$entities, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.updateListAsync_7quahr$ = function (entities_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_7quahr$_0(this, entities_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.findByClazzLogUid_s8cxhz$ = function (clazzLogUid, continuation) { return this._dao_0.findByClazzLogUid_s8cxhz$(clazzLogUid, continuation); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.updateRescheduledClazzLogUids_b9bd0d$ = function (oldClazzLogUid, newClazzLogUid, changedTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_26($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_26.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_26.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_26.prototype.constructor = Coroutine$insertAsync_26; Coroutine$insertAsync_26.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.clazzLogAttendanceRecordUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(15, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.clazzLogAttendanceRecordUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.clazzLogAttendanceRecordLastChangedTime = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.clazzLogAttendanceRecordUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_26(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogAttendanceRecordDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogAttendanceRecordDao_ReplicateWrapper', interfaces: [ClazzLogAttendanceRecordDao]}; function ClazzLogAttendanceRecordDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzLogAttendanceRecordDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_25($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_25.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_25.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_25.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_25; Coroutine$replicateOnNewNode_s8cxhz$_25.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_25(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_22($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_22.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_22.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_22.prototype.constructor = Coroutine$replicateOnChange_22; Coroutine$replicateOnChange_22.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_22(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_7quahr$_1($this, entities_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entities = entities_0; } Coroutine$insertListAsync_7quahr$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_7quahr$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_7quahr$_1.prototype.constructor = Coroutine$insertListAsync_7quahr$_1; Coroutine$insertListAsync_7quahr$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_7quahr$(this.local$entities, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_Repo.prototype.insertListAsync_7quahr$ = function (entities_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_7quahr$_1(this, entities_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_Repo.prototype.findByUid_s8cxhz$ = function (uid) { var _result = this._dao.findByUid_s8cxhz$(uid); return _result; }; function Coroutine$updateListAsync_7quahr$_1($this, entities_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entities = entities_0; } Coroutine$updateListAsync_7quahr$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_7quahr$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_7quahr$_1.prototype.constructor = Coroutine$updateListAsync_7quahr$_1; Coroutine$updateListAsync_7quahr$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_7quahr$(this.local$entities, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_Repo.prototype.updateListAsync_7quahr$ = function (entities_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_7quahr$_1(this, entities_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByClazzLogUid_s8cxhz$($this, clazzLogUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzLogUid = clazzLogUid_0; } Coroutine$findByClazzLogUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzLogUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzLogUid_s8cxhz$.prototype.constructor = Coroutine$findByClazzLogUid_s8cxhz$; Coroutine$findByClazzLogUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByClazzLogUid_s8cxhz$(this.local$clazzLogUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_Repo.prototype.findByClazzLogUid_s8cxhz$ = function (clazzLogUid_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzLogUid_s8cxhz$(this, clazzLogUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_Repo.prototype.updateRescheduledClazzLogUids_b9bd0d$ = function (oldClazzLogUid, newClazzLogUid, changedTime) { this._dao.updateRescheduledClazzLogUids_b9bd0d$(oldClazzLogUid, newClazzLogUid, changedTime); }; ClazzLogAttendanceRecordDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_27($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_27.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_27.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_27.prototype.constructor = Coroutine$insertAsync_27; Coroutine$insertAsync_27.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogAttendanceRecordDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_27(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogAttendanceRecordDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzLogAttendanceRecordDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzLogAttendanceRecordDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzLogAttendanceRecordDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogAttendanceRecordDao_Repo', interfaces: [ClazzLogAttendanceRecordDao]}; function ClazzLogDao() { } ClazzLogDao.prototype.findByClazzUidWithinTimeRange_ttedgd$ = function (clazzUid, fromTime, toTime, excludeStatusFilter, limit, callback$default) { if (excludeStatusFilter === void 0) excludeStatusFilter = 0; if (limit === void 0) limit = 2147483647; return callback$default ? callback$default(clazzUid, fromTime, toTime, excludeStatusFilter, limit) : this.findByClazzUidWithinTimeRange_ttedgd$$default(clazzUid, fromTime, toTime, excludeStatusFilter, limit); }; ClazzLogDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogDao', interfaces: [BaseDao]}; function ClazzLogDao_JdbcKt(_db) { ClazzLogDao.call(this); this._db = _db; this._insertAdapterClazzLog_upsert = new ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral(this._db); this._insertAdapterClazzLog_ = new ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral(this._db); } ClazzLogDao_JdbcKt.prototype.replace_b1okmm$ = function (entity) { var _retVal = this._insertAdapterClazzLog_upsert.insertAndReturnId_11rb$(entity); return _retVal; }; ClazzLogDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterClazzLog_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_28($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_28.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_28.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_28.prototype.constructor = Coroutine$insertAsync_28; Coroutine$insertAsync_28.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterClazzLog_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_28(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterClazzLog_.insertList_4ezy5m$(entityList); }; function Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda(closure$clazzLog_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzLog = closure$clazzLog_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda; Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzLog.clazzLogClazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzLog.logDate); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzLog.timeRecorded); this.local$_stmt.setBoolean_fzusl$(4, this.local$closure$clazzLog.clazzLogDone); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$clazzLog.cancellationNote); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$clazzLog.clazzLogCancelled); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$clazzLog.clazzLogNumPresent); this.local$_stmt.setInt_vux9f0$(8, this.local$closure$clazzLog.clazzLogNumAbsent); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$clazzLog.clazzLogNumPartial); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$clazzLog.clazzLogScheduleUid); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$clazzLog.clazzLogStatusFlag); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$clazzLog.clazzLogMSQN); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$clazzLog.clazzLogLCSN); this.local$_stmt.setInt_vux9f0$(14, this.local$closure$clazzLog.clazzLogLCB); this.local$_stmt.setLong_6svq3l$(15, this.local$closure$clazzLog.clazzLogLastChangedTime); this.local$_stmt.setLong_6svq3l$(16, this.local$closure$clazzLog.clazzLogUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$updateAsync$lambda(closure$clazzLog_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$updateAsync$lambda(closure$clazzLog_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_b1okmm$($this, clazzLog_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzLog = clazzLog_0; } Coroutine$updateAsync_b1okmm$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_b1okmm$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_b1okmm$.prototype.constructor = Coroutine$updateAsync_b1okmm$; Coroutine$updateAsync_b1okmm$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ClazzLog SET clazzLogClazzUid = ?, logDate = ?, timeRecorded = ?, clazzLogDone = ?, cancellationNote = ?, clazzLogCancelled = ?, clazzLogNumPresent = ?, clazzLogNumAbsent = ?, clazzLogNumPartial = ?, clazzLogScheduleUid = ?, clazzLogStatusFlag = ?, clazzLogMSQN = ?, clazzLogLCSN = ?, clazzLogLCB = ?, clazzLogLastChangedTime = ? WHERE clazzLogUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ClazzLogDao_JdbcKt$updateAsync$lambda(this.local$clazzLog), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_JdbcKt.prototype.updateAsync_b1okmm$ = function (clazzLog_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_b1okmm$(this, clazzLog_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzLogDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.clazzLogClazzUid); _stmt.setLong_6svq3l$(2, _entity.logDate); _stmt.setLong_6svq3l$(3, _entity.timeRecorded); _stmt.setBoolean_fzusl$(4, _entity.clazzLogDone); _stmt.setString_vqvrqt$(5, _entity.cancellationNote); _stmt.setBoolean_fzusl$(6, _entity.clazzLogCancelled); _stmt.setInt_vux9f0$(7, _entity.clazzLogNumPresent); _stmt.setInt_vux9f0$(8, _entity.clazzLogNumAbsent); _stmt.setInt_vux9f0$(9, _entity.clazzLogNumPartial); _stmt.setLong_6svq3l$(10, _entity.clazzLogScheduleUid); _stmt.setInt_vux9f0$(11, _entity.clazzLogStatusFlag); _stmt.setLong_6svq3l$(12, _entity.clazzLogMSQN); _stmt.setLong_6svq3l$(13, _entity.clazzLogLCSN); _stmt.setInt_vux9f0$(14, _entity.clazzLogLCB); _stmt.setLong_6svq3l$(15, _entity.clazzLogLastChangedTime); _stmt.setLong_6svq3l$(16, _entity.clazzLogUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ClazzLogDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ClazzLog SET clazzLogClazzUid = ?, logDate = ?, timeRecorded = ?, clazzLogDone = ?, cancellationNote = ?, clazzLogCancelled = ?, clazzLogNumPresent = ?, clazzLogNumAbsent = ?, clazzLogNumPartial = ?, clazzLogScheduleUid = ?, clazzLogStatusFlag = ?, clazzLogMSQN = ?, clazzLogLCSN = ?, clazzLogLCB = ?, clazzLogLastChangedTime = ? WHERE clazzLogUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzLogDao_JdbcKt$updateList$lambda(entityList)); }; function ClazzLogDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.clazzLogClazzUid); _stmt.setLong_6svq3l$(2, closure$entity.logDate); _stmt.setLong_6svq3l$(3, closure$entity.timeRecorded); _stmt.setBoolean_fzusl$(4, closure$entity.clazzLogDone); _stmt.setString_vqvrqt$(5, closure$entity.cancellationNote); _stmt.setBoolean_fzusl$(6, closure$entity.clazzLogCancelled); _stmt.setInt_vux9f0$(7, closure$entity.clazzLogNumPresent); _stmt.setInt_vux9f0$(8, closure$entity.clazzLogNumAbsent); _stmt.setInt_vux9f0$(9, closure$entity.clazzLogNumPartial); _stmt.setLong_6svq3l$(10, closure$entity.clazzLogScheduleUid); _stmt.setInt_vux9f0$(11, closure$entity.clazzLogStatusFlag); _stmt.setLong_6svq3l$(12, closure$entity.clazzLogMSQN); _stmt.setLong_6svq3l$(13, closure$entity.clazzLogLCSN); _stmt.setInt_vux9f0$(14, closure$entity.clazzLogLCB); _stmt.setLong_6svq3l$(15, closure$entity.clazzLogLastChangedTime); _stmt.setLong_6svq3l$(16, closure$entity.clazzLogUid); return _stmt.executeUpdate(); }; } ClazzLogDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ClazzLog SET clazzLogClazzUid = ?, logDate = ?, timeRecorded = ?, clazzLogDone = ?, cancellationNote = ?, clazzLogCancelled = ?, clazzLogNumPresent = ?, clazzLogNumAbsent = ?, clazzLogNumPartial = ?, clazzLogScheduleUid = ?, clazzLogStatusFlag = ?, clazzLogMSQN = ?, clazzLogLCSN = ?, clazzLogLCB = ?, clazzLogLastChangedTime = ? WHERE clazzLogUid = ?'; prepareAndUseStatement(this._db, _sql, ClazzLogDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_26($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_26.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_26.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_26.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_26; Coroutine$replicateOnNewNode_s8cxhz$_26.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzLogReplicate(clPk, clDestination)\n | SELECT DISTINCT ClazzLog.clazzLogUid AS clUid,\n | ? AS clDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzLog\n | ON ClazzLog.clazzLogClazzUid = Clazz.clazzUid\n | WHERE ClazzLog.clazzLogLastChangedTime != COALESCE(\n | (SELECT clVersionId\n | FROM ClazzLogReplicate\n | WHERE clPk = ClazzLog.clazzLogUid\n | AND clDestination = ?), 0) \n | /*psql ON CONFLICT(clPk, clDestination) DO UPDATE\n | SET clPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzLogReplicate(clPk, clDestination)\n | SELECT DISTINCT ClazzLog.clazzLogUid AS clUid,\n | ? AS clDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzLog\n | ON ClazzLog.clazzLogClazzUid = Clazz.clazzUid\n | WHERE ClazzLog.clazzLogLastChangedTime != COALESCE(\n | (SELECT clVersionId\n | FROM ClazzLogReplicate\n | WHERE clPk = ClazzLog.clazzLogUid\n | AND clDestination = ?), 0) \n | ON CONFLICT(clPk, clDestination) DO UPDATE\n | SET clPending = true\n | \n | \n |')), ClazzLogDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_26(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda; Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_23($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_23.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_23.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_23.prototype.constructor = Coroutine$replicateOnChange_23; Coroutine$replicateOnChange_23.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ClazzLogReplicate(clPk, clDestination)\n | SELECT DISTINCT ClazzLog.clazzLogUid AS clUid,\n | UserSession.usClientNodeId AS clDestination\n | FROM ChangeLog\n | JOIN ClazzLog \n | ON ChangeLog.chTableId = 14 \n | AND ClazzLog.clazzLogUid = ChangeLog.chEntityPk\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzLog.clazzLogClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzLog.clazzLogLastChangedTime != COALESCE(\n | (SELECT clVersionId\n | FROM ClazzLogReplicate\n | WHERE clPk = ClazzLog.clazzLogUid\n | AND clDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(clPk, clDestination) DO UPDATE\n | SET clPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ClazzLogReplicate(clPk, clDestination)\n | SELECT DISTINCT ClazzLog.clazzLogUid AS clUid,\n | UserSession.usClientNodeId AS clDestination\n | FROM ChangeLog\n | JOIN ClazzLog \n | ON ChangeLog.chTableId = 14 \n | AND ClazzLog.clazzLogUid = ChangeLog.chEntityPk\n | JOIN Clazz \n | ON Clazz.clazzUid = ClazzLog.clazzLogClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ClazzLog.clazzLogLastChangedTime != COALESCE(\n | (SELECT clVersionId\n | FROM ClazzLogReplicate\n | WHERE clPk = ClazzLog.clazzLogUid\n | AND clDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(clPk, clDestination) DO UPDATE\n | SET clPending = true\n | \n | \n |')), ClazzLogDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_23(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ClazzLogDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzLogUid = closure$_result.getLong_61zpoe$('clazzLogUid'); var _tmp_clazzLogClazzUid = closure$_result.getLong_61zpoe$('clazzLogClazzUid'); var _tmp_logDate = closure$_result.getLong_61zpoe$('logDate'); var _tmp_timeRecorded = closure$_result.getLong_61zpoe$('timeRecorded'); var _tmp_clazzLogDone = closure$_result.getBoolean_61zpoe$('clazzLogDone'); var _tmp_cancellationNote = closure$_result.getString_61zpoe$('cancellationNote'); var _tmp_clazzLogCancelled = closure$_result.getBoolean_61zpoe$('clazzLogCancelled'); var _tmp_clazzLogNumPresent = closure$_result.getInt_61zpoe$('clazzLogNumPresent'); var _tmp_clazzLogNumAbsent = closure$_result.getInt_61zpoe$('clazzLogNumAbsent'); var _tmp_clazzLogNumPartial = closure$_result.getInt_61zpoe$('clazzLogNumPartial'); var _tmp_clazzLogScheduleUid = closure$_result.getLong_61zpoe$('clazzLogScheduleUid'); var _tmp_clazzLogStatusFlag = closure$_result.getInt_61zpoe$('clazzLogStatusFlag'); var _tmp_clazzLogMSQN = closure$_result.getLong_61zpoe$('clazzLogMSQN'); var _tmp_clazzLogLCSN = closure$_result.getLong_61zpoe$('clazzLogLCSN'); var _tmp_clazzLogLCB = closure$_result.getInt_61zpoe$('clazzLogLCB'); var _tmp_clazzLogLastChangedTime = closure$_result.getLong_61zpoe$('clazzLogLastChangedTime'); var $receiver = new ClazzLog(); $receiver.clazzLogUid = _tmp_clazzLogUid; $receiver.clazzLogClazzUid = _tmp_clazzLogClazzUid; $receiver.logDate = _tmp_logDate; $receiver.timeRecorded = _tmp_timeRecorded; $receiver.clazzLogDone = _tmp_clazzLogDone; $receiver.cancellationNote = _tmp_cancellationNote; $receiver.clazzLogCancelled = _tmp_clazzLogCancelled; $receiver.clazzLogNumPresent = _tmp_clazzLogNumPresent; $receiver.clazzLogNumAbsent = _tmp_clazzLogNumAbsent; $receiver.clazzLogNumPartial = _tmp_clazzLogNumPartial; $receiver.clazzLogScheduleUid = _tmp_clazzLogScheduleUid; $receiver.clazzLogStatusFlag = _tmp_clazzLogStatusFlag; $receiver.clazzLogMSQN = _tmp_clazzLogMSQN; $receiver.clazzLogLCSN = _tmp_clazzLogLCSN; $receiver.clazzLogLCB = _tmp_clazzLogLCB; $receiver.clazzLogLastChangedTime = _tmp_clazzLogLastChangedTime; return $receiver; }; } function ClazzLogDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzLogDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function ClazzLogDao_JdbcKt$findByUid$lambda(closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); return useResults(_stmt.executeQuery(), ClazzLogDao_JdbcKt$findByUid$lambda$lambda); }; } ClazzLogDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ClazzLog WHERE clazzLogUid = ?'), ClazzLogDao_JdbcKt$findByUid$lambda(uid)); }; function ClazzLogDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzLogUid = closure$_result.getLong_61zpoe$('clazzLogUid'); var _tmp_clazzLogClazzUid = closure$_result.getLong_61zpoe$('clazzLogClazzUid'); var _tmp_logDate = closure$_result.getLong_61zpoe$('logDate'); var _tmp_timeRecorded = closure$_result.getLong_61zpoe$('timeRecorded'); var _tmp_clazzLogDone = closure$_result.getBoolean_61zpoe$('clazzLogDone'); var _tmp_cancellationNote = closure$_result.getString_61zpoe$('cancellationNote'); var _tmp_clazzLogCancelled = closure$_result.getBoolean_61zpoe$('clazzLogCancelled'); var _tmp_clazzLogNumPresent = closure$_result.getInt_61zpoe$('clazzLogNumPresent'); var _tmp_clazzLogNumAbsent = closure$_result.getInt_61zpoe$('clazzLogNumAbsent'); var _tmp_clazzLogNumPartial = closure$_result.getInt_61zpoe$('clazzLogNumPartial'); var _tmp_clazzLogScheduleUid = closure$_result.getLong_61zpoe$('clazzLogScheduleUid'); var _tmp_clazzLogStatusFlag = closure$_result.getInt_61zpoe$('clazzLogStatusFlag'); var _tmp_clazzLogMSQN = closure$_result.getLong_61zpoe$('clazzLogMSQN'); var _tmp_clazzLogLCSN = closure$_result.getLong_61zpoe$('clazzLogLCSN'); var _tmp_clazzLogLCB = closure$_result.getInt_61zpoe$('clazzLogLCB'); var _tmp_clazzLogLastChangedTime = closure$_result.getLong_61zpoe$('clazzLogLastChangedTime'); var $receiver = new ClazzLog(); $receiver.clazzLogUid = _tmp_clazzLogUid; $receiver.clazzLogClazzUid = _tmp_clazzLogClazzUid; $receiver.logDate = _tmp_logDate; $receiver.timeRecorded = _tmp_timeRecorded; $receiver.clazzLogDone = _tmp_clazzLogDone; $receiver.cancellationNote = _tmp_cancellationNote; $receiver.clazzLogCancelled = _tmp_clazzLogCancelled; $receiver.clazzLogNumPresent = _tmp_clazzLogNumPresent; $receiver.clazzLogNumAbsent = _tmp_clazzLogNumAbsent; $receiver.clazzLogNumPartial = _tmp_clazzLogNumPartial; $receiver.clazzLogScheduleUid = _tmp_clazzLogScheduleUid; $receiver.clazzLogStatusFlag = _tmp_clazzLogStatusFlag; $receiver.clazzLogMSQN = _tmp_clazzLogMSQN; $receiver.clazzLogLCSN = _tmp_clazzLogLCSN; $receiver.clazzLogLCB = _tmp_clazzLogLCB; $receiver.clazzLogLastChangedTime = _tmp_clazzLogLastChangedTime; return $receiver; }; } function ClazzLogDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzLogDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda; Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM ClazzLog WHERE clazzLogUid = ?'), ClazzLogDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzLogUid = closure$_result.getLong_61zpoe$('clazzLogUid'); var _tmp_clazzLogClazzUid = closure$_result.getLong_61zpoe$('clazzLogClazzUid'); var _tmp_logDate = closure$_result.getLong_61zpoe$('logDate'); var _tmp_timeRecorded = closure$_result.getLong_61zpoe$('timeRecorded'); var _tmp_clazzLogDone = closure$_result.getBoolean_61zpoe$('clazzLogDone'); var _tmp_cancellationNote = closure$_result.getString_61zpoe$('cancellationNote'); var _tmp_clazzLogCancelled = closure$_result.getBoolean_61zpoe$('clazzLogCancelled'); var _tmp_clazzLogNumPresent = closure$_result.getInt_61zpoe$('clazzLogNumPresent'); var _tmp_clazzLogNumAbsent = closure$_result.getInt_61zpoe$('clazzLogNumAbsent'); var _tmp_clazzLogNumPartial = closure$_result.getInt_61zpoe$('clazzLogNumPartial'); var _tmp_clazzLogScheduleUid = closure$_result.getLong_61zpoe$('clazzLogScheduleUid'); var _tmp_clazzLogStatusFlag = closure$_result.getInt_61zpoe$('clazzLogStatusFlag'); var _tmp_clazzLogMSQN = closure$_result.getLong_61zpoe$('clazzLogMSQN'); var _tmp_clazzLogLCSN = closure$_result.getLong_61zpoe$('clazzLogLCSN'); var _tmp_clazzLogLCB = closure$_result.getInt_61zpoe$('clazzLogLCB'); var _tmp_clazzLogLastChangedTime = closure$_result.getLong_61zpoe$('clazzLogLastChangedTime'); var $receiver = new ClazzLog(); $receiver.clazzLogUid = _tmp_clazzLogUid; $receiver.clazzLogClazzUid = _tmp_clazzLogClazzUid; $receiver.logDate = _tmp_logDate; $receiver.timeRecorded = _tmp_timeRecorded; $receiver.clazzLogDone = _tmp_clazzLogDone; $receiver.cancellationNote = _tmp_cancellationNote; $receiver.clazzLogCancelled = _tmp_clazzLogCancelled; $receiver.clazzLogNumPresent = _tmp_clazzLogNumPresent; $receiver.clazzLogNumAbsent = _tmp_clazzLogNumAbsent; $receiver.clazzLogNumPartial = _tmp_clazzLogNumPartial; $receiver.clazzLogScheduleUid = _tmp_clazzLogScheduleUid; $receiver.clazzLogStatusFlag = _tmp_clazzLogStatusFlag; $receiver.clazzLogMSQN = _tmp_clazzLogMSQN; $receiver.clazzLogLCSN = _tmp_clazzLogLCSN; $receiver.clazzLogLCB = _tmp_clazzLogLCB; $receiver.clazzLogLastChangedTime = _tmp_clazzLogLastChangedTime; return $receiver; }; } function ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzLogDao_JdbcKt = this$ClazzLogDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; } Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda; Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzLogDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM ClazzLog WHERE clazzLogUid = ?'), ClazzLogDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByUidLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByUidLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { return new LiveDataImpl(this._db, listOf_0('ClazzLog'), ClazzLogDao_JdbcKt$findByUidLive$lambda(this, uid)); }; function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral(this$ClazzLogDao_JdbcKt, closure$clazzUid, closure$excludeStatus) { this.this$ClazzLogDao_JdbcKt = this$ClazzLogDao_JdbcKt; this.closure$clazzUid = closure$clazzUid; this.closure$excludeStatus = closure$excludeStatus; DataSourceFactory.call(this); } function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzLogUid = closure$_result.getLong_61zpoe$('clazzLogUid'); var _tmp_clazzLogClazzUid = closure$_result.getLong_61zpoe$('clazzLogClazzUid'); var _tmp_logDate = closure$_result.getLong_61zpoe$('logDate'); var _tmp_timeRecorded = closure$_result.getLong_61zpoe$('timeRecorded'); var _tmp_clazzLogDone = closure$_result.getBoolean_61zpoe$('clazzLogDone'); var _tmp_cancellationNote = closure$_result.getString_61zpoe$('cancellationNote'); var _tmp_clazzLogCancelled = closure$_result.getBoolean_61zpoe$('clazzLogCancelled'); var _tmp_clazzLogNumPresent = closure$_result.getInt_61zpoe$('clazzLogNumPresent'); var _tmp_clazzLogNumAbsent = closure$_result.getInt_61zpoe$('clazzLogNumAbsent'); var _tmp_clazzLogNumPartial = closure$_result.getInt_61zpoe$('clazzLogNumPartial'); var _tmp_clazzLogScheduleUid = closure$_result.getLong_61zpoe$('clazzLogScheduleUid'); var _tmp_clazzLogStatusFlag = closure$_result.getInt_61zpoe$('clazzLogStatusFlag'); var _tmp_clazzLogMSQN = closure$_result.getLong_61zpoe$('clazzLogMSQN'); var _tmp_clazzLogLCSN = closure$_result.getLong_61zpoe$('clazzLogLCSN'); var _tmp_clazzLogLCB = closure$_result.getInt_61zpoe$('clazzLogLCB'); var _tmp_clazzLogLastChangedTime = closure$_result.getLong_61zpoe$('clazzLogLastChangedTime'); var $receiver = new ClazzLog(); $receiver.clazzLogUid = _tmp_clazzLogUid; $receiver.clazzLogClazzUid = _tmp_clazzLogClazzUid; $receiver.logDate = _tmp_logDate; $receiver.timeRecorded = _tmp_timeRecorded; $receiver.clazzLogDone = _tmp_clazzLogDone; $receiver.cancellationNote = _tmp_cancellationNote; $receiver.clazzLogCancelled = _tmp_clazzLogCancelled; $receiver.clazzLogNumPresent = _tmp_clazzLogNumPresent; $receiver.clazzLogNumAbsent = _tmp_clazzLogNumAbsent; $receiver.clazzLogNumPartial = _tmp_clazzLogNumPartial; $receiver.clazzLogScheduleUid = _tmp_clazzLogScheduleUid; $receiver.clazzLogStatusFlag = _tmp_clazzLogStatusFlag; $receiver.clazzLogMSQN = _tmp_clazzLogMSQN; $receiver.clazzLogLCSN = _tmp_clazzLogLCSN; $receiver.clazzLogLCB = _tmp_clazzLogLCB; $receiver.clazzLogLastChangedTime = _tmp_clazzLogLastChangedTime; return $receiver; }; } function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$excludeStatus_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatus = closure$excludeStatus_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$excludeStatus); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$excludeStatus_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$excludeStatus_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatus_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzLogDao_JdbcKt = this$ClazzLogDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatus = closure$excludeStatus_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzLogDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT ClazzLog.* FROM ClazzLog \n | WHERE clazzLogClazzUid = ?\n | AND clazzLog.clazzLogStatusFlag != ?\n | ORDER BY ClazzLog.logDate DESC) LIMIT ? OFFSET ?\n ')), ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda$lambda(this.local$closure$clazzUid, this.local$closure$excludeStatus, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatus_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatus_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ClazzLogDao_JdbcKt._db, listOf_0('ClazzLog'), ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getData$lambda(this.this$ClazzLogDao_JdbcKt, this.closure$clazzUid, this.closure$excludeStatus, _limit, _offset)); }; function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$excludeStatus_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatus = closure$excludeStatus_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$excludeStatus); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$excludeStatus_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$excludeStatus_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatus_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzLogDao_JdbcKt = this$ClazzLogDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatus = closure$excludeStatus_0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzLogDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT ClazzLog.* FROM ClazzLog \n | WHERE clazzLogClazzUid = ?\n | AND clazzLog.clazzLogStatusFlag != ?\n | ORDER BY ClazzLog.logDate DESC) \n ')), ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda$lambda(this.local$closure$clazzUid, this.local$closure$excludeStatus), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatus_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatus_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ClazzLogDao_JdbcKt._db, listOf_0('ClazzLog'), ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral$getLength$lambda(this.this$ClazzLogDao_JdbcKt, this.closure$clazzUid, this.closure$excludeStatus)); }; ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ClazzLogDao_JdbcKt.prototype.findByClazzUidAsFactory_yhmem3$ = function (clazzUid, excludeStatus) { return new ClazzLogDao_JdbcKt$findByClazzUidAsFactory$ObjectLiteral(this, clazzUid, excludeStatus); }; function ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzLogUid = closure$_result.getLong_61zpoe$('clazzLogUid'); var _tmp_clazzLogClazzUid = closure$_result.getLong_61zpoe$('clazzLogClazzUid'); var _tmp_logDate = closure$_result.getLong_61zpoe$('logDate'); var _tmp_timeRecorded = closure$_result.getLong_61zpoe$('timeRecorded'); var _tmp_clazzLogDone = closure$_result.getBoolean_61zpoe$('clazzLogDone'); var _tmp_cancellationNote = closure$_result.getString_61zpoe$('cancellationNote'); var _tmp_clazzLogCancelled = closure$_result.getBoolean_61zpoe$('clazzLogCancelled'); var _tmp_clazzLogNumPresent = closure$_result.getInt_61zpoe$('clazzLogNumPresent'); var _tmp_clazzLogNumAbsent = closure$_result.getInt_61zpoe$('clazzLogNumAbsent'); var _tmp_clazzLogNumPartial = closure$_result.getInt_61zpoe$('clazzLogNumPartial'); var _tmp_clazzLogScheduleUid = closure$_result.getLong_61zpoe$('clazzLogScheduleUid'); var _tmp_clazzLogStatusFlag = closure$_result.getInt_61zpoe$('clazzLogStatusFlag'); var _tmp_clazzLogMSQN = closure$_result.getLong_61zpoe$('clazzLogMSQN'); var _tmp_clazzLogLCSN = closure$_result.getLong_61zpoe$('clazzLogLCSN'); var _tmp_clazzLogLCB = closure$_result.getInt_61zpoe$('clazzLogLCB'); var _tmp_clazzLogLastChangedTime = closure$_result.getLong_61zpoe$('clazzLogLastChangedTime'); var $receiver = new ClazzLog(); $receiver.clazzLogUid = _tmp_clazzLogUid; $receiver.clazzLogClazzUid = _tmp_clazzLogClazzUid; $receiver.logDate = _tmp_logDate; $receiver.timeRecorded = _tmp_timeRecorded; $receiver.clazzLogDone = _tmp_clazzLogDone; $receiver.cancellationNote = _tmp_cancellationNote; $receiver.clazzLogCancelled = _tmp_clazzLogCancelled; $receiver.clazzLogNumPresent = _tmp_clazzLogNumPresent; $receiver.clazzLogNumAbsent = _tmp_clazzLogNumAbsent; $receiver.clazzLogNumPartial = _tmp_clazzLogNumPartial; $receiver.clazzLogScheduleUid = _tmp_clazzLogScheduleUid; $receiver.clazzLogStatusFlag = _tmp_clazzLogStatusFlag; $receiver.clazzLogMSQN = _tmp_clazzLogMSQN; $receiver.clazzLogLCSN = _tmp_clazzLogLCSN; $receiver.clazzLogLCB = _tmp_clazzLogLCB; $receiver.clazzLogLastChangedTime = _tmp_clazzLogLastChangedTime; return $receiver; }; } function ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda$lambda(_result) { return mapRows(_result, ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda(closure$clazzUid_0, closure$excludeStatus_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatus = closure$excludeStatus_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$excludeStatus); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda(closure$clazzUid_0, closure$excludeStatus_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda(closure$clazzUid_0, closure$excludeStatus_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogDao_JdbcKt.prototype.findByClazzUidAsync_yhmem3$ = function (clazzUid, excludeStatus, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT ClazzLog.* FROM ClazzLog \n | WHERE clazzLogClazzUid = ?\n | AND clazzLog.clazzLogStatusFlag != ?\n | ORDER BY ClazzLog.logDate ASC\n ')), ClazzLogDao_JdbcKt$findByClazzUidAsync$lambda(clazzUid, excludeStatus), continuation); }; function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzLogUid = closure$_result.getLong_61zpoe$('clazzLogUid'); var _tmp_clazzLogClazzUid = closure$_result.getLong_61zpoe$('clazzLogClazzUid'); var _tmp_logDate = closure$_result.getLong_61zpoe$('logDate'); var _tmp_timeRecorded = closure$_result.getLong_61zpoe$('timeRecorded'); var _tmp_clazzLogDone = closure$_result.getBoolean_61zpoe$('clazzLogDone'); var _tmp_cancellationNote = closure$_result.getString_61zpoe$('cancellationNote'); var _tmp_clazzLogCancelled = closure$_result.getBoolean_61zpoe$('clazzLogCancelled'); var _tmp_clazzLogNumPresent = closure$_result.getInt_61zpoe$('clazzLogNumPresent'); var _tmp_clazzLogNumAbsent = closure$_result.getInt_61zpoe$('clazzLogNumAbsent'); var _tmp_clazzLogNumPartial = closure$_result.getInt_61zpoe$('clazzLogNumPartial'); var _tmp_clazzLogScheduleUid = closure$_result.getLong_61zpoe$('clazzLogScheduleUid'); var _tmp_clazzLogStatusFlag = closure$_result.getInt_61zpoe$('clazzLogStatusFlag'); var _tmp_clazzLogMSQN = closure$_result.getLong_61zpoe$('clazzLogMSQN'); var _tmp_clazzLogLCSN = closure$_result.getLong_61zpoe$('clazzLogLCSN'); var _tmp_clazzLogLCB = closure$_result.getInt_61zpoe$('clazzLogLCB'); var _tmp_clazzLogLastChangedTime = closure$_result.getLong_61zpoe$('clazzLogLastChangedTime'); var $receiver = new ClazzLog(); $receiver.clazzLogUid = _tmp_clazzLogUid; $receiver.clazzLogClazzUid = _tmp_clazzLogClazzUid; $receiver.logDate = _tmp_logDate; $receiver.timeRecorded = _tmp_timeRecorded; $receiver.clazzLogDone = _tmp_clazzLogDone; $receiver.cancellationNote = _tmp_cancellationNote; $receiver.clazzLogCancelled = _tmp_clazzLogCancelled; $receiver.clazzLogNumPresent = _tmp_clazzLogNumPresent; $receiver.clazzLogNumAbsent = _tmp_clazzLogNumAbsent; $receiver.clazzLogNumPartial = _tmp_clazzLogNumPartial; $receiver.clazzLogScheduleUid = _tmp_clazzLogScheduleUid; $receiver.clazzLogStatusFlag = _tmp_clazzLogStatusFlag; $receiver.clazzLogMSQN = _tmp_clazzLogMSQN; $receiver.clazzLogLCSN = _tmp_clazzLogLCSN; $receiver.clazzLogLCB = _tmp_clazzLogLCB; $receiver.clazzLogLastChangedTime = _tmp_clazzLogLastChangedTime; return $receiver; }; } function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda$lambda(_result) { return mapRows(_result, ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda$lambda$lambda(_result)); } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda(closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$excludeStatusFilter_0, closure$limit_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$fromTime = closure$fromTime_0; this.local$closure$toTime = closure$toTime_0; this.local$closure$excludeStatusFilter = closure$excludeStatusFilter_0; this.local$closure$limit = closure$limit_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$fromTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$toTime); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$excludeStatusFilter); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$excludeStatusFilter); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$limit); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda(closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$excludeStatusFilter_0, closure$limit_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda(closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$excludeStatusFilter_0, closure$limit_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogDao_JdbcKt.prototype.findByClazzUidWithinTimeRangeAsync_ttedgd$ = function (clazzUid, fromTime, toTime, excludeStatusFilter, limit, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT ClazzLog.* FROM ClazzLog \n | WHERE \n | ClazzLog.clazzLogClazzUid = ? \n | AND ClazzLog.logDate BETWEEN ? AND ?\n | AND (? = 0 OR ((ClazzLog.clazzLogStatusFlag & ?) = 0))\n | ORDER BY ClazzLog.logDate DESC\n | LIMIT ?\n | \n ')), ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeAsync$lambda(clazzUid, fromTime, toTime, excludeStatusFilter, limit), continuation); }; function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRange$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzLogUid = closure$_result.getLong_61zpoe$('clazzLogUid'); var _tmp_clazzLogClazzUid = closure$_result.getLong_61zpoe$('clazzLogClazzUid'); var _tmp_logDate = closure$_result.getLong_61zpoe$('logDate'); var _tmp_timeRecorded = closure$_result.getLong_61zpoe$('timeRecorded'); var _tmp_clazzLogDone = closure$_result.getBoolean_61zpoe$('clazzLogDone'); var _tmp_cancellationNote = closure$_result.getString_61zpoe$('cancellationNote'); var _tmp_clazzLogCancelled = closure$_result.getBoolean_61zpoe$('clazzLogCancelled'); var _tmp_clazzLogNumPresent = closure$_result.getInt_61zpoe$('clazzLogNumPresent'); var _tmp_clazzLogNumAbsent = closure$_result.getInt_61zpoe$('clazzLogNumAbsent'); var _tmp_clazzLogNumPartial = closure$_result.getInt_61zpoe$('clazzLogNumPartial'); var _tmp_clazzLogScheduleUid = closure$_result.getLong_61zpoe$('clazzLogScheduleUid'); var _tmp_clazzLogStatusFlag = closure$_result.getInt_61zpoe$('clazzLogStatusFlag'); var _tmp_clazzLogMSQN = closure$_result.getLong_61zpoe$('clazzLogMSQN'); var _tmp_clazzLogLCSN = closure$_result.getLong_61zpoe$('clazzLogLCSN'); var _tmp_clazzLogLCB = closure$_result.getInt_61zpoe$('clazzLogLCB'); var _tmp_clazzLogLastChangedTime = closure$_result.getLong_61zpoe$('clazzLogLastChangedTime'); var $receiver = new ClazzLog(); $receiver.clazzLogUid = _tmp_clazzLogUid; $receiver.clazzLogClazzUid = _tmp_clazzLogClazzUid; $receiver.logDate = _tmp_logDate; $receiver.timeRecorded = _tmp_timeRecorded; $receiver.clazzLogDone = _tmp_clazzLogDone; $receiver.cancellationNote = _tmp_cancellationNote; $receiver.clazzLogCancelled = _tmp_clazzLogCancelled; $receiver.clazzLogNumPresent = _tmp_clazzLogNumPresent; $receiver.clazzLogNumAbsent = _tmp_clazzLogNumAbsent; $receiver.clazzLogNumPartial = _tmp_clazzLogNumPartial; $receiver.clazzLogScheduleUid = _tmp_clazzLogScheduleUid; $receiver.clazzLogStatusFlag = _tmp_clazzLogStatusFlag; $receiver.clazzLogMSQN = _tmp_clazzLogMSQN; $receiver.clazzLogLCSN = _tmp_clazzLogLCSN; $receiver.clazzLogLCB = _tmp_clazzLogLCB; $receiver.clazzLogLastChangedTime = _tmp_clazzLogLastChangedTime; return $receiver; }; } function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRange$lambda$lambda(_result) { return mapRows(_result, ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRange$lambda$lambda$lambda(_result)); } function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRange$lambda(closure$clazzUid, closure$fromTime, closure$toTime, closure$excludeStatusFilter, closure$limit) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$clazzUid); _stmt.setLong_6svq3l$(2, closure$fromTime); _stmt.setLong_6svq3l$(3, closure$toTime); _stmt.setInt_vux9f0$(4, closure$excludeStatusFilter); _stmt.setInt_vux9f0$(5, closure$excludeStatusFilter); _stmt.setInt_vux9f0$(6, closure$limit); return useResults(_stmt.executeQuery(), ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRange$lambda$lambda); }; } ClazzLogDao_JdbcKt.prototype.findByClazzUidWithinTimeRange_ttedgd$$default = function (clazzUid, fromTime, toTime, excludeStatusFilter, limit) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT ClazzLog.* FROM ClazzLog \n | WHERE \n | ClazzLog.clazzLogClazzUid = ? \n | AND ClazzLog.logDate BETWEEN ? AND ?\n | AND (? = 0 OR ((ClazzLog.clazzLogStatusFlag & ?) = 0))\n | ORDER BY ClazzLog.logDate DESC\n | LIMIT ?\n | \n ')), ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRange$lambda(clazzUid, fromTime, toTime, excludeStatusFilter, limit)); }; function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_clazzLogUid = closure$_result.getLong_61zpoe$('clazzLogUid'); var _tmp_clazzLogClazzUid = closure$_result.getLong_61zpoe$('clazzLogClazzUid'); var _tmp_logDate = closure$_result.getLong_61zpoe$('logDate'); var _tmp_timeRecorded = closure$_result.getLong_61zpoe$('timeRecorded'); var _tmp_clazzLogDone = closure$_result.getBoolean_61zpoe$('clazzLogDone'); var _tmp_cancellationNote = closure$_result.getString_61zpoe$('cancellationNote'); var _tmp_clazzLogCancelled = closure$_result.getBoolean_61zpoe$('clazzLogCancelled'); var _tmp_clazzLogNumPresent = closure$_result.getInt_61zpoe$('clazzLogNumPresent'); var _tmp_clazzLogNumAbsent = closure$_result.getInt_61zpoe$('clazzLogNumAbsent'); var _tmp_clazzLogNumPartial = closure$_result.getInt_61zpoe$('clazzLogNumPartial'); var _tmp_clazzLogScheduleUid = closure$_result.getLong_61zpoe$('clazzLogScheduleUid'); var _tmp_clazzLogStatusFlag = closure$_result.getInt_61zpoe$('clazzLogStatusFlag'); var _tmp_clazzLogMSQN = closure$_result.getLong_61zpoe$('clazzLogMSQN'); var _tmp_clazzLogLCSN = closure$_result.getLong_61zpoe$('clazzLogLCSN'); var _tmp_clazzLogLCB = closure$_result.getInt_61zpoe$('clazzLogLCB'); var _tmp_clazzLogLastChangedTime = closure$_result.getLong_61zpoe$('clazzLogLastChangedTime'); var $receiver = new ClazzLog(); $receiver.clazzLogUid = _tmp_clazzLogUid; $receiver.clazzLogClazzUid = _tmp_clazzLogClazzUid; $receiver.logDate = _tmp_logDate; $receiver.timeRecorded = _tmp_timeRecorded; $receiver.clazzLogDone = _tmp_clazzLogDone; $receiver.cancellationNote = _tmp_cancellationNote; $receiver.clazzLogCancelled = _tmp_clazzLogCancelled; $receiver.clazzLogNumPresent = _tmp_clazzLogNumPresent; $receiver.clazzLogNumAbsent = _tmp_clazzLogNumAbsent; $receiver.clazzLogNumPartial = _tmp_clazzLogNumPartial; $receiver.clazzLogScheduleUid = _tmp_clazzLogScheduleUid; $receiver.clazzLogStatusFlag = _tmp_clazzLogStatusFlag; $receiver.clazzLogMSQN = _tmp_clazzLogMSQN; $receiver.clazzLogLCSN = _tmp_clazzLogLCSN; $receiver.clazzLogLCB = _tmp_clazzLogLCB; $receiver.clazzLogLastChangedTime = _tmp_clazzLogLastChangedTime; return $receiver; }; } function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda$lambda(_result) { return mapRows(_result, ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda(closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$statusFilter_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$fromTime = closure$fromTime_0; this.local$closure$toTime = closure$toTime_0; this.local$closure$statusFilter = closure$statusFilter_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$fromTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$toTime); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$statusFilter); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$statusFilter); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda(closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$statusFilter_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda(closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$statusFilter_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$statusFilter_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzLogDao_JdbcKt = this$ClazzLogDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$fromTime = closure$fromTime_0; this.local$closure$toTime = closure$toTime_0; this.local$closure$statusFilter = closure$statusFilter_0; } Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda; Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzLogDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT ClazzLog.* FROM ClazzLog \n | WHERE \n | ClazzLog.clazzLogClazzUid = ? \n | AND ClazzLog.logDate BETWEEN ? AND ?\n | AND (? = 0 OR ClazzLog.clazzLogStatusFlag = ?)\n | ORDER BY ClazzLog.logDate\n | \n ')), ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda$lambda(this.local$closure$clazzUid, this.local$closure$fromTime, this.local$closure$toTime, this.local$closure$statusFilter), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$statusFilter_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$fromTime_0, closure$toTime_0, closure$statusFilter_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogDao_JdbcKt.prototype.findByClazzUidWithinTimeRangeLive_kxxcc5$ = function (clazzUid, fromTime, toTime, statusFilter) { return new LiveDataImpl(this._db, listOf_0('ClazzLog'), ClazzLogDao_JdbcKt$findByClazzUidWithinTimeRangeLive$lambda(this, clazzUid, fromTime, toTime, statusFilter)); }; function ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, false, ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda(closure$clazzUid_0, closure$excludeStatusFilter_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatusFilter = closure$excludeStatusFilter_0; this.local$_stmt = _stmt_0; } Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda; Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$excludeStatusFilter); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$excludeStatusFilter); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda(closure$clazzUid_0, closure$excludeStatusFilter_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda(closure$clazzUid_0, closure$excludeStatusFilter_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatusFilter_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ClazzLogDao_JdbcKt = this$ClazzLogDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$excludeStatusFilter = closure$excludeStatusFilter_0; } Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda.prototype.constructor = Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda; Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ClazzLogDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT EXISTS(SELECT ClazzLog.clazzLogUid FROM ClazzLog WHERE clazzLogClazzUid = ? \n | AND (? = 0 OR ((ClazzLog.clazzLogStatusFlag & ?) = 0)))\n | \n ')), ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda$lambda(this.local$closure$clazzUid, this.local$closure$excludeStatusFilter), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatusFilter_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda(this$ClazzLogDao_JdbcKt_0, closure$clazzUid_0, closure$excludeStatusFilter_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ClazzLogDao_JdbcKt.prototype.clazzHasScheduleLive_yhmem3$ = function (clazzUid, excludeStatusFilter) { return new LiveDataImpl(this._db, listOf_0('ClazzLog'), ClazzLogDao_JdbcKt$clazzHasScheduleLive$lambda(this, clazzUid, excludeStatusFilter)); }; function ClazzLogDao_JdbcKt$updateStatusByClazzLogUid$lambda(closure$newStatus, closure$timeChanged, closure$clazzLogUid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$newStatus); _stmt.setLong_6svq3l$(2, closure$timeChanged); _stmt.setLong_6svq3l$(3, closure$clazzLogUid); return _stmt.executeUpdate(); }; } ClazzLogDao_JdbcKt.prototype.updateStatusByClazzLogUid_ro19vi$ = function (clazzLogUid, newStatus, timeChanged) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |UPDATE ClazzLog \n | SET clazzLogStatusFlag = ?,\n | clazzLogLastChangedTime = ?\n | WHERE clazzLogUid = ?\n ')), ClazzLogDao_JdbcKt$updateStatusByClazzLogUid$lambda(newStatus, timeChanged, clazzLogUid)); }; function ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO ClazzLog (clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.clazzLogUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.clazzLogUid); } stmt.setLong_6svq3l$(2, entity.clazzLogClazzUid); stmt.setLong_6svq3l$(3, entity.logDate); stmt.setLong_6svq3l$(4, entity.timeRecorded); stmt.setBoolean_fzusl$(5, entity.clazzLogDone); stmt.setString_vqvrqt$(6, entity.cancellationNote); stmt.setBoolean_fzusl$(7, entity.clazzLogCancelled); stmt.setInt_vux9f0$(8, entity.clazzLogNumPresent); stmt.setInt_vux9f0$(9, entity.clazzLogNumAbsent); stmt.setInt_vux9f0$(10, entity.clazzLogNumPartial); stmt.setLong_6svq3l$(11, entity.clazzLogScheduleUid); stmt.setInt_vux9f0$(12, entity.clazzLogStatusFlag); stmt.setLong_6svq3l$(13, entity.clazzLogMSQN); stmt.setLong_6svq3l$(14, entity.clazzLogLCSN); stmt.setInt_vux9f0$(15, entity.clazzLogLCB); stmt.setLong_6svq3l$(16, entity.clazzLogLastChangedTime); }; ClazzLogDao_JdbcKt$_insertAdapterClazzLog_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ClazzLog (clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.clazzLogUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.clazzLogUid); } stmt.setLong_6svq3l$(2, entity.clazzLogClazzUid); stmt.setLong_6svq3l$(3, entity.logDate); stmt.setLong_6svq3l$(4, entity.timeRecorded); stmt.setBoolean_fzusl$(5, entity.clazzLogDone); stmt.setString_vqvrqt$(6, entity.cancellationNote); stmt.setBoolean_fzusl$(7, entity.clazzLogCancelled); stmt.setInt_vux9f0$(8, entity.clazzLogNumPresent); stmt.setInt_vux9f0$(9, entity.clazzLogNumAbsent); stmt.setInt_vux9f0$(10, entity.clazzLogNumPartial); stmt.setLong_6svq3l$(11, entity.clazzLogScheduleUid); stmt.setInt_vux9f0$(12, entity.clazzLogStatusFlag); stmt.setLong_6svq3l$(13, entity.clazzLogMSQN); stmt.setLong_6svq3l$(14, entity.clazzLogLCSN); stmt.setInt_vux9f0$(15, entity.clazzLogLCB); stmt.setLong_6svq3l$(16, entity.clazzLogLastChangedTime); }; ClazzLogDao_JdbcKt$_insertAdapterClazzLog_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ClazzLogDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogDao_JdbcKt', interfaces: [ClazzLogDao]}; function ClazzLogDao_ReplicateWrapper(_db, _dao) { ClazzLogDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_27($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_27.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_27.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_27.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_27; Coroutine$replicateOnNewNode_s8cxhz$_27.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_27(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_ReplicateWrapper.prototype.replace_b1okmm$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$replicateOnChange_24($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_24.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_24.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_24.prototype.constructor = Coroutine$replicateOnChange_24; Coroutine$replicateOnChange_24.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_24(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; ClazzLogDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; ClazzLogDao_ReplicateWrapper.prototype.findByClazzUidAsFactory_yhmem3$ = function (clazzUid, excludeStatus) { return this._dao_0.findByClazzUidAsFactory_yhmem3$(clazzUid, excludeStatus); }; ClazzLogDao_ReplicateWrapper.prototype.findByClazzUidAsync_yhmem3$ = function (clazzUid, excludeStatus, continuation) { return this._dao_0.findByClazzUidAsync_yhmem3$(clazzUid, excludeStatus, continuation); }; ClazzLogDao_ReplicateWrapper.prototype.findByClazzUidWithinTimeRangeAsync_ttedgd$ = function (clazzUid, fromTime, toTime, excludeStatusFilter, limit, continuation) { return this._dao_0.findByClazzUidWithinTimeRangeAsync_ttedgd$(clazzUid, fromTime, toTime, excludeStatusFilter, limit, continuation); }; ClazzLogDao_ReplicateWrapper.prototype.findByClazzUidWithinTimeRange_ttedgd$$default = function (clazzUid, fromTime, toTime, excludeStatusFilter, limit) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogDao_ReplicateWrapper.prototype.findByClazzUidWithinTimeRangeLive_kxxcc5$ = function (clazzUid, fromTime, toTime, statusFilter) { return this._dao_0.findByClazzUidWithinTimeRangeLive_kxxcc5$(clazzUid, fromTime, toTime, statusFilter); }; ClazzLogDao_ReplicateWrapper.prototype.clazzHasScheduleLive_yhmem3$ = function (clazzUid, excludeStatusFilter) { return this._dao_0.clazzHasScheduleLive_yhmem3$(clazzUid, excludeStatusFilter); }; ClazzLogDao_ReplicateWrapper.prototype.updateStatusByClazzLogUid_ro19vi$ = function (clazzLogUid, newStatus, timeChanged) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$updateAsync_b1okmm$_0($this, clazzLog_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzLog = clazzLog_0; } Coroutine$updateAsync_b1okmm$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_b1okmm$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_b1okmm$_0.prototype.constructor = Coroutine$updateAsync_b1okmm$_0; Coroutine$updateAsync_b1okmm$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$clazzLog.clazzLogLastChangedTime = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.$this._dao_0.updateAsync_b1okmm$(this.local$clazzLog, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_ReplicateWrapper.prototype.updateAsync_b1okmm$ = function (clazzLog_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_b1okmm$_0(this, clazzLog_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_29($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_29.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_29.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_29.prototype.constructor = Coroutine$insertAsync_29; Coroutine$insertAsync_29.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.clazzLogUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(14, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.clazzLogUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.clazzLogLastChangedTime = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.clazzLogUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_29(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ClazzLogDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogDao_ReplicateWrapper', interfaces: [ClazzLogDao]}; function ClazzLogDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ClazzLogDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_28($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_28.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_28.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_28.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_28; Coroutine$replicateOnNewNode_s8cxhz$_28.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_28(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_Repo.prototype.replace_b1okmm$ = function (entity) { var _result = this._dao.replace_b1okmm$(entity); return _result; }; function Coroutine$replicateOnChange_25($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_25.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_25.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_25.prototype.constructor = Coroutine$replicateOnChange_25; Coroutine$replicateOnChange_25.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_25(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_Repo.prototype.findByUid_s8cxhz$ = function (uid) { var _result = this._dao.findByUid_s8cxhz$(uid); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_1($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_1.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_1; Coroutine$findByUidAsync_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_1(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; ClazzLogDao_Repo.prototype.findByClazzUidAsFactory_yhmem3$ = function (clazzUid, excludeStatus) { var _result = this._dao.findByClazzUidAsFactory_yhmem3$(clazzUid, excludeStatus); return _result; }; function Coroutine$findByClazzUidAsync_yhmem3$($this, clazzUid_0, excludeStatus_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$excludeStatus = excludeStatus_0; } Coroutine$findByClazzUidAsync_yhmem3$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzUidAsync_yhmem3$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzUidAsync_yhmem3$.prototype.constructor = Coroutine$findByClazzUidAsync_yhmem3$; Coroutine$findByClazzUidAsync_yhmem3$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByClazzUidAsync_yhmem3$(this.local$clazzUid, this.local$excludeStatus, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.findByClazzUidAsync_yhmem3$ = function (clazzUid_0, excludeStatus_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzUidAsync_yhmem3$(this, clazzUid_0, excludeStatus_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$($this, clazzUid_0, fromTime_0, toTime_0, excludeStatusFilter_0, limit_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; this.local$fromTime = fromTime_0; this.local$toTime = toTime_0; this.local$excludeStatusFilter = excludeStatusFilter_0; this.local$limit = limit_0; } Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$.prototype.constructor = Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$; Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByClazzUidWithinTimeRangeAsync_ttedgd$(this.local$clazzUid, this.local$fromTime, this.local$toTime, this.local$excludeStatusFilter, this.local$limit, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.findByClazzUidWithinTimeRangeAsync_ttedgd$ = function (clazzUid_0, fromTime_0, toTime_0, excludeStatusFilter_0, limit_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzUidWithinTimeRangeAsync_ttedgd$(this, clazzUid_0, fromTime_0, toTime_0, excludeStatusFilter_0, limit_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_Repo.prototype.findByClazzUidWithinTimeRange_ttedgd$$default = function (clazzUid, fromTime, toTime, excludeStatusFilter, limit) { var _result = this._dao.findByClazzUidWithinTimeRange_ttedgd$(clazzUid, fromTime, toTime, excludeStatusFilter, limit); return _result; }; ClazzLogDao_Repo.prototype.findByClazzUidWithinTimeRangeLive_kxxcc5$ = function (clazzUid, fromTime, toTime, statusFilter) { var _result = this._dao.findByClazzUidWithinTimeRangeLive_kxxcc5$(clazzUid, fromTime, toTime, statusFilter); return _result; }; ClazzLogDao_Repo.prototype.clazzHasScheduleLive_yhmem3$ = function (clazzUid, excludeStatusFilter) { var _result = this._dao.clazzHasScheduleLive_yhmem3$(clazzUid, excludeStatusFilter); return _result; }; ClazzLogDao_Repo.prototype.updateStatusByClazzLogUid_ro19vi$ = function (clazzLogUid, newStatus, timeChanged) { this._dao.updateStatusByClazzLogUid_ro19vi$(clazzLogUid, newStatus, timeChanged); }; function Coroutine$updateAsync_b1okmm$_1($this, clazzLog_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzLog = clazzLog_0; } Coroutine$updateAsync_b1okmm$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_b1okmm$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_b1okmm$_1.prototype.constructor = Coroutine$updateAsync_b1okmm$_1; Coroutine$updateAsync_b1okmm$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_b1okmm$(this.local$clazzLog, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.updateAsync_b1okmm$ = function (clazzLog_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_b1okmm$_1(this, clazzLog_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_30($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_30.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_30.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_30.prototype.constructor = Coroutine$insertAsync_30; Coroutine$insertAsync_30.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ClazzLogDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_30(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ClazzLogDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ClazzLogDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ClazzLogDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ClazzLogDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogDao_Repo', interfaces: [ClazzLogDao]}; function CommentsDao() { } CommentsDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'CommentsDao', interfaces: [OneToManyJoinDao, BaseDao]}; function CommentsDao_JdbcKt(_db) { CommentsDao.call(this); this._db = _db; this._insertAdapterComments_ = new CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral(this._db); } CommentsDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterComments_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_31($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_31.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_31.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_31.prototype.constructor = Coroutine$insertAsync_31; Coroutine$insertAsync_31.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterComments_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_31(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterComments_.insertList_4ezy5m$(entityList); }; function Coroutine$insertListAsync_4ezy5m$_2($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_2.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_2; Coroutine$insertListAsync_4ezy5m$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterComments_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_2(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CommentsDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.commentsText); _stmt.setInt_vux9f0$(2, _entity.commentsEntityType); _stmt.setLong_6svq3l$(3, _entity.commentsEntityUid); _stmt.setBoolean_fzusl$(4, _entity.commentsPublic); _stmt.setInt_vux9f0$(5, _entity.commentsStatus); _stmt.setLong_6svq3l$(6, _entity.commentsPersonUid); _stmt.setLong_6svq3l$(7, _entity.commentsToPersonUid); _stmt.setLong_6svq3l$(8, _entity.commentSubmitterUid); _stmt.setBoolean_fzusl$(9, _entity.commentsFlagged); _stmt.setBoolean_fzusl$(10, _entity.commentsInActive); _stmt.setLong_6svq3l$(11, _entity.commentsDateTimeAdded); _stmt.setLong_6svq3l$(12, _entity.commentsDateTimeUpdated); _stmt.setLong_6svq3l$(13, _entity.commentsMCSN); _stmt.setLong_6svq3l$(14, _entity.commentsLCSN); _stmt.setInt_vux9f0$(15, _entity.commentsLCB); _stmt.setLong_6svq3l$(16, _entity.commentsLct); _stmt.setLong_6svq3l$(17, _entity.commentsUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CommentsDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Comments SET commentsText = ?, commentsEntityType = ?, commentsEntityUid = ?, commentsPublic = ?, commentsStatus = ?, commentsPersonUid = ?, commentsToPersonUid = ?, commentSubmitterUid = ?, commentsFlagged = ?, commentsInActive = ?, commentsDateTimeAdded = ?, commentsDateTimeUpdated = ?, commentsMCSN = ?, commentsLCSN = ?, commentsLCB = ?, commentsLct = ? WHERE commentsUid = ?'; prepareAndUseStatement(this._db, _sql, CommentsDao_JdbcKt$updateList$lambda(entityList)); }; function CommentsDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.commentsText); _stmt.setInt_vux9f0$(2, closure$entity.commentsEntityType); _stmt.setLong_6svq3l$(3, closure$entity.commentsEntityUid); _stmt.setBoolean_fzusl$(4, closure$entity.commentsPublic); _stmt.setInt_vux9f0$(5, closure$entity.commentsStatus); _stmt.setLong_6svq3l$(6, closure$entity.commentsPersonUid); _stmt.setLong_6svq3l$(7, closure$entity.commentsToPersonUid); _stmt.setLong_6svq3l$(8, closure$entity.commentSubmitterUid); _stmt.setBoolean_fzusl$(9, closure$entity.commentsFlagged); _stmt.setBoolean_fzusl$(10, closure$entity.commentsInActive); _stmt.setLong_6svq3l$(11, closure$entity.commentsDateTimeAdded); _stmt.setLong_6svq3l$(12, closure$entity.commentsDateTimeUpdated); _stmt.setLong_6svq3l$(13, closure$entity.commentsMCSN); _stmt.setLong_6svq3l$(14, closure$entity.commentsLCSN); _stmt.setInt_vux9f0$(15, closure$entity.commentsLCB); _stmt.setLong_6svq3l$(16, closure$entity.commentsLct); _stmt.setLong_6svq3l$(17, closure$entity.commentsUid); return _stmt.executeUpdate(); }; } CommentsDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Comments SET commentsText = ?, commentsEntityType = ?, commentsEntityUid = ?, commentsPublic = ?, commentsStatus = ?, commentsPersonUid = ?, commentsToPersonUid = ?, commentSubmitterUid = ?, commentsFlagged = ?, commentsInActive = ?, commentsDateTimeAdded = ?, commentsDateTimeUpdated = ?, commentsMCSN = ?, commentsLCSN = ?, commentsLCB = ?, commentsLct = ? WHERE commentsUid = ?'; prepareAndUseStatement(this._db, _sql, CommentsDao_JdbcKt$update$lambda(entity)); }; function Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda; Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setString_vqvrqt$(1, _entity.commentsText); this.local$_stmt.setInt_vux9f0$(2, _entity.commentsEntityType); this.local$_stmt.setLong_6svq3l$(3, _entity.commentsEntityUid); this.local$_stmt.setBoolean_fzusl$(4, _entity.commentsPublic); this.local$_stmt.setInt_vux9f0$(5, _entity.commentsStatus); this.local$_stmt.setLong_6svq3l$(6, _entity.commentsPersonUid); this.local$_stmt.setLong_6svq3l$(7, _entity.commentsToPersonUid); this.local$_stmt.setLong_6svq3l$(8, _entity.commentSubmitterUid); this.local$_stmt.setBoolean_fzusl$(9, _entity.commentsFlagged); this.local$_stmt.setBoolean_fzusl$(10, _entity.commentsInActive); this.local$_stmt.setLong_6svq3l$(11, _entity.commentsDateTimeAdded); this.local$_stmt.setLong_6svq3l$(12, _entity.commentsDateTimeUpdated); this.local$_stmt.setLong_6svq3l$(13, _entity.commentsMCSN); this.local$_stmt.setLong_6svq3l$(14, _entity.commentsLCSN); this.local$_stmt.setInt_vux9f0$(15, _entity.commentsLCB); this.local$_stmt.setLong_6svq3l$(16, _entity.commentsLct); this.local$_stmt.setLong_6svq3l$(17, _entity.commentsUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_2($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_2.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_2; Coroutine$updateListAsync_4ezy5m$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE Comments SET commentsText = ?, commentsEntityType = ?, commentsEntityUid = ?, commentsPublic = ?, commentsStatus = ?, commentsPersonUid = ?, commentsToPersonUid = ?, commentSubmitterUid = ?, commentsFlagged = ?, commentsInActive = ?, commentsDateTimeAdded = ?, commentsDateTimeUpdated = ?, commentsMCSN = ?, commentsLCSN = ?, commentsLCB = ?, commentsLct = ? WHERE commentsUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CommentsDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_2(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_29($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_29.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_29.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_29.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_29; Coroutine$replicateOnNewNode_s8cxhz$_29.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CommentsReplicate(commentsPk, commentsDestination)\n | SELECT DISTINCT Comments.commentsUid AS commentsPk,\n | ? AS commentsDestination\n | FROM Comments\n | WHERE Comments.commentsLct != COALESCE(\n | (SELECT commentsVersionId\n | FROM CommentsReplicate\n | WHERE commentsPk = Comments.commentsUid\n | AND commentsDestination = ?), 0) \n | /*psql ON CONFLICT(commentsPk, commentsDestination) DO UPDATE\n | SET commentsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CommentsReplicate(commentsPk, commentsDestination)\n | SELECT DISTINCT Comments.commentsUid AS commentsPk,\n | ? AS commentsDestination\n | FROM Comments\n | WHERE Comments.commentsLct != COALESCE(\n | (SELECT commentsVersionId\n | FROM CommentsReplicate\n | WHERE commentsPk = Comments.commentsUid\n | AND commentsDestination = ?), 0) \n | ON CONFLICT(commentsPk, commentsDestination) DO UPDATE\n | SET commentsPending = true\n | \n | \n |')), CommentsDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_29(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda; Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_26($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_26.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_26.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_26.prototype.constructor = Coroutine$replicateOnChange_26; Coroutine$replicateOnChange_26.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CommentsReplicate(commentsPk, commentsDestination)\n | SELECT DISTINCT Comments.commentsUid AS commentsPk,\n | UserSession.usClientNodeId AS commentsDestination\n | FROM ChangeLog\n | JOIN Comments\n | ON ChangeLog.chTableId = 208\n | AND ChangeLog.chEntityPk = Comments.commentsUid\n | JOIN UserSession \n | ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Comments.commentsLct != COALESCE(\n | (SELECT commentsVersionId\n | FROM CommentsReplicate\n | WHERE commentsPk = Comments.commentsUid\n | AND commentsDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(commentsPk, commentsDestination) DO UPDATE\n | SET commentsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CommentsReplicate(commentsPk, commentsDestination)\n | SELECT DISTINCT Comments.commentsUid AS commentsPk,\n | UserSession.usClientNodeId AS commentsDestination\n | FROM ChangeLog\n | JOIN Comments\n | ON ChangeLog.chTableId = 208\n | AND ChangeLog.chEntityPk = Comments.commentsUid\n | JOIN UserSession \n | ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Comments.commentsLct != COALESCE(\n | (SELECT commentsVersionId\n | FROM CommentsReplicate\n | WHERE commentsPk = Comments.commentsUid\n | AND commentsDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(commentsPk, commentsDestination) DO UPDATE\n | SET commentsPending = true\n | \n | \n |')), CommentsDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_26(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CommentsDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_commentsUid = closure$_result.getLong_61zpoe$('commentsUid'); var _tmp_commentsText = closure$_result.getString_61zpoe$('commentsText'); var _tmp_commentsEntityType = closure$_result.getInt_61zpoe$('commentsEntityType'); var _tmp_commentsEntityUid = closure$_result.getLong_61zpoe$('commentsEntityUid'); var _tmp_commentsPublic = closure$_result.getBoolean_61zpoe$('commentsPublic'); var _tmp_commentsStatus = closure$_result.getInt_61zpoe$('commentsStatus'); var _tmp_commentsPersonUid = closure$_result.getLong_61zpoe$('commentsPersonUid'); var _tmp_commentsToPersonUid = closure$_result.getLong_61zpoe$('commentsToPersonUid'); var _tmp_commentSubmitterUid = closure$_result.getLong_61zpoe$('commentSubmitterUid'); var _tmp_commentsFlagged = closure$_result.getBoolean_61zpoe$('commentsFlagged'); var _tmp_commentsInActive = closure$_result.getBoolean_61zpoe$('commentsInActive'); var _tmp_commentsDateTimeAdded = closure$_result.getLong_61zpoe$('commentsDateTimeAdded'); var _tmp_commentsDateTimeUpdated = closure$_result.getLong_61zpoe$('commentsDateTimeUpdated'); var _tmp_commentsMCSN = closure$_result.getLong_61zpoe$('commentsMCSN'); var _tmp_commentsLCSN = closure$_result.getLong_61zpoe$('commentsLCSN'); var _tmp_commentsLCB = closure$_result.getInt_61zpoe$('commentsLCB'); var _tmp_commentsLct = closure$_result.getLong_61zpoe$('commentsLct'); var $receiver = new Comments(); $receiver.commentsUid = _tmp_commentsUid; $receiver.commentsText = _tmp_commentsText; $receiver.commentsEntityType = _tmp_commentsEntityType; $receiver.commentsEntityUid = _tmp_commentsEntityUid; $receiver.commentsPublic = _tmp_commentsPublic; $receiver.commentsStatus = _tmp_commentsStatus; $receiver.commentsPersonUid = _tmp_commentsPersonUid; $receiver.commentsToPersonUid = _tmp_commentsToPersonUid; $receiver.commentSubmitterUid = _tmp_commentSubmitterUid; $receiver.commentsFlagged = _tmp_commentsFlagged; $receiver.commentsInActive = _tmp_commentsInActive; $receiver.commentsDateTimeAdded = _tmp_commentsDateTimeAdded; $receiver.commentsDateTimeUpdated = _tmp_commentsDateTimeUpdated; $receiver.commentsMCSN = _tmp_commentsMCSN; $receiver.commentsLCSN = _tmp_commentsLCSN; $receiver.commentsLCB = _tmp_commentsLCB; $receiver.commentsLct = _tmp_commentsLct; return $receiver; }; } function CommentsDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, CommentsDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function CommentsDao_JdbcKt$findByUidAsync$lambda(closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); return useResults(_stmt.executeQuery(), CommentsDao_JdbcKt$findByUidAsync$lambda$lambda); }; } CommentsDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Comments WHERE commentsUid = ? AND CAST(commentsInActive AS INTEGER) = 0'), CommentsDao_JdbcKt$findByUidAsync$lambda(uid)); }; function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral(this$CommentsDao_JdbcKt, closure$entityType, closure$entityUid) { this.this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt; this.closure$entityType = closure$entityType; this.closure$entityUid = closure$entityUid; DataSourceFactory.call(this); } function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_commentsUid = closure$_result.getLong_61zpoe$('commentsUid'); var _tmp_commentsText = closure$_result.getString_61zpoe$('commentsText'); var _tmp_commentsEntityType = closure$_result.getInt_61zpoe$('commentsEntityType'); var _tmp_commentsEntityUid = closure$_result.getLong_61zpoe$('commentsEntityUid'); var _tmp_commentsPublic = closure$_result.getBoolean_61zpoe$('commentsPublic'); var _tmp_commentsStatus = closure$_result.getInt_61zpoe$('commentsStatus'); var _tmp_commentsPersonUid = closure$_result.getLong_61zpoe$('commentsPersonUid'); var _tmp_commentsToPersonUid = closure$_result.getLong_61zpoe$('commentsToPersonUid'); var _tmp_commentSubmitterUid = closure$_result.getLong_61zpoe$('commentSubmitterUid'); var _tmp_commentsFlagged = closure$_result.getBoolean_61zpoe$('commentsFlagged'); var _tmp_commentsInActive = closure$_result.getBoolean_61zpoe$('commentsInActive'); var _tmp_commentsDateTimeAdded = closure$_result.getLong_61zpoe$('commentsDateTimeAdded'); var _tmp_commentsDateTimeUpdated = closure$_result.getLong_61zpoe$('commentsDateTimeUpdated'); var _tmp_commentsMCSN = closure$_result.getLong_61zpoe$('commentsMCSN'); var _tmp_commentsLCSN = closure$_result.getLong_61zpoe$('commentsLCSN'); var _tmp_commentsLCB = closure$_result.getInt_61zpoe$('commentsLCB'); var _tmp_commentsLct = closure$_result.getLong_61zpoe$('commentsLct'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new CommentsWithPerson(); $receiver.commentsUid = _tmp_commentsUid; $receiver.commentsText = _tmp_commentsText; $receiver.commentsEntityType = _tmp_commentsEntityType; $receiver.commentsEntityUid = _tmp_commentsEntityUid; $receiver.commentsPublic = _tmp_commentsPublic; $receiver.commentsStatus = _tmp_commentsStatus; $receiver.commentsPersonUid = _tmp_commentsPersonUid; $receiver.commentsToPersonUid = _tmp_commentsToPersonUid; $receiver.commentSubmitterUid = _tmp_commentSubmitterUid; $receiver.commentsFlagged = _tmp_commentsFlagged; $receiver.commentsInActive = _tmp_commentsInActive; $receiver.commentsDateTimeAdded = _tmp_commentsDateTimeAdded; $receiver.commentsDateTimeUpdated = _tmp_commentsDateTimeUpdated; $receiver.commentsMCSN = _tmp_commentsMCSN; $receiver.commentsLCSN = _tmp_commentsLCSN; $receiver.commentsLCB = _tmp_commentsLCB; $receiver.commentsLct = _tmp_commentsLct; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.commentsPerson = $receiver_0; } return $receiver; }; } function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, Person.* \n | FROM Comments\n | LEFT JOIN Person \n | ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 1\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ?\n ')), CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getData$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, _limit, _offset)); }; function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; } Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda; Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, Person.* \n | FROM Comments\n | LEFT JOIN Person \n | ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 1\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n ')), CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral$getLength$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid)); }; CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; CommentsDao_JdbcKt.prototype.findPublicByEntityTypeAndUidLive_6svq3l$ = function (entityType, entityUid) { return new CommentsDao_JdbcKt$findPublicByEntityTypeAndUidLive$ObjectLiteral(this, entityType, entityUid); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral(this$CommentsDao_JdbcKt, closure$entityType, closure$entityUid, closure$personUid) { this.this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt; this.closure$entityType = closure$entityType; this.closure$entityUid = closure$entityUid; this.closure$personUid = closure$personUid; DataSourceFactory.call(this); } function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_commentsUid = closure$_result.getLong_61zpoe$('commentsUid'); var _tmp_commentsText = closure$_result.getString_61zpoe$('commentsText'); var _tmp_commentsEntityType = closure$_result.getInt_61zpoe$('commentsEntityType'); var _tmp_commentsEntityUid = closure$_result.getLong_61zpoe$('commentsEntityUid'); var _tmp_commentsPublic = closure$_result.getBoolean_61zpoe$('commentsPublic'); var _tmp_commentsStatus = closure$_result.getInt_61zpoe$('commentsStatus'); var _tmp_commentsPersonUid = closure$_result.getLong_61zpoe$('commentsPersonUid'); var _tmp_commentsToPersonUid = closure$_result.getLong_61zpoe$('commentsToPersonUid'); var _tmp_commentSubmitterUid = closure$_result.getLong_61zpoe$('commentSubmitterUid'); var _tmp_commentsFlagged = closure$_result.getBoolean_61zpoe$('commentsFlagged'); var _tmp_commentsInActive = closure$_result.getBoolean_61zpoe$('commentsInActive'); var _tmp_commentsDateTimeAdded = closure$_result.getLong_61zpoe$('commentsDateTimeAdded'); var _tmp_commentsDateTimeUpdated = closure$_result.getLong_61zpoe$('commentsDateTimeUpdated'); var _tmp_commentsMCSN = closure$_result.getLong_61zpoe$('commentsMCSN'); var _tmp_commentsLCSN = closure$_result.getLong_61zpoe$('commentsLCSN'); var _tmp_commentsLCB = closure$_result.getInt_61zpoe$('commentsLCB'); var _tmp_commentsLct = closure$_result.getLong_61zpoe$('commentsLct'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new CommentsWithPerson(); $receiver.commentsUid = _tmp_commentsUid; $receiver.commentsText = _tmp_commentsText; $receiver.commentsEntityType = _tmp_commentsEntityType; $receiver.commentsEntityUid = _tmp_commentsEntityUid; $receiver.commentsPublic = _tmp_commentsPublic; $receiver.commentsStatus = _tmp_commentsStatus; $receiver.commentsPersonUid = _tmp_commentsPersonUid; $receiver.commentsToPersonUid = _tmp_commentsToPersonUid; $receiver.commentSubmitterUid = _tmp_commentSubmitterUid; $receiver.commentsFlagged = _tmp_commentsFlagged; $receiver.commentsInActive = _tmp_commentsInActive; $receiver.commentsDateTimeAdded = _tmp_commentsDateTimeAdded; $receiver.commentsDateTimeUpdated = _tmp_commentsDateTimeUpdated; $receiver.commentsMCSN = _tmp_commentsMCSN; $receiver.commentsLCSN = _tmp_commentsLCSN; $receiver.commentsLCB = _tmp_commentsLCB; $receiver.commentsLct = _tmp_commentsLct; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.commentsPerson = $receiver_0; } return $receiver; }; } function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND Comments.commentsPersonUid = ? OR Comments.commentsToPersonUid = ? \n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Person.personUid = ?\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ?\n ')), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$personUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getData$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$personUid, _limit, _offset)); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND Comments.commentsPersonUid = ? OR Comments.commentsToPersonUid = ? \n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Person.personUid = ?\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n ')), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$personUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral$getLength$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$personUid)); }; CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; CommentsDao_JdbcKt.prototype.findPrivateByEntityTypeAndUidAndForPersonLive_h639zw$ = function (entityType, entityUid, personUid) { return new CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive$ObjectLiteral(this, entityType, entityUid, personUid); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral(this$CommentsDao_JdbcKt, closure$entityType, closure$entityUid, closure$submitterUid) { this.this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt; this.closure$entityType = closure$entityType; this.closure$entityUid = closure$entityUid; this.closure$submitterUid = closure$submitterUid; DataSourceFactory.call(this); } function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_commentsUid = closure$_result.getLong_61zpoe$('commentsUid'); var _tmp_commentsText = closure$_result.getString_61zpoe$('commentsText'); var _tmp_commentsEntityType = closure$_result.getInt_61zpoe$('commentsEntityType'); var _tmp_commentsEntityUid = closure$_result.getLong_61zpoe$('commentsEntityUid'); var _tmp_commentsPublic = closure$_result.getBoolean_61zpoe$('commentsPublic'); var _tmp_commentsStatus = closure$_result.getInt_61zpoe$('commentsStatus'); var _tmp_commentsPersonUid = closure$_result.getLong_61zpoe$('commentsPersonUid'); var _tmp_commentsToPersonUid = closure$_result.getLong_61zpoe$('commentsToPersonUid'); var _tmp_commentSubmitterUid = closure$_result.getLong_61zpoe$('commentSubmitterUid'); var _tmp_commentsFlagged = closure$_result.getBoolean_61zpoe$('commentsFlagged'); var _tmp_commentsInActive = closure$_result.getBoolean_61zpoe$('commentsInActive'); var _tmp_commentsDateTimeAdded = closure$_result.getLong_61zpoe$('commentsDateTimeAdded'); var _tmp_commentsDateTimeUpdated = closure$_result.getLong_61zpoe$('commentsDateTimeUpdated'); var _tmp_commentsMCSN = closure$_result.getLong_61zpoe$('commentsMCSN'); var _tmp_commentsLCSN = closure$_result.getLong_61zpoe$('commentsLCSN'); var _tmp_commentsLCB = closure$_result.getInt_61zpoe$('commentsLCB'); var _tmp_commentsLct = closure$_result.getLong_61zpoe$('commentsLct'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new CommentsWithPerson(); $receiver.commentsUid = _tmp_commentsUid; $receiver.commentsText = _tmp_commentsText; $receiver.commentsEntityType = _tmp_commentsEntityType; $receiver.commentsEntityUid = _tmp_commentsEntityUid; $receiver.commentsPublic = _tmp_commentsPublic; $receiver.commentsStatus = _tmp_commentsStatus; $receiver.commentsPersonUid = _tmp_commentsPersonUid; $receiver.commentsToPersonUid = _tmp_commentsToPersonUid; $receiver.commentSubmitterUid = _tmp_commentSubmitterUid; $receiver.commentsFlagged = _tmp_commentsFlagged; $receiver.commentsInActive = _tmp_commentsInActive; $receiver.commentsDateTimeAdded = _tmp_commentsDateTimeAdded; $receiver.commentsDateTimeUpdated = _tmp_commentsDateTimeUpdated; $receiver.commentsMCSN = _tmp_commentsMCSN; $receiver.commentsLCSN = _tmp_commentsLCSN; $receiver.commentsLCB = _tmp_commentsLCB; $receiver.commentsLct = _tmp_commentsLct; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.commentsPerson = $receiver_0; } return $receiver; }; } function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$submitterUid); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, \n | Person.* \n | FROM Comments\n | LEFT JOIN Person \n | ON Person.personUid = Comments.commentsPersonUid\n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND Comments.commentSubmitterUid = ? \n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ?\n ')), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$submitterUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getData$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$submitterUid, _limit, _offset)); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$submitterUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$submitterUid = closure$submitterUid_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, \n | Person.* \n | FROM Comments\n | LEFT JOIN Person \n | ON Person.personUid = Comments.commentsPersonUid\n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND Comments.commentSubmitterUid = ? \n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n ')), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$submitterUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$submitterUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral$getLength$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$submitterUid)); }; CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; CommentsDao_JdbcKt.prototype.findPrivateByEntityTypeAndUidAndForPersonLive2_h639zw$ = function (entityType, entityUid, submitterUid) { return new CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndForPersonLive2$ObjectLiteral(this, entityType, entityUid, submitterUid); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral(this$CommentsDao_JdbcKt, closure$entityType, closure$entityUid, closure$personUid) { this.this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt; this.closure$entityType = closure$entityType; this.closure$entityUid = closure$entityUid; this.closure$personUid = closure$personUid; DataSourceFactory.call(this); } function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_commentsUid = closure$_result.getLong_61zpoe$('commentsUid'); var _tmp_commentsText = closure$_result.getString_61zpoe$('commentsText'); var _tmp_commentsEntityType = closure$_result.getInt_61zpoe$('commentsEntityType'); var _tmp_commentsEntityUid = closure$_result.getLong_61zpoe$('commentsEntityUid'); var _tmp_commentsPublic = closure$_result.getBoolean_61zpoe$('commentsPublic'); var _tmp_commentsStatus = closure$_result.getInt_61zpoe$('commentsStatus'); var _tmp_commentsPersonUid = closure$_result.getLong_61zpoe$('commentsPersonUid'); var _tmp_commentsToPersonUid = closure$_result.getLong_61zpoe$('commentsToPersonUid'); var _tmp_commentSubmitterUid = closure$_result.getLong_61zpoe$('commentSubmitterUid'); var _tmp_commentsFlagged = closure$_result.getBoolean_61zpoe$('commentsFlagged'); var _tmp_commentsInActive = closure$_result.getBoolean_61zpoe$('commentsInActive'); var _tmp_commentsDateTimeAdded = closure$_result.getLong_61zpoe$('commentsDateTimeAdded'); var _tmp_commentsDateTimeUpdated = closure$_result.getLong_61zpoe$('commentsDateTimeUpdated'); var _tmp_commentsMCSN = closure$_result.getLong_61zpoe$('commentsMCSN'); var _tmp_commentsLCSN = closure$_result.getLong_61zpoe$('commentsLCSN'); var _tmp_commentsLCB = closure$_result.getInt_61zpoe$('commentsLCB'); var _tmp_commentsLct = closure$_result.getLong_61zpoe$('commentsLct'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new CommentsWithPerson(); $receiver.commentsUid = _tmp_commentsUid; $receiver.commentsText = _tmp_commentsText; $receiver.commentsEntityType = _tmp_commentsEntityType; $receiver.commentsEntityUid = _tmp_commentsEntityUid; $receiver.commentsPublic = _tmp_commentsPublic; $receiver.commentsStatus = _tmp_commentsStatus; $receiver.commentsPersonUid = _tmp_commentsPersonUid; $receiver.commentsToPersonUid = _tmp_commentsToPersonUid; $receiver.commentSubmitterUid = _tmp_commentSubmitterUid; $receiver.commentsFlagged = _tmp_commentsFlagged; $receiver.commentsInActive = _tmp_commentsInActive; $receiver.commentsDateTimeAdded = _tmp_commentsDateTimeAdded; $receiver.commentsDateTimeUpdated = _tmp_commentsDateTimeUpdated; $receiver.commentsMCSN = _tmp_commentsMCSN; $receiver.commentsLCSN = _tmp_commentsLCSN; $receiver.commentsLCB = _tmp_commentsLCB; $receiver.commentsLct = _tmp_commentsLct; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.commentsPerson = $receiver_0; } return $receiver; }; } function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Person.personUid = ?\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ?\n ')), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$personUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getData$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$personUid, _limit, _offset)); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personUid = closure$personUid_0; } Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Person.personUid = ?\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n ')), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$personUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral$getLength$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$personUid)); }; CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; CommentsDao_JdbcKt.prototype.findPrivateByEntityTypeAndUidAndPersonLive_h639zw$ = function (entityType, entityUid, personUid) { return new CommentsDao_JdbcKt$findPrivateByEntityTypeAndUidAndPersonLive$ObjectLiteral(this, entityType, entityUid, personUid); }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral(this$CommentsDao_JdbcKt, closure$entityType, closure$entityUid, closure$personFrom) { this.this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt; this.closure$entityType = closure$entityType; this.closure$entityUid = closure$entityUid; this.closure$personFrom = closure$personFrom; DataSourceFactory.call(this); } function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_commentsUid = closure$_result.getLong_61zpoe$('commentsUid'); var _tmp_commentsText = closure$_result.getString_61zpoe$('commentsText'); var _tmp_commentsEntityType = closure$_result.getInt_61zpoe$('commentsEntityType'); var _tmp_commentsEntityUid = closure$_result.getLong_61zpoe$('commentsEntityUid'); var _tmp_commentsPublic = closure$_result.getBoolean_61zpoe$('commentsPublic'); var _tmp_commentsStatus = closure$_result.getInt_61zpoe$('commentsStatus'); var _tmp_commentsPersonUid = closure$_result.getLong_61zpoe$('commentsPersonUid'); var _tmp_commentsToPersonUid = closure$_result.getLong_61zpoe$('commentsToPersonUid'); var _tmp_commentSubmitterUid = closure$_result.getLong_61zpoe$('commentSubmitterUid'); var _tmp_commentsFlagged = closure$_result.getBoolean_61zpoe$('commentsFlagged'); var _tmp_commentsInActive = closure$_result.getBoolean_61zpoe$('commentsInActive'); var _tmp_commentsDateTimeAdded = closure$_result.getLong_61zpoe$('commentsDateTimeAdded'); var _tmp_commentsDateTimeUpdated = closure$_result.getLong_61zpoe$('commentsDateTimeUpdated'); var _tmp_commentsMCSN = closure$_result.getLong_61zpoe$('commentsMCSN'); var _tmp_commentsLCSN = closure$_result.getLong_61zpoe$('commentsLCSN'); var _tmp_commentsLCB = closure$_result.getInt_61zpoe$('commentsLCB'); var _tmp_commentsLct = closure$_result.getLong_61zpoe$('commentsLct'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new CommentsWithPerson(); $receiver.commentsUid = _tmp_commentsUid; $receiver.commentsText = _tmp_commentsText; $receiver.commentsEntityType = _tmp_commentsEntityType; $receiver.commentsEntityUid = _tmp_commentsEntityUid; $receiver.commentsPublic = _tmp_commentsPublic; $receiver.commentsStatus = _tmp_commentsStatus; $receiver.commentsPersonUid = _tmp_commentsPersonUid; $receiver.commentsToPersonUid = _tmp_commentsToPersonUid; $receiver.commentSubmitterUid = _tmp_commentSubmitterUid; $receiver.commentsFlagged = _tmp_commentsFlagged; $receiver.commentsInActive = _tmp_commentsInActive; $receiver.commentsDateTimeAdded = _tmp_commentsDateTimeAdded; $receiver.commentsDateTimeUpdated = _tmp_commentsDateTimeUpdated; $receiver.commentsMCSN = _tmp_commentsMCSN; $receiver.commentsLCSN = _tmp_commentsLCSN; $receiver.commentsLCB = _tmp_commentsLCB; $receiver.commentsLct = _tmp_commentsLct; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.commentsPerson = $receiver_0; } return $receiver; }; } function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personFrom = closure$personFrom_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personFrom); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personFrom); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personFrom = closure$personFrom_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND (Comments.commentsToPersonUid = ? \n | OR Comments.commentsPersonUid = ?)\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) LIMIT ? OFFSET ?\n ')), CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$personFrom, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personFrom_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getData$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$personFrom, _limit, _offset)); }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personFrom_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personFrom = closure$personFrom_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entityType); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personFrom); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personFrom); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personFrom_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda(closure$entityType_0, closure$entityUid_0, closure$personFrom_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personFrom_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CommentsDao_JdbcKt = this$CommentsDao_JdbcKt_0; this.local$closure$entityType = closure$entityType_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$personFrom = closure$personFrom_0; } Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda; Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CommentsDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND (Comments.commentsToPersonUid = ? \n | OR Comments.commentsPersonUid = ?)\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | ) \n ')), CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda$lambda(this.local$closure$entityType, this.local$closure$entityUid, this.local$closure$personFrom), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personFrom_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda(this$CommentsDao_JdbcKt_0, closure$entityType_0, closure$entityUid_0, closure$personFrom_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$CommentsDao_JdbcKt._db, listOf(['Comments', 'Person']), CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral$getLength$lambda(this.this$CommentsDao_JdbcKt, this.closure$entityType, this.closure$entityUid, this.closure$personFrom)); }; CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; CommentsDao_JdbcKt.prototype.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive_h639zw$ = function (entityType, entityUid, personFrom) { return new CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive$ObjectLiteral(this, entityType, entityUid, personFrom); }; function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_commentsUid = closure$_result.getLong_61zpoe$('commentsUid'); var _tmp_commentsText = closure$_result.getString_61zpoe$('commentsText'); var _tmp_commentsEntityType = closure$_result.getInt_61zpoe$('commentsEntityType'); var _tmp_commentsEntityUid = closure$_result.getLong_61zpoe$('commentsEntityUid'); var _tmp_commentsPublic = closure$_result.getBoolean_61zpoe$('commentsPublic'); var _tmp_commentsStatus = closure$_result.getInt_61zpoe$('commentsStatus'); var _tmp_commentsPersonUid = closure$_result.getLong_61zpoe$('commentsPersonUid'); var _tmp_commentsToPersonUid = closure$_result.getLong_61zpoe$('commentsToPersonUid'); var _tmp_commentSubmitterUid = closure$_result.getLong_61zpoe$('commentSubmitterUid'); var _tmp_commentsFlagged = closure$_result.getBoolean_61zpoe$('commentsFlagged'); var _tmp_commentsInActive = closure$_result.getBoolean_61zpoe$('commentsInActive'); var _tmp_commentsDateTimeAdded = closure$_result.getLong_61zpoe$('commentsDateTimeAdded'); var _tmp_commentsDateTimeUpdated = closure$_result.getLong_61zpoe$('commentsDateTimeUpdated'); var _tmp_commentsMCSN = closure$_result.getLong_61zpoe$('commentsMCSN'); var _tmp_commentsLCSN = closure$_result.getLong_61zpoe$('commentsLCSN'); var _tmp_commentsLCB = closure$_result.getInt_61zpoe$('commentsLCB'); var _tmp_commentsLct = closure$_result.getLong_61zpoe$('commentsLct'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new CommentsWithPerson(); $receiver.commentsUid = _tmp_commentsUid; $receiver.commentsText = _tmp_commentsText; $receiver.commentsEntityType = _tmp_commentsEntityType; $receiver.commentsEntityUid = _tmp_commentsEntityUid; $receiver.commentsPublic = _tmp_commentsPublic; $receiver.commentsStatus = _tmp_commentsStatus; $receiver.commentsPersonUid = _tmp_commentsPersonUid; $receiver.commentsToPersonUid = _tmp_commentsToPersonUid; $receiver.commentSubmitterUid = _tmp_commentSubmitterUid; $receiver.commentsFlagged = _tmp_commentsFlagged; $receiver.commentsInActive = _tmp_commentsInActive; $receiver.commentsDateTimeAdded = _tmp_commentsDateTimeAdded; $receiver.commentsDateTimeUpdated = _tmp_commentsDateTimeUpdated; $receiver.commentsMCSN = _tmp_commentsMCSN; $receiver.commentsLCSN = _tmp_commentsLCSN; $receiver.commentsLCB = _tmp_commentsLCB; $receiver.commentsLct = _tmp_commentsLct; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.commentsPerson = $receiver_0; } return $receiver; }; } function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest$lambda$lambda(_result) { return mapRows(_result, CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest$lambda$lambda$lambda(_result)); } function CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest$lambda(closure$entityType, closure$entityUid, closure$personFrom, closure$personTo) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$entityType); _stmt.setLong_6svq3l$(2, closure$entityUid); _stmt.setLong_6svq3l$(3, closure$personFrom); _stmt.setLong_6svq3l$(4, closure$personTo); _stmt.setLong_6svq3l$(5, closure$personFrom); return useResults(_stmt.executeQuery(), CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest$lambda$lambda); }; } CommentsDao_JdbcKt.prototype.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest_tmkdev$ = function (entityType, entityUid, personFrom, personTo) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Comments.*, Person.* FROM Comments\n | LEFT JOIN Person ON Person.personUid = Comments.commentsPersonUid \n | WHERE Comments.commentsEntityType = ? \n | AND Comments.commentsEntityUid = ?\n | AND CAST(Comments.commentsFlagged AS INTEGER) = 0\n | AND CAST(Comments.commentsInActive AS INTEGER) = 0\n | AND CAST(Comments.commentsPublic AS INTEGER) = 0\n | AND Comments.commentsPersonUid = ? \n | OR (? = 0 OR Comments.commentsToPersonUid = ?)\n | ORDER BY Comments.commentsDateTimeAdded DESC \n | \n ')), CommentsDao_JdbcKt$findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest$lambda(entityType, entityUid, personFrom, personTo)); }; function Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda(closure$inActive_0, closure$changeTime_0, closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$inActive = closure$inActive_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda.prototype.constructor = Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda; Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$inActive); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda(closure$inActive_0, closure$changeTime_0, closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda(closure$inActive_0, closure$changeTime_0, closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateInActiveByCommentUid_zaz62j$($this, uid_0, inActive_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; this.local$inActive = inActive_0; this.local$changeTime = changeTime_0; } Coroutine$updateInActiveByCommentUid_zaz62j$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateInActiveByCommentUid_zaz62j$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateInActiveByCommentUid_zaz62j$.prototype.constructor = Coroutine$updateInActiveByCommentUid_zaz62j$; Coroutine$updateInActiveByCommentUid_zaz62j$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Comments \n | SET commentsInActive = ?,\n | commentsLct = ?\n | WHERE Comments.commentsUid = ?\n | \n ')), CommentsDao_JdbcKt$updateInActiveByCommentUid$lambda(this.local$inActive, this.local$changeTime, this.local$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_JdbcKt.prototype.updateInActiveByCommentUid_zaz62j$ = function (uid_0, inActive_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateInActiveByCommentUid_zaz62j$(this, uid_0, inActive_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO Comments (commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.commentsUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.commentsUid); } stmt.setString_vqvrqt$(2, entity.commentsText); stmt.setInt_vux9f0$(3, entity.commentsEntityType); stmt.setLong_6svq3l$(4, entity.commentsEntityUid); stmt.setBoolean_fzusl$(5, entity.commentsPublic); stmt.setInt_vux9f0$(6, entity.commentsStatus); stmt.setLong_6svq3l$(7, entity.commentsPersonUid); stmt.setLong_6svq3l$(8, entity.commentsToPersonUid); stmt.setLong_6svq3l$(9, entity.commentSubmitterUid); stmt.setBoolean_fzusl$(10, entity.commentsFlagged); stmt.setBoolean_fzusl$(11, entity.commentsInActive); stmt.setLong_6svq3l$(12, entity.commentsDateTimeAdded); stmt.setLong_6svq3l$(13, entity.commentsDateTimeUpdated); stmt.setLong_6svq3l$(14, entity.commentsMCSN); stmt.setLong_6svq3l$(15, entity.commentsLCSN); stmt.setInt_vux9f0$(16, entity.commentsLCB); stmt.setLong_6svq3l$(17, entity.commentsLct); }; CommentsDao_JdbcKt$_insertAdapterComments_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CommentsDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CommentsDao_JdbcKt', interfaces: [CommentsDao]}; function CommentsDao_ReplicateWrapper(_db, _dao) { CommentsDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_30($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_30.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_30.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_30.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_30; Coroutine$replicateOnNewNode_s8cxhz$_30.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_30(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_27($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_27.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_27.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_27.prototype.constructor = Coroutine$replicateOnChange_27; Coroutine$replicateOnChange_27.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_27(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CommentsDao_ReplicateWrapper.prototype.findPublicByEntityTypeAndUidLive_6svq3l$ = function (entityType, entityUid) { return this._dao_0.findPublicByEntityTypeAndUidLive_6svq3l$(entityType, entityUid); }; CommentsDao_ReplicateWrapper.prototype.findPrivateByEntityTypeAndUidAndForPersonLive_h639zw$ = function (entityType, entityUid, personUid) { return this._dao_0.findPrivateByEntityTypeAndUidAndForPersonLive_h639zw$(entityType, entityUid, personUid); }; CommentsDao_ReplicateWrapper.prototype.findPrivateByEntityTypeAndUidAndForPersonLive2_h639zw$ = function (entityType, entityUid, submitterUid) { return this._dao_0.findPrivateByEntityTypeAndUidAndForPersonLive2_h639zw$(entityType, entityUid, submitterUid); }; CommentsDao_ReplicateWrapper.prototype.findPrivateByEntityTypeAndUidAndPersonLive_h639zw$ = function (entityType, entityUid, personUid) { return this._dao_0.findPrivateByEntityTypeAndUidAndPersonLive_h639zw$(entityType, entityUid, personUid); }; CommentsDao_ReplicateWrapper.prototype.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive_h639zw$ = function (entityType, entityUid, personFrom) { return this._dao_0.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive_h639zw$(entityType, entityUid, personFrom); }; CommentsDao_ReplicateWrapper.prototype.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest_tmkdev$ = function (entityType, entityUid, personFrom, personTo) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$updateInActiveByCommentUid_zaz62j$_0($this, uid_0, inActive_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; this.local$inActive = inActive_0; this.local$changeTime = changeTime_0; } Coroutine$updateInActiveByCommentUid_zaz62j$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateInActiveByCommentUid_zaz62j$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateInActiveByCommentUid_zaz62j$_0.prototype.constructor = Coroutine$updateInActiveByCommentUid_zaz62j$_0; Coroutine$updateInActiveByCommentUid_zaz62j$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateInActiveByCommentUid_zaz62j$(this.local$uid, this.local$inActive, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_ReplicateWrapper.prototype.updateInActiveByCommentUid_zaz62j$ = function (uid_0, inActive_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateInActiveByCommentUid_zaz62j$_0(this, uid_0, inActive_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_32($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_32.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_32.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_32.prototype.constructor = Coroutine$insertAsync_32; Coroutine$insertAsync_32.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.commentsUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(208, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.commentsUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.commentsLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.commentsUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_32(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CommentsDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CommentsDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_3($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_3.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_3; Coroutine$insertListAsync_4ezy5m$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.commentsUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(208, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.commentsUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.commentsLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_3(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_3($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_3.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_3; Coroutine$updateListAsync_4ezy5m$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.commentsLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_3(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CommentsDao_ReplicateWrapper', interfaces: [CommentsDao]}; function CommentsDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CommentsDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_31($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_31.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_31.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_31.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_31; Coroutine$replicateOnNewNode_s8cxhz$_31.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_31(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_28($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_28.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_28.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_28.prototype.constructor = Coroutine$replicateOnChange_28; Coroutine$replicateOnChange_28.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_28(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid) { var _result = this._dao.findByUidAsync_s8cxhz$(uid); return _result; }; CommentsDao_Repo.prototype.findPublicByEntityTypeAndUidLive_6svq3l$ = function (entityType, entityUid) { var _result = this._dao.findPublicByEntityTypeAndUidLive_6svq3l$(entityType, entityUid); return _result; }; CommentsDao_Repo.prototype.findPrivateByEntityTypeAndUidAndForPersonLive_h639zw$ = function (entityType, entityUid, personUid) { var _result = this._dao.findPrivateByEntityTypeAndUidAndForPersonLive_h639zw$(entityType, entityUid, personUid); return _result; }; CommentsDao_Repo.prototype.findPrivateByEntityTypeAndUidAndForPersonLive2_h639zw$ = function (entityType, entityUid, submitterUid) { var _result = this._dao.findPrivateByEntityTypeAndUidAndForPersonLive2_h639zw$(entityType, entityUid, submitterUid); return _result; }; CommentsDao_Repo.prototype.findPrivateByEntityTypeAndUidAndPersonLive_h639zw$ = function (entityType, entityUid, personUid) { var _result = this._dao.findPrivateByEntityTypeAndUidAndPersonLive_h639zw$(entityType, entityUid, personUid); return _result; }; CommentsDao_Repo.prototype.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive_h639zw$ = function (entityType, entityUid, personFrom) { var _result = this._dao.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToLive_h639zw$(entityType, entityUid, personFrom); return _result; }; CommentsDao_Repo.prototype.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest_tmkdev$ = function (entityType, entityUid, personFrom, personTo) { var _result = this._dao.findPrivateCommentsByEntityTypeAndUidAndPersonAndPersonToTest_tmkdev$(entityType, entityUid, personFrom, personTo); return _result; }; function Coroutine$updateInActiveByCommentUid_zaz62j$_1($this, uid_0, inActive_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; this.local$inActive = inActive_0; this.local$changeTime = changeTime_0; } Coroutine$updateInActiveByCommentUid_zaz62j$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateInActiveByCommentUid_zaz62j$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateInActiveByCommentUid_zaz62j$_1.prototype.constructor = Coroutine$updateInActiveByCommentUid_zaz62j$_1; Coroutine$updateInActiveByCommentUid_zaz62j$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateInActiveByCommentUid_zaz62j$(this.local$uid, this.local$inActive, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_Repo.prototype.updateInActiveByCommentUid_zaz62j$ = function (uid_0, inActive_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateInActiveByCommentUid_zaz62j$_1(this, uid_0, inActive_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_33($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_33.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_33.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_33.prototype.constructor = Coroutine$insertAsync_33; Coroutine$insertAsync_33.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_33(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CommentsDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CommentsDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_4($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_4.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_4; Coroutine$insertListAsync_4ezy5m$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_4(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_4($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_4.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_4; Coroutine$updateListAsync_4ezy5m$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CommentsDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_4(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CommentsDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CommentsDao_Repo', interfaces: [CommentsDao]}; function ConnectivityStatusDao() { } ConnectivityStatusDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ConnectivityStatusDao', interfaces: []}; function ConnectivityStatusDao_JdbcKt(_db) { ConnectivityStatusDao.call(this); this._db = _db; this._insertAdapterConnectivityStatus_upsert = new ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral(this._db); } ConnectivityStatusDao_JdbcKt.prototype.insert_v0v7in$ = function (connectivityStatus) { var _retVal = this._insertAdapterConnectivityStatus_upsert.insertAndReturnId_11rb$(connectivityStatus); return _retVal; }; function Coroutine$insertAsync_v0v7in$($this, connectivityStatus_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$connectivityStatus = connectivityStatus_0; } Coroutine$insertAsync_v0v7in$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_v0v7in$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_v0v7in$.prototype.constructor = Coroutine$insertAsync_v0v7in$; Coroutine$insertAsync_v0v7in$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterConnectivityStatus_upsert.insertAndReturnIdAsync_11rb$(this.local$connectivityStatus, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ConnectivityStatusDao_JdbcKt.prototype.insertAsync_v0v7in$ = function (connectivityStatus_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_v0v7in$(this, connectivityStatus_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_csUid = closure$_result.getInt_61zpoe$('csUid'); var _tmp_connectivityState = closure$_result.getInt_61zpoe$('connectivityState'); var _tmp_wifiSsid = closure$_result.getString_61zpoe$('wifiSsid'); var _tmp_connectedOrConnecting = closure$_result.getBoolean_61zpoe$('connectedOrConnecting'); var $receiver = new ConnectivityStatus(); $receiver.csUid = _tmp_csUid; $receiver.connectivityState = _tmp_connectivityState; $receiver.wifiSsid = _tmp_wifiSsid; $receiver.connectedOrConnecting = _tmp_connectedOrConnecting; return $receiver; }; } function ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda.prototype.constructor = Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda; Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda(this$ConnectivityStatusDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ConnectivityStatusDao_JdbcKt = this$ConnectivityStatusDao_JdbcKt_0; } Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda.prototype.constructor = Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda; Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ConnectivityStatusDao_JdbcKt._db, new PreparedStatementConfig('SELECT ConnectivityStatus.* FROM ConnectivityStatus LIMIT 1'), ConnectivityStatusDao_JdbcKt$statusLive$lambda$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ConnectivityStatusDao_JdbcKt$statusLive$lambda(this$ConnectivityStatusDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ConnectivityStatusDao_JdbcKt$statusLive$lambda(this$ConnectivityStatusDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ConnectivityStatusDao_JdbcKt.prototype.statusLive = function () { return new LiveDataImpl(this._db, listOf_0('ConnectivityStatus'), ConnectivityStatusDao_JdbcKt$statusLive$lambda(this)); }; function ConnectivityStatusDao_JdbcKt$status$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_csUid = closure$_result.getInt_61zpoe$('csUid'); var _tmp_connectivityState = closure$_result.getInt_61zpoe$('connectivityState'); var _tmp_wifiSsid = closure$_result.getString_61zpoe$('wifiSsid'); var _tmp_connectedOrConnecting = closure$_result.getBoolean_61zpoe$('connectedOrConnecting'); var $receiver = new ConnectivityStatus(); $receiver.csUid = _tmp_csUid; $receiver.connectivityState = _tmp_connectivityState; $receiver.wifiSsid = _tmp_wifiSsid; $receiver.connectedOrConnecting = _tmp_connectedOrConnecting; return $receiver; }; } function ConnectivityStatusDao_JdbcKt$status$lambda$lambda(_result) { return mapNextRow(_result, null, ConnectivityStatusDao_JdbcKt$status$lambda$lambda$lambda(_result)); } function ConnectivityStatusDao_JdbcKt$status$lambda(_stmt) { return useResults(_stmt.executeQuery(), ConnectivityStatusDao_JdbcKt$status$lambda$lambda); } ConnectivityStatusDao_JdbcKt.prototype.status = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT ConnectivityStatus.* FROM ConnectivityStatus LIMIT 1'), ConnectivityStatusDao_JdbcKt$status$lambda); }; function Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda(closure$connectivityState_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$connectivityState = closure$connectivityState_0; this.local$_stmt = _stmt_0; } Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda.prototype.constructor = Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda; Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$connectivityState); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda(closure$connectivityState_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda(closure$connectivityState_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateStateAsync_za3lpa$($this, connectivityState_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$connectivityState = connectivityState_0; } Coroutine$updateStateAsync_za3lpa$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateStateAsync_za3lpa$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateStateAsync_za3lpa$.prototype.constructor = Coroutine$updateStateAsync_za3lpa$; Coroutine$updateStateAsync_za3lpa$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig('UPDATE ConnectivityStatus SET connectivityState = ?'), ConnectivityStatusDao_JdbcKt$updateStateAsync$lambda(this.local$connectivityState), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ConnectivityStatusDao_JdbcKt.prototype.updateStateAsync_za3lpa$ = function (connectivityState_0, continuation_0, suspended) { var instance = new Coroutine$updateStateAsync_za3lpa$(this, connectivityState_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda(closure$connectivityState_0, closure$wifiSsid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$connectivityState = closure$connectivityState_0; this.local$closure$wifiSsid = closure$wifiSsid_0; this.local$_stmt = _stmt_0; } Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda.prototype.constructor = Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda; Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$connectivityState); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$wifiSsid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ConnectivityStatusDao_JdbcKt$updateState$lambda(closure$connectivityState_0, closure$wifiSsid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ConnectivityStatusDao_JdbcKt$updateState$lambda(closure$connectivityState_0, closure$wifiSsid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateState_19mbxw$($this, connectivityState_0, wifiSsid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$connectivityState = connectivityState_0; this.local$wifiSsid = wifiSsid_0; } Coroutine$updateState_19mbxw$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateState_19mbxw$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateState_19mbxw$.prototype.constructor = Coroutine$updateState_19mbxw$; Coroutine$updateState_19mbxw$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig('UPDATE ConnectivityStatus SET connectivityState = ? , wifiSsid = ?'), ConnectivityStatusDao_JdbcKt$updateState$lambda(this.local$connectivityState, this.local$wifiSsid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ConnectivityStatusDao_JdbcKt.prototype.updateState_19mbxw$ = function (connectivityState_0, wifiSsid_0, continuation_0, suspended) { var instance = new Coroutine$updateState_19mbxw$(this, connectivityState_0, wifiSsid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ConnectivityStatusDao_JdbcKt$updateStateSync$lambda(closure$connectivityState, closure$wifiSsid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$connectivityState); _stmt.setString_vqvrqt$(2, closure$wifiSsid); return _stmt.executeUpdate(); }; } ConnectivityStatusDao_JdbcKt.prototype.updateStateSync_19mbxw$ = function (connectivityState, wifiSsid) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('UPDATE ConnectivityStatus SET connectivityState = ? , wifiSsid = ?'), ConnectivityStatusDao_JdbcKt$updateStateSync$lambda(connectivityState, wifiSsid)); }; function ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO ConnectivityStatus (csUid, connectivityState, wifiSsid, connectedOrConnecting) VALUES(?, ?, ?, ?)'; }; ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setInt_vux9f0$(1, entity.csUid); stmt.setInt_vux9f0$(2, entity.connectivityState); stmt.setString_vqvrqt$(3, entity.wifiSsid); stmt.setBoolean_fzusl$(4, entity.connectedOrConnecting); }; ConnectivityStatusDao_JdbcKt$_insertAdapterConnectivityStatus_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ConnectivityStatusDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ConnectivityStatusDao_JdbcKt', interfaces: [ConnectivityStatusDao]}; function ContainerDao() { } ContainerDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerDao', interfaces: [BaseDao]}; function ContainerDao_JdbcKt(_db) { ContainerDao.call(this); this._db = _db; this._insertAdapterContainer_ = new ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral(this._db); this._insertAdapterContainer_upsert = new ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral(this._db); } function Coroutine$insertListAsync_5ys87q$($this, containerList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerList = containerList_0; } Coroutine$insertListAsync_5ys87q$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_5ys87q$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_5ys87q$.prototype.constructor = Coroutine$insertListAsync_5ys87q$; Coroutine$insertListAsync_5ys87q$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainer_.insertListAsync_4ezy5m$(this.local$containerList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.insertListAsync_5ys87q$ = function (containerList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_5ys87q$(this, containerList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_JdbcKt.prototype.replaceList_5ys87q$ = function (entries) { this._insertAdapterContainer_upsert.insertList_4ezy5m$(entries); }; ContainerDao_JdbcKt.prototype.insertWithReplace_2nhbaz$ = function (container) { this._insertAdapterContainer_upsert.insert_11rb$(container); }; ContainerDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContainer_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_34($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_34.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_34.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_34.prototype.constructor = Coroutine$insertAsync_34; Coroutine$insertAsync_34.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainer_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_34(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContainer_.insertList_4ezy5m$(entityList); }; function ContainerDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cntLocalCsn); _stmt.setLong_6svq3l$(2, _entity.cntMasterCsn); _stmt.setInt_vux9f0$(3, _entity.cntLastModBy); _stmt.setLong_6svq3l$(4, _entity.cntLct); _stmt.setLong_6svq3l$(5, _entity.fileSize); _stmt.setLong_6svq3l$(6, _entity.containerContentEntryUid); _stmt.setLong_6svq3l$(7, _entity.cntLastModified); _stmt.setString_vqvrqt$(8, _entity.mimeType); _stmt.setString_vqvrqt$(9, _entity.remarks); _stmt.setBoolean_fzusl$(10, _entity.mobileOptimized); _stmt.setInt_vux9f0$(11, _entity.cntNumEntries); _stmt.setLong_6svq3l$(12, _entity.containerUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContainerDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Container SET cntLocalCsn = ?, cntMasterCsn = ?, cntLastModBy = ?, cntLct = ?, fileSize = ?, containerContentEntryUid = ?, cntLastModified = ?, mimeType = ?, remarks = ?, mobileOptimized = ?, cntNumEntries = ? WHERE containerUid = ?'; prepareAndUseStatement(this._db, _sql, ContainerDao_JdbcKt$updateList$lambda(entityList)); }; function ContainerDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cntLocalCsn); _stmt.setLong_6svq3l$(2, closure$entity.cntMasterCsn); _stmt.setInt_vux9f0$(3, closure$entity.cntLastModBy); _stmt.setLong_6svq3l$(4, closure$entity.cntLct); _stmt.setLong_6svq3l$(5, closure$entity.fileSize); _stmt.setLong_6svq3l$(6, closure$entity.containerContentEntryUid); _stmt.setLong_6svq3l$(7, closure$entity.cntLastModified); _stmt.setString_vqvrqt$(8, closure$entity.mimeType); _stmt.setString_vqvrqt$(9, closure$entity.remarks); _stmt.setBoolean_fzusl$(10, closure$entity.mobileOptimized); _stmt.setInt_vux9f0$(11, closure$entity.cntNumEntries); _stmt.setLong_6svq3l$(12, closure$entity.containerUid); return _stmt.executeUpdate(); }; } ContainerDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Container SET cntLocalCsn = ?, cntMasterCsn = ?, cntLastModBy = ?, cntLct = ?, fileSize = ?, containerContentEntryUid = ?, cntLastModified = ?, mimeType = ?, remarks = ?, mobileOptimized = ?, cntNumEntries = ? WHERE containerUid = ?'; prepareAndUseStatement(this._db, _sql, ContainerDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_32($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_32.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_32.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_32.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_32; Coroutine$replicateOnNewNode_s8cxhz$_32.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContainerReplicate(containerPk, containerDestination)\n | SELECT DISTINCT Container.containerUid AS containerPk,\n | ? AS containerDestination\n | FROM Container\n | WHERE Container.cntLct != COALESCE(\n | (SELECT containerVersionId\n | FROM ContainerReplicate\n | WHERE containerPk = Container.containerUid\n | AND containerDestination = ?), 0) \n | /*psql ON CONFLICT(containerPk, containerDestination) DO UPDATE\n | SET containerPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContainerReplicate(containerPk, containerDestination)\n | SELECT DISTINCT Container.containerUid AS containerPk,\n | ? AS containerDestination\n | FROM Container\n | WHERE Container.cntLct != COALESCE(\n | (SELECT containerVersionId\n | FROM ContainerReplicate\n | WHERE containerPk = Container.containerUid\n | AND containerDestination = ?), 0) \n | ON CONFLICT(containerPk, containerDestination) DO UPDATE\n | SET containerPending = true\n | \n | \n |')), ContainerDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_32(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_29($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_29.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_29.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_29.prototype.constructor = Coroutine$replicateOnChange_29; Coroutine$replicateOnChange_29.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContainerReplicate(containerPk, containerDestination)\n | SELECT DISTINCT Container.containerUid AS containerUid,\n | UserSession.usClientNodeId AS containerDestination\n | FROM ChangeLog\n | JOIN Container\n | ON ChangeLog.chTableId = 51\n | AND ChangeLog.chEntityPk = Container.containerUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Container.cntLct != COALESCE(\n | (SELECT containerVersionId\n | FROM ContainerReplicate\n | WHERE containerPk = Container.containerUid\n | AND containerDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(containerPk, containerDestination) DO UPDATE\n | SET containerPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContainerReplicate(containerPk, containerDestination)\n | SELECT DISTINCT Container.containerUid AS containerUid,\n | UserSession.usClientNodeId AS containerDestination\n | FROM ChangeLog\n | JOIN Container\n | ON ChangeLog.chTableId = 51\n | AND ChangeLog.chEntityPk = Container.containerUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Container.cntLct != COALESCE(\n | (SELECT containerVersionId\n | FROM ContainerReplicate\n | WHERE containerPk = Container.containerUid\n | AND containerDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(containerPk, containerDestination) DO UPDATE\n | SET containerPending = true\n | \n | \n |')), ContainerDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_29(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); var $receiver = new Container(); $receiver.containerUid = _tmp_containerUid; $receiver.cntLocalCsn = _tmp_cntLocalCsn; $receiver.cntMasterCsn = _tmp_cntMasterCsn; $receiver.cntLastModBy = _tmp_cntLastModBy; $receiver.cntLct = _tmp_cntLct; $receiver.fileSize = _tmp_fileSize; $receiver.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver.cntLastModified = _tmp_cntLastModified; $receiver.mimeType = _tmp_mimeType; $receiver.remarks = _tmp_remarks; $receiver.mobileOptimized = _tmp_mobileOptimized; $receiver.cntNumEntries = _tmp_cntNumEntries; return $receiver; }; } function ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda(closure$contentEntry_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntry = closure$contentEntry_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda; Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntry); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda(closure$contentEntry_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda(closure$contentEntry_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerDao_JdbcKt.prototype.getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$ = function (contentEntry, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('Select Container.* FROM Container WHERE Container.containerContentEntryUid = ? ORDER BY Container.cntLastModified DESC LIMIT 1'), ContainerDao_JdbcKt$getMostRecentDownloadedContainerForContentEntryAsync$lambda(contentEntry), continuation); }; function ContainerDao_JdbcKt$getMostRecentContainerForContentEntry$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); var $receiver = new Container(); $receiver.containerUid = _tmp_containerUid; $receiver.cntLocalCsn = _tmp_cntLocalCsn; $receiver.cntMasterCsn = _tmp_cntMasterCsn; $receiver.cntLastModBy = _tmp_cntLastModBy; $receiver.cntLct = _tmp_cntLct; $receiver.fileSize = _tmp_fileSize; $receiver.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver.cntLastModified = _tmp_cntLastModified; $receiver.mimeType = _tmp_mimeType; $receiver.remarks = _tmp_remarks; $receiver.mobileOptimized = _tmp_mobileOptimized; $receiver.cntNumEntries = _tmp_cntNumEntries; return $receiver; }; } function ContainerDao_JdbcKt$getMostRecentContainerForContentEntry$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerDao_JdbcKt$getMostRecentContainerForContentEntry$lambda$lambda$lambda(_result)); } function ContainerDao_JdbcKt$getMostRecentContainerForContentEntry$lambda(closure$contentEntryUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$contentEntryUid); return useResults(_stmt.executeQuery(), ContainerDao_JdbcKt$getMostRecentContainerForContentEntry$lambda$lambda); }; } ContainerDao_JdbcKt.prototype.getMostRecentContainerForContentEntry_s8cxhz$ = function (contentEntryUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Container.*\n | \n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND \n | Container.fileSize > 0\n | \n | ORDER BY Container.cntLastModified DESC \n | LIMIT 1\n | \n | \n ')), ContainerDao_JdbcKt$getMostRecentContainerForContentEntry$lambda(contentEntryUid)); }; function ContainerDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); var $receiver = new Container(); $receiver.containerUid = _tmp_containerUid; $receiver.cntLocalCsn = _tmp_cntLocalCsn; $receiver.cntMasterCsn = _tmp_cntMasterCsn; $receiver.cntLastModBy = _tmp_cntLastModBy; $receiver.cntLct = _tmp_cntLct; $receiver.fileSize = _tmp_fileSize; $receiver.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver.cntLastModified = _tmp_cntLastModified; $receiver.mimeType = _tmp_mimeType; $receiver.remarks = _tmp_remarks; $receiver.mobileOptimized = _tmp_mobileOptimized; $receiver.cntNumEntries = _tmp_cntNumEntries; return $receiver; }; } function ContainerDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function ContainerDao_JdbcKt$findByUid$lambda(closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); return useResults(_stmt.executeQuery(), ContainerDao_JdbcKt$findByUid$lambda$lambda); }; } ContainerDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Container WHERE containerUid = ?'), ContainerDao_JdbcKt$findByUid$lambda(uid)); }; function ContainerDao_JdbcKt$findSizeByUid$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ContainerDao_JdbcKt$findSizeByUid$lambda$lambda(_result) { return mapNextRow(_result, L0, ContainerDao_JdbcKt$findSizeByUid$lambda$lambda$lambda(_result)); } function Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda; Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$findSizeByUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$findSizeByUid$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$findSizeByUid$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerDao_JdbcKt.prototype.findSizeByUid_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT(COALESCE((\n | SELECT fileSize\n | FROM Container\n | WHERE containerUid = ?), 0))\n | \n ')), ContainerDao_JdbcKt$findSizeByUid$lambda(uid), continuation); }; function ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); var $receiver = new Container(); $receiver.containerUid = _tmp_containerUid; $receiver.cntLocalCsn = _tmp_cntLocalCsn; $receiver.cntMasterCsn = _tmp_cntMasterCsn; $receiver.cntLastModBy = _tmp_cntLastModBy; $receiver.cntLct = _tmp_cntLct; $receiver.fileSize = _tmp_fileSize; $receiver.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver.cntLastModified = _tmp_cntLastModified; $receiver.mimeType = _tmp_mimeType; $receiver.remarks = _tmp_remarks; $receiver.mobileOptimized = _tmp_mobileOptimized; $receiver.cntNumEntries = _tmp_cntNumEntries; return $receiver; }; } function ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda$lambda(_result) { return mapRows(_result, ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda$lambda$lambda(_result)); } function Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda(closure$contentEntries_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntries = closure$contentEntries_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda; Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$contentEntries))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda(closure$contentEntries_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda(closure$contentEntries_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerDao_JdbcKt.prototype.findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$ = function (contentEntries, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT recent.* FROM Container recent LEFT JOIN Container old ON (recent.containerContentEntryUid = old.containerContentEntryUid AND recent.cntLastModified < old.cntLastModified) WHERE old.containerUid IS NULL AND recent.containerContentEntryUid IN (?)', true), ContainerDao_JdbcKt$findRecentContainerToBeMonitoredWithEntriesUid$lambda(contentEntries), continuation); }; function ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); var $receiver = new Container(); $receiver.containerUid = _tmp_containerUid; $receiver.cntLocalCsn = _tmp_cntLocalCsn; $receiver.cntMasterCsn = _tmp_cntMasterCsn; $receiver.cntLastModBy = _tmp_cntLastModBy; $receiver.cntLct = _tmp_cntLct; $receiver.fileSize = _tmp_fileSize; $receiver.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver.cntLastModified = _tmp_cntLastModified; $receiver.mimeType = _tmp_mimeType; $receiver.remarks = _tmp_remarks; $receiver.mobileOptimized = _tmp_mobileOptimized; $receiver.cntNumEntries = _tmp_cntNumEntries; return $receiver; }; } function ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda$lambda(_result) { return mapRows(_result, ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda$lambda$lambda(_result)); } function Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda; Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerDao_JdbcKt.prototype.findContainersForContentEntryUid_s8cxhz$ = function (contentEntryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |Select Container.* FROM Container \n | WHERE Container.containerContentEntryUid = ?\n | ORDER BY Container.cntLastModified DESC\n ')), ContainerDao_JdbcKt$findContainersForContentEntryUid$lambda(contentEntryUid), continuation); }; function ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda$lambda(_result) { return mapNextRow(_result, false, ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda; Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda(this$ContainerDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContainerDao_JdbcKt = this$ContainerDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; } Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda; Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContainerDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT EXISTS(SELECT 1\n | FROM Container \n | WHERE Container.containerContentEntryUid = ?\n | AND NOT EXISTS (SELECT ContainerEntry.ceUid \n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid) \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n ')), ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda$lambda(this.local$closure$contentEntryUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda(this$ContainerDao_JdbcKt_0, closure$contentEntryUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda(this$ContainerDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerDao_JdbcKt.prototype.hasContainerWithFilesToDownload_s8cxhz$ = function (contentEntryUid) { return new LiveDataImpl(this._db, listOf(['Container', 'ContainerEntry']), ContainerDao_JdbcKt$hasContainerWithFilesToDownload$lambda(this, contentEntryUid)); }; function ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); var $receiver = new Container(); $receiver.containerUid = _tmp_containerUid; $receiver.cntLocalCsn = _tmp_cntLocalCsn; $receiver.cntMasterCsn = _tmp_cntMasterCsn; $receiver.cntLastModBy = _tmp_cntLastModBy; $receiver.cntLct = _tmp_cntLct; $receiver.fileSize = _tmp_fileSize; $receiver.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver.cntLastModified = _tmp_cntLastModified; $receiver.mimeType = _tmp_mimeType; $receiver.remarks = _tmp_remarks; $receiver.mobileOptimized = _tmp_mobileOptimized; $receiver.cntNumEntries = _tmp_cntNumEntries; return $receiver; }; } function ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda$lambda$lambda(_result)); } function Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda; Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerDao_JdbcKt.prototype.findContainerWithFilesByContentEntryUid_s8cxhz$ = function (contentEntryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Container.*\n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND EXISTS (SELECT ContainerEntry.ceUid \n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid) \n | ORDER BY Container.cntLastModified DESC LIMIT 1\n | \n ')), ContainerDao_JdbcKt$findContainerWithFilesByContentEntryUid$lambda(contentEntryUid), continuation); }; function ContainerDao_JdbcKt$findAllPublikContainers$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); var $receiver = new Container(); $receiver.containerUid = _tmp_containerUid; $receiver.cntLocalCsn = _tmp_cntLocalCsn; $receiver.cntMasterCsn = _tmp_cntMasterCsn; $receiver.cntLastModBy = _tmp_cntLastModBy; $receiver.cntLct = _tmp_cntLct; $receiver.fileSize = _tmp_fileSize; $receiver.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver.cntLastModified = _tmp_cntLastModified; $receiver.mimeType = _tmp_mimeType; $receiver.remarks = _tmp_remarks; $receiver.mobileOptimized = _tmp_mobileOptimized; $receiver.cntNumEntries = _tmp_cntNumEntries; return $receiver; }; } function ContainerDao_JdbcKt$findAllPublikContainers$lambda$lambda(_result) { return mapRows(_result, ContainerDao_JdbcKt$findAllPublikContainers$lambda$lambda$lambda(_result)); } function ContainerDao_JdbcKt$findAllPublikContainers$lambda(_stmt) { return useResults(_stmt.executeQuery(), ContainerDao_JdbcKt$findAllPublikContainers$lambda$lambda); } ContainerDao_JdbcKt.prototype.findAllPublikContainers = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT Container.* FROM Container LEFT JOIN ContentEntry ON ContentEntry.contentEntryUid = containerContentEntryUid WHERE ContentEntry.publik'), ContainerDao_JdbcKt$findAllPublikContainers$lambda); }; function ContainerDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); var $receiver = new Container(); $receiver.containerUid = _tmp_containerUid; $receiver.cntLocalCsn = _tmp_cntLocalCsn; $receiver.cntMasterCsn = _tmp_cntMasterCsn; $receiver.cntLastModBy = _tmp_cntLastModBy; $receiver.cntLct = _tmp_cntLct; $receiver.fileSize = _tmp_fileSize; $receiver.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver.cntLastModified = _tmp_cntLastModified; $receiver.mimeType = _tmp_mimeType; $receiver.remarks = _tmp_remarks; $receiver.mobileOptimized = _tmp_mobileOptimized; $receiver.cntNumEntries = _tmp_cntNumEntries; return $receiver; }; } function ContainerDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda(closure$containerUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$containerUid = closure$containerUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda; Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$containerUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$findByUidAsync$lambda(closure$containerUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$findByUidAsync$lambda(closure$containerUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (containerUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * From Container WHERE Container.containerUid = ? LIMIT 1'), ContainerDao_JdbcKt$findByUidAsync$lambda(containerUid), continuation); }; function Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda(closure$changeTime_0, closure$containerUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$containerUid = closure$containerUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda; Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$containerUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda(closure$changeTime_0, closure$containerUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda(closure$changeTime_0, closure$containerUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$($this, containerUid_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerUid = containerUid_0; this.local$changeTime = changeTime_0; } Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$.prototype.constructor = Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$; Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Container \n | SET cntNumEntries = COALESCE(\n | (SELECT COUNT(*) \n | FROM ContainerEntry \n | WHERE ceContainerUid = Container.containerUid), 0),\n | fileSize = COALESCE(\n | (SELECT SUM(ContainerEntryFile.ceCompressedSize) AS totalSize \n | FROM ContainerEntry\n | JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid), 0),\n | cntLct = ? \n | \n | WHERE containerUid = ?\n | \n ')), ContainerDao_JdbcKt$updateContainerSizeAndNumEntriesAsync$lambda(this.local$changeTime, this.local$containerUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_JdbcKt.prototype.updateContainerSizeAndNumEntriesAsync_3pjtqy$ = function (containerUid_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$(this, containerUid_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerDao_JdbcKt$findLocalAvailabilityByUid$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ContainerDao_JdbcKt$findLocalAvailabilityByUid$lambda$lambda(_result) { return mapNextRow(_result, L0, ContainerDao_JdbcKt$findLocalAvailabilityByUid$lambda$lambda$lambda(_result)); } function ContainerDao_JdbcKt$findLocalAvailabilityByUid$lambda(closure$containerUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); return useResults(_stmt.executeQuery(), ContainerDao_JdbcKt$findLocalAvailabilityByUid$lambda$lambda); }; } ContainerDao_JdbcKt.prototype.findLocalAvailabilityByUid_s8cxhz$ = function (containerUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT Container.containerUid FROM Container WHERE Container.containerUid = ? AND (SELECT COUNT(*) FROM ContainerEntry WHERE ceContainerUid = Container.containerUid) = Container.cntNumEntries'), ContainerDao_JdbcKt$findLocalAvailabilityByUid$lambda(containerUid)); }; function ContainerDao_JdbcKt$findAllWithId$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); var $receiver = new Container(); $receiver.containerUid = _tmp_containerUid; $receiver.cntLocalCsn = _tmp_cntLocalCsn; $receiver.cntMasterCsn = _tmp_cntMasterCsn; $receiver.cntLastModBy = _tmp_cntLastModBy; $receiver.cntLct = _tmp_cntLct; $receiver.fileSize = _tmp_fileSize; $receiver.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver.cntLastModified = _tmp_cntLastModified; $receiver.mimeType = _tmp_mimeType; $receiver.remarks = _tmp_remarks; $receiver.mobileOptimized = _tmp_mobileOptimized; $receiver.cntNumEntries = _tmp_cntNumEntries; return $receiver; }; } function ContainerDao_JdbcKt$findAllWithId$lambda$lambda(_result) { return mapRows(_result, ContainerDao_JdbcKt$findAllWithId$lambda$lambda$lambda(_result)); } function ContainerDao_JdbcKt$findAllWithId$lambda(closure$containerUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); return useResults(_stmt.executeQuery(), ContainerDao_JdbcKt$findAllWithId$lambda$lambda); }; } ContainerDao_JdbcKt.prototype.findAllWithId_s8cxhz$ = function (containerUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Container WHERE Container.containerUid = ?'), ContainerDao_JdbcKt$findAllWithId$lambda(containerUid)); }; function ContainerDao_JdbcKt$findKhanContainers$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); var $receiver = new ContainerWithContentEntry(); $receiver.entryId = _tmp_entryId; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.containerUid = _tmp_containerUid; $receiver.cntLocalCsn = _tmp_cntLocalCsn; $receiver.cntMasterCsn = _tmp_cntMasterCsn; $receiver.cntLastModBy = _tmp_cntLastModBy; $receiver.cntLct = _tmp_cntLct; $receiver.fileSize = _tmp_fileSize; $receiver.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver.cntLastModified = _tmp_cntLastModified; $receiver.mimeType = _tmp_mimeType; $receiver.remarks = _tmp_remarks; $receiver.mobileOptimized = _tmp_mobileOptimized; $receiver.cntNumEntries = _tmp_cntNumEntries; return $receiver; }; } function ContainerDao_JdbcKt$findKhanContainers$lambda$lambda(_result) { return mapRows(_result, ContainerDao_JdbcKt$findKhanContainers$lambda$lambda$lambda(_result)); } function ContainerDao_JdbcKt$findKhanContainers$lambda(_stmt) { return useResults(_stmt.executeQuery(), ContainerDao_JdbcKt$findKhanContainers$lambda$lambda); } ContainerDao_JdbcKt.prototype.findKhanContainers = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig("SELECT Container.*, ContentEntry.entryId, ContentEntry.sourceUrl FROM Container LEFT JOIN ContentEntry ON Container.containerContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntry.publisher LIKE '%Khan Academy%' AND Container.mimeType = 'video/mp4'"), ContainerDao_JdbcKt$findKhanContainers$lambda); }; function ContainerDao_JdbcKt$deleteByUid$lambda(closure$containerUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); return _stmt.executeUpdate(); }; } ContainerDao_JdbcKt.prototype.deleteByUid_s8cxhz$ = function (containerUid) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('DELETE FROM Container WHERE containerUid = ?'), ContainerDao_JdbcKt$deleteByUid$lambda(containerUid)); }; function ContainerDao_JdbcKt$updateMimeType$lambda(closure$mimeType, closure$containerUid) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$mimeType); _stmt.setLong_6svq3l$(2, closure$containerUid); return _stmt.executeUpdate(); }; } ContainerDao_JdbcKt.prototype.updateMimeType_4wgjuj$ = function (mimeType, containerUid) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('UPDATE Container SET mimeType = ? WHERE Container.containerUid = ?'), ContainerDao_JdbcKt$updateMimeType$lambda(mimeType, containerUid)); }; function ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); var $receiver = new Container(); $receiver.containerUid = _tmp_containerUid; $receiver.cntLocalCsn = _tmp_cntLocalCsn; $receiver.cntMasterCsn = _tmp_cntMasterCsn; $receiver.cntLastModBy = _tmp_cntLastModBy; $receiver.cntLct = _tmp_cntLct; $receiver.fileSize = _tmp_fileSize; $receiver.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver.cntLastModified = _tmp_cntLastModified; $receiver.mimeType = _tmp_mimeType; $receiver.remarks = _tmp_remarks; $receiver.mobileOptimized = _tmp_mobileOptimized; $receiver.cntNumEntries = _tmp_cntNumEntries; return $receiver; }; } function ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda; Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerDao_JdbcKt.prototype.getMostRecentContainerForContentEntryAsync_s8cxhz$ = function (contentEntryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Container.*\n | \n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND \n | Container.fileSize > 0\n | \n | ORDER BY Container.cntLastModified DESC \n | LIMIT 1\n | \n | \n ')), ContainerDao_JdbcKt$getMostRecentContainerForContentEntryAsync$lambda(contentEntryUid), continuation); }; function ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda$lambda(_result) { return mapNextRow(_result, L0, ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda; Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerDao_JdbcKt.prototype.getMostRecentContainerUidForContentEntryAsync_s8cxhz$ = function (contentEntryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((\n | SELECT containerUid \n | \n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND \n | Container.fileSize > 0\n | \n | ORDER BY Container.cntLastModified DESC \n | LIMIT 1\n | ), 0)\n | \n ')), ContainerDao_JdbcKt$getMostRecentContainerUidForContentEntryAsync$lambda(contentEntryUid), continuation); }; function ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var $receiver = new ContainerUidAndMimeType(); $receiver.containerUid = _tmp_containerUid; $receiver.mimeType = _tmp_mimeType; return $receiver; }; } function ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda$lambda$lambda(_result)); } function Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda(closure$contentEntryUid_0, closure$downloadRequired_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$downloadRequired = closure$downloadRequired_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda; Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setBoolean_fzusl$(2, this.local$closure$downloadRequired); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda(closure$contentEntryUid_0, closure$downloadRequired_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda(closure$contentEntryUid_0, closure$downloadRequired_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerDao_JdbcKt.prototype.getMostRecentAvailableContainerUidAndMimeType_2gd3um$ = function (contentEntryUid, downloadRequired, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Container.containerUid, Container.mimeType \n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND \n | Container.fileSize > 0\n | \n | AND (CAST(? AS INTEGER) = 0\n | OR EXISTS (SELECT ContainerEntry.ceUid \n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid))\n | ORDER BY Container.cntLastModified DESC \n | LIMIT 1\n | \n ')), ContainerDao_JdbcKt$getMostRecentAvailableContainerUidAndMimeType$lambda(contentEntryUid, downloadRequired), continuation); }; function ContainerDao_JdbcKt$getContainerSizeByUid$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ContainerDao_JdbcKt$getContainerSizeByUid$lambda$lambda(_result) { return mapNextRow(_result, L0, ContainerDao_JdbcKt$getContainerSizeByUid$lambda$lambda$lambda(_result)); } function Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda(closure$containerUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$containerUid = closure$containerUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda.prototype.constructor = Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda; Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$containerUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerDao_JdbcKt$getContainerSizeByUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerDao_JdbcKt$getContainerSizeByUid$lambda(closure$containerUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerDao_JdbcKt$getContainerSizeByUid$lambda(closure$containerUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerDao_JdbcKt.prototype.getContainerSizeByUid_s8cxhz$ = function (containerUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE(\n | (SELECT fileSize\n | FROM Container\n | WHERE containerUid = ?), -1)\n | \n ')), ContainerDao_JdbcKt$getContainerSizeByUid$lambda(containerUid), continuation); }; function ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO Container (containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.containerUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.containerUid); } stmt.setLong_6svq3l$(2, entity.cntLocalCsn); stmt.setLong_6svq3l$(3, entity.cntMasterCsn); stmt.setInt_vux9f0$(4, entity.cntLastModBy); stmt.setLong_6svq3l$(5, entity.cntLct); stmt.setLong_6svq3l$(6, entity.fileSize); stmt.setLong_6svq3l$(7, entity.containerContentEntryUid); stmt.setLong_6svq3l$(8, entity.cntLastModified); stmt.setString_vqvrqt$(9, entity.mimeType); stmt.setString_vqvrqt$(10, entity.remarks); stmt.setBoolean_fzusl$(11, entity.mobileOptimized); stmt.setInt_vux9f0$(12, entity.cntNumEntries); }; ContainerDao_JdbcKt$_insertAdapterContainer_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO Container (containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.containerUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.containerUid); } stmt.setLong_6svq3l$(2, entity.cntLocalCsn); stmt.setLong_6svq3l$(3, entity.cntMasterCsn); stmt.setInt_vux9f0$(4, entity.cntLastModBy); stmt.setLong_6svq3l$(5, entity.cntLct); stmt.setLong_6svq3l$(6, entity.fileSize); stmt.setLong_6svq3l$(7, entity.containerContentEntryUid); stmt.setLong_6svq3l$(8, entity.cntLastModified); stmt.setString_vqvrqt$(9, entity.mimeType); stmt.setString_vqvrqt$(10, entity.remarks); stmt.setBoolean_fzusl$(11, entity.mobileOptimized); stmt.setInt_vux9f0$(12, entity.cntNumEntries); }; ContainerDao_JdbcKt$_insertAdapterContainer_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContainerDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerDao_JdbcKt', interfaces: [ContainerDao]}; function ContainerDao_ReplicateWrapper(_db, _dao) { ContainerDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_33($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_33.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_33.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_33.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_33; Coroutine$replicateOnNewNode_s8cxhz$_33.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_33(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_30($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_30.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_30.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_30.prototype.constructor = Coroutine$replicateOnChange_30; Coroutine$replicateOnChange_30.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_30(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_5ys87q$_0($this, containerList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$containerList = containerList_0; } Coroutine$insertListAsync_5ys87q$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_5ys87q$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_5ys87q$_0.prototype.constructor = Coroutine$insertListAsync_5ys87q$_0; Coroutine$insertListAsync_5ys87q$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$containerList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.containerUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(51, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.containerUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.cntLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_5ys87q$(this.local$containerList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_ReplicateWrapper.prototype.insertListAsync_5ys87q$ = function (containerList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_5ys87q$_0(this, containerList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_ReplicateWrapper.prototype.getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$ = function (contentEntry, continuation) { return this._dao_0.getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$(contentEntry, continuation); }; ContainerDao_ReplicateWrapper.prototype.getMostRecentContainerForContentEntry_s8cxhz$ = function (contentEntryUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.findSizeByUid_s8cxhz$ = function (uid, continuation) { return this._dao_0.findSizeByUid_s8cxhz$(uid, continuation); }; ContainerDao_ReplicateWrapper.prototype.findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$ = function (contentEntries, continuation) { return this._dao_0.findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$(contentEntries, continuation); }; ContainerDao_ReplicateWrapper.prototype.findContainersForContentEntryUid_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.findContainersForContentEntryUid_s8cxhz$(contentEntryUid, continuation); }; ContainerDao_ReplicateWrapper.prototype.hasContainerWithFilesToDownload_s8cxhz$ = function (contentEntryUid) { return this._dao_0.hasContainerWithFilesToDownload_s8cxhz$(contentEntryUid); }; ContainerDao_ReplicateWrapper.prototype.findContainerWithFilesByContentEntryUid_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.findContainerWithFilesByContentEntryUid_s8cxhz$(contentEntryUid, continuation); }; ContainerDao_ReplicateWrapper.prototype.findAllPublikContainers = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (containerUid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(containerUid, continuation); }; function Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0($this, containerUid_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerUid = containerUid_0; this.local$changeTime = changeTime_0; } Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0.prototype.constructor = Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0; Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateContainerSizeAndNumEntriesAsync_3pjtqy$(this.local$containerUid, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_ReplicateWrapper.prototype.updateContainerSizeAndNumEntriesAsync_3pjtqy$ = function (containerUid_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_0(this, containerUid_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_ReplicateWrapper.prototype.findLocalAvailabilityByUid_s8cxhz$ = function (containerUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.findAllWithId_s8cxhz$ = function (containerUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.findKhanContainers = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.deleteByUid_s8cxhz$ = function (containerUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.updateMimeType_4wgjuj$ = function (mimeType, containerUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.getMostRecentContainerForContentEntryAsync_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.getMostRecentContainerForContentEntryAsync_s8cxhz$(contentEntryUid, continuation); }; ContainerDao_ReplicateWrapper.prototype.getMostRecentContainerUidForContentEntryAsync_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.getMostRecentContainerUidForContentEntryAsync_s8cxhz$(contentEntryUid, continuation); }; ContainerDao_ReplicateWrapper.prototype.getMostRecentAvailableContainerUidAndMimeType_2gd3um$ = function (contentEntryUid, downloadRequired, continuation) { return this._dao_0.getMostRecentAvailableContainerUidAndMimeType_2gd3um$(contentEntryUid, downloadRequired, continuation); }; ContainerDao_ReplicateWrapper.prototype.replaceList_5ys87q$ = function (entries) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.insertWithReplace_2nhbaz$ = function (container) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.getContainerSizeByUid_s8cxhz$ = function (containerUid, continuation) { return this._dao_0.getContainerSizeByUid_s8cxhz$(containerUid, continuation); }; ContainerDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_35($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_35.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_35.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_35.prototype.constructor = Coroutine$insertAsync_35; Coroutine$insertAsync_35.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.containerUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(51, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.containerUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cntLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.containerUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_35(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContainerDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerDao_ReplicateWrapper', interfaces: [ContainerDao]}; function ContainerDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContainerDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_34($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_34.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_34.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_34.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_34; Coroutine$replicateOnNewNode_s8cxhz$_34.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_34(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_31($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_31.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_31.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_31.prototype.constructor = Coroutine$replicateOnChange_31; Coroutine$replicateOnChange_31.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_31(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_5ys87q$_1($this, containerList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerList = containerList_0; } Coroutine$insertListAsync_5ys87q$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_5ys87q$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_5ys87q$_1.prototype.constructor = Coroutine$insertListAsync_5ys87q$_1; Coroutine$insertListAsync_5ys87q$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_5ys87q$(this.local$containerList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.insertListAsync_5ys87q$ = function (containerList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_5ys87q$_1(this, containerList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$($this, contentEntry_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntry = contentEntry_0; } Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$.prototype.constructor = Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$; Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$(this.local$contentEntry, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$ = function (contentEntry_0, continuation_0, suspended) { var instance = new Coroutine$getMostRecentDownloadedContainerForContentEntryAsync_s8cxhz$(this, contentEntry_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.getMostRecentContainerForContentEntry_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.getMostRecentContainerForContentEntry_s8cxhz$(contentEntryUid); return _result; }; ContainerDao_Repo.prototype.findByUid_s8cxhz$ = function (uid) { var _result = this._dao.findByUid_s8cxhz$(uid); return _result; }; function Coroutine$findSizeByUid_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findSizeByUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSizeByUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSizeByUid_s8cxhz$.prototype.constructor = Coroutine$findSizeByUid_s8cxhz$; Coroutine$findSizeByUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findSizeByUid_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.findSizeByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findSizeByUid_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$($this, contentEntries_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntries = contentEntries_0; } Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$.prototype.constructor = Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$; Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$(this.local$contentEntries, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$ = function (contentEntries_0, continuation_0, suspended) { var instance = new Coroutine$findRecentContainerToBeMonitoredWithEntriesUid_gox9k8$(this, contentEntries_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findContainersForContentEntryUid_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findContainersForContentEntryUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findContainersForContentEntryUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findContainersForContentEntryUid_s8cxhz$.prototype.constructor = Coroutine$findContainersForContentEntryUid_s8cxhz$; Coroutine$findContainersForContentEntryUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findContainersForContentEntryUid_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.findContainersForContentEntryUid_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findContainersForContentEntryUid_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.hasContainerWithFilesToDownload_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.hasContainerWithFilesToDownload_s8cxhz$(contentEntryUid); return _result; }; function Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$.prototype.constructor = Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$; Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findContainerWithFilesByContentEntryUid_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.findContainerWithFilesByContentEntryUid_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findContainerWithFilesByContentEntryUid_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.findAllPublikContainers = function () { var _result = this._dao.findAllPublikContainers(); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_2($this, containerUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerUid = containerUid_0; } Coroutine$findByUidAsync_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_2.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_2; Coroutine$findByUidAsync_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$containerUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (containerUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_2(this, containerUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1($this, containerUid_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerUid = containerUid_0; this.local$changeTime = changeTime_0; } Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1.prototype.constructor = Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1; Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateContainerSizeAndNumEntriesAsync_3pjtqy$(this.local$containerUid, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.updateContainerSizeAndNumEntriesAsync_3pjtqy$ = function (containerUid_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateContainerSizeAndNumEntriesAsync_3pjtqy$_1(this, containerUid_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.findLocalAvailabilityByUid_s8cxhz$ = function (containerUid) { var _result = this._dao.findLocalAvailabilityByUid_s8cxhz$(containerUid); return _result; }; ContainerDao_Repo.prototype.findAllWithId_s8cxhz$ = function (containerUid) { var _result = this._dao.findAllWithId_s8cxhz$(containerUid); return _result; }; ContainerDao_Repo.prototype.findKhanContainers = function () { var _result = this._dao.findKhanContainers(); return _result; }; ContainerDao_Repo.prototype.deleteByUid_s8cxhz$ = function (containerUid) { this._dao.deleteByUid_s8cxhz$(containerUid); }; ContainerDao_Repo.prototype.updateMimeType_4wgjuj$ = function (mimeType, containerUid) { this._dao.updateMimeType_4wgjuj$(mimeType, containerUid); }; function Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$.prototype.constructor = Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$; Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getMostRecentContainerForContentEntryAsync_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.getMostRecentContainerForContentEntryAsync_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$getMostRecentContainerForContentEntryAsync_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$.prototype.constructor = Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$; Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getMostRecentContainerUidForContentEntryAsync_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.getMostRecentContainerUidForContentEntryAsync_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$getMostRecentContainerUidForContentEntryAsync_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$($this, contentEntryUid_0, downloadRequired_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$downloadRequired = downloadRequired_0; } Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$.prototype.constructor = Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$; Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getMostRecentAvailableContainerUidAndMimeType_2gd3um$(this.local$contentEntryUid, this.local$downloadRequired, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.getMostRecentAvailableContainerUidAndMimeType_2gd3um$ = function (contentEntryUid_0, downloadRequired_0, continuation_0, suspended) { var instance = new Coroutine$getMostRecentAvailableContainerUidAndMimeType_2gd3um$(this, contentEntryUid_0, downloadRequired_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.replaceList_5ys87q$ = function (entries) { this._dao.replaceList_5ys87q$(entries); }; ContainerDao_Repo.prototype.insertWithReplace_2nhbaz$ = function (container) { this._dao.insertWithReplace_2nhbaz$(container); }; function Coroutine$getContainerSizeByUid_s8cxhz$($this, containerUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerUid = containerUid_0; } Coroutine$getContainerSizeByUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getContainerSizeByUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getContainerSizeByUid_s8cxhz$.prototype.constructor = Coroutine$getContainerSizeByUid_s8cxhz$; Coroutine$getContainerSizeByUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getContainerSizeByUid_s8cxhz$(this.local$containerUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.getContainerSizeByUid_s8cxhz$ = function (containerUid_0, continuation_0, suspended) { var instance = new Coroutine$getContainerSizeByUid_s8cxhz$(this, containerUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_36($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_36.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_36.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_36.prototype.constructor = Coroutine$insertAsync_36; Coroutine$insertAsync_36.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_36(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContainerDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContainerDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContainerDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerDao_Repo', interfaces: [ContainerDao]}; function ContainerETagDao() { } ContainerETagDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerETagDao', interfaces: [BaseDao]}; function ContainerETagDao_JdbcKt(_db) { ContainerETagDao.call(this); this._db = _db; this._insertAdapterContainerETag_ = new ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral(this._db); } ContainerETagDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContainerETag_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_37($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_37.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_37.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_37.prototype.constructor = Coroutine$insertAsync_37; Coroutine$insertAsync_37.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainerETag_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerETagDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_37(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerETagDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContainerETag_.insertList_4ezy5m$(entityList); }; function ContainerETagDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.cetag); _stmt.setLong_6svq3l$(2, _entity.ceContainerUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContainerETagDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContainerETag SET cetag = ? WHERE ceContainerUid = ?'; prepareAndUseStatement(this._db, _sql, ContainerETagDao_JdbcKt$updateList$lambda(entityList)); }; function ContainerETagDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.cetag); _stmt.setLong_6svq3l$(2, closure$entity.ceContainerUid); return _stmt.executeUpdate(); }; } ContainerETagDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContainerETag SET cetag = ? WHERE ceContainerUid = ?'; prepareAndUseStatement(this._db, _sql, ContainerETagDao_JdbcKt$update$lambda(entity)); }; function ContainerETagDao_JdbcKt$getEtagOfContainer$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getString_za3lpa$(1); }; } function ContainerETagDao_JdbcKt$getEtagOfContainer$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerETagDao_JdbcKt$getEtagOfContainer$lambda$lambda$lambda(_result)); } function ContainerETagDao_JdbcKt$getEtagOfContainer$lambda(closure$containerUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); return useResults(_stmt.executeQuery(), ContainerETagDao_JdbcKt$getEtagOfContainer$lambda$lambda); }; } ContainerETagDao_JdbcKt.prototype.getEtagOfContainer_s8cxhz$ = function (containerUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT cetag FROM ContainerETag WHERE ceContainerUid = ?'), ContainerETagDao_JdbcKt$getEtagOfContainer$lambda(containerUid)); }; function ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContainerETag (ceContainerUid, cetag) VALUES(?, ?)'; }; ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setLong_6svq3l$(1, entity.ceContainerUid); stmt.setString_vqvrqt$(2, entity.cetag); }; ContainerETagDao_JdbcKt$_insertAdapterContainerETag_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContainerETagDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerETagDao_JdbcKt', interfaces: [ContainerETagDao]}; function ContainerEntryDao() { } ContainerEntryDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerEntryDao', interfaces: [BaseDao]}; function ContainerEntryDao_JdbcKt(_db) { ContainerEntryDao.call(this); this._db = _db; this._insertAdapterContainerEntry_ = new ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral(this._db); } function Coroutine$insertListAsync_oe4mvo$($this, containerEntryList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerEntryList = containerEntryList_0; } Coroutine$insertListAsync_oe4mvo$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_oe4mvo$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_oe4mvo$.prototype.constructor = Coroutine$insertListAsync_oe4mvo$; Coroutine$insertListAsync_oe4mvo$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainerEntry_.insertListAsync_4ezy5m$(this.local$containerEntryList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryDao_JdbcKt.prototype.insertListAsync_oe4mvo$ = function (containerEntryList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_oe4mvo$(this, containerEntryList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerEntryDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContainerEntry_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_38($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_38.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_38.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_38.prototype.constructor = Coroutine$insertAsync_38; Coroutine$insertAsync_38.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainerEntry_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_38(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerEntryDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContainerEntry_.insertList_4ezy5m$(entityList); }; function ContainerEntryDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.ceContainerUid); _stmt.setString_vqvrqt$(2, _entity.cePath); _stmt.setLong_6svq3l$(3, _entity.ceCefUid); _stmt.setLong_6svq3l$(4, _entity.ceUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContainerEntryDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContainerEntry SET ceContainerUid = ?, cePath = ?, ceCefUid = ? WHERE ceUid = ?'; prepareAndUseStatement(this._db, _sql, ContainerEntryDao_JdbcKt$updateList$lambda(entityList)); }; function ContainerEntryDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.ceContainerUid); _stmt.setString_vqvrqt$(2, closure$entity.cePath); _stmt.setLong_6svq3l$(3, closure$entity.ceCefUid); _stmt.setLong_6svq3l$(4, closure$entity.ceUid); return _stmt.executeUpdate(); }; } ContainerEntryDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContainerEntry SET ceContainerUid = ?, cePath = ?, ceCefUid = ? WHERE ceUid = ?'; prepareAndUseStatement(this._db, _sql, ContainerEntryDao_JdbcKt$update$lambda(entity)); }; function ContainerEntryDao_JdbcKt$deleteList$lambda(closure$entries, closure$_numChanges) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entries.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.ceUid); closure$_numChanges.v = closure$_numChanges.v + _stmt.executeUpdate() | 0; } _stmt.getConnection().commit(); return Unit; }; } ContainerEntryDao_JdbcKt.prototype.deleteList_oe4mvo$ = function (entries) { var _numChanges = {v: 0}; prepareAndUseStatement(this._db, 'DELETE FROM ContainerEntry WHERE ceUid = ?', ContainerEntryDao_JdbcKt$deleteList$lambda(entries, _numChanges)); }; function ContainerEntryDao_JdbcKt$findByContainer$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_ceUid = closure$_result.getLong_61zpoe$('ceUid'); var _tmp_ceContainerUid = closure$_result.getLong_61zpoe$('ceContainerUid'); var _tmp_cePath = closure$_result.getString_61zpoe$('cePath'); var _tmp_ceCefUid = closure$_result.getLong_61zpoe$('ceCefUid'); var _tmp_ContainerEntryFile_nullCount = 0; var _tmp_cefUid = closure$_result.getLong_61zpoe$('cefUid'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_cefMd5 = closure$_result.getString_61zpoe$('cefMd5'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_cefPath = closure$_result.getString_61zpoe$('cefPath'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_ceTotalSize = closure$_result.getLong_61zpoe$('ceTotalSize'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_ceCompressedSize = closure$_result.getLong_61zpoe$('ceCompressedSize'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_compression = closure$_result.getInt_61zpoe$('compression'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_ContainerEntryFile_isAllNull = _tmp_ContainerEntryFile_nullCount === 7; var $receiver = new ContainerEntryWithContainerEntryFile(); $receiver.ceUid = _tmp_ceUid; $receiver.ceContainerUid = _tmp_ceContainerUid; $receiver.cePath = _tmp_cePath; $receiver.ceCefUid = _tmp_ceCefUid; if (!_tmp_ContainerEntryFile_isAllNull) { var $receiver_0 = new ContainerEntryFile(); $receiver_0.cefUid = _tmp_cefUid; $receiver_0.cefMd5 = _tmp_cefMd5; $receiver_0.cefPath = _tmp_cefPath; $receiver_0.ceTotalSize = _tmp_ceTotalSize; $receiver_0.ceCompressedSize = _tmp_ceCompressedSize; $receiver_0.compression = _tmp_compression; $receiver_0.lastModified = _tmp_lastModified; $receiver.containerEntryFile = $receiver_0; } return $receiver; }; } function ContainerEntryDao_JdbcKt$findByContainer$lambda$lambda(_result) { return mapRows(_result, ContainerEntryDao_JdbcKt$findByContainer$lambda$lambda$lambda(_result)); } function ContainerEntryDao_JdbcKt$findByContainer$lambda(closure$containerUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); return useResults(_stmt.executeQuery(), ContainerEntryDao_JdbcKt$findByContainer$lambda$lambda); }; } ContainerEntryDao_JdbcKt.prototype.findByContainer_s8cxhz$ = function (containerUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT ContainerEntry.*, ContainerEntryFile.* FROM ContainerEntry LEFT JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ?'), ContainerEntryDao_JdbcKt$findByContainer$lambda(containerUid)); }; function ContainerEntryDao_JdbcKt$findByPathInContainer$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_ceUid = closure$_result.getLong_61zpoe$('ceUid'); var _tmp_ceContainerUid = closure$_result.getLong_61zpoe$('ceContainerUid'); var _tmp_cePath = closure$_result.getString_61zpoe$('cePath'); var _tmp_ceCefUid = closure$_result.getLong_61zpoe$('ceCefUid'); var _tmp_ContainerEntryFile_nullCount = 0; var _tmp_cefUid = closure$_result.getLong_61zpoe$('cefUid'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_cefMd5 = closure$_result.getString_61zpoe$('cefMd5'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_cefPath = closure$_result.getString_61zpoe$('cefPath'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_ceTotalSize = closure$_result.getLong_61zpoe$('ceTotalSize'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_ceCompressedSize = closure$_result.getLong_61zpoe$('ceCompressedSize'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_compression = closure$_result.getInt_61zpoe$('compression'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_ContainerEntryFile_isAllNull = _tmp_ContainerEntryFile_nullCount === 7; var $receiver = new ContainerEntryWithContainerEntryFile(); $receiver.ceUid = _tmp_ceUid; $receiver.ceContainerUid = _tmp_ceContainerUid; $receiver.cePath = _tmp_cePath; $receiver.ceCefUid = _tmp_ceCefUid; if (!_tmp_ContainerEntryFile_isAllNull) { var $receiver_0 = new ContainerEntryFile(); $receiver_0.cefUid = _tmp_cefUid; $receiver_0.cefMd5 = _tmp_cefMd5; $receiver_0.cefPath = _tmp_cefPath; $receiver_0.ceTotalSize = _tmp_ceTotalSize; $receiver_0.ceCompressedSize = _tmp_ceCompressedSize; $receiver_0.compression = _tmp_compression; $receiver_0.lastModified = _tmp_lastModified; $receiver.containerEntryFile = $receiver_0; } return $receiver; }; } function ContainerEntryDao_JdbcKt$findByPathInContainer$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerEntryDao_JdbcKt$findByPathInContainer$lambda$lambda$lambda(_result)); } function ContainerEntryDao_JdbcKt$findByPathInContainer$lambda(closure$containerUid, closure$pathInContainer) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); _stmt.setString_vqvrqt$(2, closure$pathInContainer); return useResults(_stmt.executeQuery(), ContainerEntryDao_JdbcKt$findByPathInContainer$lambda$lambda); }; } ContainerEntryDao_JdbcKt.prototype.findByPathInContainer_a4hdmt$ = function (containerUid, pathInContainer) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT ContainerEntry.*, ContainerEntryFile.* FROM ContainerEntry LEFT JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ? AND ContainerEntry.cePath = ?'), ContainerEntryDao_JdbcKt$findByPathInContainer$lambda(containerUid, pathInContainer)); }; function ContainerEntryDao_JdbcKt$findByContainerWithMd5$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cefMd5 = closure$_result.getString_61zpoe$('cefMd5'); var _tmp_ceUid = closure$_result.getLong_61zpoe$('ceUid'); var _tmp_ceContainerUid = closure$_result.getLong_61zpoe$('ceContainerUid'); var _tmp_cePath = closure$_result.getString_61zpoe$('cePath'); var _tmp_ceCefUid = closure$_result.getLong_61zpoe$('ceCefUid'); var $receiver = new ContainerEntryWithMd5(); $receiver.cefMd5 = _tmp_cefMd5; $receiver.ceUid = _tmp_ceUid; $receiver.ceContainerUid = _tmp_ceContainerUid; $receiver.cePath = _tmp_cePath; $receiver.ceCefUid = _tmp_ceCefUid; return $receiver; }; } function ContainerEntryDao_JdbcKt$findByContainerWithMd5$lambda$lambda(_result) { return mapRows(_result, ContainerEntryDao_JdbcKt$findByContainerWithMd5$lambda$lambda$lambda(_result)); } function ContainerEntryDao_JdbcKt$findByContainerWithMd5$lambda(closure$containerUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); return useResults(_stmt.executeQuery(), ContainerEntryDao_JdbcKt$findByContainerWithMd5$lambda$lambda); }; } ContainerEntryDao_JdbcKt.prototype.findByContainerWithMd5_s8cxhz$ = function (containerUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT ContainerEntry.*, ContainerEntryFile.cefMd5 AS cefMd5 FROM ContainerEntry LEFT JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ?'), ContainerEntryDao_JdbcKt$findByContainerWithMd5$lambda(containerUid)); }; function ContainerEntryDao_JdbcKt$findByContainerAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_ceUid = closure$_result.getLong_61zpoe$('ceUid'); var _tmp_ceContainerUid = closure$_result.getLong_61zpoe$('ceContainerUid'); var _tmp_cePath = closure$_result.getString_61zpoe$('cePath'); var _tmp_ceCefUid = closure$_result.getLong_61zpoe$('ceCefUid'); var _tmp_ContainerEntryFile_nullCount = 0; var _tmp_cefUid = closure$_result.getLong_61zpoe$('cefUid'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_cefMd5 = closure$_result.getString_61zpoe$('cefMd5'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_cefPath = closure$_result.getString_61zpoe$('cefPath'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_ceTotalSize = closure$_result.getLong_61zpoe$('ceTotalSize'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_ceCompressedSize = closure$_result.getLong_61zpoe$('ceCompressedSize'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_compression = closure$_result.getInt_61zpoe$('compression'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); if (closure$_result.wasNull()) { _tmp_ContainerEntryFile_nullCount = _tmp_ContainerEntryFile_nullCount + 1 | 0; } var _tmp_ContainerEntryFile_isAllNull = _tmp_ContainerEntryFile_nullCount === 7; var $receiver = new ContainerEntryWithContainerEntryFile(); $receiver.ceUid = _tmp_ceUid; $receiver.ceContainerUid = _tmp_ceContainerUid; $receiver.cePath = _tmp_cePath; $receiver.ceCefUid = _tmp_ceCefUid; if (!_tmp_ContainerEntryFile_isAllNull) { var $receiver_0 = new ContainerEntryFile(); $receiver_0.cefUid = _tmp_cefUid; $receiver_0.cefMd5 = _tmp_cefMd5; $receiver_0.cefPath = _tmp_cefPath; $receiver_0.ceTotalSize = _tmp_ceTotalSize; $receiver_0.ceCompressedSize = _tmp_ceCompressedSize; $receiver_0.compression = _tmp_compression; $receiver_0.lastModified = _tmp_lastModified; $receiver.containerEntryFile = $receiver_0; } return $receiver; }; } function ContainerEntryDao_JdbcKt$findByContainerAsync$lambda$lambda(_result) { return mapRows(_result, ContainerEntryDao_JdbcKt$findByContainerAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda(closure$containerUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$containerUid = closure$containerUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda.prototype.constructor = Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda; Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$containerUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerEntryDao_JdbcKt$findByContainerAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryDao_JdbcKt$findByContainerAsync$lambda(closure$containerUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryDao_JdbcKt$findByContainerAsync$lambda(closure$containerUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerEntryDao_JdbcKt.prototype.findByContainerAsync_s8cxhz$ = function (containerUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT ContainerEntry.*, ContainerEntryFile.* FROM ContainerEntry LEFT JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ?'), ContainerEntryDao_JdbcKt$findByContainerAsync$lambda(containerUid), continuation); }; function ContainerEntryDao_JdbcKt$deleteByContainerUid$lambda(closure$containerUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); return _stmt.executeUpdate(); }; } ContainerEntryDao_JdbcKt.prototype.deleteByContainerUid_s8cxhz$ = function (containerUid) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('DELETE FROM ContainerEntry WHERE ceContainerUid = ?'), ContainerEntryDao_JdbcKt$deleteByContainerUid$lambda(containerUid)); }; function Coroutine$ContainerEntryDao_JdbcKt$deleteContainerEntriesCreatedByJobs$lambda(closure$jobId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$jobId = closure$jobId_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryDao_JdbcKt$deleteContainerEntriesCreatedByJobs$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryDao_JdbcKt$deleteContainerEntriesCreatedByJobs$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryDao_JdbcKt$deleteContainerEntriesCreatedByJobs$lambda.prototype.constructor = Coroutine$ContainerEntryDao_JdbcKt$deleteContainerEntriesCreatedByJobs$lambda; Coroutine$ContainerEntryDao_JdbcKt$deleteContainerEntriesCreatedByJobs$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$jobId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryDao_JdbcKt$deleteContainerEntriesCreatedByJobs$lambda(closure$jobId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryDao_JdbcKt$deleteContainerEntriesCreatedByJobs$lambda(closure$jobId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$deleteContainerEntriesCreatedByJobs_s8cxhz$($this, jobId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$jobId = jobId_0; } Coroutine$deleteContainerEntriesCreatedByJobs_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deleteContainerEntriesCreatedByJobs_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deleteContainerEntriesCreatedByJobs_s8cxhz$.prototype.constructor = Coroutine$deleteContainerEntriesCreatedByJobs_s8cxhz$; Coroutine$deleteContainerEntriesCreatedByJobs_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | DELETE FROM ContainerEntry \n | WHERE ceContainerUid \n | IN (SELECT cjiContainerUid \n | FROM ContentJobItem\n | JOIN ContentJob \n | ON ContentJobItem.cjiJobUid = ContentJob.cjUid\n | WHERE ContentJob.cjUid = ?)\n ')), ContainerEntryDao_JdbcKt$deleteContainerEntriesCreatedByJobs$lambda(this.local$jobId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryDao_JdbcKt.prototype.deleteContainerEntriesCreatedByJobs_s8cxhz$ = function (jobId_0, continuation_0, suspended) { var instance = new Coroutine$deleteContainerEntriesCreatedByJobs_s8cxhz$(this, jobId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerEntryDao_JdbcKt$deleteByContentEntryUid$lambda(closure$contentEntryUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$contentEntryUid); return _stmt.executeUpdate(); }; } ContainerEntryDao_JdbcKt.prototype.deleteByContentEntryUid_s8cxhz$ = function (contentEntryUid) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | DELETE FROM ContainerEntry\n | WHERE ceContainerUid\n | IN (SELECT containerUid\n | FROM Container\n | WHERE containerContentEntryUid = ?) \n | \n ')), ContainerEntryDao_JdbcKt$deleteByContentEntryUid$lambda(contentEntryUid)); }; function Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda(closure$containerUid_0, closure$path_0, closure$md5_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$containerUid = closure$containerUid_0; this.local$closure$path = closure$path_0; this.local$closure$md5 = closure$md5_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda.prototype.constructor = Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda; Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$containerUid); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$path); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$md5); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda(closure$containerUid_0, closure$path_0, closure$md5_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda(closure$containerUid_0, closure$path_0, closure$md5_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$insertWithMd5SumsAsync_r69jt9$($this, containerUid_0, path_0, md5_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$containerUid = containerUid_0; this.local$path = path_0; this.local$md5 = md5_0; } Coroutine$insertWithMd5SumsAsync_r69jt9$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertWithMd5SumsAsync_r69jt9$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertWithMd5SumsAsync_r69jt9$.prototype.constructor = Coroutine$insertWithMd5SumsAsync_r69jt9$; Coroutine$insertWithMd5SumsAsync_r69jt9$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | INSERT INTO ContainerEntry(ceContainerUid, cePath, ceCefUid) \n | SELECT ? AS ceContainerUid, ? AS cePath, \n | (SELECT COALESCE(\n | (SELECT cefUid \n | FROM ContainerEntryFile\n | WHERE cefMd5 = ?\n | LIMIT 1), 0)) \n | \n ')), ContainerEntryDao_JdbcKt$insertWithMd5SumsAsync$lambda(this.local$containerUid, this.local$path, this.local$md5), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryDao_JdbcKt.prototype.insertWithMd5SumsAsync_r69jt9$ = function (containerUid_0, path_0, md5_0, continuation_0, suspended) { var instance = new Coroutine$insertWithMd5SumsAsync_r69jt9$(this, containerUid_0, path_0, md5_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContainerEntry (ceUid, ceContainerUid, cePath, ceCefUid) VALUES(?, ?, ?, ?)'; }; ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.ceUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.ceUid); } stmt.setLong_6svq3l$(2, entity.ceContainerUid); stmt.setString_vqvrqt$(3, entity.cePath); stmt.setLong_6svq3l$(4, entity.ceCefUid); }; ContainerEntryDao_JdbcKt$_insertAdapterContainerEntry_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContainerEntryDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerEntryDao_JdbcKt', interfaces: [ContainerEntryDao]}; function ContainerEntryFileDao() { } ContainerEntryFileDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerEntryFileDao', interfaces: [BaseDao]}; function ContainerEntryFileDao_JdbcKt(_db) { ContainerEntryFileDao.call(this); this._db = _db; this._insertAdapterContainerEntryFile_ = new ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral(this._db); } function Coroutine$insertListAsync_aufyg$($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$insertListAsync_aufyg$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_aufyg$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_aufyg$.prototype.constructor = Coroutine$insertListAsync_aufyg$; Coroutine$insertListAsync_aufyg$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainerEntryFile_.insertListAsync_4ezy5m$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryFileDao_JdbcKt.prototype.insertListAsync_aufyg$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_aufyg$(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerEntryFileDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContainerEntryFile_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_39($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_39.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_39.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_39.prototype.constructor = Coroutine$insertAsync_39; Coroutine$insertAsync_39.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainerEntryFile_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryFileDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_39(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerEntryFileDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContainerEntryFile_.insertList_4ezy5m$(entityList); }; function ContainerEntryFileDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.cefMd5); _stmt.setString_vqvrqt$(2, _entity.cefPath); _stmt.setLong_6svq3l$(3, _entity.ceTotalSize); _stmt.setLong_6svq3l$(4, _entity.ceCompressedSize); _stmt.setInt_vux9f0$(5, _entity.compression); _stmt.setLong_6svq3l$(6, _entity.lastModified); _stmt.setLong_6svq3l$(7, _entity.cefUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContainerEntryFileDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContainerEntryFile SET cefMd5 = ?, cefPath = ?, ceTotalSize = ?, ceCompressedSize = ?, compression = ?, lastModified = ? WHERE cefUid = ?'; prepareAndUseStatement(this._db, _sql, ContainerEntryFileDao_JdbcKt$updateList$lambda(entityList)); }; function ContainerEntryFileDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.cefMd5); _stmt.setString_vqvrqt$(2, closure$entity.cefPath); _stmt.setLong_6svq3l$(3, closure$entity.ceTotalSize); _stmt.setLong_6svq3l$(4, closure$entity.ceCompressedSize); _stmt.setInt_vux9f0$(5, closure$entity.compression); _stmt.setLong_6svq3l$(6, closure$entity.lastModified); _stmt.setLong_6svq3l$(7, closure$entity.cefUid); return _stmt.executeUpdate(); }; } ContainerEntryFileDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContainerEntryFile SET cefMd5 = ?, cefPath = ?, ceTotalSize = ?, ceCompressedSize = ?, compression = ?, lastModified = ? WHERE cefUid = ?'; prepareAndUseStatement(this._db, _sql, ContainerEntryFileDao_JdbcKt$update$lambda(entity)); }; function ContainerEntryFileDao_JdbcKt$deleteListOfEntryFiles$lambda(closure$entriesToDelete, closure$_numChanges) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entriesToDelete.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cefUid); closure$_numChanges.v = closure$_numChanges.v + _stmt.executeUpdate() | 0; } _stmt.getConnection().commit(); return Unit; }; } ContainerEntryFileDao_JdbcKt.prototype.deleteListOfEntryFiles_aufyg$ = function (entriesToDelete) { var _numChanges = {v: 0}; prepareAndUseStatement(this._db, 'DELETE FROM ContainerEntryFile WHERE cefUid = ?', ContainerEntryFileDao_JdbcKt$deleteListOfEntryFiles$lambda(entriesToDelete, _numChanges)); }; function ContainerEntryFileDao_JdbcKt$findEntriesByMd5Sums$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cefUid = closure$_result.getLong_61zpoe$('cefUid'); var _tmp_cefMd5 = closure$_result.getString_61zpoe$('cefMd5'); var _tmp_cefPath = closure$_result.getString_61zpoe$('cefPath'); var _tmp_ceTotalSize = closure$_result.getLong_61zpoe$('ceTotalSize'); var _tmp_ceCompressedSize = closure$_result.getLong_61zpoe$('ceCompressedSize'); var _tmp_compression = closure$_result.getInt_61zpoe$('compression'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var $receiver = new ContainerEntryFile(); $receiver.cefUid = _tmp_cefUid; $receiver.cefMd5 = _tmp_cefMd5; $receiver.cefPath = _tmp_cefPath; $receiver.ceTotalSize = _tmp_ceTotalSize; $receiver.ceCompressedSize = _tmp_ceCompressedSize; $receiver.compression = _tmp_compression; $receiver.lastModified = _tmp_lastModified; return $receiver; }; } function ContainerEntryFileDao_JdbcKt$findEntriesByMd5Sums$lambda$lambda(_result) { return mapRows(_result, ContainerEntryFileDao_JdbcKt$findEntriesByMd5Sums$lambda$lambda$lambda(_result)); } function ContainerEntryFileDao_JdbcKt$findEntriesByMd5Sums$lambda(closure$md5Sums) { return function (_stmt) { _stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(_stmt.getConnection(), 'TEXT', copyToArray(closure$md5Sums))); return useResults(_stmt.executeQuery(), ContainerEntryFileDao_JdbcKt$findEntriesByMd5Sums$lambda$lambda); }; } ContainerEntryFileDao_JdbcKt.prototype.findEntriesByMd5Sums_mhpeer$ = function (md5Sums) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT ContainerEntryFile.* FROM ContainerEntryFile WHERE cefMd5 IN (?)', true), ContainerEntryFileDao_JdbcKt$findEntriesByMd5Sums$lambda(md5Sums)); }; function ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cefUid = closure$_result.getLong_61zpoe$('cefUid'); var _tmp_cefMd5 = closure$_result.getString_61zpoe$('cefMd5'); var _tmp_cefPath = closure$_result.getString_61zpoe$('cefPath'); var _tmp_ceTotalSize = closure$_result.getLong_61zpoe$('ceTotalSize'); var _tmp_ceCompressedSize = closure$_result.getLong_61zpoe$('ceCompressedSize'); var _tmp_compression = closure$_result.getInt_61zpoe$('compression'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var $receiver = new ContainerEntryFile(); $receiver.cefUid = _tmp_cefUid; $receiver.cefMd5 = _tmp_cefMd5; $receiver.cefPath = _tmp_cefPath; $receiver.ceTotalSize = _tmp_ceTotalSize; $receiver.ceCompressedSize = _tmp_ceCompressedSize; $receiver.compression = _tmp_compression; $receiver.lastModified = _tmp_lastModified; return $receiver; }; } function ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda$lambda(_result) { return mapRows(_result, ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda(closure$md5Sums_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$md5Sums = closure$md5Sums_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda.prototype.constructor = Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda; Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'TEXT', copyToArray(this.local$closure$md5Sums))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda(closure$md5Sums_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda(closure$md5Sums_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerEntryFileDao_JdbcKt.prototype.findEntriesByMd5SumsAsync_mhpeer$ = function (md5Sums, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT ContainerEntryFile.* FROM ContainerEntryFile WHERE cefMd5 IN (?)', true), ContainerEntryFileDao_JdbcKt$findEntriesByMd5SumsAsync$lambda(md5Sums), continuation); }; function ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getString_za3lpa$(1); }; } function ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda$lambda(_result) { return mapRows(_result, ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda(closure$md5Sums_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$md5Sums = closure$md5Sums_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda.prototype.constructor = Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda; Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'TEXT', copyToArray(this.local$closure$md5Sums))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda(closure$md5Sums_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda(closure$md5Sums_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerEntryFileDao_JdbcKt.prototype.findExistingMd5SumsByMd5SumsAsync_mhpeer$ = function (md5Sums, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT ContainerEntryFile.cefMd5 FROM ContainerEntryFile WHERE cefMd5 IN (?)', true), ContainerEntryFileDao_JdbcKt$findExistingMd5SumsByMd5SumsAsync$lambda(md5Sums), continuation); }; function ContainerEntryFileDao_JdbcKt$findEntriesByUids$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cefUid = closure$_result.getLong_61zpoe$('cefUid'); var _tmp_cefMd5 = closure$_result.getString_61zpoe$('cefMd5'); var _tmp_cefPath = closure$_result.getString_61zpoe$('cefPath'); var _tmp_ceTotalSize = closure$_result.getLong_61zpoe$('ceTotalSize'); var _tmp_ceCompressedSize = closure$_result.getLong_61zpoe$('ceCompressedSize'); var _tmp_compression = closure$_result.getInt_61zpoe$('compression'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var $receiver = new ContainerEntryFile(); $receiver.cefUid = _tmp_cefUid; $receiver.cefMd5 = _tmp_cefMd5; $receiver.cefPath = _tmp_cefPath; $receiver.ceTotalSize = _tmp_ceTotalSize; $receiver.ceCompressedSize = _tmp_ceCompressedSize; $receiver.compression = _tmp_compression; $receiver.lastModified = _tmp_lastModified; return $receiver; }; } function ContainerEntryFileDao_JdbcKt$findEntriesByUids$lambda$lambda(_result) { return mapRows(_result, ContainerEntryFileDao_JdbcKt$findEntriesByUids$lambda$lambda$lambda(_result)); } function ContainerEntryFileDao_JdbcKt$findEntriesByUids$lambda(closure$uidList) { return function (_stmt) { _stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(_stmt.getConnection(), 'BIGINT', copyToArray(closure$uidList))); return useResults(_stmt.executeQuery(), ContainerEntryFileDao_JdbcKt$findEntriesByUids$lambda$lambda); }; } ContainerEntryFileDao_JdbcKt.prototype.findEntriesByUids_gox9k8$ = function (uidList) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT ContainerEntryFile.* FROM ContainerEntryFile WHERE cefUid IN (?)', true), ContainerEntryFileDao_JdbcKt$findEntriesByUids$lambda(uidList)); }; function ContainerEntryFileDao_JdbcKt$updateFilePath$lambda(closure$path, closure$cefUid) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$path); _stmt.setLong_6svq3l$(2, closure$cefUid); return _stmt.executeUpdate(); }; } ContainerEntryFileDao_JdbcKt.prototype.updateFilePath_a4hdmt$ = function (cefUid, path) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('UPDATE ContainerEntryFile SET cefPath = ? WHERE cefUid = ?'), ContainerEntryFileDao_JdbcKt$updateFilePath$lambda(path, cefUid)); }; function ContainerEntryFileDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cefUid = closure$_result.getLong_61zpoe$('cefUid'); var _tmp_cefMd5 = closure$_result.getString_61zpoe$('cefMd5'); var _tmp_cefPath = closure$_result.getString_61zpoe$('cefPath'); var _tmp_ceTotalSize = closure$_result.getLong_61zpoe$('ceTotalSize'); var _tmp_ceCompressedSize = closure$_result.getLong_61zpoe$('ceCompressedSize'); var _tmp_compression = closure$_result.getInt_61zpoe$('compression'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var $receiver = new ContainerEntryFile(); $receiver.cefUid = _tmp_cefUid; $receiver.cefMd5 = _tmp_cefMd5; $receiver.cefPath = _tmp_cefPath; $receiver.ceTotalSize = _tmp_ceTotalSize; $receiver.ceCompressedSize = _tmp_ceCompressedSize; $receiver.compression = _tmp_compression; $receiver.lastModified = _tmp_lastModified; return $receiver; }; } function ContainerEntryFileDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerEntryFileDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function ContainerEntryFileDao_JdbcKt$findByUid$lambda(closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); return useResults(_stmt.executeQuery(), ContainerEntryFileDao_JdbcKt$findByUid$lambda$lambda); }; } ContainerEntryFileDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContainerEntryFile WHERE cefUid = ?'), ContainerEntryFileDao_JdbcKt$findByUid$lambda(uid)); }; function ContainerEntryFileDao_JdbcKt$sumContainerFileEntrySizes$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ContainerEntryFileDao_JdbcKt$sumContainerFileEntrySizes$lambda$lambda(_result) { return mapNextRow(_result, L0, ContainerEntryFileDao_JdbcKt$sumContainerFileEntrySizes$lambda$lambda$lambda(_result)); } function ContainerEntryFileDao_JdbcKt$sumContainerFileEntrySizes$lambda(closure$containerUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$containerUid); return useResults(_stmt.executeQuery(), ContainerEntryFileDao_JdbcKt$sumContainerFileEntrySizes$lambda$lambda); }; } ContainerEntryFileDao_JdbcKt.prototype.sumContainerFileEntrySizes_s8cxhz$ = function (containerUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT SUM(ContainerEntryFile.ceCompressedSize) FROM ContainerEntry JOIN ContainerEntryFile ON ContainerEntry.ceCefUid = ContainerEntryFile.cefUid WHERE ContainerEntry.ceContainerUid = ?'), ContainerEntryFileDao_JdbcKt$sumContainerFileEntrySizes$lambda(containerUid)); }; function ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cefUid = closure$_result.getLong_61zpoe$('cefUid'); var _tmp_cefMd5 = closure$_result.getString_61zpoe$('cefMd5'); var _tmp_cefPath = closure$_result.getString_61zpoe$('cefPath'); var _tmp_ceTotalSize = closure$_result.getLong_61zpoe$('ceTotalSize'); var _tmp_ceCompressedSize = closure$_result.getLong_61zpoe$('ceCompressedSize'); var _tmp_compression = closure$_result.getInt_61zpoe$('compression'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var $receiver = new ContainerEntryFile(); $receiver.cefUid = _tmp_cefUid; $receiver.cefMd5 = _tmp_cefMd5; $receiver.cefPath = _tmp_cefPath; $receiver.ceTotalSize = _tmp_ceTotalSize; $receiver.ceCompressedSize = _tmp_ceCompressedSize; $receiver.compression = _tmp_compression; $receiver.lastModified = _tmp_lastModified; return $receiver; }; } function ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda$lambda(_result) { return mapRows(_result, ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda$lambda$lambda(_result)); } function Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda.prototype.constructor = Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda; Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } ContainerEntryFileDao_JdbcKt.prototype.getAllFilesForCompression = function (continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig("SELECT * FROM ContainerEntryFile WHERE compression = 0 AND NOT EXISTS(SELECT * FROM ContainerEntry WHERE ceCefUid = ContainerEntryFile.cefUid AND (ContainerEntry.cePath LIKE '%.webm' OR ContainerEntry.cePath LIKE '%.mp4')) LIMIT 100"), ContainerEntryFileDao_JdbcKt$getAllFilesForCompression$lambda, continuation); }; function ContainerEntryFileDao_JdbcKt$updateCompressedFile$lambda(closure$compression, closure$ceCompressedSize, closure$cefUid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$compression); _stmt.setLong_6svq3l$(2, closure$ceCompressedSize); _stmt.setLong_6svq3l$(3, closure$cefUid); return _stmt.executeUpdate(); }; } ContainerEntryFileDao_JdbcKt.prototype.updateCompressedFile_h639zw$ = function (compression, ceCompressedSize, cefUid) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('UPDATE ContainerEntryFile SET compression = ?, ceCompressedSize = ? WHERE cefUid = ?'), ContainerEntryFileDao_JdbcKt$updateCompressedFile$lambda(compression, ceCompressedSize, cefUid)); }; function ContainerEntryFileDao_JdbcKt$findZombieEntries$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cefUid = closure$_result.getLong_61zpoe$('cefUid'); var _tmp_cefMd5 = closure$_result.getString_61zpoe$('cefMd5'); var _tmp_cefPath = closure$_result.getString_61zpoe$('cefPath'); var _tmp_ceTotalSize = closure$_result.getLong_61zpoe$('ceTotalSize'); var _tmp_ceCompressedSize = closure$_result.getLong_61zpoe$('ceCompressedSize'); var _tmp_compression = closure$_result.getInt_61zpoe$('compression'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var $receiver = new ContainerEntryFile(); $receiver.cefUid = _tmp_cefUid; $receiver.cefMd5 = _tmp_cefMd5; $receiver.cefPath = _tmp_cefPath; $receiver.ceTotalSize = _tmp_ceTotalSize; $receiver.ceCompressedSize = _tmp_ceCompressedSize; $receiver.compression = _tmp_compression; $receiver.lastModified = _tmp_lastModified; return $receiver; }; } function ContainerEntryFileDao_JdbcKt$findZombieEntries$lambda$lambda(_result) { return mapRows(_result, ContainerEntryFileDao_JdbcKt$findZombieEntries$lambda$lambda$lambda(_result)); } function ContainerEntryFileDao_JdbcKt$findZombieEntries$lambda(_stmt) { return useResults(_stmt.executeQuery(), ContainerEntryFileDao_JdbcKt$findZombieEntries$lambda$lambda); } ContainerEntryFileDao_JdbcKt.prototype.findZombieEntries = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT ContainerEntryFile.* \n | FROM ContainerEntryFile \n | WHERE NOT EXISTS (SELECT ContainerEntry.ceCefUid \n | FROM ContainerEntry \n | WHERE ContainerEntryFile.cefUid = ContainerEntry.ceCefUid) \n | LIMIT 100\n ')), ContainerEntryFileDao_JdbcKt$findZombieEntries$lambda); }; function ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cefUid = closure$_result.getLong_61zpoe$('cefUid'); var _tmp_cefPath = closure$_result.getString_61zpoe$('cefPath'); var $receiver = new ContainerEntryFileUidAndPath(); $receiver.cefUid = _tmp_cefUid; $receiver.cefPath = _tmp_cefPath; return $receiver; }; } function ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda$lambda(_result) { return mapRows(_result, ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda$lambda$lambda(_result)); } function Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda(closure$limit_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$limit = closure$limit_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda.prototype.constructor = Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda; Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$limit); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda(closure$limit_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda(closure$limit_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerEntryFileDao_JdbcKt.prototype.findZombieUidsAndPath_za3lpa$ = function (limit, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT cefUid, cefPath\n | FROM ContainerEntryFile\n | WHERE NOT EXISTS \n | (SELECT ContainerEntry.ceCefUid \n | FROM ContainerEntry \n | WHERE ContainerEntry.ceCefUid = ContainerEntryFile.cefUid \n | LIMIT 1)\n | LIMIT ? \n | \n ')), ContainerEntryFileDao_JdbcKt$findZombieUidsAndPath$lambda(limit), continuation); }; function Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda(closure$uidList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uidList = closure$uidList_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda.prototype.constructor = Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda; Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda(closure$uidList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda(closure$uidList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$deleteByUidList_gox9k8$($this, uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uidList = uidList_0; } Coroutine$deleteByUidList_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deleteByUidList_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deleteByUidList_gox9k8$.prototype.constructor = Coroutine$deleteByUidList_gox9k8$; Coroutine$deleteByUidList_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | DELETE FROM ContainerEntryFile\n | WHERE cefUid IN (?) \n | \n '), true), ContainerEntryFileDao_JdbcKt$deleteByUidList$lambda(this.local$uidList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerEntryFileDao_JdbcKt.prototype.deleteByUidList_gox9k8$ = function (uidList_0, continuation_0, suspended) { var instance = new Coroutine$deleteByUidList_gox9k8$(this, uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cefUid = closure$_result.getLong_61zpoe$('cefUid'); var _tmp_cefMd5 = closure$_result.getString_61zpoe$('cefMd5'); var _tmp_cefPath = closure$_result.getString_61zpoe$('cefPath'); var _tmp_ceTotalSize = closure$_result.getLong_61zpoe$('ceTotalSize'); var _tmp_ceCompressedSize = closure$_result.getLong_61zpoe$('ceCompressedSize'); var _tmp_compression = closure$_result.getInt_61zpoe$('compression'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var $receiver = new ContainerEntryFile(); $receiver.cefUid = _tmp_cefUid; $receiver.cefMd5 = _tmp_cefMd5; $receiver.cefPath = _tmp_cefPath; $receiver.ceTotalSize = _tmp_ceTotalSize; $receiver.ceCompressedSize = _tmp_ceCompressedSize; $receiver.compression = _tmp_compression; $receiver.lastModified = _tmp_lastModified; return $receiver; }; } function ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda$lambda$lambda(_result)); } function Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda(closure$md5Sum_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$md5Sum = closure$md5Sum_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda.prototype.constructor = Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda; Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$md5Sum); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda(closure$md5Sum_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda(closure$md5Sum_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerEntryFileDao_JdbcKt.prototype.findEntryByMd5Sum_61zpoe$ = function (md5Sum, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT ContainerEntryFile.* FROM ContainerEntryFile WHERE cefMd5 = ?'), ContainerEntryFileDao_JdbcKt$findEntryByMd5Sum$lambda(md5Sum), continuation); }; function ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContainerEntryFile (cefUid, cefMd5, cefPath, ceTotalSize, ceCompressedSize, compression, lastModified) VALUES(?, ?, ?, ?, ?, ?, ?)'; }; ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cefUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cefUid); } stmt.setString_vqvrqt$(2, entity.cefMd5); stmt.setString_vqvrqt$(3, entity.cefPath); stmt.setLong_6svq3l$(4, entity.ceTotalSize); stmt.setLong_6svq3l$(5, entity.ceCompressedSize); stmt.setInt_vux9f0$(6, entity.compression); stmt.setLong_6svq3l$(7, entity.lastModified); }; ContainerEntryFileDao_JdbcKt$_insertAdapterContainerEntryFile_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContainerEntryFileDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerEntryFileDao_JdbcKt', interfaces: [ContainerEntryFileDao]}; function ContainerImportJobDao() { } ContainerImportJobDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerImportJobDao', interfaces: [BaseDao]}; function ContainerImportJobDao_JdbcKt(_db) { ContainerImportJobDao.call(this); this._db = _db; this._insertAdapterContainerImportJob_ = new ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral(this._db); } ContainerImportJobDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContainerImportJob_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_40($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_40.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_40.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_40.prototype.constructor = Coroutine$insertAsync_40; Coroutine$insertAsync_40.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContainerImportJob_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerImportJobDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_40(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContainerImportJobDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContainerImportJob_.insertList_4ezy5m$(entityList); }; function ContainerImportJobDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cijContainerUid); _stmt.setString_vqvrqt$(2, _entity.cijUri); _stmt.setInt_vux9f0$(3, _entity.cijImportMode); _stmt.setString_vqvrqt$(4, _entity.cijContainerBaseDir); _stmt.setLong_6svq3l$(5, _entity.cijContentEntryUid); _stmt.setString_vqvrqt$(6, _entity.cijMimeType); _stmt.setString_vqvrqt$(7, _entity.cijSessionId); _stmt.setInt_vux9f0$(8, _entity.cijJobStatus); _stmt.setLong_6svq3l$(9, _entity.cijBytesSoFar); _stmt.setBoolean_fzusl$(10, _entity.cijImportCompleted); _stmt.setLong_6svq3l$(11, _entity.cijContentLength); _stmt.setString_vqvrqt$(12, _entity.cijContainerEntryFileUids); _stmt.setString_vqvrqt$(13, _entity.cijConversionParams); _stmt.setLong_6svq3l$(14, _entity.cijUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContainerImportJobDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContainerImportJob SET cijContainerUid = ?, cijUri = ?, cijImportMode = ?, cijContainerBaseDir = ?, cijContentEntryUid = ?, cijMimeType = ?, cijSessionId = ?, cijJobStatus = ?, cijBytesSoFar = ?, cijImportCompleted = ?, cijContentLength = ?, cijContainerEntryFileUids = ?, cijConversionParams = ? WHERE cijUid = ?'; prepareAndUseStatement(this._db, _sql, ContainerImportJobDao_JdbcKt$updateList$lambda(entityList)); }; function ContainerImportJobDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cijContainerUid); _stmt.setString_vqvrqt$(2, closure$entity.cijUri); _stmt.setInt_vux9f0$(3, closure$entity.cijImportMode); _stmt.setString_vqvrqt$(4, closure$entity.cijContainerBaseDir); _stmt.setLong_6svq3l$(5, closure$entity.cijContentEntryUid); _stmt.setString_vqvrqt$(6, closure$entity.cijMimeType); _stmt.setString_vqvrqt$(7, closure$entity.cijSessionId); _stmt.setInt_vux9f0$(8, closure$entity.cijJobStatus); _stmt.setLong_6svq3l$(9, closure$entity.cijBytesSoFar); _stmt.setBoolean_fzusl$(10, closure$entity.cijImportCompleted); _stmt.setLong_6svq3l$(11, closure$entity.cijContentLength); _stmt.setString_vqvrqt$(12, closure$entity.cijContainerEntryFileUids); _stmt.setString_vqvrqt$(13, closure$entity.cijConversionParams); _stmt.setLong_6svq3l$(14, closure$entity.cijUid); return _stmt.executeUpdate(); }; } ContainerImportJobDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContainerImportJob SET cijContainerUid = ?, cijUri = ?, cijImportMode = ?, cijContainerBaseDir = ?, cijContentEntryUid = ?, cijMimeType = ?, cijSessionId = ?, cijJobStatus = ?, cijBytesSoFar = ?, cijImportCompleted = ?, cijContentLength = ?, cijContainerEntryFileUids = ?, cijConversionParams = ? WHERE cijUid = ?'; prepareAndUseStatement(this._db, _sql, ContainerImportJobDao_JdbcKt$update$lambda(entity)); }; function ContainerImportJobDao_JdbcKt$findBySessionId$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cijUid = closure$_result.getLong_61zpoe$('cijUid'); var _tmp_cijContainerUid = closure$_result.getLong_61zpoe$('cijContainerUid'); var _tmp_cijUri = closure$_result.getString_61zpoe$('cijUri'); var _tmp_cijImportMode = closure$_result.getInt_61zpoe$('cijImportMode'); var _tmp_cijContainerBaseDir = closure$_result.getString_61zpoe$('cijContainerBaseDir'); var _tmp_cijContentEntryUid = closure$_result.getLong_61zpoe$('cijContentEntryUid'); var _tmp_cijMimeType = closure$_result.getString_61zpoe$('cijMimeType'); var _tmp_cijSessionId = closure$_result.getString_61zpoe$('cijSessionId'); var _tmp_cijJobStatus = closure$_result.getInt_61zpoe$('cijJobStatus'); var _tmp_cijBytesSoFar = closure$_result.getLong_61zpoe$('cijBytesSoFar'); var _tmp_cijImportCompleted = closure$_result.getBoolean_61zpoe$('cijImportCompleted'); var _tmp_cijContentLength = closure$_result.getLong_61zpoe$('cijContentLength'); var _tmp_cijContainerEntryFileUids = closure$_result.getString_61zpoe$('cijContainerEntryFileUids'); var _tmp_cijConversionParams = closure$_result.getString_61zpoe$('cijConversionParams'); var $receiver = new ContainerImportJob(); $receiver.cijUid = _tmp_cijUid; $receiver.cijContainerUid = _tmp_cijContainerUid; $receiver.cijUri = _tmp_cijUri; $receiver.cijImportMode = _tmp_cijImportMode; $receiver.cijContainerBaseDir = _tmp_cijContainerBaseDir; $receiver.cijContentEntryUid = _tmp_cijContentEntryUid; $receiver.cijMimeType = _tmp_cijMimeType; $receiver.cijSessionId = _tmp_cijSessionId; $receiver.cijJobStatus = _tmp_cijJobStatus; $receiver.cijBytesSoFar = _tmp_cijBytesSoFar; $receiver.cijImportCompleted = _tmp_cijImportCompleted; $receiver.cijContentLength = _tmp_cijContentLength; $receiver.cijContainerEntryFileUids = _tmp_cijContainerEntryFileUids; $receiver.cijConversionParams = _tmp_cijConversionParams; return $receiver; }; } function ContainerImportJobDao_JdbcKt$findBySessionId$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerImportJobDao_JdbcKt$findBySessionId$lambda$lambda$lambda(_result)); } function ContainerImportJobDao_JdbcKt$findBySessionId$lambda(closure$sessionId) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$sessionId); return useResults(_stmt.executeQuery(), ContainerImportJobDao_JdbcKt$findBySessionId$lambda$lambda); }; } ContainerImportJobDao_JdbcKt.prototype.findBySessionId_61zpoe$ = function (sessionId) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContainerImportJob WHERE cijSessionId = ?'), ContainerImportJobDao_JdbcKt$findBySessionId$lambda(sessionId)); }; function ContainerImportJobDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cijUid = closure$_result.getLong_61zpoe$('cijUid'); var _tmp_cijContainerUid = closure$_result.getLong_61zpoe$('cijContainerUid'); var _tmp_cijUri = closure$_result.getString_61zpoe$('cijUri'); var _tmp_cijImportMode = closure$_result.getInt_61zpoe$('cijImportMode'); var _tmp_cijContainerBaseDir = closure$_result.getString_61zpoe$('cijContainerBaseDir'); var _tmp_cijContentEntryUid = closure$_result.getLong_61zpoe$('cijContentEntryUid'); var _tmp_cijMimeType = closure$_result.getString_61zpoe$('cijMimeType'); var _tmp_cijSessionId = closure$_result.getString_61zpoe$('cijSessionId'); var _tmp_cijJobStatus = closure$_result.getInt_61zpoe$('cijJobStatus'); var _tmp_cijBytesSoFar = closure$_result.getLong_61zpoe$('cijBytesSoFar'); var _tmp_cijImportCompleted = closure$_result.getBoolean_61zpoe$('cijImportCompleted'); var _tmp_cijContentLength = closure$_result.getLong_61zpoe$('cijContentLength'); var _tmp_cijContainerEntryFileUids = closure$_result.getString_61zpoe$('cijContainerEntryFileUids'); var _tmp_cijConversionParams = closure$_result.getString_61zpoe$('cijConversionParams'); var $receiver = new ContainerImportJob(); $receiver.cijUid = _tmp_cijUid; $receiver.cijContainerUid = _tmp_cijContainerUid; $receiver.cijUri = _tmp_cijUri; $receiver.cijImportMode = _tmp_cijImportMode; $receiver.cijContainerBaseDir = _tmp_cijContainerBaseDir; $receiver.cijContentEntryUid = _tmp_cijContentEntryUid; $receiver.cijMimeType = _tmp_cijMimeType; $receiver.cijSessionId = _tmp_cijSessionId; $receiver.cijJobStatus = _tmp_cijJobStatus; $receiver.cijBytesSoFar = _tmp_cijBytesSoFar; $receiver.cijImportCompleted = _tmp_cijImportCompleted; $receiver.cijContentLength = _tmp_cijContentLength; $receiver.cijContainerEntryFileUids = _tmp_cijContainerEntryFileUids; $receiver.cijConversionParams = _tmp_cijConversionParams; return $receiver; }; } function ContainerImportJobDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerImportJobDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function ContainerImportJobDao_JdbcKt$findByUid$lambda(closure$uploadId) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uploadId); return useResults(_stmt.executeQuery(), ContainerImportJobDao_JdbcKt$findByUid$lambda$lambda); }; } ContainerImportJobDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uploadId) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContainerImportJob where cijUid = ?'), ContainerImportJobDao_JdbcKt$findByUid$lambda(uploadId)); }; function ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cijUid = closure$_result.getLong_61zpoe$('cijUid'); var _tmp_cijContainerUid = closure$_result.getLong_61zpoe$('cijContainerUid'); var _tmp_cijUri = closure$_result.getString_61zpoe$('cijUri'); var _tmp_cijImportMode = closure$_result.getInt_61zpoe$('cijImportMode'); var _tmp_cijContainerBaseDir = closure$_result.getString_61zpoe$('cijContainerBaseDir'); var _tmp_cijContentEntryUid = closure$_result.getLong_61zpoe$('cijContentEntryUid'); var _tmp_cijMimeType = closure$_result.getString_61zpoe$('cijMimeType'); var _tmp_cijSessionId = closure$_result.getString_61zpoe$('cijSessionId'); var _tmp_cijJobStatus = closure$_result.getInt_61zpoe$('cijJobStatus'); var _tmp_cijBytesSoFar = closure$_result.getLong_61zpoe$('cijBytesSoFar'); var _tmp_cijImportCompleted = closure$_result.getBoolean_61zpoe$('cijImportCompleted'); var _tmp_cijContentLength = closure$_result.getLong_61zpoe$('cijContentLength'); var _tmp_cijContainerEntryFileUids = closure$_result.getString_61zpoe$('cijContainerEntryFileUids'); var _tmp_cijConversionParams = closure$_result.getString_61zpoe$('cijConversionParams'); var $receiver = new ContainerImportJob(); $receiver.cijUid = _tmp_cijUid; $receiver.cijContainerUid = _tmp_cijContainerUid; $receiver.cijUri = _tmp_cijUri; $receiver.cijImportMode = _tmp_cijImportMode; $receiver.cijContainerBaseDir = _tmp_cijContainerBaseDir; $receiver.cijContentEntryUid = _tmp_cijContentEntryUid; $receiver.cijMimeType = _tmp_cijMimeType; $receiver.cijSessionId = _tmp_cijSessionId; $receiver.cijJobStatus = _tmp_cijJobStatus; $receiver.cijBytesSoFar = _tmp_cijBytesSoFar; $receiver.cijImportCompleted = _tmp_cijImportCompleted; $receiver.cijContentLength = _tmp_cijContentLength; $receiver.cijContainerEntryFileUids = _tmp_cijContainerEntryFileUids; $receiver.cijConversionParams = _tmp_cijConversionParams; return $receiver; }; } function ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda$lambda(_result) { return mapRows(_result, ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda; Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda(this$ContainerImportJobDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContainerImportJobDao_JdbcKt = this$ContainerImportJobDao_JdbcKt_0; } Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda; Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContainerImportJobDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ContainerImportJob \n | WHERE cijJobStatus = 4\n | AND (NOT cijImportCompleted OR \n | (SELECT connectivityState \n | FROM ConnectivityStatus)\n | IN (3, 4))\n | LIMIT 10\n ')), ContainerImportJobDao_JdbcKt$findJobs$lambda$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$findJobs$lambda(this$ContainerImportJobDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$findJobs$lambda(this$ContainerImportJobDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerImportJobDao_JdbcKt.prototype.findJobs = function () { return new LiveDataImpl(this._db, listOf(['ContainerImportJob', 'ConnectivityStatus']), ContainerImportJobDao_JdbcKt$findJobs$lambda(this)); }; function Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda(closure$uploadJobId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uploadJobId = closure$uploadJobId_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda; Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uploadJobId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda(closure$uploadJobId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda(closure$uploadJobId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$setStatusToQueueAsync_s8cxhz$($this, uploadJobId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uploadJobId = uploadJobId_0; } Coroutine$setStatusToQueueAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$setStatusToQueueAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$setStatusToQueueAsync_s8cxhz$.prototype.constructor = Coroutine$setStatusToQueueAsync_s8cxhz$; Coroutine$setStatusToQueueAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig('UPDATE ContainerImportJob SET cijJobStatus = 4 WHERE cijUid = ? AND cijJobStatus = 0'), ContainerImportJobDao_JdbcKt$setStatusToQueueAsync$lambda(this.local$uploadJobId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerImportJobDao_JdbcKt.prototype.setStatusToQueueAsync_s8cxhz$ = function (uploadJobId_0, continuation_0, suspended) { var instance = new Coroutine$setStatusToQueueAsync_s8cxhz$(this, uploadJobId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerImportJobDao_JdbcKt$updateProgress$lambda(closure$progress, closure$contentLength, closure$uploadJobId) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$progress); _stmt.setLong_6svq3l$(2, closure$contentLength); _stmt.setLong_6svq3l$(3, closure$uploadJobId); return _stmt.executeUpdate(); }; } ContainerImportJobDao_JdbcKt.prototype.updateProgress_b9bd0d$ = function (progress, contentLength, uploadJobId) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('UPDATE ContainerImportJob SET cijBytesSoFar = ?, cijContentLength = ? WHERE cijUid = ?'), ContainerImportJobDao_JdbcKt$updateProgress$lambda(progress, contentLength, uploadJobId)); }; function ContainerImportJobDao_JdbcKt$updateStatus$lambda(closure$status, closure$uploadJobId) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$status); _stmt.setLong_6svq3l$(2, closure$uploadJobId); return _stmt.executeUpdate(); }; } ContainerImportJobDao_JdbcKt.prototype.updateStatus_6svq3l$ = function (status, uploadJobId) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('UPDATE ContainerImportJob SET cijJobStatus = ? WHERE cijUid = ?'), ContainerImportJobDao_JdbcKt$updateStatus$lambda(status, uploadJobId)); }; function ContainerImportJobDao_JdbcKt$updateImportComplete$lambda(closure$importCompleted, closure$containerUid, closure$importJobUid) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$importCompleted); _stmt.setLong_6svq3l$(2, closure$containerUid); _stmt.setLong_6svq3l$(3, closure$importJobUid); return _stmt.executeUpdate(); }; } ContainerImportJobDao_JdbcKt.prototype.updateImportComplete_vhff2t$ = function (importCompleted, containerUid, importJobUid) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |UPDATE ContainerImportJob \n | SET cijImportCompleted = ?,\n | cijContainerUid = ?\n | WHERE cijUid = ?\n ')), ContainerImportJobDao_JdbcKt$updateImportComplete$lambda(importCompleted, containerUid, importJobUid)); }; function ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getString_za3lpa$(1); }; } function ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda$lambda$lambda(_result)); } function Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda(closure$importJobUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$importJobUid = closure$importJobUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda; Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$importJobUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda(closure$importJobUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda(closure$importJobUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerImportJobDao_JdbcKt.prototype.getTitleOfEntry_s8cxhz$ = function (importJobUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT ContentEntry.title FROM ContainerImportJob LEFT JOIN ContentEntry ON ContainerImportJob.cijContentEntryUid = ContentEntry.contentEntryUid WHERE ContainerImportJob.cijUid = ?'), ContainerImportJobDao_JdbcKt$getTitleOfEntry$lambda(importJobUid), continuation); }; function ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cijUid = closure$_result.getLong_61zpoe$('cijUid'); var _tmp_cijContainerUid = closure$_result.getLong_61zpoe$('cijContainerUid'); var _tmp_cijUri = closure$_result.getString_61zpoe$('cijUri'); var _tmp_cijImportMode = closure$_result.getInt_61zpoe$('cijImportMode'); var _tmp_cijContainerBaseDir = closure$_result.getString_61zpoe$('cijContainerBaseDir'); var _tmp_cijContentEntryUid = closure$_result.getLong_61zpoe$('cijContentEntryUid'); var _tmp_cijMimeType = closure$_result.getString_61zpoe$('cijMimeType'); var _tmp_cijSessionId = closure$_result.getString_61zpoe$('cijSessionId'); var _tmp_cijJobStatus = closure$_result.getInt_61zpoe$('cijJobStatus'); var _tmp_cijBytesSoFar = closure$_result.getLong_61zpoe$('cijBytesSoFar'); var _tmp_cijImportCompleted = closure$_result.getBoolean_61zpoe$('cijImportCompleted'); var _tmp_cijContentLength = closure$_result.getLong_61zpoe$('cijContentLength'); var _tmp_cijContainerEntryFileUids = closure$_result.getString_61zpoe$('cijContainerEntryFileUids'); var _tmp_cijConversionParams = closure$_result.getString_61zpoe$('cijConversionParams'); var $receiver = new ContainerImportJob(); $receiver.cijUid = _tmp_cijUid; $receiver.cijContainerUid = _tmp_cijContainerUid; $receiver.cijUri = _tmp_cijUri; $receiver.cijImportMode = _tmp_cijImportMode; $receiver.cijContainerBaseDir = _tmp_cijContainerBaseDir; $receiver.cijContentEntryUid = _tmp_cijContentEntryUid; $receiver.cijMimeType = _tmp_cijMimeType; $receiver.cijSessionId = _tmp_cijSessionId; $receiver.cijJobStatus = _tmp_cijJobStatus; $receiver.cijBytesSoFar = _tmp_cijBytesSoFar; $receiver.cijImportCompleted = _tmp_cijImportCompleted; $receiver.cijContentLength = _tmp_cijContentLength; $receiver.cijContainerEntryFileUids = _tmp_cijContainerEntryFileUids; $receiver.cijConversionParams = _tmp_cijConversionParams; return $receiver; }; } function ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda(closure$importJobUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$importJobUid = closure$importJobUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda; Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$importJobUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda(closure$importJobUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda(closure$importJobUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda(this$ContainerImportJobDao_JdbcKt_0, closure$importJobUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContainerImportJobDao_JdbcKt = this$ContainerImportJobDao_JdbcKt_0; this.local$closure$importJobUid = closure$importJobUid_0; } Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda; Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContainerImportJobDao_JdbcKt._db, new PreparedStatementConfig('SELECT * From ContainerImportJob WHERE ContainerImportJob.cijUid = ?'), ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda$lambda(this.local$closure$importJobUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda(this$ContainerImportJobDao_JdbcKt_0, closure$importJobUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda(this$ContainerImportJobDao_JdbcKt_0, closure$importJobUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContainerImportJobDao_JdbcKt.prototype.getImportJobLiveData_s8cxhz$ = function (importJobUid) { return new LiveDataImpl(this._db, listOf_0('ContainerImportJob'), ContainerImportJobDao_JdbcKt$getImportJobLiveData$lambda(this, importJobUid)); }; function Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda(closure$sessionId_0, closure$importJobUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$sessionId = closure$sessionId_0; this.local$closure$importJobUid = closure$importJobUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda.prototype.constructor = Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda; Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$sessionId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$importJobUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContainerImportJobDao_JdbcKt$updateSessionId$lambda(closure$sessionId_0, closure$importJobUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContainerImportJobDao_JdbcKt$updateSessionId$lambda(closure$sessionId_0, closure$importJobUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateSessionId_a4hdmt$($this, importJobUid_0, sessionId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$importJobUid = importJobUid_0; this.local$sessionId = sessionId_0; } Coroutine$updateSessionId_a4hdmt$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateSessionId_a4hdmt$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateSessionId_a4hdmt$.prototype.constructor = Coroutine$updateSessionId_a4hdmt$; Coroutine$updateSessionId_a4hdmt$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig('UPDATE ContainerImportJob SET cijSessionId = ? WHERE cijUid = ?'), ContainerImportJobDao_JdbcKt$updateSessionId$lambda(this.local$sessionId, this.local$importJobUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContainerImportJobDao_JdbcKt.prototype.updateSessionId_a4hdmt$ = function (importJobUid_0, sessionId_0, continuation_0, suspended) { var instance = new Coroutine$updateSessionId_a4hdmt$(this, importJobUid_0, sessionId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContainerImportJob (cijUid, cijContainerUid, cijUri, cijImportMode, cijContainerBaseDir, cijContentEntryUid, cijMimeType, cijSessionId, cijJobStatus, cijBytesSoFar, cijImportCompleted, cijContentLength, cijContainerEntryFileUids, cijConversionParams) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cijUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cijUid); } stmt.setLong_6svq3l$(2, entity.cijContainerUid); stmt.setString_vqvrqt$(3, entity.cijUri); stmt.setInt_vux9f0$(4, entity.cijImportMode); stmt.setString_vqvrqt$(5, entity.cijContainerBaseDir); stmt.setLong_6svq3l$(6, entity.cijContentEntryUid); stmt.setString_vqvrqt$(7, entity.cijMimeType); stmt.setString_vqvrqt$(8, entity.cijSessionId); stmt.setInt_vux9f0$(9, entity.cijJobStatus); stmt.setLong_6svq3l$(10, entity.cijBytesSoFar); stmt.setBoolean_fzusl$(11, entity.cijImportCompleted); stmt.setLong_6svq3l$(12, entity.cijContentLength); stmt.setString_vqvrqt$(13, entity.cijContainerEntryFileUids); stmt.setString_vqvrqt$(14, entity.cijConversionParams); }; ContainerImportJobDao_JdbcKt$_insertAdapterContainerImportJob_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContainerImportJobDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerImportJobDao_JdbcKt', interfaces: [ContainerImportJobDao]}; function ContentCategoryDao() { } ContentCategoryDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategoryDao', interfaces: [BaseDao]}; function ContentCategoryDao_JdbcKt(_db) { ContentCategoryDao.call(this); this._db = _db; this._insertAdapterContentCategory_ = new ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral(this._db); } ContentCategoryDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentCategory_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_41($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_41.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_41.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_41.prototype.constructor = Coroutine$insertAsync_41; Coroutine$insertAsync_41.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentCategory_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_41(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategoryDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentCategory_.insertList_4ezy5m$(entityList); }; function ContentCategoryDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.ctnCatContentCategorySchemaUid); _stmt.setString_vqvrqt$(2, _entity.name); _stmt.setLong_6svq3l$(3, _entity.contentCategoryLocalChangeSeqNum); _stmt.setLong_6svq3l$(4, _entity.contentCategoryMasterChangeSeqNum); _stmt.setInt_vux9f0$(5, _entity.contentCategoryLastChangedBy); _stmt.setLong_6svq3l$(6, _entity.contentCategoryLct); _stmt.setLong_6svq3l$(7, _entity.contentCategoryUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentCategoryDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentCategory SET ctnCatContentCategorySchemaUid = ?, name = ?, contentCategoryLocalChangeSeqNum = ?, contentCategoryMasterChangeSeqNum = ?, contentCategoryLastChangedBy = ?, contentCategoryLct = ? WHERE contentCategoryUid = ?'; prepareAndUseStatement(this._db, _sql, ContentCategoryDao_JdbcKt$updateList$lambda(entityList)); }; function ContentCategoryDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.ctnCatContentCategorySchemaUid); _stmt.setString_vqvrqt$(2, closure$entity.name); _stmt.setLong_6svq3l$(3, closure$entity.contentCategoryLocalChangeSeqNum); _stmt.setLong_6svq3l$(4, closure$entity.contentCategoryMasterChangeSeqNum); _stmt.setInt_vux9f0$(5, closure$entity.contentCategoryLastChangedBy); _stmt.setLong_6svq3l$(6, closure$entity.contentCategoryLct); _stmt.setLong_6svq3l$(7, closure$entity.contentCategoryUid); return _stmt.executeUpdate(); }; } ContentCategoryDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentCategory SET ctnCatContentCategorySchemaUid = ?, name = ?, contentCategoryLocalChangeSeqNum = ?, contentCategoryMasterChangeSeqNum = ?, contentCategoryLastChangedBy = ?, contentCategoryLct = ? WHERE contentCategoryUid = ?'; prepareAndUseStatement(this._db, _sql, ContentCategoryDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_35($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_35.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_35.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_35.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_35; Coroutine$replicateOnNewNode_s8cxhz$_35.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentCategoryReplicate(ccPk, ccDestination)\n | SELECT DISTINCT ContentCategory.contentCategoryUid AS ccPk,\n | ? AS ccDestination\n | FROM ContentCategory\n | WHERE ContentCategory.contentCategoryLct != COALESCE(\n | (SELECT ccVersionId\n | FROM ContentCategoryReplicate\n | WHERE ccPk = ContentCategory.contentCategoryUid\n | AND ccDestination = ?), 0) \n | /*psql ON CONFLICT(ccPk, ccDestination) DO UPDATE\n | SET ccPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentCategoryReplicate(ccPk, ccDestination)\n | SELECT DISTINCT ContentCategory.contentCategoryUid AS ccPk,\n | ? AS ccDestination\n | FROM ContentCategory\n | WHERE ContentCategory.contentCategoryLct != COALESCE(\n | (SELECT ccVersionId\n | FROM ContentCategoryReplicate\n | WHERE ccPk = ContentCategory.contentCategoryUid\n | AND ccDestination = ?), 0) \n | ON CONFLICT(ccPk, ccDestination) DO UPDATE\n | SET ccPending = true\n | \n | \n |')), ContentCategoryDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_35(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentCategoryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentCategoryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_32($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_32.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_32.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_32.prototype.constructor = Coroutine$replicateOnChange_32; Coroutine$replicateOnChange_32.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentCategoryReplicate(ccPk, ccDestination)\n | SELECT DISTINCT ContentCategory.contentCategoryUid AS ccUid,\n | UserSession.usClientNodeId AS ccDestination\n | FROM ChangeLog\n | JOIN ContentCategory\n | ON ChangeLog.chTableId = 1\n | AND ChangeLog.chEntityPk = ContentCategory.contentCategoryUid\n | JOIN UserSession \n | ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentCategory.contentCategoryLct != COALESCE(\n | (SELECT ccVersionId\n | FROM ContentCategoryReplicate\n | WHERE ccPk = ContentCategory.contentCategoryUid\n | AND ccDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ccPk, ccDestination) DO UPDATE\n | SET ccPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentCategoryReplicate(ccPk, ccDestination)\n | SELECT DISTINCT ContentCategory.contentCategoryUid AS ccUid,\n | UserSession.usClientNodeId AS ccDestination\n | FROM ChangeLog\n | JOIN ContentCategory\n | ON ChangeLog.chTableId = 1\n | AND ChangeLog.chEntityPk = ContentCategory.contentCategoryUid\n | JOIN UserSession \n | ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentCategory.contentCategoryLct != COALESCE(\n | (SELECT ccVersionId\n | FROM ContentCategoryReplicate\n | WHERE ccPk = ContentCategory.contentCategoryUid\n | AND ccDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ccPk, ccDestination) DO UPDATE\n | SET ccPending = true\n | \n | \n |')), ContentCategoryDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_32(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentCategoryDao_JdbcKt$publicContentCategories$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentCategoryUid = closure$_result.getLong_61zpoe$('contentCategoryUid'); var _tmp_ctnCatContentCategorySchemaUid = closure$_result.getLong_61zpoe$('ctnCatContentCategorySchemaUid'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_contentCategoryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentCategoryLocalChangeSeqNum'); var _tmp_contentCategoryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentCategoryMasterChangeSeqNum'); var _tmp_contentCategoryLastChangedBy = closure$_result.getInt_61zpoe$('contentCategoryLastChangedBy'); var _tmp_contentCategoryLct = closure$_result.getLong_61zpoe$('contentCategoryLct'); var $receiver = new ContentCategory(); $receiver.contentCategoryUid = _tmp_contentCategoryUid; $receiver.ctnCatContentCategorySchemaUid = _tmp_ctnCatContentCategorySchemaUid; $receiver.name = _tmp_name; $receiver.contentCategoryLocalChangeSeqNum = _tmp_contentCategoryLocalChangeSeqNum; $receiver.contentCategoryMasterChangeSeqNum = _tmp_contentCategoryMasterChangeSeqNum; $receiver.contentCategoryLastChangedBy = _tmp_contentCategoryLastChangedBy; $receiver.contentCategoryLct = _tmp_contentCategoryLct; return $receiver; }; } function ContentCategoryDao_JdbcKt$publicContentCategories$lambda$lambda(_result) { return mapRows(_result, ContentCategoryDao_JdbcKt$publicContentCategories$lambda$lambda$lambda(_result)); } function ContentCategoryDao_JdbcKt$publicContentCategories$lambda(_stmt) { return useResults(_stmt.executeQuery(), ContentCategoryDao_JdbcKt$publicContentCategories$lambda$lambda); } ContentCategoryDao_JdbcKt.prototype.publicContentCategories = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT ContentCategory.* FROM ContentCategory'), ContentCategoryDao_JdbcKt$publicContentCategories$lambda); }; function ContentCategoryDao_JdbcKt$findCategoryBySchemaIdAndName$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentCategoryUid = closure$_result.getLong_61zpoe$('contentCategoryUid'); var _tmp_ctnCatContentCategorySchemaUid = closure$_result.getLong_61zpoe$('ctnCatContentCategorySchemaUid'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_contentCategoryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentCategoryLocalChangeSeqNum'); var _tmp_contentCategoryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentCategoryMasterChangeSeqNum'); var _tmp_contentCategoryLastChangedBy = closure$_result.getInt_61zpoe$('contentCategoryLastChangedBy'); var _tmp_contentCategoryLct = closure$_result.getLong_61zpoe$('contentCategoryLct'); var $receiver = new ContentCategory(); $receiver.contentCategoryUid = _tmp_contentCategoryUid; $receiver.ctnCatContentCategorySchemaUid = _tmp_ctnCatContentCategorySchemaUid; $receiver.name = _tmp_name; $receiver.contentCategoryLocalChangeSeqNum = _tmp_contentCategoryLocalChangeSeqNum; $receiver.contentCategoryMasterChangeSeqNum = _tmp_contentCategoryMasterChangeSeqNum; $receiver.contentCategoryLastChangedBy = _tmp_contentCategoryLastChangedBy; $receiver.contentCategoryLct = _tmp_contentCategoryLct; return $receiver; }; } function ContentCategoryDao_JdbcKt$findCategoryBySchemaIdAndName$lambda$lambda(_result) { return mapNextRow(_result, null, ContentCategoryDao_JdbcKt$findCategoryBySchemaIdAndName$lambda$lambda$lambda(_result)); } function ContentCategoryDao_JdbcKt$findCategoryBySchemaIdAndName$lambda(closure$schemaId, closure$name) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$schemaId); _stmt.setString_vqvrqt$(2, closure$name); return useResults(_stmt.executeQuery(), ContentCategoryDao_JdbcKt$findCategoryBySchemaIdAndName$lambda$lambda); }; } ContentCategoryDao_JdbcKt.prototype.findCategoryBySchemaIdAndName_a4hdmt$ = function (schemaId, name) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContentCategory WHERE ctnCatContentCategorySchemaUid = ? AND name = ?'), ContentCategoryDao_JdbcKt$findCategoryBySchemaIdAndName$lambda(schemaId, name)); }; function ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContentCategory (contentCategoryUid, ctnCatContentCategorySchemaUid, name, contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy, contentCategoryLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; }; ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.contentCategoryUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.contentCategoryUid); } stmt.setLong_6svq3l$(2, entity.ctnCatContentCategorySchemaUid); stmt.setString_vqvrqt$(3, entity.name); stmt.setLong_6svq3l$(4, entity.contentCategoryLocalChangeSeqNum); stmt.setLong_6svq3l$(5, entity.contentCategoryMasterChangeSeqNum); stmt.setInt_vux9f0$(6, entity.contentCategoryLastChangedBy); stmt.setLong_6svq3l$(7, entity.contentCategoryLct); }; ContentCategoryDao_JdbcKt$_insertAdapterContentCategory_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentCategoryDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategoryDao_JdbcKt', interfaces: [ContentCategoryDao]}; function ContentCategoryDao_ReplicateWrapper(_db, _dao) { ContentCategoryDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_36($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_36.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_36.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_36.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_36; Coroutine$replicateOnNewNode_s8cxhz$_36.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_36(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_33($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_33.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_33.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_33.prototype.constructor = Coroutine$replicateOnChange_33; Coroutine$replicateOnChange_33.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_33(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategoryDao_ReplicateWrapper.prototype.publicContentCategories = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategoryDao_ReplicateWrapper.prototype.findCategoryBySchemaIdAndName_a4hdmt$ = function (schemaId, name) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategoryDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_42($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_42.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_42.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_42.prototype.constructor = Coroutine$insertAsync_42; Coroutine$insertAsync_42.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.contentCategoryUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(1, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.contentCategoryUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.contentCategoryLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.contentCategoryUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_42(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategoryDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategoryDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategoryDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategoryDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategoryDao_ReplicateWrapper', interfaces: [ContentCategoryDao]}; function ContentCategoryDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentCategoryDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_37($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_37.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_37.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_37.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_37; Coroutine$replicateOnNewNode_s8cxhz$_37.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_37(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_34($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_34.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_34.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_34.prototype.constructor = Coroutine$replicateOnChange_34; Coroutine$replicateOnChange_34.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_34(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategoryDao_Repo.prototype.publicContentCategories = function () { var _result = this._dao.publicContentCategories(); return _result; }; ContentCategoryDao_Repo.prototype.findCategoryBySchemaIdAndName_a4hdmt$ = function (schemaId, name) { var _result = this._dao.findCategoryBySchemaIdAndName_a4hdmt$(schemaId, name); return _result; }; ContentCategoryDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_43($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_43.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_43.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_43.prototype.constructor = Coroutine$insertAsync_43; Coroutine$insertAsync_43.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategoryDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_43(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategoryDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentCategoryDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentCategoryDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContentCategoryDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategoryDao_Repo', interfaces: [ContentCategoryDao]}; function ContentCategorySchemaDao() { } ContentCategorySchemaDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategorySchemaDao', interfaces: [BaseDao]}; function ContentCategorySchemaDao_JdbcKt(_db) { ContentCategorySchemaDao.call(this); this._db = _db; this._insertAdapterContentCategorySchema_ = new ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral(this._db); } ContentCategorySchemaDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentCategorySchema_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_44($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_44.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_44.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_44.prototype.constructor = Coroutine$insertAsync_44; Coroutine$insertAsync_44.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentCategorySchema_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_44(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategorySchemaDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentCategorySchema_.insertList_4ezy5m$(entityList); }; function ContentCategorySchemaDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.schemaName); _stmt.setString_vqvrqt$(2, _entity.schemaUrl); _stmt.setLong_6svq3l$(3, _entity.contentCategorySchemaLocalChangeSeqNum); _stmt.setLong_6svq3l$(4, _entity.contentCategorySchemaMasterChangeSeqNum); _stmt.setInt_vux9f0$(5, _entity.contentCategorySchemaLastChangedBy); _stmt.setLong_6svq3l$(6, _entity.contentCategorySchemaLct); _stmt.setLong_6svq3l$(7, _entity.contentCategorySchemaUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentCategorySchemaDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentCategorySchema SET schemaName = ?, schemaUrl = ?, contentCategorySchemaLocalChangeSeqNum = ?, contentCategorySchemaMasterChangeSeqNum = ?, contentCategorySchemaLastChangedBy = ?, contentCategorySchemaLct = ? WHERE contentCategorySchemaUid = ?'; prepareAndUseStatement(this._db, _sql, ContentCategorySchemaDao_JdbcKt$updateList$lambda(entityList)); }; function ContentCategorySchemaDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.schemaName); _stmt.setString_vqvrqt$(2, closure$entity.schemaUrl); _stmt.setLong_6svq3l$(3, closure$entity.contentCategorySchemaLocalChangeSeqNum); _stmt.setLong_6svq3l$(4, closure$entity.contentCategorySchemaMasterChangeSeqNum); _stmt.setInt_vux9f0$(5, closure$entity.contentCategorySchemaLastChangedBy); _stmt.setLong_6svq3l$(6, closure$entity.contentCategorySchemaLct); _stmt.setLong_6svq3l$(7, closure$entity.contentCategorySchemaUid); return _stmt.executeUpdate(); }; } ContentCategorySchemaDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentCategorySchema SET schemaName = ?, schemaUrl = ?, contentCategorySchemaLocalChangeSeqNum = ?, contentCategorySchemaMasterChangeSeqNum = ?, contentCategorySchemaLastChangedBy = ?, contentCategorySchemaLct = ? WHERE contentCategorySchemaUid = ?'; prepareAndUseStatement(this._db, _sql, ContentCategorySchemaDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_38($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_38.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_38.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_38.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_38; Coroutine$replicateOnNewNode_s8cxhz$_38.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentCategorySchemaReplicate(ccsPk, ccsDestination)\n | SELECT DISTINCT ContentCategorySchema.contentCategorySchemaUid AS ccsPk,\n | ? AS ccsDestination\n | FROM ContentCategorySchema\n | WHERE ContentCategorySchema.contentCategorySchemaLct != COALESCE(\n | (SELECT ccsVersionId\n | FROM ContentCategorySchemaReplicate\n | WHERE ccsPk = ContentCategorySchema.contentCategorySchemaUid\n | AND ccsDestination = ?), 0) \n | /*psql ON CONFLICT(ccsPk, ccsDestination) DO UPDATE\n | SET ccsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentCategorySchemaReplicate(ccsPk, ccsDestination)\n | SELECT DISTINCT ContentCategorySchema.contentCategorySchemaUid AS ccsPk,\n | ? AS ccsDestination\n | FROM ContentCategorySchema\n | WHERE ContentCategorySchema.contentCategorySchemaLct != COALESCE(\n | (SELECT ccsVersionId\n | FROM ContentCategorySchemaReplicate\n | WHERE ccsPk = ContentCategorySchema.contentCategorySchemaUid\n | AND ccsDestination = ?), 0) \n | ON CONFLICT(ccsPk, ccsDestination) DO UPDATE\n | SET ccsPending = true\n | \n | \n |')), ContentCategorySchemaDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_38(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_35($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_35.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_35.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_35.prototype.constructor = Coroutine$replicateOnChange_35; Coroutine$replicateOnChange_35.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentCategorySchemaReplicate(ccsPk, ccsDestination)\n | SELECT DISTINCT ContentCategorySchema.contentCategorySchemaUid AS ccsUid,\n | UserSession.usClientNodeId AS ccsDestination\n | FROM ChangeLog\n | JOIN ContentCategorySchema\n | ON ChangeLog.chTableId = 2\n | AND ChangeLog.chEntityPk = ContentCategorySchema.contentCategorySchemaUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentCategorySchema.contentCategorySchemaLct != COALESCE(\n | (SELECT ccsVersionId\n | FROM ContentCategorySchemaReplicate\n | WHERE ccsPk = ContentCategorySchema.contentCategorySchemaUid\n | AND ccsDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ccsPk, ccsDestination) DO UPDATE\n | SET ccsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentCategorySchemaReplicate(ccsPk, ccsDestination)\n | SELECT DISTINCT ContentCategorySchema.contentCategorySchemaUid AS ccsUid,\n | UserSession.usClientNodeId AS ccsDestination\n | FROM ChangeLog\n | JOIN ContentCategorySchema\n | ON ChangeLog.chTableId = 2\n | AND ChangeLog.chEntityPk = ContentCategorySchema.contentCategorySchemaUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentCategorySchema.contentCategorySchemaLct != COALESCE(\n | (SELECT ccsVersionId\n | FROM ContentCategorySchemaReplicate\n | WHERE ccsPk = ContentCategorySchema.contentCategorySchemaUid\n | AND ccsDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ccsPk, ccsDestination) DO UPDATE\n | SET ccsPending = true\n | \n | \n |')), ContentCategorySchemaDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_35(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentCategorySchemaDao_JdbcKt$publicContentCategorySchemas$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentCategorySchemaUid = closure$_result.getLong_61zpoe$('contentCategorySchemaUid'); var _tmp_schemaName = closure$_result.getString_61zpoe$('schemaName'); var _tmp_schemaUrl = closure$_result.getString_61zpoe$('schemaUrl'); var _tmp_contentCategorySchemaLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentCategorySchemaLocalChangeSeqNum'); var _tmp_contentCategorySchemaMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentCategorySchemaMasterChangeSeqNum'); var _tmp_contentCategorySchemaLastChangedBy = closure$_result.getInt_61zpoe$('contentCategorySchemaLastChangedBy'); var _tmp_contentCategorySchemaLct = closure$_result.getLong_61zpoe$('contentCategorySchemaLct'); var $receiver = new ContentCategorySchema(); $receiver.contentCategorySchemaUid = _tmp_contentCategorySchemaUid; $receiver.schemaName = _tmp_schemaName; $receiver.schemaUrl = _tmp_schemaUrl; $receiver.contentCategorySchemaLocalChangeSeqNum = _tmp_contentCategorySchemaLocalChangeSeqNum; $receiver.contentCategorySchemaMasterChangeSeqNum = _tmp_contentCategorySchemaMasterChangeSeqNum; $receiver.contentCategorySchemaLastChangedBy = _tmp_contentCategorySchemaLastChangedBy; $receiver.contentCategorySchemaLct = _tmp_contentCategorySchemaLct; return $receiver; }; } function ContentCategorySchemaDao_JdbcKt$publicContentCategorySchemas$lambda$lambda(_result) { return mapRows(_result, ContentCategorySchemaDao_JdbcKt$publicContentCategorySchemas$lambda$lambda$lambda(_result)); } function ContentCategorySchemaDao_JdbcKt$publicContentCategorySchemas$lambda(_stmt) { return useResults(_stmt.executeQuery(), ContentCategorySchemaDao_JdbcKt$publicContentCategorySchemas$lambda$lambda); } ContentCategorySchemaDao_JdbcKt.prototype.publicContentCategorySchemas = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT ContentCategorySchema.* FROM ContentCategorySchema'), ContentCategorySchemaDao_JdbcKt$publicContentCategorySchemas$lambda); }; function ContentCategorySchemaDao_JdbcKt$findBySchemaUrl$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentCategorySchemaUid = closure$_result.getLong_61zpoe$('contentCategorySchemaUid'); var _tmp_schemaName = closure$_result.getString_61zpoe$('schemaName'); var _tmp_schemaUrl = closure$_result.getString_61zpoe$('schemaUrl'); var _tmp_contentCategorySchemaLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentCategorySchemaLocalChangeSeqNum'); var _tmp_contentCategorySchemaMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentCategorySchemaMasterChangeSeqNum'); var _tmp_contentCategorySchemaLastChangedBy = closure$_result.getInt_61zpoe$('contentCategorySchemaLastChangedBy'); var _tmp_contentCategorySchemaLct = closure$_result.getLong_61zpoe$('contentCategorySchemaLct'); var $receiver = new ContentCategorySchema(); $receiver.contentCategorySchemaUid = _tmp_contentCategorySchemaUid; $receiver.schemaName = _tmp_schemaName; $receiver.schemaUrl = _tmp_schemaUrl; $receiver.contentCategorySchemaLocalChangeSeqNum = _tmp_contentCategorySchemaLocalChangeSeqNum; $receiver.contentCategorySchemaMasterChangeSeqNum = _tmp_contentCategorySchemaMasterChangeSeqNum; $receiver.contentCategorySchemaLastChangedBy = _tmp_contentCategorySchemaLastChangedBy; $receiver.contentCategorySchemaLct = _tmp_contentCategorySchemaLct; return $receiver; }; } function ContentCategorySchemaDao_JdbcKt$findBySchemaUrl$lambda$lambda(_result) { return mapNextRow(_result, null, ContentCategorySchemaDao_JdbcKt$findBySchemaUrl$lambda$lambda$lambda(_result)); } function ContentCategorySchemaDao_JdbcKt$findBySchemaUrl$lambda(closure$schemaUrl) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$schemaUrl); return useResults(_stmt.executeQuery(), ContentCategorySchemaDao_JdbcKt$findBySchemaUrl$lambda$lambda); }; } ContentCategorySchemaDao_JdbcKt.prototype.findBySchemaUrl_61zpoe$ = function (schemaUrl) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContentCategorySchema WHERE schemaUrl = ?'), ContentCategorySchemaDao_JdbcKt$findBySchemaUrl$lambda(schemaUrl)); }; function ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContentCategorySchema (contentCategorySchemaUid, schemaName, schemaUrl, contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy, contentCategorySchemaLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; }; ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.contentCategorySchemaUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.contentCategorySchemaUid); } stmt.setString_vqvrqt$(2, entity.schemaName); stmt.setString_vqvrqt$(3, entity.schemaUrl); stmt.setLong_6svq3l$(4, entity.contentCategorySchemaLocalChangeSeqNum); stmt.setLong_6svq3l$(5, entity.contentCategorySchemaMasterChangeSeqNum); stmt.setInt_vux9f0$(6, entity.contentCategorySchemaLastChangedBy); stmt.setLong_6svq3l$(7, entity.contentCategorySchemaLct); }; ContentCategorySchemaDao_JdbcKt$_insertAdapterContentCategorySchema_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentCategorySchemaDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategorySchemaDao_JdbcKt', interfaces: [ContentCategorySchemaDao]}; function ContentCategorySchemaDao_ReplicateWrapper(_db, _dao) { ContentCategorySchemaDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_39($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_39.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_39.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_39.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_39; Coroutine$replicateOnNewNode_s8cxhz$_39.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_39(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_36($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_36.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_36.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_36.prototype.constructor = Coroutine$replicateOnChange_36; Coroutine$replicateOnChange_36.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_36(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.publicContentCategorySchemas = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.findBySchemaUrl_61zpoe$ = function (schemaUrl) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_45($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_45.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_45.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_45.prototype.constructor = Coroutine$insertAsync_45; Coroutine$insertAsync_45.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.contentCategorySchemaUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(2, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.contentCategorySchemaUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.contentCategorySchemaLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.contentCategorySchemaUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_45(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategorySchemaDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentCategorySchemaDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategorySchemaDao_ReplicateWrapper', interfaces: [ContentCategorySchemaDao]}; function ContentCategorySchemaDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentCategorySchemaDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_40($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_40.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_40.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_40.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_40; Coroutine$replicateOnNewNode_s8cxhz$_40.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_40(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_37($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_37.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_37.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_37.prototype.constructor = Coroutine$replicateOnChange_37; Coroutine$replicateOnChange_37.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_37(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategorySchemaDao_Repo.prototype.publicContentCategorySchemas = function () { var _result = this._dao.publicContentCategorySchemas(); return _result; }; ContentCategorySchemaDao_Repo.prototype.findBySchemaUrl_61zpoe$ = function (schemaUrl) { var _result = this._dao.findBySchemaUrl_61zpoe$(schemaUrl); return _result; }; ContentCategorySchemaDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_46($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_46.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_46.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_46.prototype.constructor = Coroutine$insertAsync_46; Coroutine$insertAsync_46.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentCategorySchemaDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_46(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentCategorySchemaDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentCategorySchemaDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentCategorySchemaDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContentCategorySchemaDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategorySchemaDao_Repo', interfaces: [ContentCategorySchemaDao]}; function ContentEntryContentCategoryJoinDao() { } ContentEntryContentCategoryJoinDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryContentCategoryJoinDao', interfaces: [BaseDao]}; function ContentEntryContentCategoryJoinDao_JdbcKt(_db) { ContentEntryContentCategoryJoinDao.call(this); this._db = _db; this._insertAdapterContentEntryContentCategoryJoin_ = new ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral(this._db); } ContentEntryContentCategoryJoinDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentEntryContentCategoryJoin_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_47($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_47.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_47.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_47.prototype.constructor = Coroutine$insertAsync_47; Coroutine$insertAsync_47.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntryContentCategoryJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_47(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryContentCategoryJoinDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentEntryContentCategoryJoin_.insertList_4ezy5m$(entityList); }; function ContentEntryContentCategoryJoinDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.ceccjContentEntryUid); _stmt.setLong_6svq3l$(2, _entity.ceccjContentCategoryUid); _stmt.setLong_6svq3l$(3, _entity.ceccjLocalChangeSeqNum); _stmt.setLong_6svq3l$(4, _entity.ceccjMasterChangeSeqNum); _stmt.setInt_vux9f0$(5, _entity.ceccjLastChangedBy); _stmt.setLong_6svq3l$(6, _entity.ceccjLct); _stmt.setLong_6svq3l$(7, _entity.ceccjUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentEntryContentCategoryJoinDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentEntryContentCategoryJoin SET ceccjContentEntryUid = ?, ceccjContentCategoryUid = ?, ceccjLocalChangeSeqNum = ?, ceccjMasterChangeSeqNum = ?, ceccjLastChangedBy = ?, ceccjLct = ? WHERE ceccjUid = ?'; prepareAndUseStatement(this._db, _sql, ContentEntryContentCategoryJoinDao_JdbcKt$updateList$lambda(entityList)); }; function ContentEntryContentCategoryJoinDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.ceccjContentEntryUid); _stmt.setLong_6svq3l$(2, closure$entity.ceccjContentCategoryUid); _stmt.setLong_6svq3l$(3, closure$entity.ceccjLocalChangeSeqNum); _stmt.setLong_6svq3l$(4, closure$entity.ceccjMasterChangeSeqNum); _stmt.setInt_vux9f0$(5, closure$entity.ceccjLastChangedBy); _stmt.setLong_6svq3l$(6, closure$entity.ceccjLct); _stmt.setLong_6svq3l$(7, closure$entity.ceccjUid); return _stmt.executeUpdate(); }; } ContentEntryContentCategoryJoinDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentEntryContentCategoryJoin SET ceccjContentEntryUid = ?, ceccjContentCategoryUid = ?, ceccjLocalChangeSeqNum = ?, ceccjMasterChangeSeqNum = ?, ceccjLastChangedBy = ?, ceccjLct = ? WHERE ceccjUid = ?'; prepareAndUseStatement(this._db, _sql, ContentEntryContentCategoryJoinDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_41($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_41.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_41.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_41.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_41; Coroutine$replicateOnNewNode_s8cxhz$_41.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryContentCategoryJoinReplicate(ceccjPk, ceccjDestination)\n | SELECT DISTINCT ContentEntryContentCategoryJoin.ceccjUid AS ceccjPk,\n | ? AS ceccjDestination\n | FROM ContentEntryContentCategoryJoin\n | WHERE ContentEntryContentCategoryJoin.ceccjLct != COALESCE(\n | (SELECT ceccjVersionId\n | FROM ContentEntryContentCategoryJoinReplicate\n | WHERE ceccjPk = ContentEntryContentCategoryJoin.ceccjUid\n | AND ceccjDestination = ?), 0) \n | /*psql ON CONFLICT(ceccjPk, ceccjDestination) DO UPDATE\n | SET ceccjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryContentCategoryJoinReplicate(ceccjPk, ceccjDestination)\n | SELECT DISTINCT ContentEntryContentCategoryJoin.ceccjUid AS ceccjPk,\n | ? AS ceccjDestination\n | FROM ContentEntryContentCategoryJoin\n | WHERE ContentEntryContentCategoryJoin.ceccjLct != COALESCE(\n | (SELECT ceccjVersionId\n | FROM ContentEntryContentCategoryJoinReplicate\n | WHERE ceccjPk = ContentEntryContentCategoryJoin.ceccjUid\n | AND ceccjDestination = ?), 0) \n | ON CONFLICT(ceccjPk, ceccjDestination) DO UPDATE\n | SET ceccjPending = true\n | \n | \n |')), ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_41(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_38($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_38.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_38.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_38.prototype.constructor = Coroutine$replicateOnChange_38; Coroutine$replicateOnChange_38.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryContentCategoryJoinReplicate(ceccjPk, ceccjDestination)\n | SELECT DISTINCT ContentEntryContentCategoryJoin.ceccjUid AS ceccjUid,\n | UserSession.usClientNodeId AS ceccjDestination\n | FROM ChangeLog\n | JOIN ContentEntryContentCategoryJoin\n | ON ChangeLog.chTableId = 3\n | AND ChangeLog.chEntityPk = ContentEntryContentCategoryJoin.ceccjUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryContentCategoryJoin.ceccjLct != COALESCE(\n | (SELECT ceccjVersionId\n | FROM ContentEntryContentCategoryJoinReplicate\n | WHERE ceccjPk = ContentEntryContentCategoryJoin.ceccjUid\n | AND ceccjDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ceccjPk, ceccjDestination) DO UPDATE\n | SET ceccjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryContentCategoryJoinReplicate(ceccjPk, ceccjDestination)\n | SELECT DISTINCT ContentEntryContentCategoryJoin.ceccjUid AS ceccjUid,\n | UserSession.usClientNodeId AS ceccjDestination\n | FROM ChangeLog\n | JOIN ContentEntryContentCategoryJoin\n | ON ChangeLog.chTableId = 3\n | AND ChangeLog.chEntityPk = ContentEntryContentCategoryJoin.ceccjUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryContentCategoryJoin.ceccjLct != COALESCE(\n | (SELECT ceccjVersionId\n | FROM ContentEntryContentCategoryJoinReplicate\n | WHERE ceccjPk = ContentEntryContentCategoryJoin.ceccjUid\n | AND ceccjDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ceccjPk, ceccjDestination) DO UPDATE\n | SET ceccjPending = true\n | \n | \n |')), ContentEntryContentCategoryJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_38(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryContentCategoryJoinDao_JdbcKt$publicContentEntryContentCategoryJoins$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_ceccjUid = closure$_result.getLong_61zpoe$('ceccjUid'); var _tmp_ceccjContentEntryUid = closure$_result.getLong_61zpoe$('ceccjContentEntryUid'); var _tmp_ceccjContentCategoryUid = closure$_result.getLong_61zpoe$('ceccjContentCategoryUid'); var _tmp_ceccjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('ceccjLocalChangeSeqNum'); var _tmp_ceccjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('ceccjMasterChangeSeqNum'); var _tmp_ceccjLastChangedBy = closure$_result.getInt_61zpoe$('ceccjLastChangedBy'); var _tmp_ceccjLct = closure$_result.getLong_61zpoe$('ceccjLct'); var $receiver = new ContentEntryContentCategoryJoin(); $receiver.ceccjUid = _tmp_ceccjUid; $receiver.ceccjContentEntryUid = _tmp_ceccjContentEntryUid; $receiver.ceccjContentCategoryUid = _tmp_ceccjContentCategoryUid; $receiver.ceccjLocalChangeSeqNum = _tmp_ceccjLocalChangeSeqNum; $receiver.ceccjMasterChangeSeqNum = _tmp_ceccjMasterChangeSeqNum; $receiver.ceccjLastChangedBy = _tmp_ceccjLastChangedBy; $receiver.ceccjLct = _tmp_ceccjLct; return $receiver; }; } function ContentEntryContentCategoryJoinDao_JdbcKt$publicContentEntryContentCategoryJoins$lambda$lambda(_result) { return mapRows(_result, ContentEntryContentCategoryJoinDao_JdbcKt$publicContentEntryContentCategoryJoins$lambda$lambda$lambda(_result)); } function ContentEntryContentCategoryJoinDao_JdbcKt$publicContentEntryContentCategoryJoins$lambda(_stmt) { return useResults(_stmt.executeQuery(), ContentEntryContentCategoryJoinDao_JdbcKt$publicContentEntryContentCategoryJoins$lambda$lambda); } ContentEntryContentCategoryJoinDao_JdbcKt.prototype.publicContentEntryContentCategoryJoins = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT ContentEntryContentCategoryJoin.* FROM ContentEntryContentCategoryJoin LEFT JOIN ContentEntry ON ContentEntryContentCategoryJoin.ceccjContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntry.publik'), ContentEntryContentCategoryJoinDao_JdbcKt$publicContentEntryContentCategoryJoins$lambda); }; function ContentEntryContentCategoryJoinDao_JdbcKt$findJoinByParentChildUuids$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_ceccjUid = closure$_result.getLong_61zpoe$('ceccjUid'); var _tmp_ceccjContentEntryUid = closure$_result.getLong_61zpoe$('ceccjContentEntryUid'); var _tmp_ceccjContentCategoryUid = closure$_result.getLong_61zpoe$('ceccjContentCategoryUid'); var _tmp_ceccjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('ceccjLocalChangeSeqNum'); var _tmp_ceccjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('ceccjMasterChangeSeqNum'); var _tmp_ceccjLastChangedBy = closure$_result.getInt_61zpoe$('ceccjLastChangedBy'); var _tmp_ceccjLct = closure$_result.getLong_61zpoe$('ceccjLct'); var $receiver = new ContentEntryContentCategoryJoin(); $receiver.ceccjUid = _tmp_ceccjUid; $receiver.ceccjContentEntryUid = _tmp_ceccjContentEntryUid; $receiver.ceccjContentCategoryUid = _tmp_ceccjContentCategoryUid; $receiver.ceccjLocalChangeSeqNum = _tmp_ceccjLocalChangeSeqNum; $receiver.ceccjMasterChangeSeqNum = _tmp_ceccjMasterChangeSeqNum; $receiver.ceccjLastChangedBy = _tmp_ceccjLastChangedBy; $receiver.ceccjLct = _tmp_ceccjLct; return $receiver; }; } function ContentEntryContentCategoryJoinDao_JdbcKt$findJoinByParentChildUuids$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryContentCategoryJoinDao_JdbcKt$findJoinByParentChildUuids$lambda$lambda$lambda(_result)); } function ContentEntryContentCategoryJoinDao_JdbcKt$findJoinByParentChildUuids$lambda(closure$categoryUid, closure$contentEntry) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$categoryUid); _stmt.setLong_6svq3l$(2, closure$contentEntry); return useResults(_stmt.executeQuery(), ContentEntryContentCategoryJoinDao_JdbcKt$findJoinByParentChildUuids$lambda$lambda); }; } ContentEntryContentCategoryJoinDao_JdbcKt.prototype.findJoinByParentChildUuids_3pjtqy$ = function (categoryUid, contentEntry) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * from ContentEntryContentCategoryJoin WHERE ceccjContentCategoryUid = ? AND ceccjContentEntryUid = ?'), ContentEntryContentCategoryJoinDao_JdbcKt$findJoinByParentChildUuids$lambda(categoryUid, contentEntry)); }; function ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContentEntryContentCategoryJoin (ceccjUid, ceccjContentEntryUid, ceccjContentCategoryUid, ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum, ceccjLastChangedBy, ceccjLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; }; ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.ceccjUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.ceccjUid); } stmt.setLong_6svq3l$(2, entity.ceccjContentEntryUid); stmt.setLong_6svq3l$(3, entity.ceccjContentCategoryUid); stmt.setLong_6svq3l$(4, entity.ceccjLocalChangeSeqNum); stmt.setLong_6svq3l$(5, entity.ceccjMasterChangeSeqNum); stmt.setInt_vux9f0$(6, entity.ceccjLastChangedBy); stmt.setLong_6svq3l$(7, entity.ceccjLct); }; ContentEntryContentCategoryJoinDao_JdbcKt$_insertAdapterContentEntryContentCategoryJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentEntryContentCategoryJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryContentCategoryJoinDao_JdbcKt', interfaces: [ContentEntryContentCategoryJoinDao]}; function ContentEntryContentCategoryJoinDao_ReplicateWrapper(_db, _dao) { ContentEntryContentCategoryJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_42($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_42.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_42.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_42.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_42; Coroutine$replicateOnNewNode_s8cxhz$_42.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_42(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_39($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_39.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_39.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_39.prototype.constructor = Coroutine$replicateOnChange_39; Coroutine$replicateOnChange_39.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_39(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.publicContentEntryContentCategoryJoins = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.findJoinByParentChildUuids_3pjtqy$ = function (categoryUid, contentEntry) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_48($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_48.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_48.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_48.prototype.constructor = Coroutine$insertAsync_48; Coroutine$insertAsync_48.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.ceccjUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(3, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.ceccjUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.ceccjLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.ceccjUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_48(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryContentCategoryJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryContentCategoryJoinDao_ReplicateWrapper', interfaces: [ContentEntryContentCategoryJoinDao]}; function ContentEntryContentCategoryJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentEntryContentCategoryJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_43($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_43.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_43.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_43.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_43; Coroutine$replicateOnNewNode_s8cxhz$_43.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_43(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_40($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_40.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_40.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_40.prototype.constructor = Coroutine$replicateOnChange_40; Coroutine$replicateOnChange_40.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_40(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryContentCategoryJoinDao_Repo.prototype.publicContentEntryContentCategoryJoins = function () { var _result = this._dao.publicContentEntryContentCategoryJoins(); return _result; }; ContentEntryContentCategoryJoinDao_Repo.prototype.findJoinByParentChildUuids_3pjtqy$ = function (categoryUid, contentEntry) { var _result = this._dao.findJoinByParentChildUuids_3pjtqy$(categoryUid, contentEntry); return _result; }; ContentEntryContentCategoryJoinDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_49($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_49.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_49.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_49.prototype.constructor = Coroutine$insertAsync_49; Coroutine$insertAsync_49.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryContentCategoryJoinDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_49(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryContentCategoryJoinDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentEntryContentCategoryJoinDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentEntryContentCategoryJoinDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContentEntryContentCategoryJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryContentCategoryJoinDao_Repo', interfaces: [ContentEntryContentCategoryJoinDao]}; function ContentEntryDao() { } ContentEntryDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryDao', interfaces: [BaseDao]}; function ContentEntryDao_JdbcKt(_db) { ContentEntryDao.call(this); this._db = _db; this._insertAdapterContentEntry_ = new ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral(this._db); this._insertAdapterContentEntry_upsert = new ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral(this._db); } function Coroutine$insertListAsync_o4zuk4$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_o4zuk4$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_o4zuk4$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_o4zuk4$.prototype.constructor = Coroutine$insertListAsync_o4zuk4$; Coroutine$insertListAsync_o4zuk4$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntry_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.insertListAsync_o4zuk4$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_o4zuk4$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_JdbcKt.prototype.replaceList_o4zuk4$ = function (entries) { this._insertAdapterContentEntry_upsert.insertList_4ezy5m$(entries); }; ContentEntryDao_JdbcKt.prototype.insertWithReplace_4pedz3$ = function (entry) { this._insertAdapterContentEntry_upsert.insert_11rb$(entry); }; ContentEntryDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentEntry_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_50($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_50.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_50.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_50.prototype.constructor = Coroutine$insertAsync_50; Coroutine$insertAsync_50.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntry_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_50(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentEntry_.insertList_4ezy5m$(entityList); }; function ContentEntryDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.title); _stmt.setString_vqvrqt$(2, closure$entity.description); _stmt.setString_vqvrqt$(3, closure$entity.entryId); _stmt.setString_vqvrqt$(4, closure$entity.author); _stmt.setString_vqvrqt$(5, closure$entity.publisher); _stmt.setInt_vux9f0$(6, closure$entity.licenseType); _stmt.setString_vqvrqt$(7, closure$entity.licenseName); _stmt.setString_vqvrqt$(8, closure$entity.licenseUrl); _stmt.setString_vqvrqt$(9, closure$entity.sourceUrl); _stmt.setString_vqvrqt$(10, closure$entity.thumbnailUrl); _stmt.setLong_6svq3l$(11, closure$entity.lastModified); _stmt.setLong_6svq3l$(12, closure$entity.primaryLanguageUid); _stmt.setLong_6svq3l$(13, closure$entity.languageVariantUid); _stmt.setInt_vux9f0$(14, closure$entity.contentFlags); _stmt.setBoolean_fzusl$(15, closure$entity.leaf); _stmt.setBoolean_fzusl$(16, closure$entity.publik); _stmt.setBoolean_fzusl$(17, closure$entity.ceInactive); _stmt.setInt_vux9f0$(18, closure$entity.completionCriteria); _stmt.setInt_vux9f0$(19, closure$entity.minScore); _stmt.setInt_vux9f0$(20, closure$entity.contentTypeFlag); _stmt.setLong_6svq3l$(21, closure$entity.contentOwner); _stmt.setLong_6svq3l$(22, closure$entity.contentEntryLocalChangeSeqNum); _stmt.setLong_6svq3l$(23, closure$entity.contentEntryMasterChangeSeqNum); _stmt.setInt_vux9f0$(24, closure$entity.contentEntryLastChangedBy); _stmt.setLong_6svq3l$(25, closure$entity.contentEntryLct); _stmt.setLong_6svq3l$(26, closure$entity.contentEntryUid); return _stmt.executeUpdate(); }; } ContentEntryDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentEntry SET title = ?, description = ?, entryId = ?, author = ?, publisher = ?, licenseType = ?, licenseName = ?, licenseUrl = ?, sourceUrl = ?, thumbnailUrl = ?, lastModified = ?, primaryLanguageUid = ?, languageVariantUid = ?, contentFlags = ?, leaf = ?, publik = ?, ceInactive = ?, completionCriteria = ?, minScore = ?, contentTypeFlag = ?, contentOwner = ?, contentEntryLocalChangeSeqNum = ?, contentEntryMasterChangeSeqNum = ?, contentEntryLastChangedBy = ?, contentEntryLct = ? WHERE contentEntryUid = ?'; prepareAndUseStatement(this._db, _sql, ContentEntryDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.title); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.description); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$entity.entryId); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$entity.author); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$entity.publisher); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$entity.licenseType); this.local$_stmt.setString_vqvrqt$(7, this.local$closure$entity.licenseName); this.local$_stmt.setString_vqvrqt$(8, this.local$closure$entity.licenseUrl); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$entity.sourceUrl); this.local$_stmt.setString_vqvrqt$(10, this.local$closure$entity.thumbnailUrl); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$entity.lastModified); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$entity.primaryLanguageUid); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$entity.languageVariantUid); this.local$_stmt.setInt_vux9f0$(14, this.local$closure$entity.contentFlags); this.local$_stmt.setBoolean_fzusl$(15, this.local$closure$entity.leaf); this.local$_stmt.setBoolean_fzusl$(16, this.local$closure$entity.publik); this.local$_stmt.setBoolean_fzusl$(17, this.local$closure$entity.ceInactive); this.local$_stmt.setInt_vux9f0$(18, this.local$closure$entity.completionCriteria); this.local$_stmt.setInt_vux9f0$(19, this.local$closure$entity.minScore); this.local$_stmt.setInt_vux9f0$(20, this.local$closure$entity.contentTypeFlag); this.local$_stmt.setLong_6svq3l$(21, this.local$closure$entity.contentOwner); this.local$_stmt.setLong_6svq3l$(22, this.local$closure$entity.contentEntryLocalChangeSeqNum); this.local$_stmt.setLong_6svq3l$(23, this.local$closure$entity.contentEntryMasterChangeSeqNum); this.local$_stmt.setInt_vux9f0$(24, this.local$closure$entity.contentEntryLastChangedBy); this.local$_stmt.setLong_6svq3l$(25, this.local$closure$entity.contentEntryLct); this.local$_stmt.setLong_6svq3l$(26, this.local$closure$entity.contentEntryUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_4pedz3$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_4pedz3$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_4pedz3$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_4pedz3$.prototype.constructor = Coroutine$updateAsync_4pedz3$; Coroutine$updateAsync_4pedz3$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE ContentEntry SET title = ?, description = ?, entryId = ?, author = ?, publisher = ?, licenseType = ?, licenseName = ?, licenseUrl = ?, sourceUrl = ?, thumbnailUrl = ?, lastModified = ?, primaryLanguageUid = ?, languageVariantUid = ?, contentFlags = ?, leaf = ?, publik = ?, ceInactive = ?, completionCriteria = ?, minScore = ?, contentTypeFlag = ?, contentOwner = ?, contentEntryLocalChangeSeqNum = ?, contentEntryMasterChangeSeqNum = ?, contentEntryLastChangedBy = ?, contentEntryLct = ? WHERE contentEntryUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ContentEntryDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.updateAsync_4pedz3$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_4pedz3$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.title); _stmt.setString_vqvrqt$(2, _entity.description); _stmt.setString_vqvrqt$(3, _entity.entryId); _stmt.setString_vqvrqt$(4, _entity.author); _stmt.setString_vqvrqt$(5, _entity.publisher); _stmt.setInt_vux9f0$(6, _entity.licenseType); _stmt.setString_vqvrqt$(7, _entity.licenseName); _stmt.setString_vqvrqt$(8, _entity.licenseUrl); _stmt.setString_vqvrqt$(9, _entity.sourceUrl); _stmt.setString_vqvrqt$(10, _entity.thumbnailUrl); _stmt.setLong_6svq3l$(11, _entity.lastModified); _stmt.setLong_6svq3l$(12, _entity.primaryLanguageUid); _stmt.setLong_6svq3l$(13, _entity.languageVariantUid); _stmt.setInt_vux9f0$(14, _entity.contentFlags); _stmt.setBoolean_fzusl$(15, _entity.leaf); _stmt.setBoolean_fzusl$(16, _entity.publik); _stmt.setBoolean_fzusl$(17, _entity.ceInactive); _stmt.setInt_vux9f0$(18, _entity.completionCriteria); _stmt.setInt_vux9f0$(19, _entity.minScore); _stmt.setInt_vux9f0$(20, _entity.contentTypeFlag); _stmt.setLong_6svq3l$(21, _entity.contentOwner); _stmt.setLong_6svq3l$(22, _entity.contentEntryLocalChangeSeqNum); _stmt.setLong_6svq3l$(23, _entity.contentEntryMasterChangeSeqNum); _stmt.setInt_vux9f0$(24, _entity.contentEntryLastChangedBy); _stmt.setLong_6svq3l$(25, _entity.contentEntryLct); _stmt.setLong_6svq3l$(26, _entity.contentEntryUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentEntryDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentEntry SET title = ?, description = ?, entryId = ?, author = ?, publisher = ?, licenseType = ?, licenseName = ?, licenseUrl = ?, sourceUrl = ?, thumbnailUrl = ?, lastModified = ?, primaryLanguageUid = ?, languageVariantUid = ?, contentFlags = ?, leaf = ?, publik = ?, ceInactive = ?, completionCriteria = ?, minScore = ?, contentTypeFlag = ?, contentOwner = ?, contentEntryLocalChangeSeqNum = ?, contentEntryMasterChangeSeqNum = ?, contentEntryLastChangedBy = ?, contentEntryLct = ? WHERE contentEntryUid = ?'; prepareAndUseStatement(this._db, _sql, ContentEntryDao_JdbcKt$updateList$lambda(entityList)); }; function Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_44($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_44.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_44.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_44.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_44; Coroutine$replicateOnNewNode_s8cxhz$_44.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryReplicate(cePk, ceDestination)\n | SELECT DISTINCT contentEntryUid AS ceUid,\n | ? AS siteDestination\n | FROM ContentEntry\n | WHERE ContentEntry.contentEntryLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ContentEntryReplicate\n | WHERE cePk = ContentEntry.contentEntryUid\n | AND ceDestination = ?), -1) \n | /*psql ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryReplicate(cePk, ceDestination)\n | SELECT DISTINCT contentEntryUid AS ceUid,\n | ? AS siteDestination\n | FROM ContentEntry\n | WHERE ContentEntry.contentEntryLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ContentEntryReplicate\n | WHERE cePk = ContentEntry.contentEntryUid\n | AND ceDestination = ?), -1) \n | ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | \n | \n |')), ContentEntryDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_44(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_41($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_41.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_41.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_41.prototype.constructor = Coroutine$replicateOnChange_41; Coroutine$replicateOnChange_41.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryReplicate(cePk, ceDestination)\n | SELECT DISTINCT ContentEntry.contentEntryUid AS cePk,\n | UserSession.usClientNodeId AS siteDestination\n | FROM ChangeLog\n | JOIN ContentEntry\n | ON ChangeLog.chTableId = 42\n | AND ChangeLog.chEntityPk = ContentEntry.contentEntryUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntry.contentEntryLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ContentEntryReplicate\n | WHERE cePk = ContentEntry.contentEntryUid\n | AND ceDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryReplicate(cePk, ceDestination)\n | SELECT DISTINCT ContentEntry.contentEntryUid AS cePk,\n | UserSession.usClientNodeId AS siteDestination\n | FROM ChangeLog\n | JOIN ContentEntry\n | ON ChangeLog.chTableId = 42\n | AND ChangeLog.chEntityPk = ContentEntry.contentEntryUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntry.contentEntryLct != COALESCE(\n | (SELECT ceVersionId\n | FROM ContentEntryReplicate\n | WHERE cePk = ContentEntry.contentEntryUid\n | AND ceDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(cePk, ceDestination) DO UPDATE\n | SET cePending = true\n | \n | \n |')), ContentEntryDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_41(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var _tmp_Language_nullCount = 0; var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_name = closure$_result.getString_61zpoe$('name'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_isAllNull = _tmp_Language_nullCount === 11; var $receiver = new ContentEntryWithLanguage(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Language_isAllNull) { var $receiver_0 = new Language(); $receiver_0.langUid = _tmp_langUid; $receiver_0.name = _tmp_name; $receiver_0.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver_0.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver_0.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver_0.Language_Type = _tmp_Language_Type; $receiver_0.languageActive = _tmp_languageActive; $receiver_0.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver_0.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver_0.langLastChangedBy = _tmp_langLastChangedBy; $receiver_0.langLct = _tmp_langLct; $receiver.language = $receiver_0; } return $receiver; }; } function ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda(closure$entryUuid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUuid = closure$entryUuid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUuid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda(closure$entryUuid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda(closure$entryUuid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findEntryWithLanguageByEntryIdAsync_s8cxhz$ = function (entryUuid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT ContentEntry.*, Language.* FROM ContentEntry LEFT JOIN Language ON Language.langUid = ContentEntry.primaryLanguageUid WHERE ContentEntry.contentEntryUid=?'), ContentEntryDao_JdbcKt$findEntryWithLanguageByEntryIdAsync$lambda(entryUuid), continuation); }; function ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var _tmp_Language_nullCount = 0; var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_name = closure$_result.getString_61zpoe$('name'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_isAllNull = _tmp_Language_nullCount === 11; var _tmp_CourseBlock_nullCount = 0; var _tmp_cbUid = closure$_result.getLong_61zpoe$('cbUid'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbType = closure$_result.getInt_61zpoe$('cbType'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbIndentLevel = closure$_result.getInt_61zpoe$('cbIndentLevel'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbModuleParentBlockUid = closure$_result.getLong_61zpoe$('cbModuleParentBlockUid'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbTitle = closure$_result.getString_61zpoe$('cbTitle'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbDescription = closure$_result.getString_61zpoe$('cbDescription'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbCompletionCriteria = closure$_result.getInt_61zpoe$('cbCompletionCriteria'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbHideUntilDate = closure$_result.getLong_61zpoe$('cbHideUntilDate'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbDeadlineDate = closure$_result.getLong_61zpoe$('cbDeadlineDate'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbLateSubmissionPenalty = closure$_result.getInt_61zpoe$('cbLateSubmissionPenalty'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbGracePeriodDate = closure$_result.getLong_61zpoe$('cbGracePeriodDate'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbMaxPoints = closure$_result.getInt_61zpoe$('cbMaxPoints'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbMinPoints = closure$_result.getInt_61zpoe$('cbMinPoints'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbIndex = closure$_result.getInt_61zpoe$('cbIndex'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbClazzUid = closure$_result.getLong_61zpoe$('cbClazzUid'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbActive = closure$_result.getBoolean_61zpoe$('cbActive'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbHidden = closure$_result.getBoolean_61zpoe$('cbHidden'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbEntityUid = closure$_result.getLong_61zpoe$('cbEntityUid'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_cbLct = closure$_result.getLong_61zpoe$('cbLct'); if (closure$_result.wasNull()) { _tmp_CourseBlock_nullCount = _tmp_CourseBlock_nullCount + 1 | 0; } var _tmp_CourseBlock_isAllNull = _tmp_CourseBlock_nullCount === 19; var $receiver = new ContentEntryWithBlockAndLanguage(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Language_isAllNull) { var $receiver_0 = new Language(); $receiver_0.langUid = _tmp_langUid; $receiver_0.name = _tmp_name; $receiver_0.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver_0.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver_0.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver_0.Language_Type = _tmp_Language_Type; $receiver_0.languageActive = _tmp_languageActive; $receiver_0.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver_0.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver_0.langLastChangedBy = _tmp_langLastChangedBy; $receiver_0.langLct = _tmp_langLct; $receiver.language = $receiver_0; } if (!_tmp_CourseBlock_isAllNull) { var $receiver_1 = new CourseBlock(); $receiver_1.cbUid = _tmp_cbUid; $receiver_1.cbType = _tmp_cbType; $receiver_1.cbIndentLevel = _tmp_cbIndentLevel; $receiver_1.cbModuleParentBlockUid = _tmp_cbModuleParentBlockUid; $receiver_1.cbTitle = _tmp_cbTitle; $receiver_1.cbDescription = _tmp_cbDescription; $receiver_1.cbCompletionCriteria = _tmp_cbCompletionCriteria; $receiver_1.cbHideUntilDate = _tmp_cbHideUntilDate; $receiver_1.cbDeadlineDate = _tmp_cbDeadlineDate; $receiver_1.cbLateSubmissionPenalty = _tmp_cbLateSubmissionPenalty; $receiver_1.cbGracePeriodDate = _tmp_cbGracePeriodDate; $receiver_1.cbMaxPoints = _tmp_cbMaxPoints; $receiver_1.cbMinPoints = _tmp_cbMinPoints; $receiver_1.cbIndex = _tmp_cbIndex; $receiver_1.cbClazzUid = _tmp_cbClazzUid; $receiver_1.cbActive = _tmp_cbActive; $receiver_1.cbHidden = _tmp_cbHidden; $receiver_1.cbEntityUid = _tmp_cbEntityUid; $receiver_1.cbLct = _tmp_cbLct; $receiver.block = $receiver_1; } return $receiver; }; } function ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda(closure$entityUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityUid = closure$entityUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda(closure$entityUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda(closure$entityUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findEntryWithBlockAndLanguageByUidAsync_s8cxhz$ = function (entityUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentEntry.*, \n | Language.*,\n | CourseBlock.*\n | FROM ContentEntry\n | LEFT JOIN Language \n | ON Language.langUid = ContentEntry.primaryLanguageUid \n | \n | LEFT JOIN CourseBlock\n | ON CourseBlock.cbType = 104\n | AND CourseBlock.cbEntityUid = ?\n | \n | WHERE ContentEntry.contentEntryUid = ? \n | \n ')), ContentEntryDao_JdbcKt$findEntryWithBlockAndLanguageByUidAsync$lambda(entityUid), continuation); }; function ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var _tmp_Container_nullCount = 0; var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_Container_isAllNull = _tmp_Container_nullCount === 12; var $receiver = new ContentEntryWithMostRecentContainer(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Container_isAllNull) { var $receiver_0 = new Container(); $receiver_0.containerUid = _tmp_containerUid; $receiver_0.cntLocalCsn = _tmp_cntLocalCsn; $receiver_0.cntMasterCsn = _tmp_cntMasterCsn; $receiver_0.cntLastModBy = _tmp_cntLastModBy; $receiver_0.cntLct = _tmp_cntLct; $receiver_0.fileSize = _tmp_fileSize; $receiver_0.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver_0.cntLastModified = _tmp_cntLastModified; $receiver_0.mimeType = _tmp_mimeType; $receiver_0.remarks = _tmp_remarks; $receiver_0.mobileOptimized = _tmp_mobileOptimized; $receiver_0.cntNumEntries = _tmp_cntNumEntries; $receiver.container = $receiver_0; } return $receiver; }; } function ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda(closure$entryUuid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUuid = closure$entryUuid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda; Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUuid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda(closure$entryUuid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda(closure$entryUuid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findEntryWithContainerByEntryId_s8cxhz$ = function (entryUuid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentEntry.*, Container.* FROM ContentEntry LEFT \n | JOIN Container ON Container.containerUid = (\n | SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1) \n | WHERE ContentEntry.contentEntryUid=?\n | \n ')), ContentEntryDao_JdbcKt$findEntryWithContainerByEntryId$lambda(entryUuid), continuation); }; function ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var _tmp_Container_nullCount = 0; var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_Container_isAllNull = _tmp_Container_nullCount === 12; var $receiver = new ContentEntryWithMostRecentContainer(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Container_isAllNull) { var $receiver_0 = new Container(); $receiver_0.containerUid = _tmp_containerUid; $receiver_0.cntLocalCsn = _tmp_cntLocalCsn; $receiver_0.cntMasterCsn = _tmp_cntMasterCsn; $receiver_0.cntLastModBy = _tmp_cntLastModBy; $receiver_0.cntLct = _tmp_cntLct; $receiver_0.fileSize = _tmp_fileSize; $receiver_0.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver_0.cntLastModified = _tmp_cntLastModified; $receiver_0.mimeType = _tmp_mimeType; $receiver_0.remarks = _tmp_remarks; $receiver_0.mobileOptimized = _tmp_mobileOptimized; $receiver_0.cntNumEntries = _tmp_cntNumEntries; $receiver.container = $receiver_0; } return $receiver; }; } function ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda(closure$entryUuid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUuid = closure$entryUuid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUuid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda(closure$entryUuid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda(closure$entryUuid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda(this$ContentEntryDao_JdbcKt_0, closure$entryUuid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$entryUuid = closure$entryUuid_0; } Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda; Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentEntry.*, Container.* FROM ContentEntry LEFT \n | JOIN Container ON Container.containerUid = (\n | SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1) \n | WHERE ContentEntry.contentEntryUid=?\n | \n ')), ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda$lambda(this.local$closure$entryUuid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda(this$ContentEntryDao_JdbcKt_0, closure$entryUuid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda(this$ContentEntryDao_JdbcKt_0, closure$entryUuid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findEntryWithContainerByEntryIdLive_s8cxhz$ = function (entryUuid) { return new LiveDataImpl(this._db, listOf(['ContentEntry', 'Container']), ContentEntryDao_JdbcKt$findEntryWithContainerByEntryIdLive$lambda(this, entryUuid)); }; function ContentEntryDao_JdbcKt$findBySourceUrl$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryDao_JdbcKt$findBySourceUrl$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$findBySourceUrl$lambda$lambda$lambda(_result)); } function ContentEntryDao_JdbcKt$findBySourceUrl$lambda(closure$sourceUrl) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$sourceUrl); return useResults(_stmt.executeQuery(), ContentEntryDao_JdbcKt$findBySourceUrl$lambda$lambda); }; } ContentEntryDao_JdbcKt.prototype.findBySourceUrl_61zpoe$ = function (sourceUrl) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContentEntry WHERE sourceUrl = ? LIMIT 1'), ContentEntryDao_JdbcKt$findBySourceUrl$lambda(sourceUrl)); }; function ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getString_za3lpa$(1); }; } function ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findTitleByUidAsync_s8cxhz$ = function (contentEntryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT title FROM ContentEntry WHERE contentEntryUid = ?'), ContentEntryDao_JdbcKt$findTitleByUidAsync$lambda(contentEntryUid), continuation); }; function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral(this$ContentEntryDao_JdbcKt, closure$parentUid) { this.this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt; this.closure$parentUid = closure$parentUid; DataSourceFactory.call(this); } function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda(closure$parentUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda(closure$parentUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda(closure$parentUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM (SELECT ContentEntry.* FROM ContentEntry LEFT Join ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?) LIMIT ? OFFSET ?'), ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda$lambda(this.local$closure$parentUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin']), ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getData$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$parentUid, _limit, _offset)); }; function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda(closure$parentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda(closure$parentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda(closure$parentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$parentUid = closure$parentUid_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig('SELECT COUNT(*) FROM (SELECT ContentEntry.* FROM ContentEntry LEFT Join ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?) '), ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda$lambda(this.local$closure$parentUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin']), ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral$getLength$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$parentUid)); }; ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ContentEntryDao_JdbcKt.prototype.getChildrenByParentUid_s8cxhz$ = function (parentUid) { return new ContentEntryDao_JdbcKt$getChildrenByParentUid$ObjectLiteral(this, parentUid); }; function ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda(closure$parentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda(closure$parentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda(closure$parentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.getChildrenByParentAsync_s8cxhz$ = function (parentUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentEntry.*\n | FROM ContentEntryParentChildJoin\n | JOIN ContentEntry \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?\n | \n ')), ContentEntryDao_JdbcKt$getChildrenByParentAsync$lambda(parentUid), continuation); }; function ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_mostRecentContainerUid = closure$_result.getLong_61zpoe$('mostRecentContainerUid'); var _tmp_mostRecentContainerSize = closure$_result.getLong_61zpoe$('mostRecentContainerSize'); var $receiver = new ContentEntryContentJobItemParams(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.leaf = _tmp_leaf; $receiver.mostRecentContainerUid = _tmp_mostRecentContainerUid; $receiver.mostRecentContainerSize = _tmp_mostRecentContainerSize; return $receiver; }; } function ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda(closure$parentUid_0, closure$limit_0, closure$offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$limit = closure$limit_0; this.local$closure$offset = closure$offset_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda(closure$parentUid_0, closure$limit_0, closure$offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda(closure$parentUid_0, closure$limit_0, closure$offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.getContentJobItemParamsByParentUid_liip7b$ = function (parentUid, limit, offset, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentEntry.contentEntryUid AS contentEntryUid, ContentEntry.leaf AS leaf, \n | COALESCE(Container.containerUid, 0) AS mostRecentContainerUid,\n | COALESCE(Container.fileSize, 0) AS mostRecentContainerSize\n | FROM ContentEntryParentChildJoin\n | JOIN ContentEntry \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid\n | LEFT JOIN Container\n | ON containerUid = \n | (SELECT COALESCE((\n | SELECT Container.containerUid \n | FROM Container\n | WHERE Container.containerContentEntryUid = ContentEntry.contentEntryUid\n | ORDER BY Container.cntLastModified DESC\n | LIMIT 1),0))\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?\n | LIMIT ?\n | OFFSET ? \n | \n ')), ContentEntryDao_JdbcKt$getContentJobItemParamsByParentUid$lambda(parentUid, limit, offset), continuation); }; function ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda$lambda(_result) { return mapNextRow(_result, 0, ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda(closure$parentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda(closure$parentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda(closure$parentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.getCountNumberOfChildrenByParentUUidAsync_s8cxhz$ = function (parentUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT COUNT(*) FROM ContentEntry LEFT Join ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?'), ContentEntryDao_JdbcKt$getCountNumberOfChildrenByParentUUidAsync$lambda(parentUid), continuation); }; function ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda(closure$parentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda(closure$parentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda(closure$parentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.getContentByUuidAsync_s8cxhz$ = function (parentUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM ContentEntry where contentEntryUid = ? LIMIT 1'), ContentEntryDao_JdbcKt$getContentByUuidAsync$lambda(parentUid), continuation); }; function ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda(closure$entryUuid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUuid = closure$entryUuid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUuid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda(closure$entryUuid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda(closure$entryUuid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findAllLanguageRelatedEntriesAsync_s8cxhz$ = function (entryUuid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT ContentEntry.* FROM ContentEntry LEFT JOIN ContentEntryRelatedEntryJoin ON ContentEntryRelatedEntryJoin.cerejRelatedEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryRelatedEntryJoin.relType = 1 AND ContentEntryRelatedEntryJoin.cerejRelatedEntryUid != ?'), ContentEntryDao_JdbcKt$findAllLanguageRelatedEntriesAsync$lambda(entryUuid), continuation); }; function ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentCategoryUid = closure$_result.getLong_61zpoe$('contentCategoryUid'); var _tmp_categoryName = closure$_result.getString_61zpoe$('categoryName'); var _tmp_contentCategorySchemaUid = closure$_result.getLong_61zpoe$('contentCategorySchemaUid'); var _tmp_schemaName = closure$_result.getString_61zpoe$('schemaName'); var $receiver = new DistinctCategorySchema(); $receiver.contentCategoryUid = _tmp_contentCategoryUid; $receiver.categoryName = _tmp_categoryName; $receiver.contentCategorySchemaUid = _tmp_contentCategorySchemaUid; $receiver.schemaName = _tmp_schemaName; return $receiver; }; } function ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda(closure$parentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda(closure$parentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda(closure$parentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findListOfCategoriesAsync_s8cxhz$ = function (parentUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT DISTINCT ContentCategory.contentCategoryUid, ContentCategory.name AS categoryName, ContentCategorySchema.contentCategorySchemaUid, ContentCategorySchema.schemaName FROM ContentEntry LEFT JOIN ContentEntryContentCategoryJoin ON ContentEntryContentCategoryJoin.ceccjContentEntryUid = ContentEntry.contentEntryUid LEFT JOIN ContentCategory ON ContentCategory.contentCategoryUid = ContentEntryContentCategoryJoin.ceccjContentCategoryUid LEFT JOIN ContentCategorySchema ON ContentCategorySchema.contentCategorySchemaUid = ContentCategory.ctnCatContentCategorySchemaUid LEFT JOIN ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? AND ContentCategory.contentCategoryUid != 0 ORDER BY ContentCategory.name'), ContentEntryDao_JdbcKt$findListOfCategoriesAsync$lambda(parentUid), continuation); }; function ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); var $receiver = new Language(); $receiver.langUid = _tmp_langUid; $receiver.name = _tmp_name; $receiver.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver.Language_Type = _tmp_Language_Type; $receiver.languageActive = _tmp_languageActive; $receiver.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver.langLastChangedBy = _tmp_langLastChangedBy; $receiver.langLct = _tmp_langLct; return $receiver; }; } function ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda(closure$parentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda(closure$parentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda(closure$parentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findUniqueLanguagesInListAsync_s8cxhz$ = function (parentUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT DISTINCT Language.* from Language LEFT JOIN ContentEntry ON ContentEntry.primaryLanguageUid = Language.langUid LEFT JOIN ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? ORDER BY Language.name'), ContentEntryDao_JdbcKt$findUniqueLanguagesInListAsync$lambda(parentUid), continuation); }; function ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); var _tmp_langName = closure$_result.getString_61zpoe$('langName'); var $receiver = new LangUidAndName(); $receiver.langUid = _tmp_langUid; $receiver.langName = _tmp_langName; return $receiver; }; } function ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda(closure$parentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda; Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda(closure$parentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda(closure$parentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findUniqueLanguageWithParentUid_s8cxhz$ = function (parentUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT DISTINCT Language.langUid, Language.name AS langName from Language\n | LEFT JOIN ContentEntry ON ContentEntry.primaryLanguageUid = Language.langUid\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? ORDER BY Language.name\n ')), ContentEntryDao_JdbcKt$findUniqueLanguageWithParentUid$lambda(parentUid), continuation); }; function ContentEntryDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda(closure$entryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUid = closure$entryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findByUidAsync$lambda(closure$entryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findByUidAsync$lambda(closure$entryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (entryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM ContentEntry WHERE contentEntryUid = ?'), ContentEntryDao_JdbcKt$findByUidAsync$lambda(entryUid), continuation); }; function ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var _tmp_Language_nullCount = 0; var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_name = closure$_result.getString_61zpoe$('name'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_isAllNull = _tmp_Language_nullCount === 11; var $receiver = new ContentEntryWithLanguage(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Language_isAllNull) { var $receiver_0 = new Language(); $receiver_0.langUid = _tmp_langUid; $receiver_0.name = _tmp_name; $receiver_0.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver_0.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver_0.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver_0.Language_Type = _tmp_Language_Type; $receiver_0.languageActive = _tmp_languageActive; $receiver_0.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver_0.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver_0.langLastChangedBy = _tmp_langLastChangedBy; $receiver_0.langLct = _tmp_langLct; $receiver.language = $receiver_0; } return $receiver; }; } function ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findByUidWithLanguageAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentEntry.*, Language.*\n | FROM ContentEntry\n | LEFT JOIN Language \n | ON Language.langUid = ContentEntry.primaryLanguageUid \n | WHERE ContentEntry.contentEntryUid = ? \n | \n ')), ContentEntryDao_JdbcKt$findByUidWithLanguageAsync$lambda(uid), continuation); }; function ContentEntryDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function ContentEntryDao_JdbcKt$findByUid$lambda(closure$entryUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entryUid); return useResults(_stmt.executeQuery(), ContentEntryDao_JdbcKt$findByUid$lambda$lambda); }; } ContentEntryDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (entryUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContentEntry WHERE contentEntryUid = ?'), ContentEntryDao_JdbcKt$findByUid$lambda(entryUid)); }; function ContentEntryDao_JdbcKt$findByTitle$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryDao_JdbcKt$findByTitle$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$findByTitle$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda(closure$title_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$title = closure$title_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$title); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findByTitle$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findByTitle$lambda$lambda(closure$title_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda$lambda(closure$title_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda(this$ContentEntryDao_JdbcKt_0, closure$title_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$title = closure$title_0; } Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda; Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM ContentEntry WHERE title = ?'), ContentEntryDao_JdbcKt$findByTitle$lambda$lambda(this.local$closure$title), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findByTitle$lambda(this$ContentEntryDao_JdbcKt_0, closure$title_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findByTitle$lambda(this$ContentEntryDao_JdbcKt_0, closure$title_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findByTitle_61zpoe$ = function (title) { return new LiveDataImpl(this._db, listOf_0('ContentEntry'), ContentEntryDao_JdbcKt$findByTitle$lambda(this, title)); }; function ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda$lambda(_result) { return mapNextRow(_result, false, ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda; Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.isMeteredAllowedForEntry_s8cxhz$ = function (contentEntryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((SELECT CAST(cjIsMeteredAllowed AS INTEGER) \n | FROM ContentJobItem \n | JOIN ContentJob\n | ON ContentJobItem.cjiJobUid = ContentJob.cjUid\n | WHERE cjiContentEntryUid = ?\n | AND cjiRecursiveStatus >= 4\n | AND cjiRecursiveStatus <= 20 LIMIT 1),\n | CAST(((SELECT connectivityState\n | FROM ConnectivityStatus\n | LIMIT 1) = 3) AS INTEGER),\n | 0) AS Status\n | \n ')), ContentEntryDao_JdbcKt$isMeteredAllowedForEntry$lambda(contentEntryUid), continuation); }; function ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda(closure$sourceUrl_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$sourceUrl = closure$sourceUrl_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda; Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$sourceUrl); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda(closure$sourceUrl_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda(closure$sourceUrl_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findBySourceUrlWithContentEntryStatusAsync_61zpoe$ = function (sourceUrl, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT ContentEntry.* FROM ContentEntry WHERE ContentEntry.sourceUrl = ?'), ContentEntryDao_JdbcKt$findBySourceUrlWithContentEntryStatusAsync$lambda(sourceUrl), continuation); }; function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral(this$ContentEntryDao_JdbcKt, closure$personUid, closure$parentUid, closure$langParam, closure$showHidden, closure$onlyFolder, closure$categoryParam0, closure$sortOrder) { this.this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt; this.closure$personUid = closure$personUid; this.closure$parentUid = closure$parentUid; this.closure$langParam = closure$langParam; this.closure$showHidden = closure$showHidden; this.closure$onlyFolder = closure$onlyFolder; this.closure$categoryParam0 = closure$categoryParam0; this.closure$sortOrder = closure$sortOrder; DataSourceFactory.call(this); } function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_assignmentContentWeight = closure$_result.getInt_61zpoe$('assignmentContentWeight'); var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var _tmp_Container_nullCount = 0; var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_Container_isAllNull = _tmp_Container_nullCount === 12; var _tmp_ContentEntryParentChildJoin_nullCount = 0; var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_ContentEntryParentChildJoin_isAllNull = _tmp_ContentEntryParentChildJoin_nullCount === 8; var _tmp_ContentEntryStatementScoreProgress_nullCount = 0; var _tmp_resultScore = closure$_result.getInt_61zpoe$('resultScore'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultMax = closure$_result.getInt_61zpoe$('resultMax'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultScaled = closure$_result.getFloat_61zpoe$('resultScaled'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultWeight = closure$_result.getInt_61zpoe$('resultWeight'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_contentComplete = closure$_result.getBoolean_61zpoe$('contentComplete'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_progress = closure$_result.getInt_61zpoe$('progress'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_success = closure$_result.getByte_61zpoe$('success'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_penalty = closure$_result.getInt_61zpoe$('penalty'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalContent = closure$_result.getInt_61zpoe$('totalContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalCompletedContent = closure$_result.getInt_61zpoe$('totalCompletedContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_ContentEntryStatementScoreProgress_isAllNull = _tmp_ContentEntryStatementScoreProgress_nullCount === 10; var $receiver = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); $receiver.assignmentContentWeight = _tmp_assignmentContentWeight; $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Container_isAllNull) { var $receiver_0 = new Container(); $receiver_0.containerUid = _tmp_containerUid; $receiver_0.cntLocalCsn = _tmp_cntLocalCsn; $receiver_0.cntMasterCsn = _tmp_cntMasterCsn; $receiver_0.cntLastModBy = _tmp_cntLastModBy; $receiver_0.cntLct = _tmp_cntLct; $receiver_0.fileSize = _tmp_fileSize; $receiver_0.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver_0.cntLastModified = _tmp_cntLastModified; $receiver_0.mimeType = _tmp_mimeType; $receiver_0.remarks = _tmp_remarks; $receiver_0.mobileOptimized = _tmp_mobileOptimized; $receiver_0.cntNumEntries = _tmp_cntNumEntries; $receiver.mostRecentContainer = $receiver_0; } if (!_tmp_ContentEntryParentChildJoin_isAllNull) { var $receiver_1 = new ContentEntryParentChildJoin(); $receiver_1.cepcjUid = _tmp_cepcjUid; $receiver_1.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver_1.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver_1.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver_1.cepcjLct = _tmp_cepcjLct; $receiver_1.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver_1.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver_1.childIndex = _tmp_childIndex; $receiver.contentEntryParentChildJoin = $receiver_1; } if (!_tmp_ContentEntryStatementScoreProgress_isAllNull) { var $receiver_2 = new ContentEntryStatementScoreProgress(); $receiver_2.resultScore = _tmp_resultScore; $receiver_2.resultMax = _tmp_resultMax; $receiver_2.resultScaled = _tmp_resultScaled; $receiver_2.resultWeight = _tmp_resultWeight; $receiver_2.contentComplete = _tmp_contentComplete; $receiver_2.progress = _tmp_progress; $receiver_2.success = _tmp_success; $receiver_2.penalty = _tmp_penalty; $receiver_2.totalContent = _tmp_totalContent; $receiver_2.totalCompletedContent = _tmp_totalCompletedContent; $receiver.scoreProgress = $receiver_2; } return $receiver; }; } function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$langParam = closure$langParam_0; this.local$closure$showHidden = closure$showHidden_0; this.local$closure$onlyFolder = closure$onlyFolder_0; this.local$closure$categoryParam0 = closure$categoryParam0_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$parentUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$langParam); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$langParam); this.local$_stmt.setBoolean_fzusl$(5, this.local$closure$showHidden); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$onlyFolder); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$categoryParam0); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$categoryParam0); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(13, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$langParam = closure$langParam_0; this.local$closure$showHidden = closure$showHidden_0; this.local$closure$onlyFolder = closure$onlyFolder_0; this.local$closure$categoryParam0 = closure$categoryParam0_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM ContentEntry \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1)\n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? \n | AND (? = 0 OR ContentEntry.primaryLanguageUid = ?) \n | AND (NOT ContentEntry.ceInactive OR ContentEntry.ceInactive = ?) \n | AND (NOT ContentEntry.leaf OR NOT ContentEntry.leaf = ?) \n | AND (ContentEntry.publik \n | OR (SELECT username\n | FROM Person\n | WHERE personUid = ?) IS NOT NULL) \n | AND \n | (? = 0 OR ? \n | IN (SELECT ceccjContentCategoryUid \n | FROM ContentEntryContentCategoryJoin \n | WHERE ceccjContentEntryUid = ContentEntry.contentEntryUid)) \n | ORDER BY ContentEntryParentChildJoin.childIndex,\n | CASE(?)\n | WHEN 1 THEN ContentEntry.title\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN ContentEntry.title\n | ELSE ''\n | END DESC, \n | ContentEntry.contentEntryUid) LIMIT ? OFFSET ?\n ")), ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$parentUid, this.local$closure$langParam, this.local$closure$showHidden, this.local$closure$onlyFolder, this.local$closure$categoryParam0, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin', 'StatementEntity', 'Container', 'ContentEntryContentCategoryJoin']), ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getData$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$personUid, this.closure$parentUid, this.closure$langParam, this.closure$showHidden, this.closure$onlyFolder, this.closure$categoryParam0, this.closure$sortOrder, _limit, _offset)); }; function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$langParam = closure$langParam_0; this.local$closure$showHidden = closure$showHidden_0; this.local$closure$onlyFolder = closure$onlyFolder_0; this.local$closure$categoryParam0 = closure$categoryParam0_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$parentUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$langParam); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$langParam); this.local$_stmt.setBoolean_fzusl$(5, this.local$closure$showHidden); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$onlyFolder); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$categoryParam0); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$categoryParam0); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$parentUid = closure$parentUid_0; this.local$closure$langParam = closure$langParam_0; this.local$closure$showHidden = closure$showHidden_0; this.local$closure$onlyFolder = closure$onlyFolder_0; this.local$closure$categoryParam0 = closure$categoryParam0_0; this.local$closure$sortOrder = closure$sortOrder_0; } Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda; Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM ContentEntry \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid \n | \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1)\n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ? \n | AND (? = 0 OR ContentEntry.primaryLanguageUid = ?) \n | AND (NOT ContentEntry.ceInactive OR ContentEntry.ceInactive = ?) \n | AND (NOT ContentEntry.leaf OR NOT ContentEntry.leaf = ?) \n | AND (ContentEntry.publik \n | OR (SELECT username\n | FROM Person\n | WHERE personUid = ?) IS NOT NULL) \n | AND \n | (? = 0 OR ? \n | IN (SELECT ceccjContentCategoryUid \n | FROM ContentEntryContentCategoryJoin \n | WHERE ceccjContentEntryUid = ContentEntry.contentEntryUid)) \n | ORDER BY ContentEntryParentChildJoin.childIndex,\n | CASE(?)\n | WHEN 1 THEN ContentEntry.title\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN ContentEntry.title\n | ELSE ''\n | END DESC, \n | ContentEntry.contentEntryUid) \n ")), ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid, this.local$closure$parentUid, this.local$closure$langParam, this.local$closure$showHidden, this.local$closure$onlyFolder, this.local$closure$categoryParam0, this.local$closure$sortOrder), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$parentUid_0, closure$langParam_0, closure$showHidden_0, closure$onlyFolder_0, closure$categoryParam0_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin', 'StatementEntity', 'Container', 'ContentEntryContentCategoryJoin']), ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral$getLength$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$personUid, this.closure$parentUid, this.closure$langParam, this.closure$showHidden, this.closure$onlyFolder, this.closure$categoryParam0, this.closure$sortOrder)); }; ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ContentEntryDao_JdbcKt.prototype.getChildrenByParentUidWithCategoryFilterOrderByName_dqef2m$ = function (parentUid, langParam, categoryParam0, personUid, showHidden, onlyFolder, sortOrder) { return new ContentEntryDao_JdbcKt$getChildrenByParentUidWithCategoryFilterOrderByName$ObjectLiteral(this, personUid, parentUid, langParam, showHidden, onlyFolder, categoryParam0, sortOrder); }; function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral(this$ContentEntryDao_JdbcKt, closure$personUid) { this.this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt; this.closure$personUid = closure$personUid; DataSourceFactory.call(this); } function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_assignmentContentWeight = closure$_result.getInt_61zpoe$('assignmentContentWeight'); var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var _tmp_Container_nullCount = 0; var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_Container_isAllNull = _tmp_Container_nullCount === 12; var _tmp_ContentEntryParentChildJoin_nullCount = 0; var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_ContentEntryParentChildJoin_isAllNull = _tmp_ContentEntryParentChildJoin_nullCount === 8; var _tmp_ContentEntryStatementScoreProgress_nullCount = 0; var _tmp_resultScore = closure$_result.getInt_61zpoe$('resultScore'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultMax = closure$_result.getInt_61zpoe$('resultMax'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultScaled = closure$_result.getFloat_61zpoe$('resultScaled'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultWeight = closure$_result.getInt_61zpoe$('resultWeight'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_contentComplete = closure$_result.getBoolean_61zpoe$('contentComplete'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_progress = closure$_result.getInt_61zpoe$('progress'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_success = closure$_result.getByte_61zpoe$('success'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_penalty = closure$_result.getInt_61zpoe$('penalty'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalContent = closure$_result.getInt_61zpoe$('totalContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalCompletedContent = closure$_result.getInt_61zpoe$('totalCompletedContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_ContentEntryStatementScoreProgress_isAllNull = _tmp_ContentEntryStatementScoreProgress_nullCount === 10; var $receiver = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); $receiver.assignmentContentWeight = _tmp_assignmentContentWeight; $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Container_isAllNull) { var $receiver_0 = new Container(); $receiver_0.containerUid = _tmp_containerUid; $receiver_0.cntLocalCsn = _tmp_cntLocalCsn; $receiver_0.cntMasterCsn = _tmp_cntMasterCsn; $receiver_0.cntLastModBy = _tmp_cntLastModBy; $receiver_0.cntLct = _tmp_cntLct; $receiver_0.fileSize = _tmp_fileSize; $receiver_0.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver_0.cntLastModified = _tmp_cntLastModified; $receiver_0.mimeType = _tmp_mimeType; $receiver_0.remarks = _tmp_remarks; $receiver_0.mobileOptimized = _tmp_mobileOptimized; $receiver_0.cntNumEntries = _tmp_cntNumEntries; $receiver.mostRecentContainer = $receiver_0; } if (!_tmp_ContentEntryParentChildJoin_isAllNull) { var $receiver_1 = new ContentEntryParentChildJoin(); $receiver_1.cepcjUid = _tmp_cepcjUid; $receiver_1.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver_1.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver_1.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver_1.cepcjLct = _tmp_cepcjLct; $receiver_1.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver_1.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver_1.childIndex = _tmp_childIndex; $receiver.contentEntryParentChildJoin = $receiver_1; } if (!_tmp_ContentEntryStatementScoreProgress_isAllNull) { var $receiver_2 = new ContentEntryStatementScoreProgress(); $receiver_2.resultScore = _tmp_resultScore; $receiver_2.resultMax = _tmp_resultMax; $receiver_2.resultScaled = _tmp_resultScaled; $receiver_2.resultWeight = _tmp_resultWeight; $receiver_2.contentComplete = _tmp_contentComplete; $receiver_2.progress = _tmp_progress; $receiver_2.success = _tmp_success; $receiver_2.penalty = _tmp_penalty; $receiver_2.totalContent = _tmp_totalContent; $receiver_2.totalCompletedContent = _tmp_totalCompletedContent; $receiver.scoreProgress = $receiver_2; } return $receiver; }; } function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM CourseBlock\n | JOIN ContentEntry \n | ON CourseBlock.cbType = 104\n | AND ContentEntry.contentEntryUid = CourseBlock.cbEntityUid\n | AND CAST(CourseBlock.cbActive AS INTEGER) = 1\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjUid = 0 \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1) \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1) \n | \n | WHERE CourseBlock.cbClazzUid IN\n | (SELECT ClazzEnrolment.clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | ) LIMIT ? OFFSET ?\n ")), ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['CourseBlock', 'ContentEntry', 'ContentEntryParentChildJoin', 'StatementEntity', 'Container', 'ClazzEnrolment']), ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getData$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$personUid, _limit, _offset)); }; function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; } Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM CourseBlock\n | JOIN ContentEntry \n | ON CourseBlock.cbType = 104\n | AND ContentEntry.contentEntryUid = CourseBlock.cbEntityUid\n | AND CAST(CourseBlock.cbActive AS INTEGER) = 1\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjUid = 0 \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1) \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1) \n | \n | WHERE CourseBlock.cbClazzUid IN\n | (SELECT ClazzEnrolment.clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = ?)\n | ) \n ")), ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['CourseBlock', 'ContentEntry', 'ContentEntryParentChildJoin', 'StatementEntity', 'Container', 'ClazzEnrolment']), ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral$getLength$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$personUid)); }; ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ContentEntryDao_JdbcKt.prototype.getContentFromMyCourses_s8cxhz$ = function (personUid) { return new ContentEntryDao_JdbcKt$getContentFromMyCourses$ObjectLiteral(this, personUid); }; function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral(this$ContentEntryDao_JdbcKt, closure$personUid) { this.this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt; this.closure$personUid = closure$personUid; DataSourceFactory.call(this); } function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_assignmentContentWeight = closure$_result.getInt_61zpoe$('assignmentContentWeight'); var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var _tmp_Container_nullCount = 0; var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_Container_isAllNull = _tmp_Container_nullCount === 12; var _tmp_ContentEntryParentChildJoin_nullCount = 0; var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_ContentEntryParentChildJoin_isAllNull = _tmp_ContentEntryParentChildJoin_nullCount === 8; var _tmp_ContentEntryStatementScoreProgress_nullCount = 0; var _tmp_resultScore = closure$_result.getInt_61zpoe$('resultScore'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultMax = closure$_result.getInt_61zpoe$('resultMax'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultScaled = closure$_result.getFloat_61zpoe$('resultScaled'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultWeight = closure$_result.getInt_61zpoe$('resultWeight'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_contentComplete = closure$_result.getBoolean_61zpoe$('contentComplete'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_progress = closure$_result.getInt_61zpoe$('progress'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_success = closure$_result.getByte_61zpoe$('success'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_penalty = closure$_result.getInt_61zpoe$('penalty'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalContent = closure$_result.getInt_61zpoe$('totalContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalCompletedContent = closure$_result.getInt_61zpoe$('totalCompletedContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_ContentEntryStatementScoreProgress_isAllNull = _tmp_ContentEntryStatementScoreProgress_nullCount === 10; var $receiver = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); $receiver.assignmentContentWeight = _tmp_assignmentContentWeight; $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Container_isAllNull) { var $receiver_0 = new Container(); $receiver_0.containerUid = _tmp_containerUid; $receiver_0.cntLocalCsn = _tmp_cntLocalCsn; $receiver_0.cntMasterCsn = _tmp_cntMasterCsn; $receiver_0.cntLastModBy = _tmp_cntLastModBy; $receiver_0.cntLct = _tmp_cntLct; $receiver_0.fileSize = _tmp_fileSize; $receiver_0.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver_0.cntLastModified = _tmp_cntLastModified; $receiver_0.mimeType = _tmp_mimeType; $receiver_0.remarks = _tmp_remarks; $receiver_0.mobileOptimized = _tmp_mobileOptimized; $receiver_0.cntNumEntries = _tmp_cntNumEntries; $receiver.mostRecentContainer = $receiver_0; } if (!_tmp_ContentEntryParentChildJoin_isAllNull) { var $receiver_1 = new ContentEntryParentChildJoin(); $receiver_1.cepcjUid = _tmp_cepcjUid; $receiver_1.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver_1.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver_1.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver_1.cepcjLct = _tmp_cepcjLct; $receiver_1.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver_1.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver_1.childIndex = _tmp_childIndex; $receiver.contentEntryParentChildJoin = $receiver_1; } if (!_tmp_ContentEntryStatementScoreProgress_isAllNull) { var $receiver_2 = new ContentEntryStatementScoreProgress(); $receiver_2.resultScore = _tmp_resultScore; $receiver_2.resultMax = _tmp_resultMax; $receiver_2.resultScaled = _tmp_resultScaled; $receiver_2.resultWeight = _tmp_resultWeight; $receiver_2.contentComplete = _tmp_contentComplete; $receiver_2.progress = _tmp_progress; $receiver_2.success = _tmp_success; $receiver_2.penalty = _tmp_penalty; $receiver_2.totalContent = _tmp_totalContent; $receiver_2.totalCompletedContent = _tmp_totalCompletedContent; $receiver.scoreProgress = $receiver_2; } return $receiver; }; } function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjUid = 0 \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1) \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1) \n | WHERE ContentEntry.contentOwner = ?\n | AND NOT EXISTS(\n | SELECT ContentEntryParentChildJoin.cepcjUid \n | FROM ContentEntryParentChildJoin\n | WHERE ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid)\n | ) LIMIT ? OFFSET ?\n ")), ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin', 'StatementEntity', 'Container']), ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getData$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$personUid, _limit, _offset)); }; function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; } Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ContentEntry.*, ContentEntryParentChildJoin.*, Container.*, \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | 0 AS assignmentContentWeight,\n | \n | 1 as totalContent, \n | \n | 0 as penalty\n | FROM ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjUid = 0 \n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1) \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1) \n | WHERE ContentEntry.contentOwner = ?\n | AND NOT EXISTS(\n | SELECT ContentEntryParentChildJoin.cepcjUid \n | FROM ContentEntryParentChildJoin\n | WHERE ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid)\n | ) \n ")), ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin', 'StatementEntity', 'Container']), ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral$getLength$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$personUid)); }; ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ContentEntryDao_JdbcKt.prototype.getContentByOwner_s8cxhz$ = function (personUid) { return new ContentEntryDao_JdbcKt$getContentByOwner$ObjectLiteral(this, personUid); }; function ContentEntryDao_JdbcKt$getChildrenByAll$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryDao_JdbcKt$getChildrenByAll$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$getChildrenByAll$lambda$lambda$lambda(_result)); } function ContentEntryDao_JdbcKt$getChildrenByAll$lambda(closure$parentUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$parentUid); return useResults(_stmt.executeQuery(), ContentEntryDao_JdbcKt$getChildrenByAll$lambda$lambda); }; } ContentEntryDao_JdbcKt.prototype.getChildrenByAll_s8cxhz$ = function (parentUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT ContentEntry.* FROM ContentEntry LEFT JOIN ContentEntryParentChildJoin ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ?'), ContentEntryDao_JdbcKt$getChildrenByAll$lambda(parentUid)); }; function ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda(closure$parentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$parentUid = closure$parentUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$parentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda(closure$parentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda(closure$parentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$parentUid = closure$parentUid_0; } Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda; Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM ContentEntry where contentEntryUid = ? LIMIT 1'), ContentEntryDao_JdbcKt$findLiveContentEntry$lambda$lambda(this.local$closure$parentUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findLiveContentEntry$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findLiveContentEntry$lambda(this$ContentEntryDao_JdbcKt_0, closure$parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findLiveContentEntry_s8cxhz$ = function (parentUid) { return new LiveDataImpl(this._db, listOf_0('ContentEntry'), ContentEntryDao_JdbcKt$findLiveContentEntry$lambda(this, parentUid)); }; function ContentEntryDao_JdbcKt$getContentEntryUidFromXapiObjectId$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ContentEntryDao_JdbcKt$getContentEntryUidFromXapiObjectId$lambda$lambda(_result) { return mapNextRow(_result, L0, ContentEntryDao_JdbcKt$getContentEntryUidFromXapiObjectId$lambda$lambda$lambda(_result)); } function ContentEntryDao_JdbcKt$getContentEntryUidFromXapiObjectId$lambda(closure$objectId) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$objectId); return useResults(_stmt.executeQuery(), ContentEntryDao_JdbcKt$getContentEntryUidFromXapiObjectId$lambda$lambda); }; } ContentEntryDao_JdbcKt.prototype.getContentEntryUidFromXapiObjectId_61zpoe$ = function (objectId) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT COALESCE((SELECT contentEntryUid \n | FROM ContentEntry \n | WHERE entryId = ? \n | LIMIT 1),0) AS ID\n ')), ContentEntryDao_JdbcKt$getContentEntryUidFromXapiObjectId$lambda(objectId)); }; function ContentEntryDao_JdbcKt$findSimilarIdEntryForKhan$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryDao_JdbcKt$findSimilarIdEntryForKhan$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$findSimilarIdEntryForKhan$lambda$lambda$lambda(_result)); } function ContentEntryDao_JdbcKt$findSimilarIdEntryForKhan$lambda(closure$sourceUrl) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$sourceUrl); return useResults(_stmt.executeQuery(), ContentEntryDao_JdbcKt$findSimilarIdEntryForKhan$lambda$lambda); }; } ContentEntryDao_JdbcKt.prototype.findSimilarIdEntryForKhan_61zpoe$ = function (sourceUrl) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContentEntry WHERE sourceUrl LIKE ?'), ContentEntryDao_JdbcKt$findSimilarIdEntryForKhan$lambda(sourceUrl)); }; function ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_numEntries = closure$_result.getInt_61zpoe$('numEntries'); var _tmp_totalSize = closure$_result.getLong_61zpoe$('totalSize'); var $receiver = new DownloadJobSizeInfo(); $receiver.numEntries = _tmp_numEntries; $receiver.totalSize = _tmp_totalSize; return $receiver; }; } function ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda; Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.getRecursiveDownloadTotals_s8cxhz$ = function (contentEntryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | WITH RECURSIVE \n | ContentEntry_recursive(contentEntryUid, containerSize) AS (\n | SELECT contentEntryUid, \n | (SELECT COALESCE((SELECT fileSize \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1), 0)) AS containerSize \n | FROM ContentEntry \n | WHERE contentEntryUid = ?\n | AND NOT ceInactive\n | UNION \n | SELECT ContentEntry.contentEntryUid, \n | (SELECT COALESCE((SELECT fileSize \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1), 0)) AS containerSize \n | FROM ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid,\n | ContentEntry_recursive\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ContentEntry_recursive.contentEntryUid\n | AND NOT ceInactive)\n | SELECT COUNT(*) AS numEntries, \n | SUM(containerSize) AS totalSize \n | FROM ContentEntry_recursive\n ')), ContentEntryDao_JdbcKt$getRecursiveDownloadTotals$lambda(contentEntryUid), continuation); }; function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral(this$ContentEntryDao_JdbcKt, closure$contentEntryUid) { this.this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt; this.closure$contentEntryUid = closure$contentEntryUid; DataSourceFactory.call(this); } function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var _tmp_Container_nullCount = 0; var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_Container_isAllNull = _tmp_Container_nullCount === 12; var _tmp_ContentEntryParentChildJoin_nullCount = 0; var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_ContentEntryParentChildJoin_isAllNull = _tmp_ContentEntryParentChildJoin_nullCount === 8; var $receiver = new ContentEntryWithParentChildJoinAndMostRecentContainer(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Container_isAllNull) { var $receiver_0 = new Container(); $receiver_0.containerUid = _tmp_containerUid; $receiver_0.cntLocalCsn = _tmp_cntLocalCsn; $receiver_0.cntMasterCsn = _tmp_cntMasterCsn; $receiver_0.cntLastModBy = _tmp_cntLastModBy; $receiver_0.cntLct = _tmp_cntLct; $receiver_0.fileSize = _tmp_fileSize; $receiver_0.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver_0.cntLastModified = _tmp_cntLastModified; $receiver_0.mimeType = _tmp_mimeType; $receiver_0.remarks = _tmp_remarks; $receiver_0.mobileOptimized = _tmp_mobileOptimized; $receiver_0.cntNumEntries = _tmp_cntNumEntries; $receiver.mostRecentContainer = $receiver_0; } if (!_tmp_ContentEntryParentChildJoin_isAllNull) { var $receiver_1 = new ContentEntryParentChildJoin(); $receiver_1.cepcjUid = _tmp_cepcjUid; $receiver_1.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver_1.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver_1.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver_1.cepcjLct = _tmp_cepcjLct; $receiver_1.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver_1.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver_1.childIndex = _tmp_childIndex; $receiver.contentEntryParentChildJoin = $receiver_1; } return $receiver; }; } function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (WITH RECURSIVE ContentEntry_recursive(\n | contentEntryUid, title, ceInactive, contentFlags, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, leaf, publik, completionCriteria, minScore, contentOwner, contentTypeFlag, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct,\n | \n | cepcjUid, cepcjChildContentEntryUid, cepcjParentContentEntryUid, childIndex, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct,\n | \n | containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries, cntLct\n | ) AS (\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct,\n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0))\n | WHERE ContentEntry.contentEntryUid = ?\n | UNION\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct, \n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0)),\n | ContentEntry_recursive\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ContentEntry_recursive.contentEntryUid)\n | SELECT * FROM ContentEntry_recursive) LIMIT ? OFFSET ?\n ')), ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda$lambda(this.local$closure$contentEntryUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin', 'Container']), ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getData$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$contentEntryUid, _limit, _offset)); }; function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; } Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda; Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (WITH RECURSIVE ContentEntry_recursive(\n | contentEntryUid, title, ceInactive, contentFlags, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, leaf, publik, completionCriteria, minScore, contentOwner, contentTypeFlag, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct,\n | \n | cepcjUid, cepcjChildContentEntryUid, cepcjParentContentEntryUid, childIndex, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct,\n | \n | containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries, cntLct\n | ) AS (\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct,\n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0))\n | WHERE ContentEntry.contentEntryUid = ?\n | UNION\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct, \n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0)),\n | ContentEntry_recursive\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ContentEntry_recursive.contentEntryUid)\n | SELECT * FROM ContentEntry_recursive) \n ')), ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda$lambda(this.local$closure$contentEntryUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda(this$ContentEntryDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ContentEntryDao_JdbcKt._db, listOf(['ContentEntry', 'ContentEntryParentChildJoin', 'Container']), ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral$getLength$lambda(this.this$ContentEntryDao_JdbcKt, this.closure$contentEntryUid)); }; ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ContentEntryDao_JdbcKt.prototype.getAllEntriesRecursively_s8cxhz$ = function (contentEntryUid) { return new ContentEntryDao_JdbcKt$getAllEntriesRecursively$ObjectLiteral(this, contentEntryUid); }; function ContentEntryDao_JdbcKt$getAllEntriesRecursivelyAsList$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var _tmp_Container_nullCount = 0; var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_Container_isAllNull = _tmp_Container_nullCount === 12; var _tmp_ContentEntryParentChildJoin_nullCount = 0; var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_ContentEntryParentChildJoin_isAllNull = _tmp_ContentEntryParentChildJoin_nullCount === 8; var $receiver = new ContentEntryWithParentChildJoinAndMostRecentContainer(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Container_isAllNull) { var $receiver_0 = new Container(); $receiver_0.containerUid = _tmp_containerUid; $receiver_0.cntLocalCsn = _tmp_cntLocalCsn; $receiver_0.cntMasterCsn = _tmp_cntMasterCsn; $receiver_0.cntLastModBy = _tmp_cntLastModBy; $receiver_0.cntLct = _tmp_cntLct; $receiver_0.fileSize = _tmp_fileSize; $receiver_0.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver_0.cntLastModified = _tmp_cntLastModified; $receiver_0.mimeType = _tmp_mimeType; $receiver_0.remarks = _tmp_remarks; $receiver_0.mobileOptimized = _tmp_mobileOptimized; $receiver_0.cntNumEntries = _tmp_cntNumEntries; $receiver.mostRecentContainer = $receiver_0; } if (!_tmp_ContentEntryParentChildJoin_isAllNull) { var $receiver_1 = new ContentEntryParentChildJoin(); $receiver_1.cepcjUid = _tmp_cepcjUid; $receiver_1.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver_1.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver_1.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver_1.cepcjLct = _tmp_cepcjLct; $receiver_1.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver_1.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver_1.childIndex = _tmp_childIndex; $receiver.contentEntryParentChildJoin = $receiver_1; } return $receiver; }; } function ContentEntryDao_JdbcKt$getAllEntriesRecursivelyAsList$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$getAllEntriesRecursivelyAsList$lambda$lambda$lambda(_result)); } function ContentEntryDao_JdbcKt$getAllEntriesRecursivelyAsList$lambda(closure$contentEntryUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$contentEntryUid); return useResults(_stmt.executeQuery(), ContentEntryDao_JdbcKt$getAllEntriesRecursivelyAsList$lambda$lambda); }; } ContentEntryDao_JdbcKt.prototype.getAllEntriesRecursivelyAsList_s8cxhz$ = function (contentEntryUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |WITH RECURSIVE ContentEntry_recursive(\n | contentEntryUid, title, ceInactive, contentFlags, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, leaf, publik, completionCriteria, minScore, contentOwner, contentTypeFlag, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct,\n | \n | cepcjUid, cepcjChildContentEntryUid, cepcjParentContentEntryUid, childIndex, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct,\n | \n | containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries, cntLct\n | ) AS (\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct,\n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0))\n | WHERE ContentEntry.contentEntryUid = ?\n | UNION\n | SELECT ContentEntry.contentEntryUid, ContentEntry.title, ContentEntry.ceInactive, ContentEntry.contentFlags, ContentEntry.description, ContentEntry.entryId, ContentEntry.author, ContentEntry.publisher, ContentEntry.licenseType, ContentEntry.licenseName, ContentEntry.licenseUrl, ContentEntry.sourceUrl, ContentEntry.thumbnailUrl, ContentEntry.lastModified, ContentEntry.primaryLanguageUid, ContentEntry.languageVariantUid, ContentEntry.leaf, ContentEntry.publik, ContentEntry.completionCriteria, ContentEntry.minScore, ContentEntry.contentOwner, ContentEntry.contentTypeFlag, ContentEntry.contentEntryLocalChangeSeqNum, ContentEntry.contentEntryMasterChangeSeqNum, ContentEntry.contentEntryLastChangedBy, ContentEntry.contentEntryLct,\n | ContentEntryParentChildJoin.cepcjUid, ContentEntryParentChildJoin.cepcjChildContentEntryUid, ContentEntryParentChildJoin.cepcjParentContentEntryUid, ContentEntryParentChildJoin.childIndex, ContentEntryParentChildJoin.cepcjLocalChangeSeqNum, ContentEntryParentChildJoin.cepcjMasterChangeSeqNum, ContentEntryParentChildJoin.cepcjLastChangedBy, ContentEntryParentChildJoin.cepcjLct, \n | Container.containerUid, Container.cntLocalCsn, Container.cntMasterCsn, Container.cntLastModBy, Container.fileSize, Container.containerContentEntryUid, Container.cntLastModified, Container.mimeType, Container.remarks, Container.mobileOptimized, Container.cntNumEntries, Container.cntLct\n | FROM \n | ContentEntry\n | LEFT JOIN ContentEntryParentChildJoin ON ContentEntry.contentEntryUid = ContentEntryParentChildJoin.cepcjChildContentEntryUid \n | LEFT JOIN Container ON Container.containerUid = (SELECT COALESCE((SELECT containerUid FROM Container WHERE containerContentEntryUid = ContentEntry.contentEntryUid ORDER BY cntLastModified DESC LIMIT 1), 0)),\n | ContentEntry_recursive\n | WHERE ContentEntryParentChildJoin.cepcjParentContentEntryUid = ContentEntry_recursive.contentEntryUid)\n | SELECT * FROM ContentEntry_recursive\n ')), ContentEntryDao_JdbcKt$getAllEntriesRecursivelyAsList$lambda(contentEntryUid)); }; function ContentEntryDao_JdbcKt$updateContentEntryInActive$lambda(closure$ceInactive, closure$changedTime, closure$contentEntryUid) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$ceInactive); _stmt.setLong_6svq3l$(2, closure$changedTime); _stmt.setLong_6svq3l$(3, closure$contentEntryUid); return _stmt.executeUpdate(); }; } ContentEntryDao_JdbcKt.prototype.updateContentEntryInActive_zaz62j$ = function (contentEntryUid, ceInactive, changedTime) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentEntry \n | SET ceInactive = ?,\n | contentEntryLct = ? \n | WHERE ContentEntry.contentEntryUid = ?\n ')), ContentEntryDao_JdbcKt$updateContentEntryInActive$lambda(ceInactive, changedTime, contentEntryUid)); }; function ContentEntryDao_JdbcKt$updateContentEntryContentFlag$lambda(closure$contentFlag, closure$changedTime, closure$contentEntryUid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$contentFlag); _stmt.setLong_6svq3l$(2, closure$changedTime); _stmt.setLong_6svq3l$(3, closure$contentEntryUid); return _stmt.executeUpdate(); }; } ContentEntryDao_JdbcKt.prototype.updateContentEntryContentFlag_h639zw$ = function (contentFlag, contentEntryUid, changedTime) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentEntry \n | SET contentTypeFlag = ?,\n | contentEntryLct = ? \n | WHERE ContentEntry.contentEntryUid = ?\n ')), ContentEntryDao_JdbcKt$updateContentEntryContentFlag$lambda(contentFlag, changedTime, contentEntryUid)); }; function ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_uid = closure$_result.getLong_61zpoe$('uid'); var _tmp_labelName = closure$_result.getString_61zpoe$('labelName'); var $receiver = new UidAndLabel(); $receiver.uid = _tmp_uid; $receiver.labelName = _tmp_labelName; return $receiver; }; } function ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda(closure$contentEntryUids_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUids = closure$contentEntryUids_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda; Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$contentEntryUids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda(closure$contentEntryUids_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda(closure$contentEntryUids_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.getContentEntryFromUids_gox9k8$ = function (contentEntryUids, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |Select ContentEntry.contentEntryUid AS uid, ContentEntry.title As labelName \n | from ContentEntry WHERE contentEntryUid IN (?)\n '), true), ContentEntryDao_JdbcKt$getContentEntryFromUids$lambda(contentEntryUids), continuation); }; function ContentEntryDao_JdbcKt$findAllLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var _tmp_Language_nullCount = 0; var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_name = closure$_result.getString_61zpoe$('name'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_isAllNull = _tmp_Language_nullCount === 11; var $receiver = new ContentEntryWithLanguage(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Language_isAllNull) { var $receiver_0 = new Language(); $receiver_0.langUid = _tmp_langUid; $receiver_0.name = _tmp_name; $receiver_0.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver_0.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver_0.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver_0.Language_Type = _tmp_Language_Type; $receiver_0.languageActive = _tmp_languageActive; $receiver_0.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver_0.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver_0.langLastChangedBy = _tmp_langLastChangedBy; $receiver_0.langLct = _tmp_langLct; $receiver.language = $receiver_0; } return $receiver; }; } function ContentEntryDao_JdbcKt$findAllLive$lambda$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$findAllLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda; Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findAllLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findAllLive$lambda$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda(this$ContentEntryDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryDao_JdbcKt = this$ContentEntryDao_JdbcKt_0; } Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda; Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryDao_JdbcKt._db, new PreparedStatementConfig('SELECT ContentEntry.*, Language.* FROM ContentEntry LEFT JOIN Language ON Language.langUid = ContentEntry.primaryLanguageUid'), ContentEntryDao_JdbcKt$findAllLive$lambda$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findAllLive$lambda(this$ContentEntryDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findAllLive$lambda(this$ContentEntryDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.findAllLive = function () { return new LiveDataImpl(this._db, listOf(['ContentEntry', 'Language']), ContentEntryDao_JdbcKt$findAllLive$lambda(this)); }; function ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda$lambda(_result) { return mapNextRow(_result, false, ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda(closure$contentEntryUid_0, closure$accountPersonUid_0, closure$permission_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$permission = closure$permission_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda; Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$permission); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda(closure$contentEntryUid_0, closure$accountPersonUid_0, closure$permission_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda(closure$contentEntryUid_0, closure$accountPersonUid_0, closure$permission_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.personHasPermissionWithContentEntry_b9bd0d$ = function (accountPersonUid, contentEntryUid, permission, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT EXISTS(SELECT 1 FROM ContentEntry WHERE ContentEntry.contentEntryUid = ? AND ? IN (\n | SELECT DISTINCT Person.PersonUid FROM Person\n | LEFT JOIN PersonGroupMember ON Person.personUid = PersonGroupMember.groupMemberPersonUid\n | LEFT JOIN EntityRole ON EntityRole.erGroupUid = PersonGroupMember.groupMemberGroupUid\n | LEFT JOIN Role ON EntityRole.erRoleUid = Role.roleUid\n | WHERE \n | CAST(Person.admin AS INTEGER) = 1\n | OR \n | (EntityRole.ertableId = 42 AND \n | EntityRole.erEntityUid = ContentEntry.contentEntryUid AND\n | (Role.rolePermissions & \n | ? ) > 0)))\n ')), ContentEntryDao_JdbcKt$personHasPermissionWithContentEntry$lambda(contentEntryUid, accountPersonUid, permission), continuation); }; function Coroutine$ContentEntryDao_JdbcKt$updateContentEntryActiveByContentJobUid$lambda(closure$inactive_0, closure$changedTime_0, closure$jobId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$inactive = closure$inactive_0; this.local$closure$changedTime = closure$changedTime_0; this.local$closure$jobId = closure$jobId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$updateContentEntryActiveByContentJobUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$updateContentEntryActiveByContentJobUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$updateContentEntryActiveByContentJobUid$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$updateContentEntryActiveByContentJobUid$lambda; Coroutine$ContentEntryDao_JdbcKt$updateContentEntryActiveByContentJobUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$inactive); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changedTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$jobId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$updateContentEntryActiveByContentJobUid$lambda(closure$inactive_0, closure$changedTime_0, closure$jobId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$updateContentEntryActiveByContentJobUid$lambda(closure$inactive_0, closure$changedTime_0, closure$jobId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$($this, jobId_0, inactive_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$jobId = jobId_0; this.local$inactive = inactive_0; this.local$changedTime = changedTime_0; } Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$.prototype.constructor = Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$; Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentEntry\n | SET ceInactive = ?,\n | contentEntryLct = ?\n | WHERE contentEntryUid IN \n | (SELECT cjiContentEntryUid \n | FROM ContentJobItem\n | WHERE cjiJobUid = ?\n | AND CAST(ContentJobItem.cjiContentDeletedOnCancellation AS INTEGER) = 1)\n | \n ')), ContentEntryDao_JdbcKt$updateContentEntryActiveByContentJobUid$lambda(this.local$inactive, this.local$changedTime, this.local$jobId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.updateContentEntryActiveByContentJobUid_zaz62j$ = function (jobId_0, inactive_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$(this, jobId_0, inactive_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda(closure$toggleVisibility_0, closure$changedTime_0, closure$selectedItem_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$toggleVisibility = closure$toggleVisibility_0; this.local$closure$changedTime = closure$changedTime_0; this.local$closure$selectedItem = closure$selectedItem_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda; Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$toggleVisibility); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changedTime); this.local$_stmt.setArray_wqp8hw$(3, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$selectedItem))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda(closure$toggleVisibility_0, closure$changedTime_0, closure$selectedItem_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda(closure$toggleVisibility_0, closure$changedTime_0, closure$selectedItem_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$toggleVisibilityContentEntryItems_cbj1f0$($this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$changedTime = changedTime_0; } Coroutine$toggleVisibilityContentEntryItems_cbj1f0$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityContentEntryItems_cbj1f0$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityContentEntryItems_cbj1f0$.prototype.constructor = Coroutine$toggleVisibilityContentEntryItems_cbj1f0$; Coroutine$toggleVisibilityContentEntryItems_cbj1f0$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentEntry \n | SET ceInactive = ?, \n | contentEntryLct = ? \n | WHERE contentEntryUid IN (?)\n '), true), ContentEntryDao_JdbcKt$toggleVisibilityContentEntryItems$lambda(this.local$toggleVisibility, this.local$changedTime, this.local$selectedItem), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_JdbcKt.prototype.toggleVisibilityContentEntryItems_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityContentEntryItems_cbj1f0$(this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda$lambda(_result) { return mapRows(_result, ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda; Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } ContentEntryDao_JdbcKt.prototype.findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize = function (continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n |SELECT ContentEntry.*\n | FROM ContentEntry\n | JOIN Container ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container\n | WHERE Container.containercontententryUid = ContentEntry.contentEntryUid\n | AND Container.cntLastModified = \n | (SELECT MAX(ContainerInternal.cntLastModified)\n | FROM Container ContainerInternal\n | WHERE ContainerInternal.containercontententryUid = ContentEntry.contentEntryUid))\n | WHERE ContentEntry.leaf \n | AND NOT ContentEntry.ceInactive\n | AND (NOT EXISTS \n | (SELECT ContainerEntry.ceUid\n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid)\n | OR Container.fileSize = 0) \n | \n ')), ContentEntryDao_JdbcKt$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize$lambda, continuation); }; function ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_showDownloadButton = closure$_result.getBoolean_61zpoe$('showDownloadButton'); var _tmp_showOpenButton = closure$_result.getBoolean_61zpoe$('showOpenButton'); var _tmp_showUpdateButton = closure$_result.getBoolean_61zpoe$('showUpdateButton'); var _tmp_showDeleteButton = closure$_result.getBoolean_61zpoe$('showDeleteButton'); var _tmp_showManageDownloadButton = closure$_result.getBoolean_61zpoe$('showManageDownloadButton'); var $receiver = new ContentEntryButtonModel(); $receiver.showDownloadButton = _tmp_showDownloadButton; $receiver.showOpenButton = _tmp_showOpenButton; $receiver.showUpdateButton = _tmp_showUpdateButton; $receiver.showDeleteButton = _tmp_showDeleteButton; $receiver.showManageDownloadButton = _tmp_showManageDownloadButton; return $receiver; }; } function ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda(closure$contentEntryUid_0, closure$platformDownloadEnabled_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$platformDownloadEnabled = closure$platformDownloadEnabled_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda; Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$contentEntryUid); this.local$_stmt.setBoolean_fzusl$(4, this.local$closure$platformDownloadEnabled); this.local$_stmt.setBoolean_fzusl$(5, this.local$closure$platformDownloadEnabled); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$contentEntryUid); this.local$_stmt.setBoolean_fzusl$(7, this.local$closure$platformDownloadEnabled); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda(closure$contentEntryUid_0, closure$platformDownloadEnabled_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda(closure$contentEntryUid_0, closure$platformDownloadEnabled_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.buttonsToShowForContentEntry_2gd3um$ = function (contentEntryUid, platformDownloadEnabled, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | WITH ContentEntryContainerUids AS \n | (SELECT Container.containerUid\n | FROM Container\n | WHERE Container.containerContentEntryUid = ?\n | AND Container.fileSize > 0),\n | \n | \n | LatestDownloadedContainer(containerUid) AS\n | (SELECT COALESCE(\n | (SELECT containerUid\n | FROM Container\n | WHERE Container.containerContentEntryUid = ? \n | AND EXISTS(\n | SELECT 1\n | FROM ContainerEntry\n | WHERE ContainerEntry.ceContainerUid = Container.containerUid)\n | ORDER BY cntLastModified DESC\n | LIMIT 1), 0))\n | ,\n | \n | \n | ActiveContentJobItems(cjiRecursiveStatus, cjiPluginId) AS\n | (SELECT cjiRecursiveStatus, cjiPluginId\n | FROM ContentJobItem\n | WHERE cjiContentEntryUid = ?\n | AND cjiStatus BETWEEN 4 AND 20)\n | ,\n | \n | ShowDownload(showDownload) AS \n | (SELECT CAST(? AS INTEGER) = 1\n | AND (SELECT containerUid FROM LatestDownloadedContainer) = 0\n | AND (SELECT COUNT(*) FROM ActiveContentJobItems) = 0\n | AND (SELECT COUNT(*) FROM ContentEntryContainerUids) > 0)\n | \n | SELECT (SELECT showDownload FROM ShowDownload)\n | AS showDownloadButton,\n | \n | CAST(? AS INTEGER) = 0\n | OR (SELECT containerUid FROM LatestDownloadedContainer) != 0 \n | AS showOpenButton,\n | \n | (SELECT NOT showDownload FROM ShowDownload)\n | AND (SELECT COUNT(*) FROM ActiveContentJobItems) = 0 \n | AND (SELECT COALESCE(\n | (SELECT cntLastModified\n | FROM Container\n | WHERE containerContentEntryUid = ?\n | AND fileSize > 0\n | ORDER BY cntLastModified DESC), 0)) \n | > (SELECT COALESCE(\n | (SELECT cntLastModified\n | FROM Container\n | WHERE Container.containerUid = \n | (SELECT LatestDownloadedContainer.containerUid\n | FROM LatestDownloadedContainer)), 0)) \n | AS showUpdateButton,\n | \n | CAST(? AS INTEGER) = 1\n | AND (SELECT containerUid FROM LatestDownloadedContainer) != 0\n | AND (SELECT COUNT(*) FROM ActiveContentJobItems) = 0 \n | AS showDeleteButton,\n | \n | (SELECT COUNT(*) \n | FROM ActiveContentJobItems \n | WHERE cjiPluginId = 10) > 0\n | AS showManageDownloadButton\n | \n ')), ContentEntryDao_JdbcKt$buttonsToShowForContentEntry$lambda(contentEntryUid, platformDownloadEnabled), continuation); }; function ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda$lambda(_result) { return mapNextRow(_result, 0, ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda; Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.statusForDownloadDialog_s8cxhz$ = function (contentEntryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJobItem.cjiRecursiveStatus AS status\n | FROM ContentJobItem\n | WHERE ContentJobItem.cjiContentEntryUid = ?\n | AND ContentJobItem.cjiPluginId != 14\n | AND ContentJobItem.cjiStatus BETWEEN 4 AND 25\n | AND NOT EXISTS(\n | SELECT 1\n | FROM ContentJobItem ContentJobItemInternal\n | WHERE ContentJobItemInternal.cjiContentEntryUid = ?\n | AND ContentJobItemInternal.cjiPluginId = 14\n | AND ContentJobItemInternal.cjiFinishTime > ContentJobItem.cjiStartTime)\n | ORDER BY ContentJobItem.cjiFinishTime DESC\n | LIMIT 1\n | \n ')), ContentEntryDao_JdbcKt$statusForDownloadDialog$lambda(contentEntryUid), continuation); }; function ContentEntryDao_JdbcKt$statusForContentEntryList$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_status = closure$_result.getInt_61zpoe$('status'); var _tmp_progress = closure$_result.getLong_61zpoe$('progress'); var _tmp_total = closure$_result.getLong_61zpoe$('total'); var $receiver = new ContentJobItemProgressAndStatus(); $receiver.status = _tmp_status; $receiver.progress = _tmp_progress; $receiver.total = _tmp_total; return $receiver; }; } function ContentEntryDao_JdbcKt$statusForContentEntryList$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryDao_JdbcKt$statusForContentEntryList$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda.prototype.constructor = Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda; Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryDao_JdbcKt$statusForContentEntryList$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryDao_JdbcKt$statusForContentEntryList$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryDao_JdbcKt$statusForContentEntryList$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryDao_JdbcKt.prototype.statusForContentEntryList_s8cxhz$ = function (contentEntryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJobItem.cjiRecursiveStatus AS status, \n | ContentJobItem.cjiRecursiveProgress AS progress,\n | ContentJobItem.cjiRecursiveTotal AS total\n | FROM ContentJobItem\n | WHERE ContentJobItem.cjiContentEntryUid = ?\n | AND ContentJobItem.cjiPluginId != 14\n | AND ContentJobItem.cjiStatus BETWEEN 4 AND 25\n | AND NOT EXISTS(\n | SELECT 1\n | FROM ContentJobItem ContentJobItemInternal\n | WHERE ContentJobItemInternal.cjiContentEntryUid = ?\n | AND ContentJobItemInternal.cjiPluginId = 14\n | AND ContentJobItemInternal.cjiFinishTime > ContentJobItem.cjiStartTime)\n | ORDER BY ContentJobItem.cjiFinishTime DESC\n | LIMIT 1\n | \n ')), ContentEntryDao_JdbcKt$statusForContentEntryList$lambda(contentEntryUid), continuation); }; function ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContentEntry (contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.contentEntryUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.contentEntryUid); } stmt.setString_vqvrqt$(2, entity.title); stmt.setString_vqvrqt$(3, entity.description); stmt.setString_vqvrqt$(4, entity.entryId); stmt.setString_vqvrqt$(5, entity.author); stmt.setString_vqvrqt$(6, entity.publisher); stmt.setInt_vux9f0$(7, entity.licenseType); stmt.setString_vqvrqt$(8, entity.licenseName); stmt.setString_vqvrqt$(9, entity.licenseUrl); stmt.setString_vqvrqt$(10, entity.sourceUrl); stmt.setString_vqvrqt$(11, entity.thumbnailUrl); stmt.setLong_6svq3l$(12, entity.lastModified); stmt.setLong_6svq3l$(13, entity.primaryLanguageUid); stmt.setLong_6svq3l$(14, entity.languageVariantUid); stmt.setInt_vux9f0$(15, entity.contentFlags); stmt.setBoolean_fzusl$(16, entity.leaf); stmt.setBoolean_fzusl$(17, entity.publik); stmt.setBoolean_fzusl$(18, entity.ceInactive); stmt.setInt_vux9f0$(19, entity.completionCriteria); stmt.setInt_vux9f0$(20, entity.minScore); stmt.setInt_vux9f0$(21, entity.contentTypeFlag); stmt.setLong_6svq3l$(22, entity.contentOwner); stmt.setLong_6svq3l$(23, entity.contentEntryLocalChangeSeqNum); stmt.setLong_6svq3l$(24, entity.contentEntryMasterChangeSeqNum); stmt.setInt_vux9f0$(25, entity.contentEntryLastChangedBy); stmt.setLong_6svq3l$(26, entity.contentEntryLct); }; ContentEntryDao_JdbcKt$_insertAdapterContentEntry_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO ContentEntry (contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.contentEntryUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.contentEntryUid); } stmt.setString_vqvrqt$(2, entity.title); stmt.setString_vqvrqt$(3, entity.description); stmt.setString_vqvrqt$(4, entity.entryId); stmt.setString_vqvrqt$(5, entity.author); stmt.setString_vqvrqt$(6, entity.publisher); stmt.setInt_vux9f0$(7, entity.licenseType); stmt.setString_vqvrqt$(8, entity.licenseName); stmt.setString_vqvrqt$(9, entity.licenseUrl); stmt.setString_vqvrqt$(10, entity.sourceUrl); stmt.setString_vqvrqt$(11, entity.thumbnailUrl); stmt.setLong_6svq3l$(12, entity.lastModified); stmt.setLong_6svq3l$(13, entity.primaryLanguageUid); stmt.setLong_6svq3l$(14, entity.languageVariantUid); stmt.setInt_vux9f0$(15, entity.contentFlags); stmt.setBoolean_fzusl$(16, entity.leaf); stmt.setBoolean_fzusl$(17, entity.publik); stmt.setBoolean_fzusl$(18, entity.ceInactive); stmt.setInt_vux9f0$(19, entity.completionCriteria); stmt.setInt_vux9f0$(20, entity.minScore); stmt.setInt_vux9f0$(21, entity.contentTypeFlag); stmt.setLong_6svq3l$(22, entity.contentOwner); stmt.setLong_6svq3l$(23, entity.contentEntryLocalChangeSeqNum); stmt.setLong_6svq3l$(24, entity.contentEntryMasterChangeSeqNum); stmt.setInt_vux9f0$(25, entity.contentEntryLastChangedBy); stmt.setLong_6svq3l$(26, entity.contentEntryLct); }; ContentEntryDao_JdbcKt$_insertAdapterContentEntry_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentEntryDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryDao_JdbcKt', interfaces: [ContentEntryDao]}; function ContentEntryDao_ReplicateWrapper(_db, _dao) { ContentEntryDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_45($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_45.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_45.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_45.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_45; Coroutine$replicateOnNewNode_s8cxhz$_45.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_45(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_42($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_42.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_42.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_42.prototype.constructor = Coroutine$replicateOnChange_42; Coroutine$replicateOnChange_42.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_42(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_o4zuk4$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_o4zuk4$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_o4zuk4$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_o4zuk4$_0.prototype.constructor = Coroutine$insertListAsync_o4zuk4$_0; Coroutine$insertListAsync_o4zuk4$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.contentEntryUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(42, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.contentEntryUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.contentEntryLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_o4zuk4$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_ReplicateWrapper.prototype.insertListAsync_o4zuk4$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_o4zuk4$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_ReplicateWrapper.prototype.findEntryWithLanguageByEntryIdAsync_s8cxhz$ = function (entryUuid, continuation) { return this._dao_0.findEntryWithLanguageByEntryIdAsync_s8cxhz$(entryUuid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findEntryWithBlockAndLanguageByUidAsync_s8cxhz$ = function (entityUid, continuation) { return this._dao_0.findEntryWithBlockAndLanguageByUidAsync_s8cxhz$(entityUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findEntryWithContainerByEntryId_s8cxhz$ = function (entryUuid, continuation) { return this._dao_0.findEntryWithContainerByEntryId_s8cxhz$(entryUuid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findEntryWithContainerByEntryIdLive_s8cxhz$ = function (entryUuid) { return this._dao_0.findEntryWithContainerByEntryIdLive_s8cxhz$(entryUuid); }; ContentEntryDao_ReplicateWrapper.prototype.findBySourceUrl_61zpoe$ = function (sourceUrl) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.findTitleByUidAsync_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.findTitleByUidAsync_s8cxhz$(contentEntryUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getChildrenByParentUid_s8cxhz$ = function (parentUid) { return this._dao_0.getChildrenByParentUid_s8cxhz$(parentUid); }; ContentEntryDao_ReplicateWrapper.prototype.getChildrenByParentAsync_s8cxhz$ = function (parentUid, continuation) { return this._dao_0.getChildrenByParentAsync_s8cxhz$(parentUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getContentJobItemParamsByParentUid_liip7b$ = function (parentUid, limit, offset, continuation) { return this._dao_0.getContentJobItemParamsByParentUid_liip7b$(parentUid, limit, offset, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getCountNumberOfChildrenByParentUUidAsync_s8cxhz$ = function (parentUid, continuation) { return this._dao_0.getCountNumberOfChildrenByParentUUidAsync_s8cxhz$(parentUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getContentByUuidAsync_s8cxhz$ = function (parentUid, continuation) { return this._dao_0.getContentByUuidAsync_s8cxhz$(parentUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findAllLanguageRelatedEntriesAsync_s8cxhz$ = function (entryUuid, continuation) { return this._dao_0.findAllLanguageRelatedEntriesAsync_s8cxhz$(entryUuid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findListOfCategoriesAsync_s8cxhz$ = function (parentUid, continuation) { return this._dao_0.findListOfCategoriesAsync_s8cxhz$(parentUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findUniqueLanguagesInListAsync_s8cxhz$ = function (parentUid, continuation) { return this._dao_0.findUniqueLanguagesInListAsync_s8cxhz$(parentUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findUniqueLanguageWithParentUid_s8cxhz$ = function (parentUid, continuation) { return this._dao_0.findUniqueLanguageWithParentUid_s8cxhz$(parentUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (entryUid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(entryUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findByUidWithLanguageAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidWithLanguageAsync_s8cxhz$(uid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (entryUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.findByTitle_61zpoe$ = function (title) { return this._dao_0.findByTitle_61zpoe$(title); }; ContentEntryDao_ReplicateWrapper.prototype.isMeteredAllowedForEntry_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.isMeteredAllowedForEntry_s8cxhz$(contentEntryUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.findBySourceUrlWithContentEntryStatusAsync_61zpoe$ = function (sourceUrl, continuation) { return this._dao_0.findBySourceUrlWithContentEntryStatusAsync_61zpoe$(sourceUrl, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getChildrenByParentUidWithCategoryFilterOrderByName_dqef2m$ = function (parentUid, langParam, categoryParam0, personUid, showHidden, onlyFolder, sortOrder) { return this._dao_0.getChildrenByParentUidWithCategoryFilterOrderByName_dqef2m$(parentUid, langParam, categoryParam0, personUid, showHidden, onlyFolder, sortOrder); }; ContentEntryDao_ReplicateWrapper.prototype.getContentFromMyCourses_s8cxhz$ = function (personUid) { return this._dao_0.getContentFromMyCourses_s8cxhz$(personUid); }; ContentEntryDao_ReplicateWrapper.prototype.getContentByOwner_s8cxhz$ = function (personUid) { return this._dao_0.getContentByOwner_s8cxhz$(personUid); }; ContentEntryDao_ReplicateWrapper.prototype.updateAsync_4pedz3$ = function (entity, continuation) { entity.contentEntryLct = systemTimeInMillis(); return this._dao_0.updateAsync_4pedz3$(entity, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getChildrenByAll_s8cxhz$ = function (parentUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.findLiveContentEntry_s8cxhz$ = function (parentUid) { return this._dao_0.findLiveContentEntry_s8cxhz$(parentUid); }; ContentEntryDao_ReplicateWrapper.prototype.getContentEntryUidFromXapiObjectId_61zpoe$ = function (objectId) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.findSimilarIdEntryForKhan_61zpoe$ = function (sourceUrl) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.getRecursiveDownloadTotals_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.getRecursiveDownloadTotals_s8cxhz$(contentEntryUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.getAllEntriesRecursively_s8cxhz$ = function (contentEntryUid) { return this._dao_0.getAllEntriesRecursively_s8cxhz$(contentEntryUid); }; ContentEntryDao_ReplicateWrapper.prototype.getAllEntriesRecursivelyAsList_s8cxhz$ = function (contentEntryUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.updateContentEntryInActive_zaz62j$ = function (contentEntryUid, ceInactive, changedTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.updateContentEntryContentFlag_h639zw$ = function (contentFlag, contentEntryUid, changedTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.replaceList_o4zuk4$ = function (entries) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.getContentEntryFromUids_gox9k8$ = function (contentEntryUids, continuation) { return this._dao_0.getContentEntryFromUids_gox9k8$(contentEntryUids, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.insertWithReplace_4pedz3$ = function (entry) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.findAllLive = function () { return this._dao_0.findAllLive(); }; ContentEntryDao_ReplicateWrapper.prototype.personHasPermissionWithContentEntry_b9bd0d$ = function (accountPersonUid, contentEntryUid, permission, continuation) { return this._dao_0.personHasPermissionWithContentEntry_b9bd0d$(accountPersonUid, contentEntryUid, permission, continuation); }; function Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_0($this, jobId_0, inactive_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$jobId = jobId_0; this.local$inactive = inactive_0; this.local$changedTime = changedTime_0; } Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_0.prototype.constructor = Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_0; Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateContentEntryActiveByContentJobUid_zaz62j$(this.local$jobId, this.local$inactive, this.local$changedTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_ReplicateWrapper.prototype.updateContentEntryActiveByContentJobUid_zaz62j$ = function (jobId_0, inactive_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_0(this, jobId_0, inactive_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0($this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$changedTime = changedTime_0; } Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0.prototype.constructor = Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0; Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.toggleVisibilityContentEntryItems_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$changedTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_ReplicateWrapper.prototype.toggleVisibilityContentEntryItems_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_0(this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_ReplicateWrapper.prototype.findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize = function (continuation) { return this._dao_0.findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize(continuation); }; ContentEntryDao_ReplicateWrapper.prototype.buttonsToShowForContentEntry_2gd3um$ = function (contentEntryUid, platformDownloadEnabled, continuation) { return this._dao_0.buttonsToShowForContentEntry_2gd3um$(contentEntryUid, platformDownloadEnabled, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.statusForDownloadDialog_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.statusForDownloadDialog_s8cxhz$(contentEntryUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.statusForContentEntryList_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.statusForContentEntryList_s8cxhz$(contentEntryUid, continuation); }; ContentEntryDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_51($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_51.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_51.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_51.prototype.constructor = Coroutine$insertAsync_51; Coroutine$insertAsync_51.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.contentEntryUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(42, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.contentEntryUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.contentEntryLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.contentEntryUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_51(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryDao_ReplicateWrapper', interfaces: [ContentEntryDao]}; function ContentEntryDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentEntryDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_46($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_46.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_46.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_46.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_46; Coroutine$replicateOnNewNode_s8cxhz$_46.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_46(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_43($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_43.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_43.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_43.prototype.constructor = Coroutine$replicateOnChange_43; Coroutine$replicateOnChange_43.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_43(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_o4zuk4$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_o4zuk4$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_o4zuk4$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_o4zuk4$_1.prototype.constructor = Coroutine$insertListAsync_o4zuk4$_1; Coroutine$insertListAsync_o4zuk4$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_o4zuk4$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.insertListAsync_o4zuk4$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_o4zuk4$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findEntryWithLanguageByEntryIdAsync_s8cxhz$($this, entryUuid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entryUuid = entryUuid_0; } Coroutine$findEntryWithLanguageByEntryIdAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEntryWithLanguageByEntryIdAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEntryWithLanguageByEntryIdAsync_s8cxhz$.prototype.constructor = Coroutine$findEntryWithLanguageByEntryIdAsync_s8cxhz$; Coroutine$findEntryWithLanguageByEntryIdAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findEntryWithLanguageByEntryIdAsync_s8cxhz$(this.local$entryUuid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findEntryWithLanguageByEntryIdAsync_s8cxhz$ = function (entryUuid_0, continuation_0, suspended) { var instance = new Coroutine$findEntryWithLanguageByEntryIdAsync_s8cxhz$(this, entryUuid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findEntryWithBlockAndLanguageByUidAsync_s8cxhz$($this, entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityUid = entityUid_0; } Coroutine$findEntryWithBlockAndLanguageByUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEntryWithBlockAndLanguageByUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEntryWithBlockAndLanguageByUidAsync_s8cxhz$.prototype.constructor = Coroutine$findEntryWithBlockAndLanguageByUidAsync_s8cxhz$; Coroutine$findEntryWithBlockAndLanguageByUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findEntryWithBlockAndLanguageByUidAsync_s8cxhz$(this.local$entityUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findEntryWithBlockAndLanguageByUidAsync_s8cxhz$ = function (entityUid_0, continuation_0, suspended) { var instance = new Coroutine$findEntryWithBlockAndLanguageByUidAsync_s8cxhz$(this, entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findEntryWithContainerByEntryId_s8cxhz$($this, entryUuid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entryUuid = entryUuid_0; } Coroutine$findEntryWithContainerByEntryId_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findEntryWithContainerByEntryId_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findEntryWithContainerByEntryId_s8cxhz$.prototype.constructor = Coroutine$findEntryWithContainerByEntryId_s8cxhz$; Coroutine$findEntryWithContainerByEntryId_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findEntryWithContainerByEntryId_s8cxhz$(this.local$entryUuid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findEntryWithContainerByEntryId_s8cxhz$ = function (entryUuid_0, continuation_0, suspended) { var instance = new Coroutine$findEntryWithContainerByEntryId_s8cxhz$(this, entryUuid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.findEntryWithContainerByEntryIdLive_s8cxhz$ = function (entryUuid) { var _result = this._dao.findEntryWithContainerByEntryIdLive_s8cxhz$(entryUuid); return _result; }; ContentEntryDao_Repo.prototype.findBySourceUrl_61zpoe$ = function (sourceUrl) { var _result = this._dao.findBySourceUrl_61zpoe$(sourceUrl); return _result; }; function Coroutine$findTitleByUidAsync_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findTitleByUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findTitleByUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findTitleByUidAsync_s8cxhz$.prototype.constructor = Coroutine$findTitleByUidAsync_s8cxhz$; Coroutine$findTitleByUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findTitleByUidAsync_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findTitleByUidAsync_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findTitleByUidAsync_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.getChildrenByParentUid_s8cxhz$ = function (parentUid) { var _result = this._dao.getChildrenByParentUid_s8cxhz$(parentUid); return _result; }; function Coroutine$getChildrenByParentAsync_s8cxhz$($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$parentUid = parentUid_0; } Coroutine$getChildrenByParentAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getChildrenByParentAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getChildrenByParentAsync_s8cxhz$.prototype.constructor = Coroutine$getChildrenByParentAsync_s8cxhz$; Coroutine$getChildrenByParentAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getChildrenByParentAsync_s8cxhz$(this.local$parentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.getChildrenByParentAsync_s8cxhz$ = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$getChildrenByParentAsync_s8cxhz$(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getContentJobItemParamsByParentUid_liip7b$($this, parentUid_0, limit_0, offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$parentUid = parentUid_0; this.local$limit = limit_0; this.local$offset = offset_0; } Coroutine$getContentJobItemParamsByParentUid_liip7b$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getContentJobItemParamsByParentUid_liip7b$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getContentJobItemParamsByParentUid_liip7b$.prototype.constructor = Coroutine$getContentJobItemParamsByParentUid_liip7b$; Coroutine$getContentJobItemParamsByParentUid_liip7b$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getContentJobItemParamsByParentUid_liip7b$(this.local$parentUid, this.local$limit, this.local$offset, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.getContentJobItemParamsByParentUid_liip7b$ = function (parentUid_0, limit_0, offset_0, continuation_0, suspended) { var instance = new Coroutine$getContentJobItemParamsByParentUid_liip7b$(this, parentUid_0, limit_0, offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getCountNumberOfChildrenByParentUUidAsync_s8cxhz$($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$parentUid = parentUid_0; } Coroutine$getCountNumberOfChildrenByParentUUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getCountNumberOfChildrenByParentUUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getCountNumberOfChildrenByParentUUidAsync_s8cxhz$.prototype.constructor = Coroutine$getCountNumberOfChildrenByParentUUidAsync_s8cxhz$; Coroutine$getCountNumberOfChildrenByParentUUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getCountNumberOfChildrenByParentUUidAsync_s8cxhz$(this.local$parentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.getCountNumberOfChildrenByParentUUidAsync_s8cxhz$ = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$getCountNumberOfChildrenByParentUUidAsync_s8cxhz$(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getContentByUuidAsync_s8cxhz$($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$parentUid = parentUid_0; } Coroutine$getContentByUuidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getContentByUuidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getContentByUuidAsync_s8cxhz$.prototype.constructor = Coroutine$getContentByUuidAsync_s8cxhz$; Coroutine$getContentByUuidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getContentByUuidAsync_s8cxhz$(this.local$parentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.getContentByUuidAsync_s8cxhz$ = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$getContentByUuidAsync_s8cxhz$(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllLanguageRelatedEntriesAsync_s8cxhz$($this, entryUuid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entryUuid = entryUuid_0; } Coroutine$findAllLanguageRelatedEntriesAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllLanguageRelatedEntriesAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllLanguageRelatedEntriesAsync_s8cxhz$.prototype.constructor = Coroutine$findAllLanguageRelatedEntriesAsync_s8cxhz$; Coroutine$findAllLanguageRelatedEntriesAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllLanguageRelatedEntriesAsync_s8cxhz$(this.local$entryUuid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findAllLanguageRelatedEntriesAsync_s8cxhz$ = function (entryUuid_0, continuation_0, suspended) { var instance = new Coroutine$findAllLanguageRelatedEntriesAsync_s8cxhz$(this, entryUuid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.findListOfCategoriesAsync_s8cxhz$ = function (parentUid, continuation) { throw IllegalStateException_init('Synchronous HTTP is not supported on Door/Javascript!'); }; function Coroutine$findUniqueLanguagesInListAsync_s8cxhz$($this, parentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$parentUid = parentUid_0; } Coroutine$findUniqueLanguagesInListAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findUniqueLanguagesInListAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findUniqueLanguagesInListAsync_s8cxhz$.prototype.constructor = Coroutine$findUniqueLanguagesInListAsync_s8cxhz$; Coroutine$findUniqueLanguagesInListAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findUniqueLanguagesInListAsync_s8cxhz$(this.local$parentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findUniqueLanguagesInListAsync_s8cxhz$ = function (parentUid_0, continuation_0, suspended) { var instance = new Coroutine$findUniqueLanguagesInListAsync_s8cxhz$(this, parentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.findUniqueLanguageWithParentUid_s8cxhz$ = function (parentUid, continuation) { throw IllegalStateException_init('Synchronous HTTP is not supported on Door/Javascript!'); }; ContentEntryDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$findByUidAsync_s8cxhz$_3($this, entryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entryUid = entryUid_0; } Coroutine$findByUidAsync_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_3.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_3; Coroutine$findByUidAsync_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$entryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (entryUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_3(this, entryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidWithLanguageAsync_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidWithLanguageAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithLanguageAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithLanguageAsync_s8cxhz$.prototype.constructor = Coroutine$findByUidWithLanguageAsync_s8cxhz$; Coroutine$findByUidWithLanguageAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidWithLanguageAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findByUidWithLanguageAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithLanguageAsync_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.findByUid_s8cxhz$ = function (entryUid) { var _result = this._dao.findByUid_s8cxhz$(entryUid); return _result; }; ContentEntryDao_Repo.prototype.findByTitle_61zpoe$ = function (title) { var _result = this._dao.findByTitle_61zpoe$(title); return _result; }; function Coroutine$isMeteredAllowedForEntry_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$isMeteredAllowedForEntry_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$isMeteredAllowedForEntry_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$isMeteredAllowedForEntry_s8cxhz$.prototype.constructor = Coroutine$isMeteredAllowedForEntry_s8cxhz$; Coroutine$isMeteredAllowedForEntry_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.isMeteredAllowedForEntry_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.isMeteredAllowedForEntry_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$isMeteredAllowedForEntry_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findBySourceUrlWithContentEntryStatusAsync_61zpoe$($this, sourceUrl_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sourceUrl = sourceUrl_0; } Coroutine$findBySourceUrlWithContentEntryStatusAsync_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findBySourceUrlWithContentEntryStatusAsync_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findBySourceUrlWithContentEntryStatusAsync_61zpoe$.prototype.constructor = Coroutine$findBySourceUrlWithContentEntryStatusAsync_61zpoe$; Coroutine$findBySourceUrlWithContentEntryStatusAsync_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findBySourceUrlWithContentEntryStatusAsync_61zpoe$(this.local$sourceUrl, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findBySourceUrlWithContentEntryStatusAsync_61zpoe$ = function (sourceUrl_0, continuation_0, suspended) { var instance = new Coroutine$findBySourceUrlWithContentEntryStatusAsync_61zpoe$(this, sourceUrl_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.getChildrenByParentUidWithCategoryFilterOrderByName_dqef2m$ = function (parentUid, langParam, categoryParam0, personUid, showHidden, onlyFolder, sortOrder) { var _result = this._dao.getChildrenByParentUidWithCategoryFilterOrderByName_dqef2m$(parentUid, langParam, categoryParam0, personUid, showHidden, onlyFolder, sortOrder); return _result; }; ContentEntryDao_Repo.prototype.getContentFromMyCourses_s8cxhz$ = function (personUid) { var _result = this._dao.getContentFromMyCourses_s8cxhz$(personUid); return _result; }; ContentEntryDao_Repo.prototype.getContentByOwner_s8cxhz$ = function (personUid) { var _result = this._dao.getContentByOwner_s8cxhz$(personUid); return _result; }; function Coroutine$updateAsync_4pedz3$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_4pedz3$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_4pedz3$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_4pedz3$_0.prototype.constructor = Coroutine$updateAsync_4pedz3$_0; Coroutine$updateAsync_4pedz3$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_4pedz3$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.updateAsync_4pedz3$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_4pedz3$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.getChildrenByAll_s8cxhz$ = function (parentUid) { var _result = this._dao.getChildrenByAll_s8cxhz$(parentUid); return _result; }; ContentEntryDao_Repo.prototype.findLiveContentEntry_s8cxhz$ = function (parentUid) { var _result = this._dao.findLiveContentEntry_s8cxhz$(parentUid); return _result; }; ContentEntryDao_Repo.prototype.getContentEntryUidFromXapiObjectId_61zpoe$ = function (objectId) { var _result = this._dao.getContentEntryUidFromXapiObjectId_61zpoe$(objectId); return _result; }; ContentEntryDao_Repo.prototype.findSimilarIdEntryForKhan_61zpoe$ = function (sourceUrl) { var _result = this._dao.findSimilarIdEntryForKhan_61zpoe$(sourceUrl); return _result; }; ContentEntryDao_Repo.prototype.getRecursiveDownloadTotals_s8cxhz$ = function (contentEntryUid, continuation) { throw IllegalStateException_init('Synchronous HTTP is not supported on Door/Javascript!'); }; ContentEntryDao_Repo.prototype.getAllEntriesRecursively_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.getAllEntriesRecursively_s8cxhz$(contentEntryUid); return _result; }; ContentEntryDao_Repo.prototype.getAllEntriesRecursivelyAsList_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.getAllEntriesRecursivelyAsList_s8cxhz$(contentEntryUid); return _result; }; ContentEntryDao_Repo.prototype.updateContentEntryInActive_zaz62j$ = function (contentEntryUid, ceInactive, changedTime) { this._dao.updateContentEntryInActive_zaz62j$(contentEntryUid, ceInactive, changedTime); }; ContentEntryDao_Repo.prototype.updateContentEntryContentFlag_h639zw$ = function (contentFlag, contentEntryUid, changedTime) { this._dao.updateContentEntryContentFlag_h639zw$(contentFlag, contentEntryUid, changedTime); }; ContentEntryDao_Repo.prototype.replaceList_o4zuk4$ = function (entries) { this._dao.replaceList_o4zuk4$(entries); }; function Coroutine$getContentEntryFromUids_gox9k8$($this, contentEntryUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUids = contentEntryUids_0; } Coroutine$getContentEntryFromUids_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getContentEntryFromUids_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getContentEntryFromUids_gox9k8$.prototype.constructor = Coroutine$getContentEntryFromUids_gox9k8$; Coroutine$getContentEntryFromUids_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getContentEntryFromUids_gox9k8$(this.local$contentEntryUids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.getContentEntryFromUids_gox9k8$ = function (contentEntryUids_0, continuation_0, suspended) { var instance = new Coroutine$getContentEntryFromUids_gox9k8$(this, contentEntryUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.insertWithReplace_4pedz3$ = function (entry) { this._dao.insertWithReplace_4pedz3$(entry); }; ContentEntryDao_Repo.prototype.findAllLive = function () { var _result = this._dao.findAllLive(); return _result; }; function Coroutine$personHasPermissionWithContentEntry_b9bd0d$($this, accountPersonUid_0, contentEntryUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$contentEntryUid = contentEntryUid_0; this.local$permission = permission_0; } Coroutine$personHasPermissionWithContentEntry_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personHasPermissionWithContentEntry_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personHasPermissionWithContentEntry_b9bd0d$.prototype.constructor = Coroutine$personHasPermissionWithContentEntry_b9bd0d$; Coroutine$personHasPermissionWithContentEntry_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.personHasPermissionWithContentEntry_b9bd0d$(this.local$accountPersonUid, this.local$contentEntryUid, this.local$permission, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.personHasPermissionWithContentEntry_b9bd0d$ = function (accountPersonUid_0, contentEntryUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$personHasPermissionWithContentEntry_b9bd0d$(this, accountPersonUid_0, contentEntryUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_1($this, jobId_0, inactive_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$jobId = jobId_0; this.local$inactive = inactive_0; this.local$changedTime = changedTime_0; } Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_1.prototype.constructor = Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_1; Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateContentEntryActiveByContentJobUid_zaz62j$(this.local$jobId, this.local$inactive, this.local$changedTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.updateContentEntryActiveByContentJobUid_zaz62j$ = function (jobId_0, inactive_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$updateContentEntryActiveByContentJobUid_zaz62j$_1(this, jobId_0, inactive_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1($this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$changedTime = changedTime_0; } Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1.prototype.constructor = Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1; Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.toggleVisibilityContentEntryItems_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$changedTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.toggleVisibilityContentEntryItems_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityContentEntryItems_cbj1f0$_1(this, toggleVisibility_0, selectedItem_0, changedTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize.prototype.constructor = Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize; Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize = function (continuation_0, suspended) { var instance = new Coroutine$findContentEntriesWhereIsLeafAndLatestContainerHasNoEntriesOrHasZeroFileSize(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$buttonsToShowForContentEntry_2gd3um$($this, contentEntryUid_0, platformDownloadEnabled_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$platformDownloadEnabled = platformDownloadEnabled_0; } Coroutine$buttonsToShowForContentEntry_2gd3um$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$buttonsToShowForContentEntry_2gd3um$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$buttonsToShowForContentEntry_2gd3um$.prototype.constructor = Coroutine$buttonsToShowForContentEntry_2gd3um$; Coroutine$buttonsToShowForContentEntry_2gd3um$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.buttonsToShowForContentEntry_2gd3um$(this.local$contentEntryUid, this.local$platformDownloadEnabled, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.buttonsToShowForContentEntry_2gd3um$ = function (contentEntryUid_0, platformDownloadEnabled_0, continuation_0, suspended) { var instance = new Coroutine$buttonsToShowForContentEntry_2gd3um$(this, contentEntryUid_0, platformDownloadEnabled_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$statusForDownloadDialog_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$statusForDownloadDialog_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$statusForDownloadDialog_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$statusForDownloadDialog_s8cxhz$.prototype.constructor = Coroutine$statusForDownloadDialog_s8cxhz$; Coroutine$statusForDownloadDialog_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.statusForDownloadDialog_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.statusForDownloadDialog_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$statusForDownloadDialog_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$statusForContentEntryList_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$statusForContentEntryList_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$statusForContentEntryList_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$statusForContentEntryList_s8cxhz$.prototype.constructor = Coroutine$statusForContentEntryList_s8cxhz$; Coroutine$statusForContentEntryList_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.statusForContentEntryList_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.statusForContentEntryList_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$statusForContentEntryList_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_52($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_52.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_52.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_52.prototype.constructor = Coroutine$insertAsync_52; Coroutine$insertAsync_52.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_52(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentEntryDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentEntryDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryDao_Repo', interfaces: [ContentEntryDao]}; function ContentEntryParentChildJoinDao() { } ContentEntryParentChildJoinDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryParentChildJoinDao', interfaces: [BaseDao]}; function ContentEntryParentChildJoinDao_JdbcKt(_db) { ContentEntryParentChildJoinDao.call(this); this._db = _db; this._insertAdapterContentEntryParentChildJoin_ = new ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral(this._db); this._insertAdapterContentEntryParentChildJoin_upsert = new ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral(this._db); } function Coroutine$insertListAsync_crmpdg$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_crmpdg$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_crmpdg$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_crmpdg$.prototype.constructor = Coroutine$insertListAsync_crmpdg$; Coroutine$insertListAsync_crmpdg$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntryParentChildJoin_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.insertListAsync_crmpdg$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_crmpdg$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.replaceList_crmpdg$ = function (entries) { this._insertAdapterContentEntryParentChildJoin_upsert.insertList_4ezy5m$(entries); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.insertWithReplace_iynbz7$ = function (parentChildJoinDao) { this._insertAdapterContentEntryParentChildJoin_upsert.insert_11rb$(parentChildJoinDao); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentEntryParentChildJoin_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_53($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_53.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_53.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_53.prototype.constructor = Coroutine$insertAsync_53; Coroutine$insertAsync_53.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntryParentChildJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_53(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentEntryParentChildJoin_.insertList_4ezy5m$(entityList); }; function ContentEntryParentChildJoinDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cepcjLocalChangeSeqNum); _stmt.setLong_6svq3l$(2, _entity.cepcjMasterChangeSeqNum); _stmt.setInt_vux9f0$(3, _entity.cepcjLastChangedBy); _stmt.setLong_6svq3l$(4, _entity.cepcjLct); _stmt.setLong_6svq3l$(5, _entity.cepcjParentContentEntryUid); _stmt.setLong_6svq3l$(6, _entity.cepcjChildContentEntryUid); _stmt.setInt_vux9f0$(7, _entity.childIndex); _stmt.setLong_6svq3l$(8, _entity.cepcjUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentEntryParentChildJoin SET cepcjLocalChangeSeqNum = ?, cepcjMasterChangeSeqNum = ?, cepcjLastChangedBy = ?, cepcjLct = ?, cepcjParentContentEntryUid = ?, cepcjChildContentEntryUid = ?, childIndex = ? WHERE cepcjUid = ?'; prepareAndUseStatement(this._db, _sql, ContentEntryParentChildJoinDao_JdbcKt$updateList$lambda(entityList)); }; function ContentEntryParentChildJoinDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cepcjLocalChangeSeqNum); _stmt.setLong_6svq3l$(2, closure$entity.cepcjMasterChangeSeqNum); _stmt.setInt_vux9f0$(3, closure$entity.cepcjLastChangedBy); _stmt.setLong_6svq3l$(4, closure$entity.cepcjLct); _stmt.setLong_6svq3l$(5, closure$entity.cepcjParentContentEntryUid); _stmt.setLong_6svq3l$(6, closure$entity.cepcjChildContentEntryUid); _stmt.setInt_vux9f0$(7, closure$entity.childIndex); _stmt.setLong_6svq3l$(8, closure$entity.cepcjUid); return _stmt.executeUpdate(); }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentEntryParentChildJoin SET cepcjLocalChangeSeqNum = ?, cepcjMasterChangeSeqNum = ?, cepcjLastChangedBy = ?, cepcjLct = ?, cepcjParentContentEntryUid = ?, cepcjChildContentEntryUid = ?, childIndex = ? WHERE cepcjUid = ?'; prepareAndUseStatement(this._db, _sql, ContentEntryParentChildJoinDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_47($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_47.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_47.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_47.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_47; Coroutine$replicateOnNewNode_s8cxhz$_47.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryParentChildJoinReplicate(cepcjPk, cepcjDestination)\n | SELECT DISTINCT ContentEntryParentChildJoin.cepcjUid AS cepcjUid,\n | ? AS cepcjDestination\n | FROM ContentEntryParentChildJoin\n | WHERE ContentEntryParentChildJoin.cepcjLct != COALESCE(\n | (SELECT cepcjVersionId\n | FROM ContentEntryParentChildJoinReplicate\n | WHERE cepcjPk = ContentEntryParentChildJoin.cepcjUid\n | AND cepcjDestination = ?), -1) \n | /*psql ON CONFLICT(cepcjPk, cepcjDestination) DO UPDATE\n | SET cepcjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryParentChildJoinReplicate(cepcjPk, cepcjDestination)\n | SELECT DISTINCT ContentEntryParentChildJoin.cepcjUid AS cepcjUid,\n | ? AS cepcjDestination\n | FROM ContentEntryParentChildJoin\n | WHERE ContentEntryParentChildJoin.cepcjLct != COALESCE(\n | (SELECT cepcjVersionId\n | FROM ContentEntryParentChildJoinReplicate\n | WHERE cepcjPk = ContentEntryParentChildJoin.cepcjUid\n | AND cepcjDestination = ?), -1) \n | ON CONFLICT(cepcjPk, cepcjDestination) DO UPDATE\n | SET cepcjPending = true\n | \n | \n |')), ContentEntryParentChildJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_47(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_44($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_44.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_44.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_44.prototype.constructor = Coroutine$replicateOnChange_44; Coroutine$replicateOnChange_44.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryParentChildJoinReplicate(cepcjPk, cepcjDestination)\n | SELECT DISTINCT ContentEntryParentChildJoin.cepcjUid AS cepcjUid,\n | UserSession.usClientNodeId AS cepcjDestination\n | FROM ChangeLog\n | JOIN ContentEntryParentChildJoin\n | ON ChangeLog.chTableId = 7\n | AND ChangeLog.chEntityPk = ContentEntryParentChildJoin.cepcjUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryParentChildJoin.cepcjLct != COALESCE(\n | (SELECT cepcjVersionId\n | FROM ContentEntryParentChildJoinReplicate\n | WHERE cepcjPk = ContentEntryParentChildJoin.cepcjUid\n | AND cepcjDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cepcjPk, cepcjDestination) DO UPDATE\n | SET cepcjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryParentChildJoinReplicate(cepcjPk, cepcjDestination)\n | SELECT DISTINCT ContentEntryParentChildJoin.cepcjUid AS cepcjUid,\n | UserSession.usClientNodeId AS cepcjDestination\n | FROM ChangeLog\n | JOIN ContentEntryParentChildJoin\n | ON ChangeLog.chTableId = 7\n | AND ChangeLog.chEntityPk = ContentEntryParentChildJoin.cepcjUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryParentChildJoin.cepcjLct != COALESCE(\n | (SELECT cepcjVersionId\n | FROM ContentEntryParentChildJoinReplicate\n | WHERE cepcjPk = ContentEntryParentChildJoin.cepcjUid\n | AND cepcjDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cepcjPk, cepcjDestination) DO UPDATE\n | SET cepcjPending = true\n | \n | \n |')), ContentEntryParentChildJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_44(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryParentChildJoinDao_JdbcKt$publicContentEntryParentChildJoins$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); var $receiver = new ContentEntryParentChildJoin(); $receiver.cepcjUid = _tmp_cepcjUid; $receiver.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver.cepcjLct = _tmp_cepcjLct; $receiver.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver.childIndex = _tmp_childIndex; return $receiver; }; } function ContentEntryParentChildJoinDao_JdbcKt$publicContentEntryParentChildJoins$lambda$lambda(_result) { return mapRows(_result, ContentEntryParentChildJoinDao_JdbcKt$publicContentEntryParentChildJoins$lambda$lambda$lambda(_result)); } function ContentEntryParentChildJoinDao_JdbcKt$publicContentEntryParentChildJoins$lambda(_stmt) { return useResults(_stmt.executeQuery(), ContentEntryParentChildJoinDao_JdbcKt$publicContentEntryParentChildJoins$lambda$lambda); } ContentEntryParentChildJoinDao_JdbcKt.prototype.publicContentEntryParentChildJoins = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT ContentEntryParentChildJoin.* FROM ContentEntryParentChildJoin LEFT JOIN ContentEntry parentEntry ON ContentEntryParentChildJoin.cepcjParentContentEntryUid = parentEntry.contentEntryUid LEFT JOIN ContentEntry childEntry ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = childEntry.contentEntryUid WHERE parentEntry.publik AND childEntry.publik'), ContentEntryParentChildJoinDao_JdbcKt$publicContentEntryParentChildJoins$lambda); }; function ContentEntryParentChildJoinDao_JdbcKt$all$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); var $receiver = new ContentEntryParentChildJoin(); $receiver.cepcjUid = _tmp_cepcjUid; $receiver.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver.cepcjLct = _tmp_cepcjLct; $receiver.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver.childIndex = _tmp_childIndex; return $receiver; }; } function ContentEntryParentChildJoinDao_JdbcKt$all$lambda$lambda(_result) { return mapRows(_result, ContentEntryParentChildJoinDao_JdbcKt$all$lambda$lambda$lambda(_result)); } function ContentEntryParentChildJoinDao_JdbcKt$all$lambda(_stmt) { return useResults(_stmt.executeQuery(), ContentEntryParentChildJoinDao_JdbcKt$all$lambda$lambda); } ContentEntryParentChildJoinDao_JdbcKt.prototype.all = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContentEntryParentChildJoin'), ContentEntryParentChildJoinDao_JdbcKt$all$lambda); }; function ContentEntryParentChildJoinDao_JdbcKt$findParentByChildUuids$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); var $receiver = new ContentEntryParentChildJoin(); $receiver.cepcjUid = _tmp_cepcjUid; $receiver.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver.cepcjLct = _tmp_cepcjLct; $receiver.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver.childIndex = _tmp_childIndex; return $receiver; }; } function ContentEntryParentChildJoinDao_JdbcKt$findParentByChildUuids$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryParentChildJoinDao_JdbcKt$findParentByChildUuids$lambda$lambda$lambda(_result)); } function ContentEntryParentChildJoinDao_JdbcKt$findParentByChildUuids$lambda(closure$childEntryContentUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$childEntryContentUid); return useResults(_stmt.executeQuery(), ContentEntryParentChildJoinDao_JdbcKt$findParentByChildUuids$lambda$lambda); }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.findParentByChildUuids_s8cxhz$ = function (childEntryContentUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContentEntryParentChildJoin WHERE cepcjChildContentEntryUid = ? LIMIT 1'), ContentEntryParentChildJoinDao_JdbcKt$findParentByChildUuids$lambda(childEntryContentUid)); }; function ContentEntryParentChildJoinDao_JdbcKt$findListOfParentsByChildUuid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); var $receiver = new ContentEntryParentChildJoin(); $receiver.cepcjUid = _tmp_cepcjUid; $receiver.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver.cepcjLct = _tmp_cepcjLct; $receiver.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver.childIndex = _tmp_childIndex; return $receiver; }; } function ContentEntryParentChildJoinDao_JdbcKt$findListOfParentsByChildUuid$lambda$lambda(_result) { return mapRows(_result, ContentEntryParentChildJoinDao_JdbcKt$findListOfParentsByChildUuid$lambda$lambda$lambda(_result)); } function ContentEntryParentChildJoinDao_JdbcKt$findListOfParentsByChildUuid$lambda(closure$childEntryContentUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$childEntryContentUid); return useResults(_stmt.executeQuery(), ContentEntryParentChildJoinDao_JdbcKt$findListOfParentsByChildUuid$lambda$lambda); }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.findListOfParentsByChildUuid_s8cxhz$ = function (childEntryContentUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContentEntryParentChildJoin WHERE cepcjChildContentEntryUid = ?'), ContentEntryParentChildJoinDao_JdbcKt$findListOfParentsByChildUuid$lambda(childEntryContentUid)); }; function ContentEntryParentChildJoinDao_JdbcKt$findListOfChildsByParentUuid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); var $receiver = new ContentEntryParentChildJoin(); $receiver.cepcjUid = _tmp_cepcjUid; $receiver.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver.cepcjLct = _tmp_cepcjLct; $receiver.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver.childIndex = _tmp_childIndex; return $receiver; }; } function ContentEntryParentChildJoinDao_JdbcKt$findListOfChildsByParentUuid$lambda$lambda(_result) { return mapRows(_result, ContentEntryParentChildJoinDao_JdbcKt$findListOfChildsByParentUuid$lambda$lambda$lambda(_result)); } function ContentEntryParentChildJoinDao_JdbcKt$findListOfChildsByParentUuid$lambda(closure$parentUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$parentUid); return useResults(_stmt.executeQuery(), ContentEntryParentChildJoinDao_JdbcKt$findListOfChildsByParentUuid$lambda$lambda); }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.findListOfChildsByParentUuid_s8cxhz$ = function (parentUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContentEntryParentChildJoin WHERE cepcjParentContentEntryUid = ?'), ContentEntryParentChildJoinDao_JdbcKt$findListOfChildsByParentUuid$lambda(parentUid)); }; function ContentEntryParentChildJoinDao_JdbcKt$findJoinByParentChildUuids$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); var $receiver = new ContentEntryParentChildJoin(); $receiver.cepcjUid = _tmp_cepcjUid; $receiver.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver.cepcjLct = _tmp_cepcjLct; $receiver.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver.childIndex = _tmp_childIndex; return $receiver; }; } function ContentEntryParentChildJoinDao_JdbcKt$findJoinByParentChildUuids$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryParentChildJoinDao_JdbcKt$findJoinByParentChildUuids$lambda$lambda$lambda(_result)); } function ContentEntryParentChildJoinDao_JdbcKt$findJoinByParentChildUuids$lambda(closure$parentUid, closure$childUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$parentUid); _stmt.setLong_6svq3l$(2, closure$childUid); return useResults(_stmt.executeQuery(), ContentEntryParentChildJoinDao_JdbcKt$findJoinByParentChildUuids$lambda$lambda); }; } ContentEntryParentChildJoinDao_JdbcKt.prototype.findJoinByParentChildUuids_3pjtqy$ = function (parentUid, childUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContentEntryParentChildJoin WHERE cepcjParentContentEntryUid = ? AND cepcjChildContentEntryUid = ? LIMIT 1'), ContentEntryParentChildJoinDao_JdbcKt$findJoinByParentChildUuids$lambda(parentUid, childUid)); }; function ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); var _tmp_title = closure$_result.getString_61zpoe$('title'); var _tmp_description = closure$_result.getString_61zpoe$('description'); var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); var _tmp_author = closure$_result.getString_61zpoe$('author'); var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); var $receiver = new ContentEntry(); $receiver.contentEntryUid = _tmp_contentEntryUid; $receiver.title = _tmp_title; $receiver.description = _tmp_description; $receiver.entryId = _tmp_entryId; $receiver.author = _tmp_author; $receiver.publisher = _tmp_publisher; $receiver.licenseType = _tmp_licenseType; $receiver.licenseName = _tmp_licenseName; $receiver.licenseUrl = _tmp_licenseUrl; $receiver.sourceUrl = _tmp_sourceUrl; $receiver.thumbnailUrl = _tmp_thumbnailUrl; $receiver.lastModified = _tmp_lastModified; $receiver.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver.languageVariantUid = _tmp_languageVariantUid; $receiver.contentFlags = _tmp_contentFlags; $receiver.leaf = _tmp_leaf; $receiver.publik = _tmp_publik; $receiver.ceInactive = _tmp_ceInactive; $receiver.completionCriteria = _tmp_completionCriteria; $receiver.minScore = _tmp_minScore; $receiver.contentTypeFlag = _tmp_contentTypeFlag; $receiver.contentOwner = _tmp_contentOwner; $receiver.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver.contentEntryLct = _tmp_contentEntryLct; return $receiver; }; } function ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda$lambda(_result) { return mapRows(_result, ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda.prototype.constructor = Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } ContentEntryParentChildJoinDao_JdbcKt.prototype.selectTopEntries = function (continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT ContentEntry.* FROM ContentEntry WHERE NOT EXISTS(SELECT cepcjUid FROM ContentEntryParentChildJoin WHERE cepcjChildContentEntryUid = ContentEntry.contentEntryUid) AND EXISTS(SELECT cepcjUid FROM ContentEntryParentChildJoin WHERE cepcjParentContentEntryUid = ContentEntry.contentEntryUid)'), ContentEntryParentChildJoinDao_JdbcKt$selectTopEntries$lambda, continuation); }; function Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda(closure$contentEntryUid_0, closure$updateTime_0, closure$selectedItems_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$updateTime = closure$updateTime_0; this.local$closure$selectedItems = closure$selectedItems_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda.prototype.constructor = Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda; Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$updateTime); this.local$_stmt.setArray_wqp8hw$(3, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$selectedItems))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda(closure$contentEntryUid_0, closure$updateTime_0, closure$selectedItems_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda(closure$contentEntryUid_0, closure$updateTime_0, closure$selectedItems_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$moveListOfEntriesToNewParent_8jtwwy$($this, contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$selectedItems = selectedItems_0; this.local$updateTime = updateTime_0; } Coroutine$moveListOfEntriesToNewParent_8jtwwy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$moveListOfEntriesToNewParent_8jtwwy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$moveListOfEntriesToNewParent_8jtwwy$.prototype.constructor = Coroutine$moveListOfEntriesToNewParent_8jtwwy$; Coroutine$moveListOfEntriesToNewParent_8jtwwy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentEntryParentChildJoin \n | SET cepcjParentContentEntryUid = ?, \n | cepcjLct = ? \n | WHERE cepcjUid IN (?)\n | \n '), true), ContentEntryParentChildJoinDao_JdbcKt$moveListOfEntriesToNewParent$lambda(this.local$contentEntryUid, this.local$updateTime, this.local$selectedItems), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_JdbcKt.prototype.moveListOfEntriesToNewParent_8jtwwy$ = function (contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$moveListOfEntriesToNewParent_8jtwwy$(this, contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContentEntryParentChildJoin (cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct, cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cepcjUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cepcjUid); } stmt.setLong_6svq3l$(2, entity.cepcjLocalChangeSeqNum); stmt.setLong_6svq3l$(3, entity.cepcjMasterChangeSeqNum); stmt.setInt_vux9f0$(4, entity.cepcjLastChangedBy); stmt.setLong_6svq3l$(5, entity.cepcjLct); stmt.setLong_6svq3l$(6, entity.cepcjParentContentEntryUid); stmt.setLong_6svq3l$(7, entity.cepcjChildContentEntryUid); stmt.setInt_vux9f0$(8, entity.childIndex); }; ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO ContentEntryParentChildJoin (cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct, cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cepcjUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cepcjUid); } stmt.setLong_6svq3l$(2, entity.cepcjLocalChangeSeqNum); stmt.setLong_6svq3l$(3, entity.cepcjMasterChangeSeqNum); stmt.setInt_vux9f0$(4, entity.cepcjLastChangedBy); stmt.setLong_6svq3l$(5, entity.cepcjLct); stmt.setLong_6svq3l$(6, entity.cepcjParentContentEntryUid); stmt.setLong_6svq3l$(7, entity.cepcjChildContentEntryUid); stmt.setInt_vux9f0$(8, entity.childIndex); }; ContentEntryParentChildJoinDao_JdbcKt$_insertAdapterContentEntryParentChildJoin_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentEntryParentChildJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryParentChildJoinDao_JdbcKt', interfaces: [ContentEntryParentChildJoinDao]}; function ContentEntryParentChildJoinDao_ReplicateWrapper(_db, _dao) { ContentEntryParentChildJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_48($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_48.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_48.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_48.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_48; Coroutine$replicateOnNewNode_s8cxhz$_48.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_48(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_45($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_45.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_45.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_45.prototype.constructor = Coroutine$replicateOnChange_45; Coroutine$replicateOnChange_45.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_45(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_crmpdg$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_crmpdg$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_crmpdg$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_crmpdg$_0.prototype.constructor = Coroutine$insertListAsync_crmpdg$_0; Coroutine$insertListAsync_crmpdg$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.cepcjUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(7, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.cepcjUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.cepcjLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_crmpdg$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.insertListAsync_crmpdg$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_crmpdg$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.publicContentEntryParentChildJoins = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.all = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.findParentByChildUuids_s8cxhz$ = function (childEntryContentUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.findListOfParentsByChildUuid_s8cxhz$ = function (childEntryContentUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.findListOfChildsByParentUuid_s8cxhz$ = function (parentUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.findJoinByParentChildUuids_3pjtqy$ = function (parentUid, childUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.selectTopEntries = function (continuation) { return this._dao_0.selectTopEntries(continuation); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.replaceList_crmpdg$ = function (entries) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.insertWithReplace_iynbz7$ = function (parentChildJoinDao) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0($this, contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$selectedItems = selectedItems_0; this.local$updateTime = updateTime_0; } Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0.prototype.constructor = Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0; Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.moveListOfEntriesToNewParent_8jtwwy$(this.local$contentEntryUid, this.local$selectedItems, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.moveListOfEntriesToNewParent_8jtwwy$ = function (contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$moveListOfEntriesToNewParent_8jtwwy$_0(this, contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_54($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_54.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_54.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_54.prototype.constructor = Coroutine$insertAsync_54; Coroutine$insertAsync_54.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cepcjUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(7, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.cepcjUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cepcjLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.cepcjUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_54(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryParentChildJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryParentChildJoinDao_ReplicateWrapper', interfaces: [ContentEntryParentChildJoinDao]}; function ContentEntryParentChildJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentEntryParentChildJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_49($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_49.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_49.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_49.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_49; Coroutine$replicateOnNewNode_s8cxhz$_49.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_49(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_46($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_46.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_46.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_46.prototype.constructor = Coroutine$replicateOnChange_46; Coroutine$replicateOnChange_46.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_46(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_crmpdg$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_crmpdg$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_crmpdg$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_crmpdg$_1.prototype.constructor = Coroutine$insertListAsync_crmpdg$_1; Coroutine$insertListAsync_crmpdg$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_crmpdg$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_Repo.prototype.insertListAsync_crmpdg$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_crmpdg$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_Repo.prototype.publicContentEntryParentChildJoins = function () { var _result = this._dao.publicContentEntryParentChildJoins(); return _result; }; ContentEntryParentChildJoinDao_Repo.prototype.all = function () { var _result = this._dao.all(); return _result; }; ContentEntryParentChildJoinDao_Repo.prototype.findParentByChildUuids_s8cxhz$ = function (childEntryContentUid) { var _result = this._dao.findParentByChildUuids_s8cxhz$(childEntryContentUid); return _result; }; ContentEntryParentChildJoinDao_Repo.prototype.findListOfParentsByChildUuid_s8cxhz$ = function (childEntryContentUid) { var _result = this._dao.findListOfParentsByChildUuid_s8cxhz$(childEntryContentUid); return _result; }; ContentEntryParentChildJoinDao_Repo.prototype.findListOfChildsByParentUuid_s8cxhz$ = function (parentUid) { var _result = this._dao.findListOfChildsByParentUuid_s8cxhz$(parentUid); return _result; }; ContentEntryParentChildJoinDao_Repo.prototype.findJoinByParentChildUuids_3pjtqy$ = function (parentUid, childUid) { var _result = this._dao.findJoinByParentChildUuids_3pjtqy$(parentUid, childUid); return _result; }; function Coroutine$selectTopEntries($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$selectTopEntries.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$selectTopEntries.prototype = Object.create(CoroutineImpl.prototype); Coroutine$selectTopEntries.prototype.constructor = Coroutine$selectTopEntries; Coroutine$selectTopEntries.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.selectTopEntries(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_Repo.prototype.selectTopEntries = function (continuation_0, suspended) { var instance = new Coroutine$selectTopEntries(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_Repo.prototype.replaceList_crmpdg$ = function (entries) { this._dao.replaceList_crmpdg$(entries); }; ContentEntryParentChildJoinDao_Repo.prototype.insertWithReplace_iynbz7$ = function (parentChildJoinDao) { this._dao.insertWithReplace_iynbz7$(parentChildJoinDao); }; function Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1($this, contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$selectedItems = selectedItems_0; this.local$updateTime = updateTime_0; } Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1.prototype.constructor = Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1; Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.moveListOfEntriesToNewParent_8jtwwy$(this.local$contentEntryUid, this.local$selectedItems, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_Repo.prototype.moveListOfEntriesToNewParent_8jtwwy$ = function (contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$moveListOfEntriesToNewParent_8jtwwy$_1(this, contentEntryUid_0, selectedItems_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_55($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_55.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_55.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_55.prototype.constructor = Coroutine$insertAsync_55; Coroutine$insertAsync_55.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryParentChildJoinDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_55(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryParentChildJoinDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentEntryParentChildJoinDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentEntryParentChildJoinDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContentEntryParentChildJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryParentChildJoinDao_Repo', interfaces: [ContentEntryParentChildJoinDao]}; function ContentEntryPictureDao() { } ContentEntryPictureDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryPictureDao', interfaces: [BaseDao]}; function ContentEntryPictureDao_JdbcKt(_db) { ContentEntryPictureDao.call(this); this._db = _db; this._insertAdapterContentEntryPicture_ = new ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral(this._db); } ContentEntryPictureDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentEntryPicture_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_56($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_56.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_56.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_56.prototype.constructor = Coroutine$insertAsync_56; Coroutine$insertAsync_56.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntryPicture_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_56(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentEntryPicture_.insertList_4ezy5m$(entityList); }; function Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda(closure$ContentEntryPicture_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$ContentEntryPicture = closure$ContentEntryPicture_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda; Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$ContentEntryPicture.cepContentEntryUid); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$ContentEntryPicture.cepUri); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$ContentEntryPicture.cepMd5); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$ContentEntryPicture.cepFileSize); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$ContentEntryPicture.cepTimestamp); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$ContentEntryPicture.cepMimeType); this.local$_stmt.setBoolean_fzusl$(7, this.local$closure$ContentEntryPicture.cepActive); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$ContentEntryPicture.cepUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryPictureDao_JdbcKt$updateAsync$lambda(closure$ContentEntryPicture_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryPictureDao_JdbcKt$updateAsync$lambda(closure$ContentEntryPicture_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_vfioqn$($this, ContentEntryPicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$ContentEntryPicture = ContentEntryPicture_0; } Coroutine$updateAsync_vfioqn$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_vfioqn$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_vfioqn$.prototype.constructor = Coroutine$updateAsync_vfioqn$; Coroutine$updateAsync_vfioqn$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ContentEntryPicture SET cepContentEntryUid = ?, cepUri = ?, cepMd5 = ?, cepFileSize = ?, cepTimestamp = ?, cepMimeType = ?, cepActive = ? WHERE cepUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ContentEntryPictureDao_JdbcKt$updateAsync$lambda(this.local$ContentEntryPicture), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_JdbcKt.prototype.updateAsync_vfioqn$ = function (ContentEntryPicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_vfioqn$(this, ContentEntryPicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryPictureDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cepContentEntryUid); _stmt.setString_vqvrqt$(2, _entity.cepUri); _stmt.setString_vqvrqt$(3, _entity.cepMd5); _stmt.setInt_vux9f0$(4, _entity.cepFileSize); _stmt.setLong_6svq3l$(5, _entity.cepTimestamp); _stmt.setString_vqvrqt$(6, _entity.cepMimeType); _stmt.setBoolean_fzusl$(7, _entity.cepActive); _stmt.setLong_6svq3l$(8, _entity.cepUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentEntryPictureDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentEntryPicture SET cepContentEntryUid = ?, cepUri = ?, cepMd5 = ?, cepFileSize = ?, cepTimestamp = ?, cepMimeType = ?, cepActive = ? WHERE cepUid = ?'; prepareAndUseStatement(this._db, _sql, ContentEntryPictureDao_JdbcKt$updateList$lambda(entityList)); }; function ContentEntryPictureDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cepContentEntryUid); _stmt.setString_vqvrqt$(2, closure$entity.cepUri); _stmt.setString_vqvrqt$(3, closure$entity.cepMd5); _stmt.setInt_vux9f0$(4, closure$entity.cepFileSize); _stmt.setLong_6svq3l$(5, closure$entity.cepTimestamp); _stmt.setString_vqvrqt$(6, closure$entity.cepMimeType); _stmt.setBoolean_fzusl$(7, closure$entity.cepActive); _stmt.setLong_6svq3l$(8, closure$entity.cepUid); return _stmt.executeUpdate(); }; } ContentEntryPictureDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentEntryPicture SET cepContentEntryUid = ?, cepUri = ?, cepMd5 = ?, cepFileSize = ?, cepTimestamp = ?, cepMimeType = ?, cepActive = ? WHERE cepUid = ?'; prepareAndUseStatement(this._db, _sql, ContentEntryPictureDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_50($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_50.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_50.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_50.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_50; Coroutine$replicateOnNewNode_s8cxhz$_50.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryPictureReplicate(cepPk, cepDestination)\n | SELECT DISTINCT cepUid AS cepPK,\n | ? AS siteDestination\n | FROM ContentEntryPicture\n | WHERE ContentEntryPicture.cepTimestamp != COALESCE(\n | (SELECT cepVersionId\n | FROM ContentEntryPictureReplicate\n | WHERE cepPk = ContentEntryPicture.cepUid\n | AND cepDestination = ?), -1) \n | /*psql ON CONFLICT(cepPk, cepDestination) DO UPDATE\n | SET cepPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryPictureReplicate(cepPk, cepDestination)\n | SELECT DISTINCT cepUid AS cepPK,\n | ? AS siteDestination\n | FROM ContentEntryPicture\n | WHERE ContentEntryPicture.cepTimestamp != COALESCE(\n | (SELECT cepVersionId\n | FROM ContentEntryPictureReplicate\n | WHERE cepPk = ContentEntryPicture.cepUid\n | AND cepDestination = ?), -1) \n | ON CONFLICT(cepPk, cepDestination) DO UPDATE\n | SET cepPending = true\n | \n | \n |')), ContentEntryPictureDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_50(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_47($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_47.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_47.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_47.prototype.constructor = Coroutine$replicateOnChange_47; Coroutine$replicateOnChange_47.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryPictureReplicate(cepPk, cepDestination)\n | SELECT DISTINCT ContentEntryPicture.cepUid AS cepPk,\n | UserSession.usClientNodeId AS siteDestination\n | FROM ChangeLog\n | JOIN ContentEntryPicture\n | ON ChangeLog.chTableId = 138\n | AND ChangeLog.chEntityPk = ContentEntryPicture.cepUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryPicture.cepTimestamp != COALESCE(\n | (SELECT cepVersionId\n | FROM ContentEntryPictureReplicate\n | WHERE cepPk = ContentEntryPicture.cepUid\n | AND cepDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(cepPk, cepDestination) DO UPDATE\n | SET cepPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryPictureReplicate(cepPk, cepDestination)\n | SELECT DISTINCT ContentEntryPicture.cepUid AS cepPk,\n | UserSession.usClientNodeId AS siteDestination\n | FROM ChangeLog\n | JOIN ContentEntryPicture\n | ON ChangeLog.chTableId = 138\n | AND ChangeLog.chEntityPk = ContentEntryPicture.cepUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryPicture.cepTimestamp != COALESCE(\n | (SELECT cepVersionId\n | FROM ContentEntryPictureReplicate\n | WHERE cepPk = ContentEntryPicture.cepUid\n | AND cepDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(cepPk, cepDestination) DO UPDATE\n | SET cepPending = true\n | \n | \n |')), ContentEntryPictureDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_47(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cepUid = closure$_result.getLong_61zpoe$('cepUid'); var _tmp_cepContentEntryUid = closure$_result.getLong_61zpoe$('cepContentEntryUid'); var _tmp_cepUri = closure$_result.getString_61zpoe$('cepUri'); var _tmp_cepMd5 = closure$_result.getString_61zpoe$('cepMd5'); var _tmp_cepFileSize = closure$_result.getInt_61zpoe$('cepFileSize'); var _tmp_cepTimestamp = closure$_result.getLong_61zpoe$('cepTimestamp'); var _tmp_cepMimeType = closure$_result.getString_61zpoe$('cepMimeType'); var _tmp_cepActive = closure$_result.getBoolean_61zpoe$('cepActive'); var $receiver = new ContentEntryPicture(); $receiver.cepUid = _tmp_cepUid; $receiver.cepContentEntryUid = _tmp_cepContentEntryUid; $receiver.cepUri = _tmp_cepUri; $receiver.cepMd5 = _tmp_cepMd5; $receiver.cepFileSize = _tmp_cepFileSize; $receiver.cepTimestamp = _tmp_cepTimestamp; $receiver.cepMimeType = _tmp_cepMimeType; $receiver.cepActive = _tmp_cepActive; return $receiver; }; } function ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda(closure$entryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUid = closure$entryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda.prototype.constructor = Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda; Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda(closure$entryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda(closure$entryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryPictureDao_JdbcKt.prototype.findByContentEntryUidAsync_s8cxhz$ = function (entryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ContentEntryPicture \n | WHERE cepContentEntryUid = ?\n | AND cepActive\n | ORDER BY cepTimestamp DESC \n | LIMIT 1\n | \n ')), ContentEntryPictureDao_JdbcKt$findByContentEntryUidAsync$lambda(entryUid), continuation); }; function ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cepUid = closure$_result.getLong_61zpoe$('cepUid'); var _tmp_cepContentEntryUid = closure$_result.getLong_61zpoe$('cepContentEntryUid'); var _tmp_cepUri = closure$_result.getString_61zpoe$('cepUri'); var _tmp_cepMd5 = closure$_result.getString_61zpoe$('cepMd5'); var _tmp_cepFileSize = closure$_result.getInt_61zpoe$('cepFileSize'); var _tmp_cepTimestamp = closure$_result.getLong_61zpoe$('cepTimestamp'); var _tmp_cepMimeType = closure$_result.getString_61zpoe$('cepMimeType'); var _tmp_cepActive = closure$_result.getBoolean_61zpoe$('cepActive'); var $receiver = new ContentEntryPicture(); $receiver.cepUid = _tmp_cepUid; $receiver.cepContentEntryUid = _tmp_cepContentEntryUid; $receiver.cepUri = _tmp_cepUri; $receiver.cepMd5 = _tmp_cepMd5; $receiver.cepFileSize = _tmp_cepFileSize; $receiver.cepTimestamp = _tmp_cepTimestamp; $receiver.cepMimeType = _tmp_cepMimeType; $receiver.cepActive = _tmp_cepActive; return $receiver; }; } function ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda(closure$entryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entryUid = closure$entryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda.prototype.constructor = Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda; Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda(closure$entryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda(closure$entryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda(this$ContentEntryPictureDao_JdbcKt_0, closure$entryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryPictureDao_JdbcKt = this$ContentEntryPictureDao_JdbcKt_0; this.local$closure$entryUid = closure$entryUid_0; } Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda.prototype.constructor = Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda; Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryPictureDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ContentEntryPicture \n | WHERE cepContentEntryUid = ?\n | AND cepActive\n | ORDER BY cepTimestamp DESC \n | LIMIT 1\n | \n ')), ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda$lambda(this.local$closure$entryUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda(this$ContentEntryPictureDao_JdbcKt_0, closure$entryUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda(this$ContentEntryPictureDao_JdbcKt_0, closure$entryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryPictureDao_JdbcKt.prototype.findByContentEntryUidLive_s8cxhz$ = function (entryUid) { return new LiveDataImpl(this._db, listOf_0('ContentEntryPicture'), ContentEntryPictureDao_JdbcKt$findByContentEntryUidLive$lambda(this, entryUid)); }; function ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContentEntryPicture (cepUid, cepContentEntryUid, cepUri, cepMd5, cepFileSize, cepTimestamp, cepMimeType, cepActive) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cepUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cepUid); } stmt.setLong_6svq3l$(2, entity.cepContentEntryUid); stmt.setString_vqvrqt$(3, entity.cepUri); stmt.setString_vqvrqt$(4, entity.cepMd5); stmt.setInt_vux9f0$(5, entity.cepFileSize); stmt.setLong_6svq3l$(6, entity.cepTimestamp); stmt.setString_vqvrqt$(7, entity.cepMimeType); stmt.setBoolean_fzusl$(8, entity.cepActive); }; ContentEntryPictureDao_JdbcKt$_insertAdapterContentEntryPicture_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentEntryPictureDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryPictureDao_JdbcKt', interfaces: [ContentEntryPictureDao]}; function ContentEntryPictureDao_ReplicateWrapper(_db, _dao) { ContentEntryPictureDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_51($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_51.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_51.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_51.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_51; Coroutine$replicateOnNewNode_s8cxhz$_51.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_51(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_48($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_48.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_48.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_48.prototype.constructor = Coroutine$replicateOnChange_48; Coroutine$replicateOnChange_48.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_48(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_ReplicateWrapper.prototype.findByContentEntryUidAsync_s8cxhz$ = function (entryUid, continuation) { return this._dao_0.findByContentEntryUidAsync_s8cxhz$(entryUid, continuation); }; ContentEntryPictureDao_ReplicateWrapper.prototype.findByContentEntryUidLive_s8cxhz$ = function (entryUid) { return this._dao_0.findByContentEntryUidLive_s8cxhz$(entryUid); }; function Coroutine$updateAsync_vfioqn$_0($this, ContentEntryPicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$ContentEntryPicture = ContentEntryPicture_0; } Coroutine$updateAsync_vfioqn$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_vfioqn$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_vfioqn$_0.prototype.constructor = Coroutine$updateAsync_vfioqn$_0; Coroutine$updateAsync_vfioqn$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new ContentEntryPicture_EwaAdapter(this.local$ContentEntryPicture), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.local$ContentEntryPicture.cepTimestamp = systemTimeInMillis(); this.state_0 = 3; this.result_0 = this.$this._dao_0.updateAsync_vfioqn$(this.local$ContentEntryPicture, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_ReplicateWrapper.prototype.updateAsync_vfioqn$ = function (ContentEntryPicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_vfioqn$_0(this, ContentEntryPicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_57($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_57.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_57.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_57.prototype.constructor = Coroutine$insertAsync_57; Coroutine$insertAsync_57.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new ContentEntryPicture_EwaAdapter(this.local$entity), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cepUid, L0)) { this.state_0 = 3; this.result_0 = _pkManager.nextIdAsync_za3lpa$(138, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$entity.cepUid = _newPk; this.state_0 = 4; continue; case 4: this.local$entity.cepTimestamp = systemTimeInMillis(); this.state_0 = 5; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: return this.local$entity.cepUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_57(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryPictureDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryPictureDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryPictureDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryPictureDao_ReplicateWrapper', interfaces: [ContentEntryPictureDao]}; function ContentEntryPictureDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentEntryPictureDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_52($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_52.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_52.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_52.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_52; Coroutine$replicateOnNewNode_s8cxhz$_52.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_52(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_49($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_49.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_49.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_49.prototype.constructor = Coroutine$replicateOnChange_49; Coroutine$replicateOnChange_49.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_49(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByContentEntryUidAsync_s8cxhz$($this, entryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entryUid = entryUid_0; } Coroutine$findByContentEntryUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByContentEntryUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByContentEntryUidAsync_s8cxhz$.prototype.constructor = Coroutine$findByContentEntryUidAsync_s8cxhz$; Coroutine$findByContentEntryUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByContentEntryUidAsync_s8cxhz$(this.local$entryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_Repo.prototype.findByContentEntryUidAsync_s8cxhz$ = function (entryUid_0, continuation_0, suspended) { var instance = new Coroutine$findByContentEntryUidAsync_s8cxhz$(this, entryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_Repo.prototype.findByContentEntryUidLive_s8cxhz$ = function (entryUid) { var _result = this._dao.findByContentEntryUidLive_s8cxhz$(entryUid); return _result; }; function Coroutine$updateAsync_vfioqn$_1($this, ContentEntryPicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$ContentEntryPicture = ContentEntryPicture_0; } Coroutine$updateAsync_vfioqn$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_vfioqn$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_vfioqn$_1.prototype.constructor = Coroutine$updateAsync_vfioqn$_1; Coroutine$updateAsync_vfioqn$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_vfioqn$(this.local$ContentEntryPicture, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_Repo.prototype.updateAsync_vfioqn$ = function (ContentEntryPicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_vfioqn$_1(this, ContentEntryPicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_58($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_58.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_58.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_58.prototype.constructor = Coroutine$insertAsync_58; Coroutine$insertAsync_58.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryPictureDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_58(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryPictureDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentEntryPictureDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentEntryPictureDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContentEntryPictureDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryPictureDao_Repo', interfaces: [ContentEntryPictureDao]}; function ContentEntryRelatedEntryJoinDao() { } ContentEntryRelatedEntryJoinDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryRelatedEntryJoinDao', interfaces: [BaseDao]}; function ContentEntryRelatedEntryJoinDao_JdbcKt(_db) { ContentEntryRelatedEntryJoinDao.call(this); this._db = _db; this._insertAdapterContentEntryRelatedEntryJoin_ = new ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral(this._db); } ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContentEntryRelatedEntryJoin_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_59($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_59.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_59.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_59.prototype.constructor = Coroutine$insertAsync_59; Coroutine$insertAsync_59.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentEntryRelatedEntryJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_59(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContentEntryRelatedEntryJoin_.insertList_4ezy5m$(entityList); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cerejContentEntryUid); _stmt.setLong_6svq3l$(2, closure$entity.cerejRelatedEntryUid); _stmt.setInt_vux9f0$(3, closure$entity.cerejLastChangedBy); _stmt.setInt_vux9f0$(4, closure$entity.relType); _stmt.setString_vqvrqt$(5, closure$entity.comment); _stmt.setLong_6svq3l$(6, closure$entity.cerejRelLanguageUid); _stmt.setLong_6svq3l$(7, closure$entity.cerejLocalChangeSeqNum); _stmt.setLong_6svq3l$(8, closure$entity.cerejMasterChangeSeqNum); _stmt.setLong_6svq3l$(9, closure$entity.cerejLct); _stmt.setLong_6svq3l$(10, closure$entity.cerejUid); return _stmt.executeUpdate(); }; } ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContentEntryRelatedEntryJoin SET cerejContentEntryUid = ?, cerejRelatedEntryUid = ?, cerejLastChangedBy = ?, relType = ?, comment = ?, cerejRelLanguageUid = ?, cerejLocalChangeSeqNum = ?, cerejMasterChangeSeqNum = ?, cerejLct = ? WHERE cerejUid = ?'; prepareAndUseStatement(this._db, _sql, ContentEntryRelatedEntryJoinDao_JdbcKt$update$lambda(entity)); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cerejContentEntryUid); _stmt.setLong_6svq3l$(2, _entity.cerejRelatedEntryUid); _stmt.setInt_vux9f0$(3, _entity.cerejLastChangedBy); _stmt.setInt_vux9f0$(4, _entity.relType); _stmt.setString_vqvrqt$(5, _entity.comment); _stmt.setLong_6svq3l$(6, _entity.cerejRelLanguageUid); _stmt.setLong_6svq3l$(7, _entity.cerejLocalChangeSeqNum); _stmt.setLong_6svq3l$(8, _entity.cerejMasterChangeSeqNum); _stmt.setLong_6svq3l$(9, _entity.cerejLct); _stmt.setLong_6svq3l$(10, _entity.cerejUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContentEntryRelatedEntryJoin SET cerejContentEntryUid = ?, cerejRelatedEntryUid = ?, cerejLastChangedBy = ?, relType = ?, comment = ?, cerejRelLanguageUid = ?, cerejLocalChangeSeqNum = ?, cerejMasterChangeSeqNum = ?, cerejLct = ? WHERE cerejUid = ?'; prepareAndUseStatement(this._db, _sql, ContentEntryRelatedEntryJoinDao_JdbcKt$updateList$lambda(entityList)); }; function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_53($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_53.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_53.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_53.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_53; Coroutine$replicateOnNewNode_s8cxhz$_53.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryRelatedEntryJoinReplicate(cerejPk, cerejDestination)\n | SELECT DISTINCT ContentEntryRelatedEntryJoin.cerejUid AS cerejPk,\n | ? AS cerejDestination\n | FROM ContentEntryRelatedEntryJoin\n | WHERE ContentEntryRelatedEntryJoin.cerejLct != COALESCE(\n | (SELECT cerejVersionId\n | FROM ContentEntryRelatedEntryJoinReplicate\n | WHERE cerejPk = ContentEntryRelatedEntryJoin.cerejUid\n | AND cerejDestination = ?), 0) \n | /*psql ON CONFLICT(cerejPk, cerejDestination) DO UPDATE\n | SET cerejPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryRelatedEntryJoinReplicate(cerejPk, cerejDestination)\n | SELECT DISTINCT ContentEntryRelatedEntryJoin.cerejUid AS cerejPk,\n | ? AS cerejDestination\n | FROM ContentEntryRelatedEntryJoin\n | WHERE ContentEntryRelatedEntryJoin.cerejLct != COALESCE(\n | (SELECT cerejVersionId\n | FROM ContentEntryRelatedEntryJoinReplicate\n | WHERE cerejPk = ContentEntryRelatedEntryJoin.cerejUid\n | AND cerejDestination = ?), 0) \n | ON CONFLICT(cerejPk, cerejDestination) DO UPDATE\n | SET cerejPending = true\n | \n | \n |')), ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_53(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_50($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_50.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_50.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_50.prototype.constructor = Coroutine$replicateOnChange_50; Coroutine$replicateOnChange_50.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContentEntryRelatedEntryJoinReplicate(cerejPk, cerejDestination)\n | SELECT DISTINCT ContentEntryRelatedEntryJoin.cerejUid AS cerejUid,\n | UserSession.usClientNodeId AS cerejDestination\n | FROM ChangeLog\n | JOIN ContentEntryRelatedEntryJoin\n | ON ChangeLog.chTableId = 8\n | AND ChangeLog.chEntityPk = ContentEntryRelatedEntryJoin.cerejUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryRelatedEntryJoin.cerejLct != COALESCE(\n | (SELECT cerejVersionId\n | FROM ContentEntryRelatedEntryJoinReplicate\n | WHERE cerejPk = ContentEntryRelatedEntryJoin.cerejUid\n | AND cerejDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cerejPk, cerejDestination) DO UPDATE\n | SET cerejPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContentEntryRelatedEntryJoinReplicate(cerejPk, cerejDestination)\n | SELECT DISTINCT ContentEntryRelatedEntryJoin.cerejUid AS cerejUid,\n | UserSession.usClientNodeId AS cerejDestination\n | FROM ChangeLog\n | JOIN ContentEntryRelatedEntryJoin\n | ON ChangeLog.chTableId = 8\n | AND ChangeLog.chEntityPk = ContentEntryRelatedEntryJoin.cerejUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ContentEntryRelatedEntryJoin.cerejLct != COALESCE(\n | (SELECT cerejVersionId\n | FROM ContentEntryRelatedEntryJoinReplicate\n | WHERE cerejPk = ContentEntryRelatedEntryJoin.cerejUid\n | AND cerejDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cerejPk, cerejDestination) DO UPDATE\n | SET cerejPending = true\n | \n | \n |')), ContentEntryRelatedEntryJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_50(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$publicContentEntryRelatedEntryJoins$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cerejUid = closure$_result.getLong_61zpoe$('cerejUid'); var _tmp_cerejContentEntryUid = closure$_result.getLong_61zpoe$('cerejContentEntryUid'); var _tmp_cerejRelatedEntryUid = closure$_result.getLong_61zpoe$('cerejRelatedEntryUid'); var _tmp_cerejLastChangedBy = closure$_result.getInt_61zpoe$('cerejLastChangedBy'); var _tmp_relType = closure$_result.getInt_61zpoe$('relType'); var _tmp_comment = closure$_result.getString_61zpoe$('comment'); var _tmp_cerejRelLanguageUid = closure$_result.getLong_61zpoe$('cerejRelLanguageUid'); var _tmp_cerejLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cerejLocalChangeSeqNum'); var _tmp_cerejMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cerejMasterChangeSeqNum'); var _tmp_cerejLct = closure$_result.getLong_61zpoe$('cerejLct'); var $receiver = new ContentEntryRelatedEntryJoin(); $receiver.cerejUid = _tmp_cerejUid; $receiver.cerejContentEntryUid = _tmp_cerejContentEntryUid; $receiver.cerejRelatedEntryUid = _tmp_cerejRelatedEntryUid; $receiver.cerejLastChangedBy = _tmp_cerejLastChangedBy; $receiver.relType = _tmp_relType; $receiver.comment = _tmp_comment; $receiver.cerejRelLanguageUid = _tmp_cerejRelLanguageUid; $receiver.cerejLocalChangeSeqNum = _tmp_cerejLocalChangeSeqNum; $receiver.cerejMasterChangeSeqNum = _tmp_cerejMasterChangeSeqNum; $receiver.cerejLct = _tmp_cerejLct; return $receiver; }; } function ContentEntryRelatedEntryJoinDao_JdbcKt$publicContentEntryRelatedEntryJoins$lambda$lambda(_result) { return mapRows(_result, ContentEntryRelatedEntryJoinDao_JdbcKt$publicContentEntryRelatedEntryJoins$lambda$lambda$lambda(_result)); } function ContentEntryRelatedEntryJoinDao_JdbcKt$publicContentEntryRelatedEntryJoins$lambda(_stmt) { return useResults(_stmt.executeQuery(), ContentEntryRelatedEntryJoinDao_JdbcKt$publicContentEntryRelatedEntryJoins$lambda$lambda); } ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.publicContentEntryRelatedEntryJoins = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT ContentEntryRelatedEntryJoin.* FROM ContentEntryRelatedEntryJoin LEFT JOIN ContentEntry ON ContentEntryRelatedEntryJoin.cerejRelatedEntryUid = ContentEntry.contentEntryUid WHERE ContentEntry.publik'), ContentEntryRelatedEntryJoinDao_JdbcKt$publicContentEntryRelatedEntryJoins$lambda); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findPrimaryByTranslation$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cerejUid = closure$_result.getLong_61zpoe$('cerejUid'); var _tmp_cerejContentEntryUid = closure$_result.getLong_61zpoe$('cerejContentEntryUid'); var _tmp_cerejRelatedEntryUid = closure$_result.getLong_61zpoe$('cerejRelatedEntryUid'); var _tmp_cerejLastChangedBy = closure$_result.getInt_61zpoe$('cerejLastChangedBy'); var _tmp_relType = closure$_result.getInt_61zpoe$('relType'); var _tmp_comment = closure$_result.getString_61zpoe$('comment'); var _tmp_cerejRelLanguageUid = closure$_result.getLong_61zpoe$('cerejRelLanguageUid'); var _tmp_cerejLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cerejLocalChangeSeqNum'); var _tmp_cerejMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cerejMasterChangeSeqNum'); var _tmp_cerejLct = closure$_result.getLong_61zpoe$('cerejLct'); var $receiver = new ContentEntryRelatedEntryJoin(); $receiver.cerejUid = _tmp_cerejUid; $receiver.cerejContentEntryUid = _tmp_cerejContentEntryUid; $receiver.cerejRelatedEntryUid = _tmp_cerejRelatedEntryUid; $receiver.cerejLastChangedBy = _tmp_cerejLastChangedBy; $receiver.relType = _tmp_relType; $receiver.comment = _tmp_comment; $receiver.cerejRelLanguageUid = _tmp_cerejRelLanguageUid; $receiver.cerejLocalChangeSeqNum = _tmp_cerejLocalChangeSeqNum; $receiver.cerejMasterChangeSeqNum = _tmp_cerejMasterChangeSeqNum; $receiver.cerejLct = _tmp_cerejLct; return $receiver; }; } function ContentEntryRelatedEntryJoinDao_JdbcKt$findPrimaryByTranslation$lambda$lambda(_result) { return mapNextRow(_result, null, ContentEntryRelatedEntryJoinDao_JdbcKt$findPrimaryByTranslation$lambda$lambda$lambda(_result)); } function ContentEntryRelatedEntryJoinDao_JdbcKt$findPrimaryByTranslation$lambda(closure$contentEntryUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$contentEntryUid); return useResults(_stmt.executeQuery(), ContentEntryRelatedEntryJoinDao_JdbcKt$findPrimaryByTranslation$lambda$lambda); }; } ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.findPrimaryByTranslation_s8cxhz$ = function (contentEntryUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContentEntryRelatedEntryJoin WHERE cerejRelatedEntryUid = ? LIMIT 1'), ContentEntryRelatedEntryJoinDao_JdbcKt$findPrimaryByTranslation$lambda(contentEntryUid)); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cerejContentEntryUid = closure$_result.getLong_61zpoe$('cerejContentEntryUid'); var _tmp_cerejRelatedEntryUid = closure$_result.getLong_61zpoe$('cerejRelatedEntryUid'); var _tmp_languageName = closure$_result.getString_61zpoe$('languageName'); var $receiver = new ContentEntryRelatedEntryJoinWithLangName(); $receiver.cerejContentEntryUid = _tmp_cerejContentEntryUid; $receiver.cerejRelatedEntryUid = _tmp_cerejRelatedEntryUid; $receiver.languageName = _tmp_languageName; return $receiver; }; } function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda$lambda(_result) { return mapRows(_result, ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.findAllTranslationsForContentEntryAsync_s8cxhz$ = function (contentEntryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT ContentEntryRelatedEntryJoin.cerejContentEntryUid, ContentEntryRelatedEntryJoin.cerejRelatedEntryUid, CASE ContentEntryRelatedEntryJoin.cerejRelatedEntryUid WHEN ? THEN (SELECT name FROM Language WHERE langUid = (SELECT primaryLanguageUid FROM ContentEntry WHERE contentEntryUid = ContentEntryRelatedEntryJoin.cerejContentEntryUid)) ELSE Language.name END languageName FROM ContentEntryRelatedEntryJoin LEFT JOIN Language ON ContentEntryRelatedEntryJoin.cerejRelLanguageUid = Language.langUid WHERE (ContentEntryRelatedEntryJoin.cerejContentEntryUid = ? OR ContentEntryRelatedEntryJoin.cerejContentEntryUid IN (SELECT cerejContentEntryUid FROM ContentEntryRelatedEntryJoin WHERE cerejRelatedEntryUid = ?)) AND ContentEntryRelatedEntryJoin.relType = 1'), ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsForContentEntryAsync$lambda(contentEntryUid), continuation); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral(this$ContentEntryRelatedEntryJoinDao_JdbcKt, closure$contentEntryUid) { this.this$ContentEntryRelatedEntryJoinDao_JdbcKt = this$ContentEntryRelatedEntryJoinDao_JdbcKt; this.closure$contentEntryUid = closure$contentEntryUid; DataSourceFactory.call(this); } function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cerejUid = closure$_result.getLong_61zpoe$('cerejUid'); var _tmp_cerejContentEntryUid = closure$_result.getLong_61zpoe$('cerejContentEntryUid'); var _tmp_cerejRelatedEntryUid = closure$_result.getLong_61zpoe$('cerejRelatedEntryUid'); var _tmp_cerejLastChangedBy = closure$_result.getInt_61zpoe$('cerejLastChangedBy'); var _tmp_relType = closure$_result.getInt_61zpoe$('relType'); var _tmp_comment = closure$_result.getString_61zpoe$('comment'); var _tmp_cerejRelLanguageUid = closure$_result.getLong_61zpoe$('cerejRelLanguageUid'); var _tmp_cerejLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cerejLocalChangeSeqNum'); var _tmp_cerejMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cerejMasterChangeSeqNum'); var _tmp_cerejLct = closure$_result.getLong_61zpoe$('cerejLct'); var _tmp_Language_nullCount = 0; var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_name = closure$_result.getString_61zpoe$('name'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_isAllNull = _tmp_Language_nullCount === 11; var $receiver = new ContentEntryRelatedEntryJoinWithLanguage(); $receiver.cerejUid = _tmp_cerejUid; $receiver.cerejContentEntryUid = _tmp_cerejContentEntryUid; $receiver.cerejRelatedEntryUid = _tmp_cerejRelatedEntryUid; $receiver.cerejLastChangedBy = _tmp_cerejLastChangedBy; $receiver.relType = _tmp_relType; $receiver.comment = _tmp_comment; $receiver.cerejRelLanguageUid = _tmp_cerejRelLanguageUid; $receiver.cerejLocalChangeSeqNum = _tmp_cerejLocalChangeSeqNum; $receiver.cerejMasterChangeSeqNum = _tmp_cerejMasterChangeSeqNum; $receiver.cerejLct = _tmp_cerejLct; if (!_tmp_Language_isAllNull) { var $receiver_0 = new Language(); $receiver_0.langUid = _tmp_langUid; $receiver_0.name = _tmp_name; $receiver_0.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver_0.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver_0.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver_0.Language_Type = _tmp_Language_Type; $receiver_0.languageActive = _tmp_languageActive; $receiver_0.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver_0.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver_0.langLastChangedBy = _tmp_langLastChangedBy; $receiver_0.langLct = _tmp_langLct; $receiver.language = $receiver_0; } return $receiver; }; } function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda(this$ContentEntryRelatedEntryJoinDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryRelatedEntryJoinDao_JdbcKt = this$ContentEntryRelatedEntryJoinDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryRelatedEntryJoinDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT ContentEntryRelatedEntryJoin.*, Language.* FROM ContentEntryRelatedEntryJoin\n | LEFT JOIN Language ON ContentEntryRelatedEntryJoin.cerejRelLanguageUid = Language.langUid\n | WHERE (ContentEntryRelatedEntryJoin.cerejContentEntryUid = ?\n | OR ContentEntryRelatedEntryJoin.cerejContentEntryUid IN\n | (SELECT cerejContentEntryUid FROM ContentEntryRelatedEntryJoin WHERE cerejRelatedEntryUid = ?))\n | AND ContentEntryRelatedEntryJoin.relType = 1\n | ORDER BY Language.name) LIMIT ? OFFSET ?\n ')), ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda$lambda(this.local$closure$contentEntryUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda(this$ContentEntryRelatedEntryJoinDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda(this$ContentEntryRelatedEntryJoinDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ContentEntryRelatedEntryJoinDao_JdbcKt._db, listOf(['ContentEntryRelatedEntryJoin', 'Language']), ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getData$lambda(this.this$ContentEntryRelatedEntryJoinDao_JdbcKt, this.closure$contentEntryUid, _limit, _offset)); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda(this$ContentEntryRelatedEntryJoinDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentEntryRelatedEntryJoinDao_JdbcKt = this$ContentEntryRelatedEntryJoinDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; } Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda; Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentEntryRelatedEntryJoinDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT ContentEntryRelatedEntryJoin.*, Language.* FROM ContentEntryRelatedEntryJoin\n | LEFT JOIN Language ON ContentEntryRelatedEntryJoin.cerejRelLanguageUid = Language.langUid\n | WHERE (ContentEntryRelatedEntryJoin.cerejContentEntryUid = ?\n | OR ContentEntryRelatedEntryJoin.cerejContentEntryUid IN\n | (SELECT cerejContentEntryUid FROM ContentEntryRelatedEntryJoin WHERE cerejRelatedEntryUid = ?))\n | AND ContentEntryRelatedEntryJoin.relType = 1\n | ORDER BY Language.name) \n ')), ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda$lambda(this.local$closure$contentEntryUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda(this$ContentEntryRelatedEntryJoinDao_JdbcKt_0, closure$contentEntryUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda(this$ContentEntryRelatedEntryJoinDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ContentEntryRelatedEntryJoinDao_JdbcKt._db, listOf(['ContentEntryRelatedEntryJoin', 'Language']), ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral$getLength$lambda(this.this$ContentEntryRelatedEntryJoinDao_JdbcKt, this.closure$contentEntryUid)); }; ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ContentEntryRelatedEntryJoinDao_JdbcKt.prototype.findAllTranslationsWithContentEntryUid_s8cxhz$ = function (contentEntryUid) { return new ContentEntryRelatedEntryJoinDao_JdbcKt$findAllTranslationsWithContentEntryUid$ObjectLiteral(this, contentEntryUid); }; function ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContentEntryRelatedEntryJoin (cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cerejUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cerejUid); } stmt.setLong_6svq3l$(2, entity.cerejContentEntryUid); stmt.setLong_6svq3l$(3, entity.cerejRelatedEntryUid); stmt.setInt_vux9f0$(4, entity.cerejLastChangedBy); stmt.setInt_vux9f0$(5, entity.relType); stmt.setString_vqvrqt$(6, entity.comment); stmt.setLong_6svq3l$(7, entity.cerejRelLanguageUid); stmt.setLong_6svq3l$(8, entity.cerejLocalChangeSeqNum); stmt.setLong_6svq3l$(9, entity.cerejMasterChangeSeqNum); stmt.setLong_6svq3l$(10, entity.cerejLct); }; ContentEntryRelatedEntryJoinDao_JdbcKt$_insertAdapterContentEntryRelatedEntryJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentEntryRelatedEntryJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryRelatedEntryJoinDao_JdbcKt', interfaces: [ContentEntryRelatedEntryJoinDao]}; function ContentEntryRelatedEntryJoinDao_ReplicateWrapper(_db, _dao) { ContentEntryRelatedEntryJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_54($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_54.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_54.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_54.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_54; Coroutine$replicateOnNewNode_s8cxhz$_54.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_54(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_51($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_51.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_51.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_51.prototype.constructor = Coroutine$replicateOnChange_51; Coroutine$replicateOnChange_51.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_51(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.publicContentEntryRelatedEntryJoins = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.findPrimaryByTranslation_s8cxhz$ = function (contentEntryUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.findAllTranslationsForContentEntryAsync_s8cxhz$ = function (contentEntryUid, continuation) { return this._dao_0.findAllTranslationsForContentEntryAsync_s8cxhz$(contentEntryUid, continuation); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.findAllTranslationsWithContentEntryUid_s8cxhz$ = function (contentEntryUid) { return this._dao_0.findAllTranslationsWithContentEntryUid_s8cxhz$(contentEntryUid); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_60($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_60.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_60.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_60.prototype.constructor = Coroutine$insertAsync_60; Coroutine$insertAsync_60.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cerejUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(8, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.cerejUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cerejLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.cerejUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_60(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContentEntryRelatedEntryJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryRelatedEntryJoinDao_ReplicateWrapper', interfaces: [ContentEntryRelatedEntryJoinDao]}; function ContentEntryRelatedEntryJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContentEntryRelatedEntryJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_55($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_55.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_55.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_55.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_55; Coroutine$replicateOnNewNode_s8cxhz$_55.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_55(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_52($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_52.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_52.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_52.prototype.constructor = Coroutine$replicateOnChange_52; Coroutine$replicateOnChange_52.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_52(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.publicContentEntryRelatedEntryJoins = function () { var _result = this._dao.publicContentEntryRelatedEntryJoins(); return _result; }; ContentEntryRelatedEntryJoinDao_Repo.prototype.findPrimaryByTranslation_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.findPrimaryByTranslation_s8cxhz$(contentEntryUid); return _result; }; function Coroutine$findAllTranslationsForContentEntryAsync_s8cxhz$($this, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findAllTranslationsForContentEntryAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllTranslationsForContentEntryAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllTranslationsForContentEntryAsync_s8cxhz$.prototype.constructor = Coroutine$findAllTranslationsForContentEntryAsync_s8cxhz$; Coroutine$findAllTranslationsForContentEntryAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllTranslationsForContentEntryAsync_s8cxhz$(this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.findAllTranslationsForContentEntryAsync_s8cxhz$ = function (contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllTranslationsForContentEntryAsync_s8cxhz$(this, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.findAllTranslationsWithContentEntryUid_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.findAllTranslationsWithContentEntryUid_s8cxhz$(contentEntryUid); return _result; }; ContentEntryRelatedEntryJoinDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_61($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_61.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_61.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_61.prototype.constructor = Coroutine$insertAsync_61; Coroutine$insertAsync_61.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_61(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContentEntryRelatedEntryJoinDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContentEntryRelatedEntryJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryRelatedEntryJoinDao_Repo', interfaces: [ContentEntryRelatedEntryJoinDao]}; function ContentJobDao() { } ContentJobDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentJobDao', interfaces: []}; function ContentJobDao_JdbcKt(_db) { ContentJobDao.call(this); this._db = _db; this._insertAdapterContentJob_ = new ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral(this._db); } function Coroutine$insertAsync_d5tex6$($this, contentJob_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentJob = contentJob_0; } Coroutine$insertAsync_d5tex6$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_d5tex6$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_d5tex6$.prototype.constructor = Coroutine$insertAsync_d5tex6$; Coroutine$insertAsync_d5tex6$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentJob_.insertAndReturnIdAsync_11rb$(this.local$contentJob, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobDao_JdbcKt.prototype.insertAsync_d5tex6$ = function (contentJob_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_d5tex6$(this, contentJob_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cjUid = closure$_result.getLong_61zpoe$('cjUid'); var _tmp_toUri = closure$_result.getString_61zpoe$('toUri'); var _tmp_cjProgress = closure$_result.getLong_61zpoe$('cjProgress'); var _tmp_cjTotal = closure$_result.getLong_61zpoe$('cjTotal'); var _tmp_cjNotificationTitle = closure$_result.getString_61zpoe$('cjNotificationTitle'); var _tmp_cjIsMeteredAllowed = closure$_result.getBoolean_61zpoe$('cjIsMeteredAllowed'); var _tmp_params = closure$_result.getString_61zpoe$('params'); var $receiver = new ContentJob(); $receiver.cjUid = _tmp_cjUid; $receiver.toUri = _tmp_toUri; $receiver.cjProgress = _tmp_cjProgress; $receiver.cjTotal = _tmp_cjTotal; $receiver.cjNotificationTitle = _tmp_cjNotificationTitle; $receiver.cjIsMeteredAllowed = _tmp_cjIsMeteredAllowed; $receiver.params = _tmp_params; return $receiver; }; } function ContentJobDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, ContentJobDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function ContentJobDao_JdbcKt$findByUid$lambda(closure$cjUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$cjUid); return useResults(_stmt.executeQuery(), ContentJobDao_JdbcKt$findByUid$lambda$lambda); }; } ContentJobDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (cjUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJob.*\n | FROM ContentJob\n | WHERE cjUid = ? \n | \n ')), ContentJobDao_JdbcKt$findByUid$lambda(cjUid)); }; function ContentJobDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cjUid = closure$_result.getLong_61zpoe$('cjUid'); var _tmp_toUri = closure$_result.getString_61zpoe$('toUri'); var _tmp_cjProgress = closure$_result.getLong_61zpoe$('cjProgress'); var _tmp_cjTotal = closure$_result.getLong_61zpoe$('cjTotal'); var _tmp_cjNotificationTitle = closure$_result.getString_61zpoe$('cjNotificationTitle'); var _tmp_cjIsMeteredAllowed = closure$_result.getBoolean_61zpoe$('cjIsMeteredAllowed'); var _tmp_params = closure$_result.getString_61zpoe$('params'); var $receiver = new ContentJob(); $receiver.cjUid = _tmp_cjUid; $receiver.toUri = _tmp_toUri; $receiver.cjProgress = _tmp_cjProgress; $receiver.cjTotal = _tmp_cjTotal; $receiver.cjNotificationTitle = _tmp_cjNotificationTitle; $receiver.cjIsMeteredAllowed = _tmp_cjIsMeteredAllowed; $receiver.params = _tmp_params; return $receiver; }; } function ContentJobDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ContentJobDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda(closure$cjUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$cjUid = closure$cjUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda; Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$cjUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$findByUidAsync$lambda(closure$cjUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$findByUidAsync$lambda(closure$cjUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (cjUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJob.*\n | FROM ContentJob\n | WHERE cjUid = ? \n | \n ')), ContentJobDao_JdbcKt$findByUidAsync$lambda(cjUid), continuation); }; function ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cjUid = closure$_result.getLong_61zpoe$('cjUid'); var _tmp_toUri = closure$_result.getString_61zpoe$('toUri'); var _tmp_cjProgress = closure$_result.getLong_61zpoe$('cjProgress'); var _tmp_cjTotal = closure$_result.getLong_61zpoe$('cjTotal'); var _tmp_cjNotificationTitle = closure$_result.getString_61zpoe$('cjNotificationTitle'); var _tmp_cjIsMeteredAllowed = closure$_result.getBoolean_61zpoe$('cjIsMeteredAllowed'); var _tmp_params = closure$_result.getString_61zpoe$('params'); var $receiver = new ContentJob(); $receiver.cjUid = _tmp_cjUid; $receiver.toUri = _tmp_toUri; $receiver.cjProgress = _tmp_cjProgress; $receiver.cjTotal = _tmp_cjTotal; $receiver.cjNotificationTitle = _tmp_cjNotificationTitle; $receiver.cjIsMeteredAllowed = _tmp_cjIsMeteredAllowed; $receiver.params = _tmp_params; return $receiver; }; } function ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda(closure$cjUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$cjUid = closure$cjUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda; Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$cjUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda(closure$cjUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda(closure$cjUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda(this$ContentJobDao_JdbcKt_0, closure$cjUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentJobDao_JdbcKt = this$ContentJobDao_JdbcKt_0; this.local$closure$cjUid = closure$cjUid_0; } Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda; Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentJobDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJob.*\n | FROM ContentJob\n | WHERE cjUid = ?\n | \n ')), ContentJobDao_JdbcKt$findLiveDataByUid$lambda$lambda(this.local$closure$cjUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$findLiveDataByUid$lambda(this$ContentJobDao_JdbcKt_0, closure$cjUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$findLiveDataByUid$lambda(this$ContentJobDao_JdbcKt_0, closure$cjUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobDao_JdbcKt.prototype.findLiveDataByUid_s8cxhz$ = function (cjUid) { return new LiveDataImpl(this._db, listOf_0('ContentJob'), ContentJobDao_JdbcKt$findLiveDataByUid$lambda(this, cjUid)); }; function Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda(closure$toUri_0, closure$cjUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$toUri = closure$toUri_0; this.local$closure$cjUid = closure$cjUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda; Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$toUri); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$updateDestinationDir$lambda(closure$toUri_0, closure$cjUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$updateDestinationDir$lambda(closure$toUri_0, closure$cjUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateDestinationDir_a4hdmt$($this, cjUid_0, toUri_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjUid = cjUid_0; this.local$toUri = toUri_0; } Coroutine$updateDestinationDir_a4hdmt$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateDestinationDir_a4hdmt$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateDestinationDir_a4hdmt$.prototype.constructor = Coroutine$updateDestinationDir_a4hdmt$; Coroutine$updateDestinationDir_a4hdmt$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJob\n | SET toUri = ?\n | WHERE cjUid = ?\n | \n ')), ContentJobDao_JdbcKt$updateDestinationDir$lambda(this.local$toUri, this.local$cjUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobDao_JdbcKt.prototype.updateDestinationDir_a4hdmt$ = function (cjUid_0, toUri_0, continuation_0, suspended) { var instance = new Coroutine$updateDestinationDir_a4hdmt$(this, cjUid_0, toUri_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda$lambda(_result) { return mapNextRow(_result, false, ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda(closure$contentJobId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentJobId = closure$contentJobId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda; Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentJobId); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda(closure$contentJobId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda(closure$contentJobId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda(this$ContentJobDao_JdbcKt_0, closure$contentJobId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentJobDao_JdbcKt = this$ContentJobDao_JdbcKt_0; this.local$closure$contentJobId = closure$contentJobId_0; } Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda; Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentJobDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((SELECT ContentJob.cjIsMeteredAllowed\n | FROM ContentJob\n | WHERE cjUid = ?\n | LIMIT 1), 0)\n | \n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COALESCE((SELECT ContentJob.cjIsMeteredAllowed\n | FROM ContentJob\n | WHERE cjUid = ?\n | LIMIT 1), FALSE)\n | \n ')), ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda$lambda(this.local$closure$contentJobId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda(this$ContentJobDao_JdbcKt_0, closure$contentJobId_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda(this$ContentJobDao_JdbcKt_0, closure$contentJobId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobDao_JdbcKt.prototype.findMeteredAllowedLiveData_s8cxhz$ = function (contentJobId) { return new LiveDataImpl(this._db, listOf_0('ContentJob'), ContentJobDao_JdbcKt$findMeteredAllowedLiveData$lambda(this, contentJobId)); }; function Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda(closure$meteredAllowed_0, closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$meteredAllowed = closure$meteredAllowed_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda; Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$meteredAllowed); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda(closure$meteredAllowed_0, closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda(closure$meteredAllowed_0, closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateMeteredAllowedForEntry_2gd3um$($this, contentEntryUid_0, meteredAllowed_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$meteredAllowed = meteredAllowed_0; } Coroutine$updateMeteredAllowedForEntry_2gd3um$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateMeteredAllowedForEntry_2gd3um$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateMeteredAllowedForEntry_2gd3um$.prototype.constructor = Coroutine$updateMeteredAllowedForEntry_2gd3um$; Coroutine$updateMeteredAllowedForEntry_2gd3um$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJob \n | SET cjIsMeteredAllowed = ?\n | WHERE cjUid IN (SELECT cjiJobUid \n | FROM ContentJobItem\n | WHERE cjiContentEntryUid = ?\n | OR cjiParentContentEntryUid = ?)\n | \n ')), ContentJobDao_JdbcKt$updateMeteredAllowedForEntry$lambda(this.local$meteredAllowed, this.local$contentEntryUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobDao_JdbcKt.prototype.updateMeteredAllowedForEntry_2gd3um$ = function (contentEntryUid_0, meteredAllowed_0, continuation_0, suspended) { var instance = new Coroutine$updateMeteredAllowedForEntry_2gd3um$(this, contentEntryUid_0, meteredAllowed_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda$lambda(_result) { return mapNextRow(_result, false, ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda$lambda$lambda(_result)); } function Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda(closure$jobId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$jobId = closure$jobId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda.prototype.constructor = Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda; Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$jobId); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda(closure$jobId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda(closure$jobId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobDao_JdbcKt.prototype.isConnectivityAcceptableForJob_s8cxhz$ = function (jobId, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | WITH ConnectivityStateCte(state) AS \n | (SELECT COALESCE(\n | (SELECT connectivityState \n | FROM ConnectivityStatus \n | LIMIT 1), 0))\n | \n | SELECT COALESCE((\n | SELECT 1 \n | FROM ContentJob \n | WHERE cjUid = ?\n | AND ((cjIsMeteredAllowed \n | AND (SELECT state FROM ConnectivityStateCte) = 3)\n |\t\t\t OR (SELECT state FROM ConnectivityStateCte) = 4)\n | ) ,0)\n | \n ')), ContentJobDao_JdbcKt$isConnectivityAcceptableForJob$lambda(jobId), continuation); }; function ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContentJob (cjUid, toUri, cjProgress, cjTotal, cjNotificationTitle, cjIsMeteredAllowed, params) VALUES(?, ?, ?, ?, ?, ?, ?)'; }; ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cjUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cjUid); } stmt.setString_vqvrqt$(2, entity.toUri); stmt.setLong_6svq3l$(3, entity.cjProgress); stmt.setLong_6svq3l$(4, entity.cjTotal); stmt.setString_vqvrqt$(5, entity.cjNotificationTitle); stmt.setBoolean_fzusl$(6, entity.cjIsMeteredAllowed); stmt.setString_vqvrqt$(7, entity.params); }; ContentJobDao_JdbcKt$_insertAdapterContentJob_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentJobDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentJobDao_JdbcKt', interfaces: [ContentJobDao]}; function ContentJobItemDao() { } ContentJobItemDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentJobItemDao', interfaces: []}; function ContentJobItemDao_JdbcKt(_db) { ContentJobItemDao.call(this); this._db = _db; this._insertAdapterContentJobItem_ = new ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral(this._db); } function Coroutine$insertJobItem_letzpf$($this, jobItem_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$jobItem = jobItem_0; } Coroutine$insertJobItem_letzpf$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertJobItem_letzpf$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertJobItem_letzpf$.prototype.constructor = Coroutine$insertJobItem_letzpf$; Coroutine$insertJobItem_letzpf$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentJobItem_.insertAndReturnIdAsync_11rb$(this.local$jobItem, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.insertJobItem_letzpf$ = function (jobItem_0, continuation_0, suspended) { var instance = new Coroutine$insertJobItem_letzpf$(this, jobItem_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertJobItems_xpde42$($this, jobItems_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$jobItems = jobItems_0; } Coroutine$insertJobItems_xpde42$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertJobItems_xpde42$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertJobItems_xpde42$.prototype.constructor = Coroutine$insertJobItems_xpde42$; Coroutine$insertJobItems_xpde42$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContentJobItem_.insertListAsync_4ezy5m$(this.local$jobItems, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.insertJobItems_xpde42$ = function (jobItems_0, continuation_0, suspended) { var instance = new Coroutine$insertJobItems_xpde42$(this, jobItems_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_ContentJobItem_nullCount = 0; var _tmp_cjiUid = closure$_result.getLong_61zpoe$('cjiUid'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiJobUid = closure$_result.getLong_61zpoe$('cjiJobUid'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_sourceUri = closure$_result.getString_61zpoe$('sourceUri'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiIsLeaf = closure$_result.getBoolean_61zpoe$('cjiIsLeaf'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiContentEntryUid = closure$_result.getLong_61zpoe$('cjiContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiParentContentEntryUid = closure$_result.getLong_61zpoe$('cjiParentContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiContainerUid = closure$_result.getLong_61zpoe$('cjiContainerUid'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiItemProgress = closure$_result.getLong_61zpoe$('cjiItemProgress'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiItemTotal = closure$_result.getLong_61zpoe$('cjiItemTotal'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiRecursiveProgress = closure$_result.getLong_61zpoe$('cjiRecursiveProgress'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiRecursiveTotal = closure$_result.getLong_61zpoe$('cjiRecursiveTotal'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiStatus = closure$_result.getInt_61zpoe$('cjiStatus'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiRecursiveStatus = closure$_result.getInt_61zpoe$('cjiRecursiveStatus'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiConnectivityNeeded = closure$_result.getBoolean_61zpoe$('cjiConnectivityNeeded'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiPluginId = closure$_result.getInt_61zpoe$('cjiPluginId'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiAttemptCount = closure$_result.getInt_61zpoe$('cjiAttemptCount'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiParentCjiUid = closure$_result.getLong_61zpoe$('cjiParentCjiUid'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiServerJobId = closure$_result.getLong_61zpoe$('cjiServerJobId'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiStartTime = closure$_result.getLong_61zpoe$('cjiStartTime'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiFinishTime = closure$_result.getLong_61zpoe$('cjiFinishTime'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiUploadSessionUid = closure$_result.getString_61zpoe$('cjiUploadSessionUid'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiContentDeletedOnCancellation = closure$_result.getBoolean_61zpoe$('cjiContentDeletedOnCancellation'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_cjiContainerProcessed = closure$_result.getBoolean_61zpoe$('cjiContainerProcessed'); if (closure$_result.wasNull()) { _tmp_ContentJobItem_nullCount = _tmp_ContentJobItem_nullCount + 1 | 0; } var _tmp_ContentJobItem_isAllNull = _tmp_ContentJobItem_nullCount === 23; var _tmp_ContentJob_nullCount = 0; var _tmp_cjUid = closure$_result.getLong_61zpoe$('cjUid'); if (closure$_result.wasNull()) { _tmp_ContentJob_nullCount = _tmp_ContentJob_nullCount + 1 | 0; } var _tmp_toUri = closure$_result.getString_61zpoe$('toUri'); if (closure$_result.wasNull()) { _tmp_ContentJob_nullCount = _tmp_ContentJob_nullCount + 1 | 0; } var _tmp_cjProgress = closure$_result.getLong_61zpoe$('cjProgress'); if (closure$_result.wasNull()) { _tmp_ContentJob_nullCount = _tmp_ContentJob_nullCount + 1 | 0; } var _tmp_cjTotal = closure$_result.getLong_61zpoe$('cjTotal'); if (closure$_result.wasNull()) { _tmp_ContentJob_nullCount = _tmp_ContentJob_nullCount + 1 | 0; } var _tmp_cjNotificationTitle = closure$_result.getString_61zpoe$('cjNotificationTitle'); if (closure$_result.wasNull()) { _tmp_ContentJob_nullCount = _tmp_ContentJob_nullCount + 1 | 0; } var _tmp_cjIsMeteredAllowed = closure$_result.getBoolean_61zpoe$('cjIsMeteredAllowed'); if (closure$_result.wasNull()) { _tmp_ContentJob_nullCount = _tmp_ContentJob_nullCount + 1 | 0; } var _tmp_params = closure$_result.getString_61zpoe$('params'); if (closure$_result.wasNull()) { _tmp_ContentJob_nullCount = _tmp_ContentJob_nullCount + 1 | 0; } var _tmp_ContentJob_isAllNull = _tmp_ContentJob_nullCount === 7; var $receiver = new ContentJobItemAndContentJob(); if (!_tmp_ContentJobItem_isAllNull) { var $receiver_0 = new ContentJobItem(); $receiver_0.cjiUid = _tmp_cjiUid; $receiver_0.cjiJobUid = _tmp_cjiJobUid; $receiver_0.sourceUri = _tmp_sourceUri; $receiver_0.cjiIsLeaf = _tmp_cjiIsLeaf; $receiver_0.cjiContentEntryUid = _tmp_cjiContentEntryUid; $receiver_0.cjiParentContentEntryUid = _tmp_cjiParentContentEntryUid; $receiver_0.cjiContainerUid = _tmp_cjiContainerUid; $receiver_0.cjiItemProgress = _tmp_cjiItemProgress; $receiver_0.cjiItemTotal = _tmp_cjiItemTotal; $receiver_0.cjiRecursiveProgress = _tmp_cjiRecursiveProgress; $receiver_0.cjiRecursiveTotal = _tmp_cjiRecursiveTotal; $receiver_0.cjiStatus = _tmp_cjiStatus; $receiver_0.cjiRecursiveStatus = _tmp_cjiRecursiveStatus; $receiver_0.cjiConnectivityNeeded = _tmp_cjiConnectivityNeeded; $receiver_0.cjiPluginId = _tmp_cjiPluginId; $receiver_0.cjiAttemptCount = _tmp_cjiAttemptCount; $receiver_0.cjiParentCjiUid = _tmp_cjiParentCjiUid; $receiver_0.cjiServerJobId = _tmp_cjiServerJobId; $receiver_0.cjiStartTime = _tmp_cjiStartTime; $receiver_0.cjiFinishTime = _tmp_cjiFinishTime; $receiver_0.cjiUploadSessionUid = _tmp_cjiUploadSessionUid; $receiver_0.cjiContentDeletedOnCancellation = _tmp_cjiContentDeletedOnCancellation; $receiver_0.cjiContainerProcessed = _tmp_cjiContainerProcessed; $receiver.contentJobItem = $receiver_0; } if (!_tmp_ContentJob_isAllNull) { var $receiver_1 = new ContentJob(); $receiver_1.cjUid = _tmp_cjUid; $receiver_1.toUri = _tmp_toUri; $receiver_1.cjProgress = _tmp_cjProgress; $receiver_1.cjTotal = _tmp_cjTotal; $receiver_1.cjNotificationTitle = _tmp_cjNotificationTitle; $receiver_1.cjIsMeteredAllowed = _tmp_cjIsMeteredAllowed; $receiver_1.params = _tmp_params; $receiver.contentJob = $receiver_1; } return $receiver; }; } function ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda$lambda(_result) { return mapRows(_result, ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda$lambda$lambda(_result)); } function Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda(closure$contentJobUid_0, closure$limit_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentJobUid = closure$contentJobUid_0; this.local$closure$limit = closure$limit_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda; Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentJobUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$limit); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda(closure$contentJobUid_0, closure$limit_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda(closure$contentJobUid_0, closure$limit_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobItemDao_JdbcKt.prototype.findNextItemsInQueue_yhmem3$ = function (contentJobUid, limit, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | WITH ConnectivityStateCte(state) AS \n | (SELECT COALESCE(\n | (SELECT connectivityState \n | FROM ConnectivityStatus \n | LIMIT 1), 0))\n | \n | SELECT ContentJobItem.*, ContentJob.*\n | FROM ContentJobItem\n | JOIN ContentJob\n | ON ContentJobItem.cjiJobUid = ContentJob.cjUid\n | WHERE ContentJobItem.cjiJobUid = ?\n | AND (ContentJobItem.cjiStatus = 4 OR \n | ContentJobItem.cjiStatus = 5)\n | AND (\n | NOT cjiConnectivityNeeded \n | OR ((SELECT state FROM ConnectivityStateCte) = 4) \n | OR (cjIsMeteredAllowed \n | AND (SELECT state FROM ConnectivityStateCte) = 3)\n | )\n | LIMIT ?\n | \n ')), ContentJobItemDao_JdbcKt$findNextItemsInQueue$lambda(contentJobUid, limit), continuation); }; function ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_progress = closure$_result.getInt_61zpoe$('progress'); var _tmp_total = closure$_result.getInt_61zpoe$('total'); var _tmp_progressTitle = closure$_result.getString_61zpoe$('progressTitle'); var _tmp_cjiUid = closure$_result.getLong_61zpoe$('cjiUid'); var $receiver = new ContentJobItemProgress(); $receiver.progress = _tmp_progress; $receiver.total = _tmp_total; $receiver.progressTitle = _tmp_progressTitle; $receiver.cjiUid = _tmp_cjiUid; return $receiver; }; } function ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda$lambda(_result) { return mapRows(_result, ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda$lambda$lambda(_result)); } function Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda; Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobItemDao_JdbcKt.prototype.findActiveContentJobItems_s8cxhz$ = function (contentEntryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT cjiRecursiveProgress AS progress, \n | cjiRecursiveTotal AS total, \n | cjNotificationTitle as progressTitle,\n | ContentJobItem.cjiUid\n | FROM ContentJobItem\n | JOIN ContentJob\n | ON ContentJob.cjUid = ContentJobItem.cjiJobUid\n | WHERE cjiContentEntryUid = ?\n | AND cjiRecursiveStatus >= 4\n | AND cjiRecursiveStatus <= 20\n | ORDER BY cjiStartTime DESC\n | \n ')), ContentJobItemDao_JdbcKt$findActiveContentJobItems$lambda(contentEntryUid), continuation); }; function Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda(closure$status_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$status = closure$status_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$status); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateItemStatus$lambda(closure$status_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateItemStatus$lambda(closure$status_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateItemStatus_yhmem3$($this, cjiUid_0, status_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$status = status_0; } Coroutine$updateItemStatus_yhmem3$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateItemStatus_yhmem3$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateItemStatus_yhmem3$.prototype.constructor = Coroutine$updateItemStatus_yhmem3$; Coroutine$updateItemStatus_yhmem3$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem \n | SET cjiStatus = ?\n | WHERE cjiUid= ? \n | \n ')), ContentJobItemDao_JdbcKt$updateItemStatus$lambda(this.local$status, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateItemStatus_yhmem3$ = function (cjiUid_0, status_0, continuation_0, suspended) { var instance = new Coroutine$updateItemStatus_yhmem3$(this, cjiUid_0, status_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$isJobDone$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function ContentJobItemDao_JdbcKt$isJobDone$lambda$lambda(_result) { return mapNextRow(_result, false, ContentJobItemDao_JdbcKt$isJobDone$lambda$lambda$lambda(_result)); } function Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda(closure$jobUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$jobUid = closure$jobUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda; Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$jobUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$isJobDone$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$isJobDone$lambda(closure$jobUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$isJobDone$lambda(closure$jobUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobItemDao_JdbcKt.prototype.isJobDone_s8cxhz$ = function (jobUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT NOT EXISTS(\n | SELECT cjiUid \n | FROM ContentJobItem\n | WHERE cjiJobUid = ?\n | AND cjiStatus < 21) \n | \n ')), ContentJobItemDao_JdbcKt$isJobDone$lambda(jobUid), continuation); }; function ContentJobItemDao_JdbcKt$findRootJobItemByJobId$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cjiUid = closure$_result.getLong_61zpoe$('cjiUid'); var _tmp_cjiJobUid = closure$_result.getLong_61zpoe$('cjiJobUid'); var _tmp_sourceUri = closure$_result.getString_61zpoe$('sourceUri'); var _tmp_cjiIsLeaf = closure$_result.getBoolean_61zpoe$('cjiIsLeaf'); var _tmp_cjiContentEntryUid = closure$_result.getLong_61zpoe$('cjiContentEntryUid'); var _tmp_cjiParentContentEntryUid = closure$_result.getLong_61zpoe$('cjiParentContentEntryUid'); var _tmp_cjiContainerUid = closure$_result.getLong_61zpoe$('cjiContainerUid'); var _tmp_cjiItemProgress = closure$_result.getLong_61zpoe$('cjiItemProgress'); var _tmp_cjiItemTotal = closure$_result.getLong_61zpoe$('cjiItemTotal'); var _tmp_cjiRecursiveProgress = closure$_result.getLong_61zpoe$('cjiRecursiveProgress'); var _tmp_cjiRecursiveTotal = closure$_result.getLong_61zpoe$('cjiRecursiveTotal'); var _tmp_cjiStatus = closure$_result.getInt_61zpoe$('cjiStatus'); var _tmp_cjiRecursiveStatus = closure$_result.getInt_61zpoe$('cjiRecursiveStatus'); var _tmp_cjiConnectivityNeeded = closure$_result.getBoolean_61zpoe$('cjiConnectivityNeeded'); var _tmp_cjiPluginId = closure$_result.getInt_61zpoe$('cjiPluginId'); var _tmp_cjiAttemptCount = closure$_result.getInt_61zpoe$('cjiAttemptCount'); var _tmp_cjiParentCjiUid = closure$_result.getLong_61zpoe$('cjiParentCjiUid'); var _tmp_cjiServerJobId = closure$_result.getLong_61zpoe$('cjiServerJobId'); var _tmp_cjiStartTime = closure$_result.getLong_61zpoe$('cjiStartTime'); var _tmp_cjiFinishTime = closure$_result.getLong_61zpoe$('cjiFinishTime'); var _tmp_cjiUploadSessionUid = closure$_result.getString_61zpoe$('cjiUploadSessionUid'); var _tmp_cjiContentDeletedOnCancellation = closure$_result.getBoolean_61zpoe$('cjiContentDeletedOnCancellation'); var _tmp_cjiContainerProcessed = closure$_result.getBoolean_61zpoe$('cjiContainerProcessed'); var $receiver = new ContentJobItem(); $receiver.cjiUid = _tmp_cjiUid; $receiver.cjiJobUid = _tmp_cjiJobUid; $receiver.sourceUri = _tmp_sourceUri; $receiver.cjiIsLeaf = _tmp_cjiIsLeaf; $receiver.cjiContentEntryUid = _tmp_cjiContentEntryUid; $receiver.cjiParentContentEntryUid = _tmp_cjiParentContentEntryUid; $receiver.cjiContainerUid = _tmp_cjiContainerUid; $receiver.cjiItemProgress = _tmp_cjiItemProgress; $receiver.cjiItemTotal = _tmp_cjiItemTotal; $receiver.cjiRecursiveProgress = _tmp_cjiRecursiveProgress; $receiver.cjiRecursiveTotal = _tmp_cjiRecursiveTotal; $receiver.cjiStatus = _tmp_cjiStatus; $receiver.cjiRecursiveStatus = _tmp_cjiRecursiveStatus; $receiver.cjiConnectivityNeeded = _tmp_cjiConnectivityNeeded; $receiver.cjiPluginId = _tmp_cjiPluginId; $receiver.cjiAttemptCount = _tmp_cjiAttemptCount; $receiver.cjiParentCjiUid = _tmp_cjiParentCjiUid; $receiver.cjiServerJobId = _tmp_cjiServerJobId; $receiver.cjiStartTime = _tmp_cjiStartTime; $receiver.cjiFinishTime = _tmp_cjiFinishTime; $receiver.cjiUploadSessionUid = _tmp_cjiUploadSessionUid; $receiver.cjiContentDeletedOnCancellation = _tmp_cjiContentDeletedOnCancellation; $receiver.cjiContainerProcessed = _tmp_cjiContainerProcessed; return $receiver; }; } function ContentJobItemDao_JdbcKt$findRootJobItemByJobId$lambda$lambda(_result) { return mapNextRow(_result, null, ContentJobItemDao_JdbcKt$findRootJobItemByJobId$lambda$lambda$lambda(_result)); } function ContentJobItemDao_JdbcKt$findRootJobItemByJobId$lambda(closure$jobUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$jobUid); return useResults(_stmt.executeQuery(), ContentJobItemDao_JdbcKt$findRootJobItemByJobId$lambda$lambda); }; } ContentJobItemDao_JdbcKt.prototype.findRootJobItemByJobId_s8cxhz$ = function (jobUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ContentJobItem\n | WHERE cjiJobUid = ? \n | AND cjiParentCjiUid = 0 \n | LIMIT 1\n | \n ')), ContentJobItemDao_JdbcKt$findRootJobItemByJobId$lambda(jobUid)); }; function Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda(closure$cjiProgress_0, closure$cjiTotal_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$cjiProgress = closure$cjiProgress_0; this.local$closure$cjiTotal = closure$cjiTotal_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$cjiProgress); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiTotal); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateItemProgress$lambda(closure$cjiProgress_0, closure$cjiTotal_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateItemProgress$lambda(closure$cjiProgress_0, closure$cjiTotal_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateItemProgress_b9bd0d$($this, cjiUid_0, cjiProgress_0, cjiTotal_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$cjiProgress = cjiProgress_0; this.local$cjiTotal = cjiTotal_0; } Coroutine$updateItemProgress_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateItemProgress_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateItemProgress_b9bd0d$.prototype.constructor = Coroutine$updateItemProgress_b9bd0d$; Coroutine$updateItemProgress_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiItemProgress = ?,\n | cjiItemTotal = ?\n | WHERE cjiUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$updateItemProgress$lambda(this.local$cjiProgress, this.local$cjiTotal, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateItemProgress_b9bd0d$ = function (cjiUid_0, cjiProgress_0, cjiTotal_0, continuation_0, suspended) { var instance = new Coroutine$updateItemProgress_b9bd0d$(this, cjiUid_0, cjiProgress_0, cjiTotal_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda(closure$connectivityNeeded_0, closure$contentJobItemId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$connectivityNeeded = closure$connectivityNeeded_0; this.local$closure$contentJobItemId = closure$contentJobItemId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$connectivityNeeded); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentJobItemId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda(closure$connectivityNeeded_0, closure$contentJobItemId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda(closure$connectivityNeeded_0, closure$contentJobItemId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateConnectivityNeeded_2gd3um$($this, contentJobItemId_0, connectivityNeeded_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentJobItemId = contentJobItemId_0; this.local$connectivityNeeded = connectivityNeeded_0; } Coroutine$updateConnectivityNeeded_2gd3um$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateConnectivityNeeded_2gd3um$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateConnectivityNeeded_2gd3um$.prototype.constructor = Coroutine$updateConnectivityNeeded_2gd3um$; Coroutine$updateConnectivityNeeded_2gd3um$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiConnectivityNeeded = ?\n | WHERE cjiUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$updateConnectivityNeeded$lambda(this.local$connectivityNeeded, this.local$contentJobItemId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateConnectivityNeeded_2gd3um$ = function (contentJobItemId_0, connectivityNeeded_0, continuation_0, suspended) { var instance = new Coroutine$updateConnectivityNeeded_2gd3um$(this, contentJobItemId_0, connectivityNeeded_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda(closure$cjiContainerProcessed_0, closure$contentJobItemId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$cjiContainerProcessed = closure$cjiContainerProcessed_0; this.local$closure$contentJobItemId = closure$contentJobItemId_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$cjiContainerProcessed); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentJobItemId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda(closure$cjiContainerProcessed_0, closure$contentJobItemId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda(closure$cjiContainerProcessed_0, closure$contentJobItemId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateContainerProcessed_2gd3um$($this, contentJobItemId_0, cjiContainerProcessed_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentJobItemId = contentJobItemId_0; this.local$cjiContainerProcessed = cjiContainerProcessed_0; } Coroutine$updateContainerProcessed_2gd3um$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContainerProcessed_2gd3um$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContainerProcessed_2gd3um$.prototype.constructor = Coroutine$updateContainerProcessed_2gd3um$; Coroutine$updateContainerProcessed_2gd3um$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiContainerProcessed = ?\n | WHERE cjiUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$updateContainerProcessed$lambda(this.local$cjiContainerProcessed, this.local$contentJobItemId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateContainerProcessed_2gd3um$ = function (contentJobItemId_0, cjiContainerProcessed_0, continuation_0, suspended) { var instance = new Coroutine$updateContainerProcessed_2gd3um$(this, contentJobItemId_0, cjiContainerProcessed_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda(closure$status_0, closure$attemptCount_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$status = closure$status_0; this.local$closure$attemptCount = closure$attemptCount_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$status); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$attemptCount); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda(closure$status_0, closure$attemptCount_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda(closure$status_0, closure$attemptCount_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateJobItemAttemptCountAndStatus_liip7b$($this, cjiUid_0, attemptCount_0, status_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$attemptCount = attemptCount_0; this.local$status = status_0; } Coroutine$updateJobItemAttemptCountAndStatus_liip7b$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateJobItemAttemptCountAndStatus_liip7b$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateJobItemAttemptCountAndStatus_liip7b$.prototype.constructor = Coroutine$updateJobItemAttemptCountAndStatus_liip7b$; Coroutine$updateJobItemAttemptCountAndStatus_liip7b$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiStatus = ?,\n | cjiAttemptCount = ?\n | WHERE cjiUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$updateJobItemAttemptCountAndStatus$lambda(this.local$status, this.local$attemptCount, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateJobItemAttemptCountAndStatus_liip7b$ = function (cjiUid_0, attemptCount_0, status_0, continuation_0, suspended) { var instance = new Coroutine$updateJobItemAttemptCountAndStatus_liip7b$(this, cjiUid_0, attemptCount_0, status_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda(closure$startTime_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$startTime = closure$startTime_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$startTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda(closure$startTime_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda(closure$startTime_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateStartTimeForJob_3pjtqy$($this, cjiUid_0, startTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$startTime = startTime_0; } Coroutine$updateStartTimeForJob_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateStartTimeForJob_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateStartTimeForJob_3pjtqy$.prototype.constructor = Coroutine$updateStartTimeForJob_3pjtqy$; Coroutine$updateStartTimeForJob_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiStartTime = ?\n | WHERE cjiUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$updateStartTimeForJob$lambda(this.local$startTime, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateStartTimeForJob_3pjtqy$ = function (cjiUid_0, startTime_0, continuation_0, suspended) { var instance = new Coroutine$updateStartTimeForJob_3pjtqy$(this, cjiUid_0, startTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda(closure$finishTime_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$finishTime = closure$finishTime_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$finishTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda(closure$finishTime_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda(closure$finishTime_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateFinishTimeForJob_3pjtqy$($this, cjiUid_0, finishTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$finishTime = finishTime_0; } Coroutine$updateFinishTimeForJob_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateFinishTimeForJob_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateFinishTimeForJob_3pjtqy$.prototype.constructor = Coroutine$updateFinishTimeForJob_3pjtqy$; Coroutine$updateFinishTimeForJob_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiFinishTime = ?\n | WHERE cjiUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$updateFinishTimeForJob$lambda(this.local$finishTime, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateFinishTimeForJob_3pjtqy$ = function (cjiUid_0, finishTime_0, continuation_0, suspended) { var instance = new Coroutine$updateFinishTimeForJob_3pjtqy$(this, cjiUid_0, finishTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda(closure$contentEntryUid_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda(closure$contentEntryUid_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda(closure$contentEntryUid_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateContentEntryUid_3pjtqy$($this, cjiUid_0, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$updateContentEntryUid_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContentEntryUid_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContentEntryUid_3pjtqy$.prototype.constructor = Coroutine$updateContentEntryUid_3pjtqy$; Coroutine$updateContentEntryUid_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobITem\n | SET cjiContentEntryUid = ?\n | WHERE cjiUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$updateContentEntryUid$lambda(this.local$contentEntryUid, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateContentEntryUid_3pjtqy$ = function (cjiUid_0, contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$updateContentEntryUid_3pjtqy$(this, cjiUid_0, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda(closure$containerUid_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$containerUid = closure$containerUid_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$containerUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda(closure$containerUid_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda(closure$containerUid_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateContentJobItemContainer_3pjtqy$($this, cjiUid_0, containerUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$containerUid = containerUid_0; } Coroutine$updateContentJobItemContainer_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateContentJobItemContainer_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateContentJobItemContainer_3pjtqy$.prototype.constructor = Coroutine$updateContentJobItemContainer_3pjtqy$; Coroutine$updateContentJobItemContainer_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiContainerUid = ?\n | WHERE cjiUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$updateContentJobItemContainer$lambda(this.local$containerUid, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateContentJobItemContainer_3pjtqy$ = function (cjiUid_0, containerUid_0, continuation_0, suspended) { var instance = new Coroutine$updateContentJobItemContainer_3pjtqy$(this, cjiUid_0, containerUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$findAll$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cjiUid = closure$_result.getLong_61zpoe$('cjiUid'); var _tmp_cjiJobUid = closure$_result.getLong_61zpoe$('cjiJobUid'); var _tmp_sourceUri = closure$_result.getString_61zpoe$('sourceUri'); var _tmp_cjiIsLeaf = closure$_result.getBoolean_61zpoe$('cjiIsLeaf'); var _tmp_cjiContentEntryUid = closure$_result.getLong_61zpoe$('cjiContentEntryUid'); var _tmp_cjiParentContentEntryUid = closure$_result.getLong_61zpoe$('cjiParentContentEntryUid'); var _tmp_cjiContainerUid = closure$_result.getLong_61zpoe$('cjiContainerUid'); var _tmp_cjiItemProgress = closure$_result.getLong_61zpoe$('cjiItemProgress'); var _tmp_cjiItemTotal = closure$_result.getLong_61zpoe$('cjiItemTotal'); var _tmp_cjiRecursiveProgress = closure$_result.getLong_61zpoe$('cjiRecursiveProgress'); var _tmp_cjiRecursiveTotal = closure$_result.getLong_61zpoe$('cjiRecursiveTotal'); var _tmp_cjiStatus = closure$_result.getInt_61zpoe$('cjiStatus'); var _tmp_cjiRecursiveStatus = closure$_result.getInt_61zpoe$('cjiRecursiveStatus'); var _tmp_cjiConnectivityNeeded = closure$_result.getBoolean_61zpoe$('cjiConnectivityNeeded'); var _tmp_cjiPluginId = closure$_result.getInt_61zpoe$('cjiPluginId'); var _tmp_cjiAttemptCount = closure$_result.getInt_61zpoe$('cjiAttemptCount'); var _tmp_cjiParentCjiUid = closure$_result.getLong_61zpoe$('cjiParentCjiUid'); var _tmp_cjiServerJobId = closure$_result.getLong_61zpoe$('cjiServerJobId'); var _tmp_cjiStartTime = closure$_result.getLong_61zpoe$('cjiStartTime'); var _tmp_cjiFinishTime = closure$_result.getLong_61zpoe$('cjiFinishTime'); var _tmp_cjiUploadSessionUid = closure$_result.getString_61zpoe$('cjiUploadSessionUid'); var _tmp_cjiContentDeletedOnCancellation = closure$_result.getBoolean_61zpoe$('cjiContentDeletedOnCancellation'); var _tmp_cjiContainerProcessed = closure$_result.getBoolean_61zpoe$('cjiContainerProcessed'); var $receiver = new ContentJobItem(); $receiver.cjiUid = _tmp_cjiUid; $receiver.cjiJobUid = _tmp_cjiJobUid; $receiver.sourceUri = _tmp_sourceUri; $receiver.cjiIsLeaf = _tmp_cjiIsLeaf; $receiver.cjiContentEntryUid = _tmp_cjiContentEntryUid; $receiver.cjiParentContentEntryUid = _tmp_cjiParentContentEntryUid; $receiver.cjiContainerUid = _tmp_cjiContainerUid; $receiver.cjiItemProgress = _tmp_cjiItemProgress; $receiver.cjiItemTotal = _tmp_cjiItemTotal; $receiver.cjiRecursiveProgress = _tmp_cjiRecursiveProgress; $receiver.cjiRecursiveTotal = _tmp_cjiRecursiveTotal; $receiver.cjiStatus = _tmp_cjiStatus; $receiver.cjiRecursiveStatus = _tmp_cjiRecursiveStatus; $receiver.cjiConnectivityNeeded = _tmp_cjiConnectivityNeeded; $receiver.cjiPluginId = _tmp_cjiPluginId; $receiver.cjiAttemptCount = _tmp_cjiAttemptCount; $receiver.cjiParentCjiUid = _tmp_cjiParentCjiUid; $receiver.cjiServerJobId = _tmp_cjiServerJobId; $receiver.cjiStartTime = _tmp_cjiStartTime; $receiver.cjiFinishTime = _tmp_cjiFinishTime; $receiver.cjiUploadSessionUid = _tmp_cjiUploadSessionUid; $receiver.cjiContentDeletedOnCancellation = _tmp_cjiContentDeletedOnCancellation; $receiver.cjiContainerProcessed = _tmp_cjiContainerProcessed; return $receiver; }; } function ContentJobItemDao_JdbcKt$findAll$lambda$lambda(_result) { return mapRows(_result, ContentJobItemDao_JdbcKt$findAll$lambda$lambda$lambda(_result)); } function Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda; Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$findAll$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$findAll$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$findAll$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } ContentJobItemDao_JdbcKt.prototype.findAll = function (continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ContentJobItem\n | \n ')), ContentJobItemDao_JdbcKt$findAll$lambda, continuation); }; function ContentJobItemDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cjiUid = closure$_result.getLong_61zpoe$('cjiUid'); var _tmp_cjiJobUid = closure$_result.getLong_61zpoe$('cjiJobUid'); var _tmp_sourceUri = closure$_result.getString_61zpoe$('sourceUri'); var _tmp_cjiIsLeaf = closure$_result.getBoolean_61zpoe$('cjiIsLeaf'); var _tmp_cjiContentEntryUid = closure$_result.getLong_61zpoe$('cjiContentEntryUid'); var _tmp_cjiParentContentEntryUid = closure$_result.getLong_61zpoe$('cjiParentContentEntryUid'); var _tmp_cjiContainerUid = closure$_result.getLong_61zpoe$('cjiContainerUid'); var _tmp_cjiItemProgress = closure$_result.getLong_61zpoe$('cjiItemProgress'); var _tmp_cjiItemTotal = closure$_result.getLong_61zpoe$('cjiItemTotal'); var _tmp_cjiRecursiveProgress = closure$_result.getLong_61zpoe$('cjiRecursiveProgress'); var _tmp_cjiRecursiveTotal = closure$_result.getLong_61zpoe$('cjiRecursiveTotal'); var _tmp_cjiStatus = closure$_result.getInt_61zpoe$('cjiStatus'); var _tmp_cjiRecursiveStatus = closure$_result.getInt_61zpoe$('cjiRecursiveStatus'); var _tmp_cjiConnectivityNeeded = closure$_result.getBoolean_61zpoe$('cjiConnectivityNeeded'); var _tmp_cjiPluginId = closure$_result.getInt_61zpoe$('cjiPluginId'); var _tmp_cjiAttemptCount = closure$_result.getInt_61zpoe$('cjiAttemptCount'); var _tmp_cjiParentCjiUid = closure$_result.getLong_61zpoe$('cjiParentCjiUid'); var _tmp_cjiServerJobId = closure$_result.getLong_61zpoe$('cjiServerJobId'); var _tmp_cjiStartTime = closure$_result.getLong_61zpoe$('cjiStartTime'); var _tmp_cjiFinishTime = closure$_result.getLong_61zpoe$('cjiFinishTime'); var _tmp_cjiUploadSessionUid = closure$_result.getString_61zpoe$('cjiUploadSessionUid'); var _tmp_cjiContentDeletedOnCancellation = closure$_result.getBoolean_61zpoe$('cjiContentDeletedOnCancellation'); var _tmp_cjiContainerProcessed = closure$_result.getBoolean_61zpoe$('cjiContainerProcessed'); var $receiver = new ContentJobItem(); $receiver.cjiUid = _tmp_cjiUid; $receiver.cjiJobUid = _tmp_cjiJobUid; $receiver.sourceUri = _tmp_sourceUri; $receiver.cjiIsLeaf = _tmp_cjiIsLeaf; $receiver.cjiContentEntryUid = _tmp_cjiContentEntryUid; $receiver.cjiParentContentEntryUid = _tmp_cjiParentContentEntryUid; $receiver.cjiContainerUid = _tmp_cjiContainerUid; $receiver.cjiItemProgress = _tmp_cjiItemProgress; $receiver.cjiItemTotal = _tmp_cjiItemTotal; $receiver.cjiRecursiveProgress = _tmp_cjiRecursiveProgress; $receiver.cjiRecursiveTotal = _tmp_cjiRecursiveTotal; $receiver.cjiStatus = _tmp_cjiStatus; $receiver.cjiRecursiveStatus = _tmp_cjiRecursiveStatus; $receiver.cjiConnectivityNeeded = _tmp_cjiConnectivityNeeded; $receiver.cjiPluginId = _tmp_cjiPluginId; $receiver.cjiAttemptCount = _tmp_cjiAttemptCount; $receiver.cjiParentCjiUid = _tmp_cjiParentCjiUid; $receiver.cjiServerJobId = _tmp_cjiServerJobId; $receiver.cjiStartTime = _tmp_cjiStartTime; $receiver.cjiFinishTime = _tmp_cjiFinishTime; $receiver.cjiUploadSessionUid = _tmp_cjiUploadSessionUid; $receiver.cjiContentDeletedOnCancellation = _tmp_cjiContentDeletedOnCancellation; $receiver.cjiContainerProcessed = _tmp_cjiContainerProcessed; return $receiver; }; } function ContentJobItemDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ContentJobItemDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda(closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda; Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$findByUidAsync$lambda(closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$findByUidAsync$lambda(closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobItemDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (cjiUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJobItem.*\n | FROM ContentJobItem\n | WHERE cjiUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$findByUidAsync$lambda(cjiUid), continuation); }; function ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda$lambda(_result) { return mapNextRow(_result, L0, ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda$lambda$lambda(_result)); } function Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda; Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobItemDao_JdbcKt.prototype.getActiveContentJobIdByContentEntryUid_s8cxhz$ = function (contentEntryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE(\n | (SELECT ContentJobItem.cjiJobUid\n | FROM ContentJobItem\n | WHERE cjiContentEntryUid = ?\n | AND cjiStatus BETWEEN 4 AND 20\n | ORDER BY cjiFinishTime DESC), 0)\n | \n ')), ContentJobItemDao_JdbcKt$getActiveContentJobIdByContentEntryUid$lambda(contentEntryUid), continuation); }; function Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda(closure$uploadSessionUuid_0, closure$cjiUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uploadSessionUuid = closure$uploadSessionUuid_0; this.local$closure$cjiUid = closure$cjiUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$uploadSessionUuid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$cjiUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda(closure$uploadSessionUuid_0, closure$cjiUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda(closure$uploadSessionUuid_0, closure$cjiUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateUploadSessionUuid_a4hdmt$($this, cjiUid_0, uploadSessionUuid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cjiUid = cjiUid_0; this.local$uploadSessionUuid = uploadSessionUuid_0; } Coroutine$updateUploadSessionUuid_a4hdmt$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateUploadSessionUuid_a4hdmt$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateUploadSessionUuid_a4hdmt$.prototype.constructor = Coroutine$updateUploadSessionUuid_a4hdmt$; Coroutine$updateUploadSessionUuid_a4hdmt$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiUploadSessionUid = ?\n | WHERE cjiUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$updateUploadSessionUuid$lambda(this.local$uploadSessionUuid, this.local$cjiUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateUploadSessionUuid_a4hdmt$ = function (cjiUid_0, uploadSessionUuid_0, continuation_0, suspended) { var instance = new Coroutine$updateUploadSessionUuid_a4hdmt$(this, cjiUid_0, uploadSessionUuid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$findAllByJobId$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cjiUid = closure$_result.getLong_61zpoe$('cjiUid'); var _tmp_cjiJobUid = closure$_result.getLong_61zpoe$('cjiJobUid'); var _tmp_sourceUri = closure$_result.getString_61zpoe$('sourceUri'); var _tmp_cjiIsLeaf = closure$_result.getBoolean_61zpoe$('cjiIsLeaf'); var _tmp_cjiContentEntryUid = closure$_result.getLong_61zpoe$('cjiContentEntryUid'); var _tmp_cjiParentContentEntryUid = closure$_result.getLong_61zpoe$('cjiParentContentEntryUid'); var _tmp_cjiContainerUid = closure$_result.getLong_61zpoe$('cjiContainerUid'); var _tmp_cjiItemProgress = closure$_result.getLong_61zpoe$('cjiItemProgress'); var _tmp_cjiItemTotal = closure$_result.getLong_61zpoe$('cjiItemTotal'); var _tmp_cjiRecursiveProgress = closure$_result.getLong_61zpoe$('cjiRecursiveProgress'); var _tmp_cjiRecursiveTotal = closure$_result.getLong_61zpoe$('cjiRecursiveTotal'); var _tmp_cjiStatus = closure$_result.getInt_61zpoe$('cjiStatus'); var _tmp_cjiRecursiveStatus = closure$_result.getInt_61zpoe$('cjiRecursiveStatus'); var _tmp_cjiConnectivityNeeded = closure$_result.getBoolean_61zpoe$('cjiConnectivityNeeded'); var _tmp_cjiPluginId = closure$_result.getInt_61zpoe$('cjiPluginId'); var _tmp_cjiAttemptCount = closure$_result.getInt_61zpoe$('cjiAttemptCount'); var _tmp_cjiParentCjiUid = closure$_result.getLong_61zpoe$('cjiParentCjiUid'); var _tmp_cjiServerJobId = closure$_result.getLong_61zpoe$('cjiServerJobId'); var _tmp_cjiStartTime = closure$_result.getLong_61zpoe$('cjiStartTime'); var _tmp_cjiFinishTime = closure$_result.getLong_61zpoe$('cjiFinishTime'); var _tmp_cjiUploadSessionUid = closure$_result.getString_61zpoe$('cjiUploadSessionUid'); var _tmp_cjiContentDeletedOnCancellation = closure$_result.getBoolean_61zpoe$('cjiContentDeletedOnCancellation'); var _tmp_cjiContainerProcessed = closure$_result.getBoolean_61zpoe$('cjiContainerProcessed'); var $receiver = new ContentJobItem(); $receiver.cjiUid = _tmp_cjiUid; $receiver.cjiJobUid = _tmp_cjiJobUid; $receiver.sourceUri = _tmp_sourceUri; $receiver.cjiIsLeaf = _tmp_cjiIsLeaf; $receiver.cjiContentEntryUid = _tmp_cjiContentEntryUid; $receiver.cjiParentContentEntryUid = _tmp_cjiParentContentEntryUid; $receiver.cjiContainerUid = _tmp_cjiContainerUid; $receiver.cjiItemProgress = _tmp_cjiItemProgress; $receiver.cjiItemTotal = _tmp_cjiItemTotal; $receiver.cjiRecursiveProgress = _tmp_cjiRecursiveProgress; $receiver.cjiRecursiveTotal = _tmp_cjiRecursiveTotal; $receiver.cjiStatus = _tmp_cjiStatus; $receiver.cjiRecursiveStatus = _tmp_cjiRecursiveStatus; $receiver.cjiConnectivityNeeded = _tmp_cjiConnectivityNeeded; $receiver.cjiPluginId = _tmp_cjiPluginId; $receiver.cjiAttemptCount = _tmp_cjiAttemptCount; $receiver.cjiParentCjiUid = _tmp_cjiParentCjiUid; $receiver.cjiServerJobId = _tmp_cjiServerJobId; $receiver.cjiStartTime = _tmp_cjiStartTime; $receiver.cjiFinishTime = _tmp_cjiFinishTime; $receiver.cjiUploadSessionUid = _tmp_cjiUploadSessionUid; $receiver.cjiContentDeletedOnCancellation = _tmp_cjiContentDeletedOnCancellation; $receiver.cjiContainerProcessed = _tmp_cjiContainerProcessed; return $receiver; }; } function ContentJobItemDao_JdbcKt$findAllByJobId$lambda$lambda(_result) { return mapRows(_result, ContentJobItemDao_JdbcKt$findAllByJobId$lambda$lambda$lambda(_result)); } function ContentJobItemDao_JdbcKt$findAllByJobId$lambda(closure$jobId) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$jobId); return useResults(_stmt.executeQuery(), ContentJobItemDao_JdbcKt$findAllByJobId$lambda$lambda); }; } ContentJobItemDao_JdbcKt.prototype.findAllByJobId_s8cxhz$ = function (jobId) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM ContentJobItem\n | WHERE cjiJobUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$findAllByJobId$lambda(jobId)); }; function ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cjiUid = closure$_result.getLong_61zpoe$('cjiUid'); var _tmp_cjiJobUid = closure$_result.getLong_61zpoe$('cjiJobUid'); var _tmp_sourceUri = closure$_result.getString_61zpoe$('sourceUri'); var _tmp_cjiIsLeaf = closure$_result.getBoolean_61zpoe$('cjiIsLeaf'); var _tmp_cjiContentEntryUid = closure$_result.getLong_61zpoe$('cjiContentEntryUid'); var _tmp_cjiParentContentEntryUid = closure$_result.getLong_61zpoe$('cjiParentContentEntryUid'); var _tmp_cjiContainerUid = closure$_result.getLong_61zpoe$('cjiContainerUid'); var _tmp_cjiItemProgress = closure$_result.getLong_61zpoe$('cjiItemProgress'); var _tmp_cjiItemTotal = closure$_result.getLong_61zpoe$('cjiItemTotal'); var _tmp_cjiRecursiveProgress = closure$_result.getLong_61zpoe$('cjiRecursiveProgress'); var _tmp_cjiRecursiveTotal = closure$_result.getLong_61zpoe$('cjiRecursiveTotal'); var _tmp_cjiStatus = closure$_result.getInt_61zpoe$('cjiStatus'); var _tmp_cjiRecursiveStatus = closure$_result.getInt_61zpoe$('cjiRecursiveStatus'); var _tmp_cjiConnectivityNeeded = closure$_result.getBoolean_61zpoe$('cjiConnectivityNeeded'); var _tmp_cjiPluginId = closure$_result.getInt_61zpoe$('cjiPluginId'); var _tmp_cjiAttemptCount = closure$_result.getInt_61zpoe$('cjiAttemptCount'); var _tmp_cjiParentCjiUid = closure$_result.getLong_61zpoe$('cjiParentCjiUid'); var _tmp_cjiServerJobId = closure$_result.getLong_61zpoe$('cjiServerJobId'); var _tmp_cjiStartTime = closure$_result.getLong_61zpoe$('cjiStartTime'); var _tmp_cjiFinishTime = closure$_result.getLong_61zpoe$('cjiFinishTime'); var _tmp_cjiUploadSessionUid = closure$_result.getString_61zpoe$('cjiUploadSessionUid'); var _tmp_cjiContentDeletedOnCancellation = closure$_result.getBoolean_61zpoe$('cjiContentDeletedOnCancellation'); var _tmp_cjiContainerProcessed = closure$_result.getBoolean_61zpoe$('cjiContainerProcessed'); var $receiver = new ContentJobItem(); $receiver.cjiUid = _tmp_cjiUid; $receiver.cjiJobUid = _tmp_cjiJobUid; $receiver.sourceUri = _tmp_sourceUri; $receiver.cjiIsLeaf = _tmp_cjiIsLeaf; $receiver.cjiContentEntryUid = _tmp_cjiContentEntryUid; $receiver.cjiParentContentEntryUid = _tmp_cjiParentContentEntryUid; $receiver.cjiContainerUid = _tmp_cjiContainerUid; $receiver.cjiItemProgress = _tmp_cjiItemProgress; $receiver.cjiItemTotal = _tmp_cjiItemTotal; $receiver.cjiRecursiveProgress = _tmp_cjiRecursiveProgress; $receiver.cjiRecursiveTotal = _tmp_cjiRecursiveTotal; $receiver.cjiStatus = _tmp_cjiStatus; $receiver.cjiRecursiveStatus = _tmp_cjiRecursiveStatus; $receiver.cjiConnectivityNeeded = _tmp_cjiConnectivityNeeded; $receiver.cjiPluginId = _tmp_cjiPluginId; $receiver.cjiAttemptCount = _tmp_cjiAttemptCount; $receiver.cjiParentCjiUid = _tmp_cjiParentCjiUid; $receiver.cjiServerJobId = _tmp_cjiServerJobId; $receiver.cjiStartTime = _tmp_cjiStartTime; $receiver.cjiFinishTime = _tmp_cjiFinishTime; $receiver.cjiUploadSessionUid = _tmp_cjiUploadSessionUid; $receiver.cjiContentDeletedOnCancellation = _tmp_cjiContentDeletedOnCancellation; $receiver.cjiContainerProcessed = _tmp_cjiContainerProcessed; return $receiver; }; } function ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda; Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda(this$ContentJobItemDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ContentJobItemDao_JdbcKt = this$ContentJobItemDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; } Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda; Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ContentJobItemDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT *\n | FROM ContentJobItem\n | WHERE cjiUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda$lambda(this.local$closure$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda(this$ContentJobItemDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda(this$ContentJobItemDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobItemDao_JdbcKt.prototype.getJobItemByUidLive_s8cxhz$ = function (uid) { return new LiveDataImpl(this._db, listOf_0('ContentJobItem'), ContentJobItemDao_JdbcKt$getJobItemByUidLive$lambda(this, uid)); }; function ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda$lambda(_result) { return mapNextRow(_result, L0, ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda$lambda$lambda(_result)); } function Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda; Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobItemDao_JdbcKt.prototype.getContainerUidByJobItemUid_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT cjiContainerUid\n | FROM ContentJobItem\n | WHERE cjiUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$getContainerUidByJobItemUid$lambda(uid), continuation); }; function Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda(closure$newStatus_0, closure$jobUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newStatus = closure$newStatus_0; this.local$closure$jobUid = closure$jobUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda; Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$newStatus); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$jobUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$newStatus); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda(closure$newStatus_0, closure$jobUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda(closure$newStatus_0, closure$jobUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAllStatusesByJobUid_yhmem3$($this, jobUid_0, newStatus_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$jobUid = jobUid_0; this.local$newStatus = newStatus_0; } Coroutine$updateAllStatusesByJobUid_yhmem3$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAllStatusesByJobUid_yhmem3$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAllStatusesByJobUid_yhmem3$.prototype.constructor = Coroutine$updateAllStatusesByJobUid_yhmem3$; Coroutine$updateAllStatusesByJobUid_yhmem3$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE ContentJobItem\n | SET cjiStatus = ?\n | WHERE cjiJobUid = ?\n | AND cjiStatus != ?\n | \n ')), ContentJobItemDao_JdbcKt$updateAllStatusesByJobUid$lambda(this.local$newStatus, this.local$jobUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContentJobItemDao_JdbcKt.prototype.updateAllStatusesByJobUid_yhmem3$ = function (jobUid_0, newStatus_0, continuation_0, suspended) { var instance = new Coroutine$updateAllStatusesByJobUid_yhmem3$(this, jobUid_0, newStatus_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda$lambda(_result) { return mapRows(_result, ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda$lambda$lambda(_result)); } function Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda(closure$jobUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$jobUid = closure$jobUid_0; this.local$_stmt = _stmt_0; } Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda.prototype.constructor = Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda; Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$jobUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda(closure$jobUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda(closure$jobUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ContentJobItemDao_JdbcKt.prototype.findAllContainersByJobUid_s8cxhz$ = function (jobUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ContentJobItem.cjiContainerUid\n | FROM ContentJobItem\n | WHERE cjiJobUid = ? \n | \n ')), ContentJobItemDao_JdbcKt$findAllContainersByJobUid$lambda(jobUid), continuation); }; function ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContentJobItem (cjiUid, cjiJobUid, sourceUri, cjiIsLeaf, cjiContentEntryUid, cjiParentContentEntryUid, cjiContainerUid, cjiItemProgress, cjiItemTotal, cjiRecursiveProgress, cjiRecursiveTotal, cjiStatus, cjiRecursiveStatus, cjiConnectivityNeeded, cjiPluginId, cjiAttemptCount, cjiParentCjiUid, cjiServerJobId, cjiStartTime, cjiFinishTime, cjiUploadSessionUid, cjiContentDeletedOnCancellation, cjiContainerProcessed) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cjiUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cjiUid); } stmt.setLong_6svq3l$(2, entity.cjiJobUid); stmt.setString_vqvrqt$(3, entity.sourceUri); stmt.setBoolean_fzusl$(4, entity.cjiIsLeaf); stmt.setLong_6svq3l$(5, entity.cjiContentEntryUid); stmt.setLong_6svq3l$(6, entity.cjiParentContentEntryUid); stmt.setLong_6svq3l$(7, entity.cjiContainerUid); stmt.setLong_6svq3l$(8, entity.cjiItemProgress); stmt.setLong_6svq3l$(9, entity.cjiItemTotal); stmt.setLong_6svq3l$(10, entity.cjiRecursiveProgress); stmt.setLong_6svq3l$(11, entity.cjiRecursiveTotal); stmt.setInt_vux9f0$(12, entity.cjiStatus); stmt.setInt_vux9f0$(13, entity.cjiRecursiveStatus); stmt.setBoolean_fzusl$(14, entity.cjiConnectivityNeeded); stmt.setInt_vux9f0$(15, entity.cjiPluginId); stmt.setInt_vux9f0$(16, entity.cjiAttemptCount); stmt.setLong_6svq3l$(17, entity.cjiParentCjiUid); stmt.setLong_6svq3l$(18, entity.cjiServerJobId); stmt.setLong_6svq3l$(19, entity.cjiStartTime); stmt.setLong_6svq3l$(20, entity.cjiFinishTime); stmt.setString_vqvrqt$(21, entity.cjiUploadSessionUid); stmt.setBoolean_fzusl$(22, entity.cjiContentDeletedOnCancellation); stmt.setBoolean_fzusl$(23, entity.cjiContainerProcessed); }; ContentJobItemDao_JdbcKt$_insertAdapterContentJobItem_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContentJobItemDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentJobItemDao_JdbcKt', interfaces: [ContentJobItemDao]}; function ContextXObjectStatementJoinDao() { } ContextXObjectStatementJoinDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContextXObjectStatementJoinDao', interfaces: [BaseDao]}; function ContextXObjectStatementJoinDao_JdbcKt(_db) { ContextXObjectStatementJoinDao.call(this); this._db = _db; this._insertAdapterContextXObjectStatementJoin_ = new ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral(this._db); } ContextXObjectStatementJoinDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterContextXObjectStatementJoin_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_62($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_62.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_62.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_62.prototype.constructor = Coroutine$insertAsync_62; Coroutine$insertAsync_62.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterContextXObjectStatementJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_62(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContextXObjectStatementJoinDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterContextXObjectStatementJoin_.insertList_4ezy5m$(entityList); }; function ContextXObjectStatementJoinDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setInt_vux9f0$(1, _entity.contextActivityFlag); _stmt.setLong_6svq3l$(2, _entity.contextStatementUid); _stmt.setLong_6svq3l$(3, _entity.contextXObjectUid); _stmt.setLong_6svq3l$(4, _entity.verbMasterChangeSeqNum); _stmt.setLong_6svq3l$(5, _entity.verbLocalChangeSeqNum); _stmt.setInt_vux9f0$(6, _entity.verbLastChangedBy); _stmt.setLong_6svq3l$(7, _entity.contextXObjectLct); _stmt.setLong_6svq3l$(8, _entity.contextXObjectStatementJoinUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ContextXObjectStatementJoinDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ContextXObjectStatementJoin SET contextActivityFlag = ?, contextStatementUid = ?, contextXObjectUid = ?, verbMasterChangeSeqNum = ?, verbLocalChangeSeqNum = ?, verbLastChangedBy = ?, contextXObjectLct = ? WHERE contextXObjectStatementJoinUid = ?'; prepareAndUseStatement(this._db, _sql, ContextXObjectStatementJoinDao_JdbcKt$updateList$lambda(entityList)); }; function ContextXObjectStatementJoinDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$entity.contextActivityFlag); _stmt.setLong_6svq3l$(2, closure$entity.contextStatementUid); _stmt.setLong_6svq3l$(3, closure$entity.contextXObjectUid); _stmt.setLong_6svq3l$(4, closure$entity.verbMasterChangeSeqNum); _stmt.setLong_6svq3l$(5, closure$entity.verbLocalChangeSeqNum); _stmt.setInt_vux9f0$(6, closure$entity.verbLastChangedBy); _stmt.setLong_6svq3l$(7, closure$entity.contextXObjectLct); _stmt.setLong_6svq3l$(8, closure$entity.contextXObjectStatementJoinUid); return _stmt.executeUpdate(); }; } ContextXObjectStatementJoinDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ContextXObjectStatementJoin SET contextActivityFlag = ?, contextStatementUid = ?, contextXObjectUid = ?, verbMasterChangeSeqNum = ?, verbLocalChangeSeqNum = ?, verbLastChangedBy = ?, contextXObjectLct = ? WHERE contextXObjectStatementJoinUid = ?'; prepareAndUseStatement(this._db, _sql, ContextXObjectStatementJoinDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_56($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_56.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_56.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_56.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_56; Coroutine$replicateOnNewNode_s8cxhz$_56.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin("\n |\n | REPLACE INTO ContextXObjectStatementJoinReplicate(cxosjPk, cxosjDestination)\n | SELECT DISTINCT ContextXObjectStatementJoin.contextXObjectStatementJoinUid AS cxosjPk,\n | UserSession.usClientNodeId AS cxosjDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN StatementEntity\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz \n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | ) \n | \n | JOIN ContextXObjectStatementJoin\n | ON ContextXObjectStatementJoin.contextStatementUid = StatementEntity.statementUid\n | WHERE UserSession.usClientNodeId = ?\n | -- Temporary measure to prevent admin user getting clogged up\n | -- Restrict to the last 30 days of data\n | AND StatementEntity.timestamp > ( \n | --notpsql\n | strftime('%s', 'now') * 1000\n | --endnotpsql\n | /*psql\n | ROUND(EXTRACT(epoch from NOW())*1000)\n | */\n | - (30 * CAST(86400000 AS BIGINT))) \n | --notpsql \n | AND ContextXObjectStatementJoin.contextXObjectLct != COALESCE(\n | (SELECT cxosjVersionId\n | FROM ContextXObjectStatementJoinReplicate\n | WHERE cxosjPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid\n | AND cxosjDestination = UserSession.usClientNodeId), 0) \n | --endnotpsql \n | /*psql ON CONFLICT(cxosjPk, cxosjDestination) DO UPDATE\n | SET cxosjPending = (SELECT ContextXObjectStatementJoin.contextXObjectLct\n | FROM ContextXObjectStatementJoin\n | WHERE ContextXObjectStatementJoin.contextXObjectStatementJoinUid = EXCLUDED.cxosjPk ) \n | != ContextXObjectStatementJoinReplicate.cxosjVersionId \n | */ \n | \n "), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContextXObjectStatementJoinReplicate(cxosjPk, cxosjDestination)\n | SELECT DISTINCT ContextXObjectStatementJoin.contextXObjectStatementJoinUid AS cxosjPk,\n | UserSession.usClientNodeId AS cxosjDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN StatementEntity\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz \n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | ) \n | \n | JOIN ContextXObjectStatementJoin\n | ON ContextXObjectStatementJoin.contextStatementUid = StatementEntity.statementUid\n | WHERE UserSession.usClientNodeId = ?\n | -- Temporary measure to prevent admin user getting clogged up\n | -- Restrict to the last 30 days of data\n | AND StatementEntity.timestamp > ( \n | \n | ROUND(EXTRACT(epoch from NOW())*1000)\n | \n | - (30 * CAST(86400000 AS BIGINT))) \n | ON CONFLICT(cxosjPk, cxosjDestination) DO UPDATE\n | SET cxosjPending = (SELECT ContextXObjectStatementJoin.contextXObjectLct\n | FROM ContextXObjectStatementJoin\n | WHERE ContextXObjectStatementJoin.contextXObjectStatementJoinUid = EXCLUDED.cxosjPk ) \n | != ContextXObjectStatementJoinReplicate.cxosjVersionId \n | \n | \n |')), ContextXObjectStatementJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_56(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_53($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_53.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_53.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_53.prototype.constructor = Coroutine$replicateOnChange_53; Coroutine$replicateOnChange_53.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ContextXObjectStatementJoinReplicate(cxosjPk, cxosjDestination)\n | SELECT DISTINCT ContextXObjectStatementJoin.contextXObjectStatementJoinUid AS cxosjUid,\n | UserSession.usClientNodeId AS cxosjDestination\n | FROM ChangeLog\n | JOIN ContextXObjectStatementJoin\n | ON ChangeLog.chTableId = 66\n | AND ChangeLog.chEntityPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid\n | JOIN StatementEntity\n | ON ContextXObjectStatementJoin.contextStatementUid = StatementEntity.statementUid\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | --notpsql \n | AND ContextXObjectStatementJoin.contextXObjectLct != COALESCE(\n | (SELECT cxosjVersionId\n | FROM ContextXObjectStatementJoinReplicate\n | WHERE cxosjPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid\n | AND cxosjDestination = UserSession.usClientNodeId), 0)\n | --endnotpsql\n | /*psql ON CONFLICT(cxosjPk, cxosjDestination) DO UPDATE\n | SET cxosjPending = (SELECT ContextXObjectStatementJoin.contextXObjectLct\n | FROM ContextXObjectStatementJoin\n | WHERE ContextXObjectStatementJoin.contextXObjectStatementJoinUid = EXCLUDED.cxosjPk ) \n | != ContextXObjectStatementJoinReplicate.cxosjVersionId \n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ContextXObjectStatementJoinReplicate(cxosjPk, cxosjDestination)\n | SELECT DISTINCT ContextXObjectStatementJoin.contextXObjectStatementJoinUid AS cxosjUid,\n | UserSession.usClientNodeId AS cxosjDestination\n | FROM ChangeLog\n | JOIN ContextXObjectStatementJoin\n | ON ChangeLog.chTableId = 66\n | AND ChangeLog.chEntityPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid\n | JOIN StatementEntity\n | ON ContextXObjectStatementJoin.contextStatementUid = StatementEntity.statementUid\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | ON CONFLICT(cxosjPk, cxosjDestination) DO UPDATE\n | SET cxosjPending = (SELECT ContextXObjectStatementJoin.contextXObjectLct\n | FROM ContextXObjectStatementJoin\n | WHERE ContextXObjectStatementJoin.contextXObjectStatementJoinUid = EXCLUDED.cxosjPk ) \n | != ContextXObjectStatementJoinReplicate.cxosjVersionId \n | \n | \n |')), ContextXObjectStatementJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_53(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ContextXObjectStatementJoinDao_JdbcKt$findByStatementAndObjectUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_contextXObjectStatementJoinUid = closure$_result.getLong_61zpoe$('contextXObjectStatementJoinUid'); var _tmp_contextActivityFlag = closure$_result.getInt_61zpoe$('contextActivityFlag'); var _tmp_contextStatementUid = closure$_result.getLong_61zpoe$('contextStatementUid'); var _tmp_contextXObjectUid = closure$_result.getLong_61zpoe$('contextXObjectUid'); var _tmp_verbMasterChangeSeqNum = closure$_result.getLong_61zpoe$('verbMasterChangeSeqNum'); var _tmp_verbLocalChangeSeqNum = closure$_result.getLong_61zpoe$('verbLocalChangeSeqNum'); var _tmp_verbLastChangedBy = closure$_result.getInt_61zpoe$('verbLastChangedBy'); var _tmp_contextXObjectLct = closure$_result.getLong_61zpoe$('contextXObjectLct'); var $receiver = new ContextXObjectStatementJoin(); $receiver.contextXObjectStatementJoinUid = _tmp_contextXObjectStatementJoinUid; $receiver.contextActivityFlag = _tmp_contextActivityFlag; $receiver.contextStatementUid = _tmp_contextStatementUid; $receiver.contextXObjectUid = _tmp_contextXObjectUid; $receiver.verbMasterChangeSeqNum = _tmp_verbMasterChangeSeqNum; $receiver.verbLocalChangeSeqNum = _tmp_verbLocalChangeSeqNum; $receiver.verbLastChangedBy = _tmp_verbLastChangedBy; $receiver.contextXObjectLct = _tmp_contextXObjectLct; return $receiver; }; } function ContextXObjectStatementJoinDao_JdbcKt$findByStatementAndObjectUid$lambda$lambda(_result) { return mapNextRow(_result, null, ContextXObjectStatementJoinDao_JdbcKt$findByStatementAndObjectUid$lambda$lambda$lambda(_result)); } function ContextXObjectStatementJoinDao_JdbcKt$findByStatementAndObjectUid$lambda(closure$statementUid, closure$objectUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$statementUid); _stmt.setLong_6svq3l$(2, closure$objectUid); return useResults(_stmt.executeQuery(), ContextXObjectStatementJoinDao_JdbcKt$findByStatementAndObjectUid$lambda$lambda); }; } ContextXObjectStatementJoinDao_JdbcKt.prototype.findByStatementAndObjectUid_3pjtqy$ = function (statementUid, objectUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM ContextXObjectStatementJoin where contextStatementUid = ? and contextXObjectUid = ?'), ContextXObjectStatementJoinDao_JdbcKt$findByStatementAndObjectUid$lambda(statementUid, objectUid)); }; function ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ContextXObjectStatementJoin (contextXObjectStatementJoinUid, contextActivityFlag, contextStatementUid, contextXObjectUid, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, contextXObjectLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.contextXObjectStatementJoinUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.contextXObjectStatementJoinUid); } stmt.setInt_vux9f0$(2, entity.contextActivityFlag); stmt.setLong_6svq3l$(3, entity.contextStatementUid); stmt.setLong_6svq3l$(4, entity.contextXObjectUid); stmt.setLong_6svq3l$(5, entity.verbMasterChangeSeqNum); stmt.setLong_6svq3l$(6, entity.verbLocalChangeSeqNum); stmt.setInt_vux9f0$(7, entity.verbLastChangedBy); stmt.setLong_6svq3l$(8, entity.contextXObjectLct); }; ContextXObjectStatementJoinDao_JdbcKt$_insertAdapterContextXObjectStatementJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ContextXObjectStatementJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContextXObjectStatementJoinDao_JdbcKt', interfaces: [ContextXObjectStatementJoinDao]}; function ContextXObjectStatementJoinDao_ReplicateWrapper(_db, _dao) { ContextXObjectStatementJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_57($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_57.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_57.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_57.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_57; Coroutine$replicateOnNewNode_s8cxhz$_57.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_57(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_54($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_54.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_54.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_54.prototype.constructor = Coroutine$replicateOnChange_54; Coroutine$replicateOnChange_54.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_54(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.findByStatementAndObjectUid_3pjtqy$ = function (statementUid, objectUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_63($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_63.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_63.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_63.prototype.constructor = Coroutine$insertAsync_63; Coroutine$insertAsync_63.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.contextXObjectStatementJoinUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(66, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.contextXObjectStatementJoinUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.contextXObjectLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.contextXObjectStatementJoinUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_63(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContextXObjectStatementJoinDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ContextXObjectStatementJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContextXObjectStatementJoinDao_ReplicateWrapper', interfaces: [ContextXObjectStatementJoinDao]}; function ContextXObjectStatementJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ContextXObjectStatementJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_58($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_58.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_58.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_58.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_58; Coroutine$replicateOnNewNode_s8cxhz$_58.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_58(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_55($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_55.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_55.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_55.prototype.constructor = Coroutine$replicateOnChange_55; Coroutine$replicateOnChange_55.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_55(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContextXObjectStatementJoinDao_Repo.prototype.findByStatementAndObjectUid_3pjtqy$ = function (statementUid, objectUid) { var _result = this._dao.findByStatementAndObjectUid_3pjtqy$(statementUid, objectUid); return _result; }; ContextXObjectStatementJoinDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_64($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_64.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_64.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_64.prototype.constructor = Coroutine$insertAsync_64; Coroutine$insertAsync_64.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ContextXObjectStatementJoinDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_64(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ContextXObjectStatementJoinDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ContextXObjectStatementJoinDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ContextXObjectStatementJoinDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ContextXObjectStatementJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContextXObjectStatementJoinDao_Repo', interfaces: [ContextXObjectStatementJoinDao]}; function CourseAssignmentMarkDao() { } CourseAssignmentMarkDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentMarkDao', interfaces: [BaseDao]}; function CourseAssignmentMarkDao_JdbcKt(_db) { CourseAssignmentMarkDao.call(this); this._db = _db; this._insertAdapterCourseAssignmentMark_ = new CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral(this._db); } CourseAssignmentMarkDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseAssignmentMark_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_65($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_65.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_65.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_65.prototype.constructor = Coroutine$insertAsync_65; Coroutine$insertAsync_65.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseAssignmentMark_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_65(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentMarkDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseAssignmentMark_.insertList_4ezy5m$(entityList); }; function CourseAssignmentMarkDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.camAssignmentUid); _stmt.setLong_6svq3l$(2, _entity.camSubmitterUid); _stmt.setFloat_24o109$(3, _entity.camMark); _stmt.setInt_vux9f0$(4, _entity.camPenalty); _stmt.setLong_6svq3l$(5, _entity.camLct); _stmt.setLong_6svq3l$(6, _entity.camUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseAssignmentMarkDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseAssignmentMark SET camAssignmentUid = ?, camSubmitterUid = ?, camMark = ?, camPenalty = ?, camLct = ? WHERE camUid = ?'; prepareAndUseStatement(this._db, _sql, CourseAssignmentMarkDao_JdbcKt$updateList$lambda(entityList)); }; function CourseAssignmentMarkDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.camAssignmentUid); _stmt.setLong_6svq3l$(2, closure$entity.camSubmitterUid); _stmt.setFloat_24o109$(3, closure$entity.camMark); _stmt.setInt_vux9f0$(4, closure$entity.camPenalty); _stmt.setLong_6svq3l$(5, closure$entity.camLct); _stmt.setLong_6svq3l$(6, closure$entity.camUid); return _stmt.executeUpdate(); }; } CourseAssignmentMarkDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseAssignmentMark SET camAssignmentUid = ?, camSubmitterUid = ?, camMark = ?, camPenalty = ?, camLct = ? WHERE camUid = ?'; prepareAndUseStatement(this._db, _sql, CourseAssignmentMarkDao_JdbcKt$update$lambda(entity)); }; function Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_59($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_59.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_59.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_59.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_59; Coroutine$replicateOnNewNode_s8cxhz$_59.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseAssignmentMarkReplicate(camPk, camDestination)\n | SELECT DISTINCT CourseAssignmentMark.camUid AS camPk,\n | ? AS camDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid \n | JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid\n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseAssignmentMark.camLct != COALESCE(\n | (SELECT camVersionId\n | FROM CourseAssignmentMarkReplicate\n | WHERE camPk = CourseAssignmentMark.camUid\n | AND camDestination = ?), 0) \n | /*psql ON CONFLICT(camPk, camDestination) DO UPDATE\n | SET camPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseAssignmentMarkReplicate(camPk, camDestination)\n | SELECT DISTINCT CourseAssignmentMark.camUid AS camPk,\n | ? AS camDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid \n | JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid\n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseAssignmentMark.camLct != COALESCE(\n | (SELECT camVersionId\n | FROM CourseAssignmentMarkReplicate\n | WHERE camPk = CourseAssignmentMark.camUid\n | AND camDestination = ?), 0) \n | ON CONFLICT(camPk, camDestination) DO UPDATE\n | SET camPending = true\n | \n | \n |')), CourseAssignmentMarkDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_59(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_56($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_56.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_56.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_56.prototype.constructor = Coroutine$replicateOnChange_56; Coroutine$replicateOnChange_56.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseAssignmentMarkReplicate(camPk, camDestination)\n | SELECT DISTINCT CourseAssignmentMark.camUid AS camPk,\n | UserSession.usClientNodeId AS camDestination\n | FROM ChangeLog\n | JOIN CourseAssignmentMark\n | ON ChangeLog.chTableId = 523\n | AND ChangeLog.chEntityPk = CourseAssignmentMark.camUid\n | JOIN ClazzAssignment\n | ON CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseAssignmentMark.camLct != COALESCE(\n | (SELECT camVersionId\n | FROM CourseAssignmentMarkReplicate\n | WHERE camPk = CourseAssignmentMark.camUid\n | AND camDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(camPk, camDestination) DO UPDATE\n | SET camPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseAssignmentMarkReplicate(camPk, camDestination)\n | SELECT DISTINCT CourseAssignmentMark.camUid AS camPk,\n | UserSession.usClientNodeId AS camDestination\n | FROM ChangeLog\n | JOIN CourseAssignmentMark\n | ON ChangeLog.chTableId = 523\n | AND ChangeLog.chEntityPk = CourseAssignmentMark.camUid\n | JOIN ClazzAssignment\n | ON CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseAssignmentMark.camLct != COALESCE(\n | (SELECT camVersionId\n | FROM CourseAssignmentMarkReplicate\n | WHERE camPk = CourseAssignmentMark.camUid\n | AND camDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(camPk, camDestination) DO UPDATE\n | SET camPending = true\n | \n | \n |')), CourseAssignmentMarkDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_56(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_camUid = closure$_result.getLong_61zpoe$('camUid'); var _tmp_camAssignmentUid = closure$_result.getLong_61zpoe$('camAssignmentUid'); var _tmp_camSubmitterUid = closure$_result.getLong_61zpoe$('camSubmitterUid'); var _tmp_camMark = closure$_result.getFloat_61zpoe$('camMark'); var _tmp_camPenalty = closure$_result.getInt_61zpoe$('camPenalty'); var _tmp_camLct = closure$_result.getLong_61zpoe$('camLct'); var $receiver = new CourseAssignmentMark(); $receiver.camUid = _tmp_camUid; $receiver.camAssignmentUid = _tmp_camAssignmentUid; $receiver.camSubmitterUid = _tmp_camSubmitterUid; $receiver.camMark = _tmp_camMark; $receiver.camPenalty = _tmp_camPenalty; $receiver.camLct = _tmp_camLct; return $receiver; }; } function CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda.prototype.constructor = Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda; Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda(this$CourseAssignmentMarkDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseAssignmentMarkDao_JdbcKt = this$CourseAssignmentMarkDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; } Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda.prototype.constructor = Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda; Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseAssignmentMarkDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseAssignmentMark \n | WHERE camAssignmentUid = ?\n | AND camSubmitterUid = ?\n | ORDER BY camLct DESC\n | LIMIT 1\n | \n ')), CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$submitterUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda(this$CourseAssignmentMarkDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda(this$CourseAssignmentMarkDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentMarkDao_JdbcKt.prototype.getMarkOfAssignmentForSubmitterLiveData_3pjtqy$ = function (assignmentUid, submitterUid) { return new LiveDataImpl(this._db, listOf_0('CourseAssignmentMark'), CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForSubmitterLiveData$lambda(this, assignmentUid, submitterUid)); }; function CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForStudent$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_camUid = closure$_result.getLong_61zpoe$('camUid'); var _tmp_camAssignmentUid = closure$_result.getLong_61zpoe$('camAssignmentUid'); var _tmp_camSubmitterUid = closure$_result.getLong_61zpoe$('camSubmitterUid'); var _tmp_camMark = closure$_result.getFloat_61zpoe$('camMark'); var _tmp_camPenalty = closure$_result.getInt_61zpoe$('camPenalty'); var _tmp_camLct = closure$_result.getLong_61zpoe$('camLct'); var $receiver = new CourseAssignmentMark(); $receiver.camUid = _tmp_camUid; $receiver.camAssignmentUid = _tmp_camAssignmentUid; $receiver.camSubmitterUid = _tmp_camSubmitterUid; $receiver.camMark = _tmp_camMark; $receiver.camPenalty = _tmp_camPenalty; $receiver.camLct = _tmp_camLct; return $receiver; }; } function CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForStudent$lambda$lambda(_result) { return mapNextRow(_result, null, CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForStudent$lambda$lambda$lambda(_result)); } function CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForStudent$lambda(closure$assignmentUid, closure$submitterUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$assignmentUid); _stmt.setLong_6svq3l$(2, closure$submitterUid); return useResults(_stmt.executeQuery(), CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForStudent$lambda$lambda); }; } CourseAssignmentMarkDao_JdbcKt.prototype.getMarkOfAssignmentForStudent_3pjtqy$ = function (assignmentUid, submitterUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ?\n | AND camSubmitterUid = ?\n | ORDER BY camLct DESC\n | LIMIT 1\n | \n ')), CourseAssignmentMarkDao_JdbcKt$getMarkOfAssignmentForStudent$lambda(assignmentUid, submitterUid)); }; function CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda$lambda(_result) { return mapNextRow(_result, L0, CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda$lambda$lambda(_result)); } function Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda.prototype.constructor = Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda; Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda(closure$assignmentUid_0, closure$submitterUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentMarkDao_JdbcKt.prototype.findNextSubmitterToMarkForAssignment_3pjtqy$ = function (assignmentUid, submitterUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((\n | SELECT casSubmitterUid\n | FROM CourseAssignmentSubmission\n | \n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camSubmitterUid = CourseAssignmentSubmission.casSubmitterUid\n | AND CourseAssignmentMark.camAssignmentUid = ?\n | \n | WHERE CourseAssignmentSubmission.casSubmitterUid != ?\n | AND CourseAssignmentMark.camUid IS NULL\n | GROUP BY casSubmitterUid\n | LIMIT 1),0)\n | \n ')), CourseAssignmentMarkDao_JdbcKt$findNextSubmitterToMarkForAssignment$lambda(assignmentUid, submitterUid), continuation); }; function CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO CourseAssignmentMark (camUid, camAssignmentUid, camSubmitterUid, camMark, camPenalty, camLct) VALUES(?, ?, ?, ?, ?, ?)'; }; CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.camUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.camUid); } stmt.setLong_6svq3l$(2, entity.camAssignmentUid); stmt.setLong_6svq3l$(3, entity.camSubmitterUid); stmt.setFloat_24o109$(4, entity.camMark); stmt.setInt_vux9f0$(5, entity.camPenalty); stmt.setLong_6svq3l$(6, entity.camLct); }; CourseAssignmentMarkDao_JdbcKt$_insertAdapterCourseAssignmentMark_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseAssignmentMarkDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentMarkDao_JdbcKt', interfaces: [CourseAssignmentMarkDao]}; function CourseAssignmentMarkDao_ReplicateWrapper(_db, _dao) { CourseAssignmentMarkDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_60($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_60.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_60.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_60.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_60; Coroutine$replicateOnNewNode_s8cxhz$_60.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_60(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_57($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_57.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_57.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_57.prototype.constructor = Coroutine$replicateOnChange_57; Coroutine$replicateOnChange_57.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_57(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.getMarkOfAssignmentForSubmitterLiveData_3pjtqy$ = function (assignmentUid, submitterUid) { return this._dao_0.getMarkOfAssignmentForSubmitterLiveData_3pjtqy$(assignmentUid, submitterUid); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.getMarkOfAssignmentForStudent_3pjtqy$ = function (assignmentUid, submitterUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.findNextSubmitterToMarkForAssignment_3pjtqy$ = function (assignmentUid, submitterUid, continuation) { return this._dao_0.findNextSubmitterToMarkForAssignment_3pjtqy$(assignmentUid, submitterUid, continuation); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_66($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_66.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_66.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_66.prototype.constructor = Coroutine$insertAsync_66; Coroutine$insertAsync_66.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.camUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(523, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.camUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.camLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.camUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_66(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentMarkDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentMarkDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentMarkDao_ReplicateWrapper', interfaces: [CourseAssignmentMarkDao]}; function CourseAssignmentMarkDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseAssignmentMarkDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_61($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_61.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_61.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_61.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_61; Coroutine$replicateOnNewNode_s8cxhz$_61.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_61(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_58($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_58.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_58.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_58.prototype.constructor = Coroutine$replicateOnChange_58; Coroutine$replicateOnChange_58.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_58(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentMarkDao_Repo.prototype.getMarkOfAssignmentForSubmitterLiveData_3pjtqy$ = function (assignmentUid, submitterUid) { var _result = this._dao.getMarkOfAssignmentForSubmitterLiveData_3pjtqy$(assignmentUid, submitterUid); return _result; }; CourseAssignmentMarkDao_Repo.prototype.getMarkOfAssignmentForStudent_3pjtqy$ = function (assignmentUid, submitterUid) { var _result = this._dao.getMarkOfAssignmentForStudent_3pjtqy$(assignmentUid, submitterUid); return _result; }; function Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$($this, assignmentUid_0, submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$assignmentUid = assignmentUid_0; this.local$submitterUid = submitterUid_0; } Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$.prototype.constructor = Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$; Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findNextSubmitterToMarkForAssignment_3pjtqy$(this.local$assignmentUid, this.local$submitterUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_Repo.prototype.findNextSubmitterToMarkForAssignment_3pjtqy$ = function (assignmentUid_0, submitterUid_0, continuation_0, suspended) { var instance = new Coroutine$findNextSubmitterToMarkForAssignment_3pjtqy$(this, assignmentUid_0, submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentMarkDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_67($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_67.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_67.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_67.prototype.constructor = Coroutine$insertAsync_67; Coroutine$insertAsync_67.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentMarkDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_67(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentMarkDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseAssignmentMarkDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseAssignmentMarkDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CourseAssignmentMarkDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentMarkDao_Repo', interfaces: [CourseAssignmentMarkDao]}; function CourseAssignmentSubmissionAttachmentDao() { } CourseAssignmentSubmissionAttachmentDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionAttachmentDao', interfaces: [BaseDao]}; function CourseAssignmentSubmissionAttachmentDao_JdbcKt(_db) { CourseAssignmentSubmissionAttachmentDao.call(this); this._db = _db; this._insertAdapterCourseAssignmentSubmissionAttachment_ = new CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral(this._db); } function Coroutine$insertListAsync_cyz50y$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_cyz50y$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_cyz50y$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_cyz50y$.prototype.constructor = Coroutine$insertListAsync_cyz50y$; Coroutine$insertListAsync_cyz50y$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseAssignmentSubmissionAttachment_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.insertListAsync_cyz50y$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_cyz50y$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseAssignmentSubmissionAttachment_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_68($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_68.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_68.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_68.prototype.constructor = Coroutine$insertAsync_68; Coroutine$insertAsync_68.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseAssignmentSubmissionAttachment_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_68(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseAssignmentSubmissionAttachment_.insertList_4ezy5m$(entityList); }; function CourseAssignmentSubmissionAttachmentDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.casaSubmissionUid); _stmt.setString_vqvrqt$(2, _entity.casaMimeType); _stmt.setString_vqvrqt$(3, _entity.casaFileName); _stmt.setString_vqvrqt$(4, _entity.casaUri); _stmt.setString_vqvrqt$(5, _entity.casaMd5); _stmt.setInt_vux9f0$(6, _entity.casaSize); _stmt.setLong_6svq3l$(7, _entity.casaTimestamp); _stmt.setLong_6svq3l$(8, _entity.casaUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseAssignmentSubmissionAttachment SET casaSubmissionUid = ?, casaMimeType = ?, casaFileName = ?, casaUri = ?, casaMd5 = ?, casaSize = ?, casaTimestamp = ? WHERE casaUid = ?'; prepareAndUseStatement(this._db, _sql, CourseAssignmentSubmissionAttachmentDao_JdbcKt$updateList$lambda(entityList)); }; function CourseAssignmentSubmissionAttachmentDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.casaSubmissionUid); _stmt.setString_vqvrqt$(2, closure$entity.casaMimeType); _stmt.setString_vqvrqt$(3, closure$entity.casaFileName); _stmt.setString_vqvrqt$(4, closure$entity.casaUri); _stmt.setString_vqvrqt$(5, closure$entity.casaMd5); _stmt.setInt_vux9f0$(6, closure$entity.casaSize); _stmt.setLong_6svq3l$(7, closure$entity.casaTimestamp); _stmt.setLong_6svq3l$(8, closure$entity.casaUid); return _stmt.executeUpdate(); }; } CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseAssignmentSubmissionAttachment SET casaSubmissionUid = ?, casaMimeType = ?, casaFileName = ?, casaUri = ?, casaMd5 = ?, casaSize = ?, casaTimestamp = ? WHERE casaUid = ?'; prepareAndUseStatement(this._db, _sql, CourseAssignmentSubmissionAttachmentDao_JdbcKt$update$lambda(entity)); }; function Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_62($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_62.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_62.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_62.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_62; Coroutine$replicateOnNewNode_s8cxhz$_62.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseAssignmentSubmissionAttachmentReplicate(casaPk, casaDestination)\n | SELECT DISTINCT CourseAssignmentSubmissionAttachment.casaUid AS casaPk,\n | ? AS casaDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | JOIN CourseAssignmentSubmissionAttachment\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseAssignmentSubmissionAttachment.casaTimestamp != COALESCE(\n | (SELECT casaVersionId\n | FROM CourseAssignmentSubmissionAttachmentReplicate\n | WHERE casaPk = CourseAssignmentSubmissionAttachment.casaUid\n | AND casaDestination = ?), 0) \n | /*psql ON CONFLICT(casaPk, casaDestination) DO UPDATE\n | SET casaPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseAssignmentSubmissionAttachmentReplicate(casaPk, casaDestination)\n | SELECT DISTINCT CourseAssignmentSubmissionAttachment.casaUid AS casaPk,\n | ? AS casaDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | JOIN CourseAssignmentSubmissionAttachment\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseAssignmentSubmissionAttachment.casaTimestamp != COALESCE(\n | (SELECT casaVersionId\n | FROM CourseAssignmentSubmissionAttachmentReplicate\n | WHERE casaPk = CourseAssignmentSubmissionAttachment.casaUid\n | AND casaDestination = ?), 0) \n | ON CONFLICT(casaPk, casaDestination) DO UPDATE\n | SET casaPending = true\n | \n | \n |')), CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_62(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_59($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_59.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_59.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_59.prototype.constructor = Coroutine$replicateOnChange_59; Coroutine$replicateOnChange_59.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseAssignmentSubmissionAttachmentReplicate(casaPk, casaDestination)\n | SELECT DISTINCT CourseAssignmentSubmissionAttachment.casaUid AS casaPk,\n | UserSession.usClientNodeId AS casaDestination\n | FROM ChangeLog\n | JOIN CourseAssignmentSubmissionAttachment\n | ON ChangeLog.chTableId = 90\n | AND ChangeLog.chEntityPk = CourseAssignmentSubmissionAttachment.casaUid\n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid \n | JOIN ClazzAssignment\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseAssignmentSubmissionAttachment.casaTimestamp != COALESCE(\n | (SELECT casaVersionId\n | FROM CourseAssignmentSubmissionAttachmentReplicate\n | WHERE casaPk = CourseAssignmentSubmissionAttachment.casaUid\n | AND casaDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(casaPk, casaDestination) DO UPDATE\n | SET casaPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseAssignmentSubmissionAttachmentReplicate(casaPk, casaDestination)\n | SELECT DISTINCT CourseAssignmentSubmissionAttachment.casaUid AS casaPk,\n | UserSession.usClientNodeId AS casaDestination\n | FROM ChangeLog\n | JOIN CourseAssignmentSubmissionAttachment\n | ON ChangeLog.chTableId = 90\n | AND ChangeLog.chEntityPk = CourseAssignmentSubmissionAttachment.casaUid\n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid \n | JOIN ClazzAssignment\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseAssignmentSubmissionAttachment.casaTimestamp != COALESCE(\n | (SELECT casaVersionId\n | FROM CourseAssignmentSubmissionAttachmentReplicate\n | WHERE casaPk = CourseAssignmentSubmissionAttachment.casaUid\n | AND casaDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(casaPk, casaDestination) DO UPDATE\n | SET casaPending = true\n | \n | \n |')), CourseAssignmentSubmissionAttachmentDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_59(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO CourseAssignmentSubmissionAttachment (casaUid, casaSubmissionUid, casaMimeType, casaFileName, casaUri, casaMd5, casaSize, casaTimestamp) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.casaUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.casaUid); } stmt.setLong_6svq3l$(2, entity.casaSubmissionUid); stmt.setString_vqvrqt$(3, entity.casaMimeType); stmt.setString_vqvrqt$(4, entity.casaFileName); stmt.setString_vqvrqt$(5, entity.casaUri); stmt.setString_vqvrqt$(6, entity.casaMd5); stmt.setInt_vux9f0$(7, entity.casaSize); stmt.setLong_6svq3l$(8, entity.casaTimestamp); }; CourseAssignmentSubmissionAttachmentDao_JdbcKt$_insertAdapterCourseAssignmentSubmissionAttachment_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseAssignmentSubmissionAttachmentDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionAttachmentDao_JdbcKt', interfaces: [CourseAssignmentSubmissionAttachmentDao]}; function CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper(_db, _dao) { CourseAssignmentSubmissionAttachmentDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_63($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_63.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_63.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_63.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_63; Coroutine$replicateOnNewNode_s8cxhz$_63.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_63(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_60($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_60.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_60.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_60.prototype.constructor = Coroutine$replicateOnChange_60; Coroutine$replicateOnChange_60.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_60(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_cyz50y$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$tmp$ = void 0; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_cyz50y$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_cyz50y$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_cyz50y$_0.prototype.constructor = Coroutine$insertListAsync_cyz50y$_0; Coroutine$insertListAsync_cyz50y$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$tmp$ = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var element = this.local$tmp$.next(); this.state_0 = 3; this.result_0 = storeAttachment(this.$this._db_0, new CourseAssignmentSubmissionAttachment_EwaAdapter(element), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 5; continue; case 5: if (!this.local$$receiver.hasNext()) { this.state_0 = 8; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.casaUid, L0)) { this.state_0 = 6; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(90, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 7; continue; } case 6: var _newPk = this.result_0; this.local$element.casaUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 7; continue; case 7: this.local$element.casaTimestamp = systemTimeInMillis(); this.state_0 = 5; continue; case 8: this.state_0 = 9; this.result_0 = this.$this._dao_0.insertListAsync_cyz50y$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 9: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.insertListAsync_cyz50y$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_cyz50y$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_69($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_69.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_69.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_69.prototype.constructor = Coroutine$insertAsync_69; Coroutine$insertAsync_69.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new CourseAssignmentSubmissionAttachment_EwaAdapter(this.local$entity), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.casaUid, L0)) { this.state_0 = 3; this.result_0 = _pkManager.nextIdAsync_za3lpa$(90, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$entity.casaUid = _newPk; this.state_0 = 4; continue; case 4: this.local$entity.casaTimestamp = systemTimeInMillis(); this.state_0 = 5; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: return this.local$entity.casaUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_69(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper', interfaces: [CourseAssignmentSubmissionAttachmentDao]}; function CourseAssignmentSubmissionAttachmentDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseAssignmentSubmissionAttachmentDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_64($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_64.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_64.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_64.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_64; Coroutine$replicateOnNewNode_s8cxhz$_64.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_64(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_61($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_61.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_61.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_61.prototype.constructor = Coroutine$replicateOnChange_61; Coroutine$replicateOnChange_61.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_61(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_cyz50y$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_cyz50y$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_cyz50y$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_cyz50y$_1.prototype.constructor = Coroutine$insertListAsync_cyz50y$_1; Coroutine$insertListAsync_cyz50y$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_cyz50y$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.insertListAsync_cyz50y$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_cyz50y$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_70($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_70.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_70.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_70.prototype.constructor = Coroutine$insertAsync_70; Coroutine$insertAsync_70.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_70(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseAssignmentSubmissionAttachmentDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CourseAssignmentSubmissionAttachmentDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionAttachmentDao_Repo', interfaces: [CourseAssignmentSubmissionAttachmentDao]}; function CourseAssignmentSubmissionDao() { } CourseAssignmentSubmissionDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionDao', interfaces: [BaseDao]}; function CourseAssignmentSubmissionDao_JdbcKt(_db) { CourseAssignmentSubmissionDao.call(this); this._db = _db; this._insertAdapterCourseAssignmentSubmission_ = new CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral(this._db); } function Coroutine$insertListAsync_6g2169$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_6g2169$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_6g2169$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_6g2169$.prototype.constructor = Coroutine$insertListAsync_6g2169$; Coroutine$insertListAsync_6g2169$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseAssignmentSubmission_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.insertListAsync_6g2169$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_6g2169$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseAssignmentSubmission_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_71($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_71.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_71.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_71.prototype.constructor = Coroutine$insertAsync_71; Coroutine$insertAsync_71.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseAssignmentSubmission_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_71(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseAssignmentSubmission_.insertList_4ezy5m$(entityList); }; function CourseAssignmentSubmissionDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.casAssignmentUid); _stmt.setLong_6svq3l$(2, _entity.casSubmitterUid); _stmt.setLong_6svq3l$(3, _entity.casSubmitterPersonUid); _stmt.setString_vqvrqt$(4, _entity.casText); _stmt.setInt_vux9f0$(5, _entity.casType); _stmt.setLong_6svq3l$(6, _entity.casTimestamp); _stmt.setLong_6svq3l$(7, _entity.casUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseAssignmentSubmissionDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseAssignmentSubmission SET casAssignmentUid = ?, casSubmitterUid = ?, casSubmitterPersonUid = ?, casText = ?, casType = ?, casTimestamp = ? WHERE casUid = ?'; prepareAndUseStatement(this._db, _sql, CourseAssignmentSubmissionDao_JdbcKt$updateList$lambda(entityList)); }; function CourseAssignmentSubmissionDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.casAssignmentUid); _stmt.setLong_6svq3l$(2, closure$entity.casSubmitterUid); _stmt.setLong_6svq3l$(3, closure$entity.casSubmitterPersonUid); _stmt.setString_vqvrqt$(4, closure$entity.casText); _stmt.setInt_vux9f0$(5, closure$entity.casType); _stmt.setLong_6svq3l$(6, closure$entity.casTimestamp); _stmt.setLong_6svq3l$(7, closure$entity.casUid); return _stmt.executeUpdate(); }; } CourseAssignmentSubmissionDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseAssignmentSubmission SET casAssignmentUid = ?, casSubmitterUid = ?, casSubmitterPersonUid = ?, casText = ?, casType = ?, casTimestamp = ? WHERE casUid = ?'; prepareAndUseStatement(this._db, _sql, CourseAssignmentSubmissionDao_JdbcKt$update$lambda(entity)); }; function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_65($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_65.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_65.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_65.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_65; Coroutine$replicateOnNewNode_s8cxhz$_65.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseAssignmentSubmissionReplicate(casPk, casDestination)\n | SELECT DISTINCT CourseAssignmentSubmission.casUid AS casPk,\n | ? AS casDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseAssignmentSubmission.casTimestamp != COALESCE(\n | (SELECT casVersionId\n | FROM CourseAssignmentSubmissionReplicate\n | WHERE casPk = CourseAssignmentSubmission.casUid\n | AND casDestination = ?), 0) \n | /*psql ON CONFLICT(casPk, casDestination) DO UPDATE\n | SET casPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseAssignmentSubmissionReplicate(casPk, casDestination)\n | SELECT DISTINCT CourseAssignmentSubmission.casUid AS casPk,\n | ? AS casDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = Clazz.clazzUid \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseAssignmentSubmission.casTimestamp != COALESCE(\n | (SELECT casVersionId\n | FROM CourseAssignmentSubmissionReplicate\n | WHERE casPk = CourseAssignmentSubmission.casUid\n | AND casDestination = ?), 0) \n | ON CONFLICT(casPk, casDestination) DO UPDATE\n | SET casPending = true\n | \n | \n |')), CourseAssignmentSubmissionDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_65(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_62($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_62.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_62.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_62.prototype.constructor = Coroutine$replicateOnChange_62; Coroutine$replicateOnChange_62.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseAssignmentSubmissionReplicate(casPk, casDestination)\n | SELECT DISTINCT CourseAssignmentSubmission.casUid AS casPk,\n | UserSession.usClientNodeId AS casDestination\n | FROM ChangeLog\n | JOIN CourseAssignmentSubmission\n | ON ChangeLog.chTableId = 522\n | AND ChangeLog.chEntityPk = CourseAssignmentSubmission.casUid\n | JOIN ClazzAssignment\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseAssignmentSubmission.casTimestamp != COALESCE(\n | (SELECT casVersionId\n | FROM CourseAssignmentSubmissionReplicate\n | WHERE casPk = CourseAssignmentSubmission.casUid\n | AND casDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(casPk, casDestination) DO UPDATE\n | SET casPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseAssignmentSubmissionReplicate(casPk, casDestination)\n | SELECT DISTINCT CourseAssignmentSubmission.casUid AS casPk,\n | UserSession.usClientNodeId AS casDestination\n | FROM ChangeLog\n | JOIN CourseAssignmentSubmission\n | ON ChangeLog.chTableId = 522\n | AND ChangeLog.chEntityPk = CourseAssignmentSubmission.casUid\n | JOIN ClazzAssignment\n | ON CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | JOIN Clazz\n | ON Clazz.clazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseAssignmentSubmission.casTimestamp != COALESCE(\n | (SELECT casVersionId\n | FROM CourseAssignmentSubmissionReplicate\n | WHERE casPk = CourseAssignmentSubmission.casUid\n | AND casDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(casPk, casDestination) DO UPDATE\n | SET casPending = true\n | \n | \n |')), CourseAssignmentSubmissionDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_62(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral(this$CourseAssignmentSubmissionDao_JdbcKt, closure$assignmentUid, closure$submitterUid) { this.this$CourseAssignmentSubmissionDao_JdbcKt = this$CourseAssignmentSubmissionDao_JdbcKt; this.closure$assignmentUid = closure$assignmentUid; this.closure$submitterUid = closure$submitterUid; DataSourceFactory.call(this); } function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_casUid = closure$_result.getLong_61zpoe$('casUid'); var _tmp_casAssignmentUid = closure$_result.getLong_61zpoe$('casAssignmentUid'); var _tmp_casSubmitterUid = closure$_result.getLong_61zpoe$('casSubmitterUid'); var _tmp_casSubmitterPersonUid = closure$_result.getLong_61zpoe$('casSubmitterPersonUid'); var _tmp_casText = closure$_result.getString_61zpoe$('casText'); var _tmp_casType = closure$_result.getInt_61zpoe$('casType'); var _tmp_casTimestamp = closure$_result.getLong_61zpoe$('casTimestamp'); var _tmp_CourseAssignmentSubmissionAttachment_nullCount = 0; var _tmp_casaUid = closure$_result.getLong_61zpoe$('casaUid'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentSubmissionAttachment_nullCount = _tmp_CourseAssignmentSubmissionAttachment_nullCount + 1 | 0; } var _tmp_casaSubmissionUid = closure$_result.getLong_61zpoe$('casaSubmissionUid'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentSubmissionAttachment_nullCount = _tmp_CourseAssignmentSubmissionAttachment_nullCount + 1 | 0; } var _tmp_casaMimeType = closure$_result.getString_61zpoe$('casaMimeType'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentSubmissionAttachment_nullCount = _tmp_CourseAssignmentSubmissionAttachment_nullCount + 1 | 0; } var _tmp_casaFileName = closure$_result.getString_61zpoe$('casaFileName'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentSubmissionAttachment_nullCount = _tmp_CourseAssignmentSubmissionAttachment_nullCount + 1 | 0; } var _tmp_casaUri = closure$_result.getString_61zpoe$('casaUri'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentSubmissionAttachment_nullCount = _tmp_CourseAssignmentSubmissionAttachment_nullCount + 1 | 0; } var _tmp_casaMd5 = closure$_result.getString_61zpoe$('casaMd5'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentSubmissionAttachment_nullCount = _tmp_CourseAssignmentSubmissionAttachment_nullCount + 1 | 0; } var _tmp_casaSize = closure$_result.getInt_61zpoe$('casaSize'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentSubmissionAttachment_nullCount = _tmp_CourseAssignmentSubmissionAttachment_nullCount + 1 | 0; } var _tmp_casaTimestamp = closure$_result.getLong_61zpoe$('casaTimestamp'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentSubmissionAttachment_nullCount = _tmp_CourseAssignmentSubmissionAttachment_nullCount + 1 | 0; } var _tmp_CourseAssignmentSubmissionAttachment_isAllNull = _tmp_CourseAssignmentSubmissionAttachment_nullCount === 8; var $receiver = new CourseAssignmentSubmissionWithAttachment(); $receiver.casUid = _tmp_casUid; $receiver.casAssignmentUid = _tmp_casAssignmentUid; $receiver.casSubmitterUid = _tmp_casSubmitterUid; $receiver.casSubmitterPersonUid = _tmp_casSubmitterPersonUid; $receiver.casText = _tmp_casText; $receiver.casType = _tmp_casType; $receiver.casTimestamp = _tmp_casTimestamp; if (!_tmp_CourseAssignmentSubmissionAttachment_isAllNull) { var $receiver_0 = new CourseAssignmentSubmissionAttachment(); $receiver_0.casaUid = _tmp_casaUid; $receiver_0.casaSubmissionUid = _tmp_casaSubmissionUid; $receiver_0.casaMimeType = _tmp_casaMimeType; $receiver_0.casaFileName = _tmp_casaFileName; $receiver_0.casaUri = _tmp_casaUri; $receiver_0.casaMd5 = _tmp_casaMd5; $receiver_0.casaSize = _tmp_casaSize; $receiver_0.casaTimestamp = _tmp_casaTimestamp; $receiver.attachment = $receiver_0; } return $receiver; }; } function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseAssignmentSubmissionDao_JdbcKt = this$CourseAssignmentSubmissionDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseAssignmentSubmissionDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT * \n | FROM CourseAssignmentSubmission\n | \n | LEFT JOIN CourseAssignmentSubmissionAttachment\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid\n | \n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = ?\n | ORDER BY casTimestamp DESC\n | ) LIMIT ? OFFSET ?\n ')), CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$submitterUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$CourseAssignmentSubmissionDao_JdbcKt._db, listOf(['CourseAssignmentSubmission', 'CourseAssignmentSubmissionAttachment']), CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getData$lambda(this.this$CourseAssignmentSubmissionDao_JdbcKt, this.closure$assignmentUid, this.closure$submitterUid, _limit, _offset)); }; function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseAssignmentSubmissionDao_JdbcKt = this$CourseAssignmentSubmissionDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseAssignmentSubmissionDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT * \n | FROM CourseAssignmentSubmission\n | \n | LEFT JOIN CourseAssignmentSubmissionAttachment\n | ON CourseAssignmentSubmissionAttachment.casaSubmissionUid = CourseAssignmentSubmission.casUid\n | \n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = ?\n | ORDER BY casTimestamp DESC\n | ) \n ')), CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$submitterUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$CourseAssignmentSubmissionDao_JdbcKt._db, listOf(['CourseAssignmentSubmission', 'CourseAssignmentSubmissionAttachment']), CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral$getLength$lambda(this.this$CourseAssignmentSubmissionDao_JdbcKt, this.closure$assignmentUid, this.closure$submitterUid)); }; CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; CourseAssignmentSubmissionDao_JdbcKt.prototype.getAllSubmissionsFromSubmitter_3pjtqy$ = function (assignmentUid, submitterUid) { return new CourseAssignmentSubmissionDao_JdbcKt$getAllSubmissionsFromSubmitter$ObjectLiteral(this, assignmentUid, submitterUid); }; function CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda$lambda(_result) { return mapNextRow(_result, 0, CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda$lambda$lambda(_result)); } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda(closure$assignmentUid_0, closure$submitterUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentSubmissionDao_JdbcKt.prototype.countFileSubmissionFromStudent_3pjtqy$ = function (assignmentUid, submitterUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Count(casUid)\n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = ?\n | AND casType = 2\n | \n ')), CourseAssignmentSubmissionDao_JdbcKt$countFileSubmissionFromStudent$lambda(assignmentUid, submitterUid), continuation); }; function CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda$lambda(_result) { return mapNextRow(_result, 0, CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda$lambda$lambda(_result)); } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda(closure$assignmentUid_0, closure$submitterUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentSubmissionDao_JdbcKt.prototype.countSubmissionsFromSubmitter_3pjtqy$ = function (assignmentUid, submitterUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Count(casUid)\n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ?\n | AND casSubmitterUid = ?\n | \n ')), CourseAssignmentSubmissionDao_JdbcKt$countSubmissionsFromSubmitter$lambda(assignmentUid, submitterUid), continuation); }; function CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseAssignmentSubmissionDao_JdbcKt = this$CourseAssignmentSubmissionDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseAssignmentSubmissionDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((\n | SELECT (CASE WHEN CourseAssignmentMark.camAssignmentUid IS NOT NULL \n | THEN 2\n | ELSE 1 \n | END) AS status\n | FROM CourseAssignmentSubmission\n | \n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentMark.camAssignmentUid = ?\n | AND CourseAssignmentMark.camSubmitterUid = ?\n | \n | WHERE CourseAssignmentSubmission.casAssignmentUid = ?\n | AND CourseAssignmentSubmission.casSubmitterUid = ?\n | LIMIT 1\n | ),0) AS Status\n | \n ')), CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda$lambda(this.local$closure$assignmentUid, this.local$closure$submitterUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, closure$submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentSubmissionDao_JdbcKt.prototype.getStatusOfAssignmentForSubmitter_3pjtqy$ = function (assignmentUid, submitterUid) { return new LiveDataImpl(this._db, listOf(['CourseAssignmentSubmission', 'CourseAssignmentMark']), CourseAssignmentSubmissionDao_JdbcKt$getStatusOfAssignmentForSubmitter$lambda(this, assignmentUid, submitterUid)); }; function CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_casUid = closure$_result.getLong_61zpoe$('casUid'); var _tmp_casAssignmentUid = closure$_result.getLong_61zpoe$('casAssignmentUid'); var _tmp_casSubmitterUid = closure$_result.getLong_61zpoe$('casSubmitterUid'); var _tmp_casSubmitterPersonUid = closure$_result.getLong_61zpoe$('casSubmitterPersonUid'); var _tmp_casText = closure$_result.getString_61zpoe$('casText'); var _tmp_casType = closure$_result.getInt_61zpoe$('casType'); var _tmp_casTimestamp = closure$_result.getLong_61zpoe$('casTimestamp'); var $receiver = new CourseAssignmentSubmission(); $receiver.casUid = _tmp_casUid; $receiver.casAssignmentUid = _tmp_casAssignmentUid; $receiver.casSubmitterUid = _tmp_casSubmitterUid; $receiver.casSubmitterPersonUid = _tmp_casSubmitterPersonUid; $receiver.casText = _tmp_casText; $receiver.casType = _tmp_casType; $receiver.casTimestamp = _tmp_casTimestamp; return $receiver; }; } function CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda$lambda(_result) { return mapNextRow(_result, null, CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda$lambda$lambda(_result)); } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$submitterUid = closure$submitterUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$submitterUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda(closure$assignmentUid_0, closure$submitterUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda(closure$assignmentUid_0, closure$submitterUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentSubmissionDao_JdbcKt.prototype.findLastSubmissionFromStudent_3pjtqy$ = function (submitterUid, assignmentUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseAssignmentSubmission\n | WHERE CourseAssignmentSubmission.casAssignmentUid = ?\n | AND CourseAssignmentSubmission.casSubmitterUid = ?\n | ORDER BY casTimestamp DESC\n | LIMIT 1\n | \n ')), CourseAssignmentSubmissionDao_JdbcKt$findLastSubmissionFromStudent$lambda(assignmentUid, submitterUid), continuation); }; function CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda$lambda(_result) { return mapNextRow(_result, false, CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda(closure$assignmentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda(closure$assignmentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda(closure$assignmentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseAssignmentSubmissionDao_JdbcKt = this$CourseAssignmentSubmissionDao_JdbcKt_0; this.local$closure$assignmentUid = closure$assignmentUid_0; } Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda.prototype.constructor = Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda; Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseAssignmentSubmissionDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT NOT EXISTS(SELECT 1\n | FROM CourseAssignmentSubmission\n | WHERE CourseAssignmentSubmission.casAssignmentUid = ?\n | LIMIT 1)\n | \n ')), CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda$lambda(this.local$closure$assignmentUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda(this$CourseAssignmentSubmissionDao_JdbcKt_0, closure$assignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseAssignmentSubmissionDao_JdbcKt.prototype.checkNoSubmissionsMade_s8cxhz$ = function (assignmentUid) { return new LiveDataImpl(this._db, listOf_0('CourseAssignmentSubmission'), CourseAssignmentSubmissionDao_JdbcKt$checkNoSubmissionsMade$lambda(this, assignmentUid)); }; function CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO CourseAssignmentSubmission (casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp) VALUES(?, ?, ?, ?, ?, ?, ?)'; }; CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.casUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.casUid); } stmt.setLong_6svq3l$(2, entity.casAssignmentUid); stmt.setLong_6svq3l$(3, entity.casSubmitterUid); stmt.setLong_6svq3l$(4, entity.casSubmitterPersonUid); stmt.setString_vqvrqt$(5, entity.casText); stmt.setInt_vux9f0$(6, entity.casType); stmt.setLong_6svq3l$(7, entity.casTimestamp); }; CourseAssignmentSubmissionDao_JdbcKt$_insertAdapterCourseAssignmentSubmission_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseAssignmentSubmissionDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionDao_JdbcKt', interfaces: [CourseAssignmentSubmissionDao]}; function CourseAssignmentSubmissionDao_ReplicateWrapper(_db, _dao) { CourseAssignmentSubmissionDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_66($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_66.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_66.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_66.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_66; Coroutine$replicateOnNewNode_s8cxhz$_66.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_66(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_63($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_63.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_63.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_63.prototype.constructor = Coroutine$replicateOnChange_63; Coroutine$replicateOnChange_63.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_63(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_6g2169$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_6g2169$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_6g2169$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_6g2169$_0.prototype.constructor = Coroutine$insertListAsync_6g2169$_0; Coroutine$insertListAsync_6g2169$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.casUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(522, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.casUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.casTimestamp = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_6g2169$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.insertListAsync_6g2169$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_6g2169$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.getAllSubmissionsFromSubmitter_3pjtqy$ = function (assignmentUid, submitterUid) { return this._dao_0.getAllSubmissionsFromSubmitter_3pjtqy$(assignmentUid, submitterUid); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.countFileSubmissionFromStudent_3pjtqy$ = function (assignmentUid, submitterUid, continuation) { return this._dao_0.countFileSubmissionFromStudent_3pjtqy$(assignmentUid, submitterUid, continuation); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.countSubmissionsFromSubmitter_3pjtqy$ = function (assignmentUid, submitterUid, continuation) { return this._dao_0.countSubmissionsFromSubmitter_3pjtqy$(assignmentUid, submitterUid, continuation); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.getStatusOfAssignmentForSubmitter_3pjtqy$ = function (assignmentUid, submitterUid) { return this._dao_0.getStatusOfAssignmentForSubmitter_3pjtqy$(assignmentUid, submitterUid); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.findLastSubmissionFromStudent_3pjtqy$ = function (submitterUid, assignmentUid, continuation) { return this._dao_0.findLastSubmissionFromStudent_3pjtqy$(submitterUid, assignmentUid, continuation); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.checkNoSubmissionsMade_s8cxhz$ = function (assignmentUid) { return this._dao_0.checkNoSubmissionsMade_s8cxhz$(assignmentUid); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_72($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_72.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_72.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_72.prototype.constructor = Coroutine$insertAsync_72; Coroutine$insertAsync_72.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.casUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(522, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.casUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.casTimestamp = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.casUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_72(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentSubmissionDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseAssignmentSubmissionDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionDao_ReplicateWrapper', interfaces: [CourseAssignmentSubmissionDao]}; function CourseAssignmentSubmissionDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseAssignmentSubmissionDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_67($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_67.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_67.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_67.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_67; Coroutine$replicateOnNewNode_s8cxhz$_67.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_67(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_64($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_64.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_64.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_64.prototype.constructor = Coroutine$replicateOnChange_64; Coroutine$replicateOnChange_64.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_64(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_6g2169$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_6g2169$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_6g2169$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_6g2169$_1.prototype.constructor = Coroutine$insertListAsync_6g2169$_1; Coroutine$insertListAsync_6g2169$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_6g2169$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.insertListAsync_6g2169$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_6g2169$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_Repo.prototype.getAllSubmissionsFromSubmitter_3pjtqy$ = function (assignmentUid, submitterUid) { var _result = this._dao.getAllSubmissionsFromSubmitter_3pjtqy$(assignmentUid, submitterUid); return _result; }; function Coroutine$countFileSubmissionFromStudent_3pjtqy$($this, assignmentUid_0, submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$assignmentUid = assignmentUid_0; this.local$submitterUid = submitterUid_0; } Coroutine$countFileSubmissionFromStudent_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$countFileSubmissionFromStudent_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$countFileSubmissionFromStudent_3pjtqy$.prototype.constructor = Coroutine$countFileSubmissionFromStudent_3pjtqy$; Coroutine$countFileSubmissionFromStudent_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.countFileSubmissionFromStudent_3pjtqy$(this.local$assignmentUid, this.local$submitterUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.countFileSubmissionFromStudent_3pjtqy$ = function (assignmentUid_0, submitterUid_0, continuation_0, suspended) { var instance = new Coroutine$countFileSubmissionFromStudent_3pjtqy$(this, assignmentUid_0, submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$countSubmissionsFromSubmitter_3pjtqy$($this, assignmentUid_0, submitterUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$assignmentUid = assignmentUid_0; this.local$submitterUid = submitterUid_0; } Coroutine$countSubmissionsFromSubmitter_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$countSubmissionsFromSubmitter_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$countSubmissionsFromSubmitter_3pjtqy$.prototype.constructor = Coroutine$countSubmissionsFromSubmitter_3pjtqy$; Coroutine$countSubmissionsFromSubmitter_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.countSubmissionsFromSubmitter_3pjtqy$(this.local$assignmentUid, this.local$submitterUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.countSubmissionsFromSubmitter_3pjtqy$ = function (assignmentUid_0, submitterUid_0, continuation_0, suspended) { var instance = new Coroutine$countSubmissionsFromSubmitter_3pjtqy$(this, assignmentUid_0, submitterUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_Repo.prototype.getStatusOfAssignmentForSubmitter_3pjtqy$ = function (assignmentUid, submitterUid) { var _result = this._dao.getStatusOfAssignmentForSubmitter_3pjtqy$(assignmentUid, submitterUid); return _result; }; function Coroutine$findLastSubmissionFromStudent_3pjtqy$($this, submitterUid_0, assignmentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$submitterUid = submitterUid_0; this.local$assignmentUid = assignmentUid_0; } Coroutine$findLastSubmissionFromStudent_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findLastSubmissionFromStudent_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findLastSubmissionFromStudent_3pjtqy$.prototype.constructor = Coroutine$findLastSubmissionFromStudent_3pjtqy$; Coroutine$findLastSubmissionFromStudent_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findLastSubmissionFromStudent_3pjtqy$(this.local$submitterUid, this.local$assignmentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.findLastSubmissionFromStudent_3pjtqy$ = function (submitterUid_0, assignmentUid_0, continuation_0, suspended) { var instance = new Coroutine$findLastSubmissionFromStudent_3pjtqy$(this, submitterUid_0, assignmentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_Repo.prototype.checkNoSubmissionsMade_s8cxhz$ = function (assignmentUid) { var _result = this._dao.checkNoSubmissionsMade_s8cxhz$(assignmentUid); return _result; }; CourseAssignmentSubmissionDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_73($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_73.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_73.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_73.prototype.constructor = Coroutine$insertAsync_73; Coroutine$insertAsync_73.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseAssignmentSubmissionDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_73(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseAssignmentSubmissionDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseAssignmentSubmissionDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseAssignmentSubmissionDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CourseAssignmentSubmissionDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionDao_Repo', interfaces: [CourseAssignmentSubmissionDao]}; function CourseBlockDao() { } CourseBlockDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseBlockDao', interfaces: [OneToManyJoinDao, BaseDao]}; function CourseBlockDao_JdbcKt(_db) { CourseBlockDao.call(this); this._db = _db; this._insertAdapterCourseBlock_upsert = new CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral(this._db); this._insertAdapterCourseBlock_ = new CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral(this._db); } function Coroutine$replaceListAsync_u9gaf9$($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$replaceListAsync_u9gaf9$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_u9gaf9$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_u9gaf9$.prototype.constructor = Coroutine$replaceListAsync_u9gaf9$; Coroutine$replaceListAsync_u9gaf9$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseBlock_upsert.insertListAsync_4ezy5m$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.replaceListAsync_u9gaf9$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_u9gaf9$(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseBlock_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_74($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_74.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_74.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_74.prototype.constructor = Coroutine$insertAsync_74; Coroutine$insertAsync_74.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseBlock_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_74(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseBlock_.insertList_4ezy5m$(entityList); }; function Coroutine$insertListAsync_4ezy5m$_5($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_5.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_5; Coroutine$insertListAsync_4ezy5m$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseBlock_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_5(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda; Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$entity.cbType); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$entity.cbIndentLevel); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.cbModuleParentBlockUid); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$entity.cbTitle); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$entity.cbDescription); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$entity.cbCompletionCriteria); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.cbHideUntilDate); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.cbDeadlineDate); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$entity.cbLateSubmissionPenalty); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.cbGracePeriodDate); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$entity.cbMaxPoints); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$entity.cbMinPoints); this.local$_stmt.setInt_vux9f0$(13, this.local$closure$entity.cbIndex); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$entity.cbClazzUid); this.local$_stmt.setBoolean_fzusl$(15, this.local$closure$entity.cbActive); this.local$_stmt.setBoolean_fzusl$(16, this.local$closure$entity.cbHidden); this.local$_stmt.setLong_6svq3l$(17, this.local$closure$entity.cbEntityUid); this.local$_stmt.setLong_6svq3l$(18, this.local$closure$entity.cbLct); this.local$_stmt.setLong_6svq3l$(19, this.local$closure$entity.cbUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_dk05ec$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_dk05ec$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_dk05ec$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_dk05ec$.prototype.constructor = Coroutine$updateAsync_dk05ec$; Coroutine$updateAsync_dk05ec$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE CourseBlock SET cbType = ?, cbIndentLevel = ?, cbModuleParentBlockUid = ?, cbTitle = ?, cbDescription = ?, cbCompletionCriteria = ?, cbHideUntilDate = ?, cbDeadlineDate = ?, cbLateSubmissionPenalty = ?, cbGracePeriodDate = ?, cbMaxPoints = ?, cbMinPoints = ?, cbIndex = ?, cbClazzUid = ?, cbActive = ?, cbHidden = ?, cbEntityUid = ?, cbLct = ? WHERE cbUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CourseBlockDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.updateAsync_dk05ec$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_dk05ec$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseBlockDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setInt_vux9f0$(1, _entity.cbType); _stmt.setInt_vux9f0$(2, _entity.cbIndentLevel); _stmt.setLong_6svq3l$(3, _entity.cbModuleParentBlockUid); _stmt.setString_vqvrqt$(4, _entity.cbTitle); _stmt.setString_vqvrqt$(5, _entity.cbDescription); _stmt.setInt_vux9f0$(6, _entity.cbCompletionCriteria); _stmt.setLong_6svq3l$(7, _entity.cbHideUntilDate); _stmt.setLong_6svq3l$(8, _entity.cbDeadlineDate); _stmt.setInt_vux9f0$(9, _entity.cbLateSubmissionPenalty); _stmt.setLong_6svq3l$(10, _entity.cbGracePeriodDate); _stmt.setInt_vux9f0$(11, _entity.cbMaxPoints); _stmt.setInt_vux9f0$(12, _entity.cbMinPoints); _stmt.setInt_vux9f0$(13, _entity.cbIndex); _stmt.setLong_6svq3l$(14, _entity.cbClazzUid); _stmt.setBoolean_fzusl$(15, _entity.cbActive); _stmt.setBoolean_fzusl$(16, _entity.cbHidden); _stmt.setLong_6svq3l$(17, _entity.cbEntityUid); _stmt.setLong_6svq3l$(18, _entity.cbLct); _stmt.setLong_6svq3l$(19, _entity.cbUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseBlockDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseBlock SET cbType = ?, cbIndentLevel = ?, cbModuleParentBlockUid = ?, cbTitle = ?, cbDescription = ?, cbCompletionCriteria = ?, cbHideUntilDate = ?, cbDeadlineDate = ?, cbLateSubmissionPenalty = ?, cbGracePeriodDate = ?, cbMaxPoints = ?, cbMinPoints = ?, cbIndex = ?, cbClazzUid = ?, cbActive = ?, cbHidden = ?, cbEntityUid = ?, cbLct = ? WHERE cbUid = ?'; prepareAndUseStatement(this._db, _sql, CourseBlockDao_JdbcKt$updateList$lambda(entityList)); }; function CourseBlockDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$entity.cbType); _stmt.setInt_vux9f0$(2, closure$entity.cbIndentLevel); _stmt.setLong_6svq3l$(3, closure$entity.cbModuleParentBlockUid); _stmt.setString_vqvrqt$(4, closure$entity.cbTitle); _stmt.setString_vqvrqt$(5, closure$entity.cbDescription); _stmt.setInt_vux9f0$(6, closure$entity.cbCompletionCriteria); _stmt.setLong_6svq3l$(7, closure$entity.cbHideUntilDate); _stmt.setLong_6svq3l$(8, closure$entity.cbDeadlineDate); _stmt.setInt_vux9f0$(9, closure$entity.cbLateSubmissionPenalty); _stmt.setLong_6svq3l$(10, closure$entity.cbGracePeriodDate); _stmt.setInt_vux9f0$(11, closure$entity.cbMaxPoints); _stmt.setInt_vux9f0$(12, closure$entity.cbMinPoints); _stmt.setInt_vux9f0$(13, closure$entity.cbIndex); _stmt.setLong_6svq3l$(14, closure$entity.cbClazzUid); _stmt.setBoolean_fzusl$(15, closure$entity.cbActive); _stmt.setBoolean_fzusl$(16, closure$entity.cbHidden); _stmt.setLong_6svq3l$(17, closure$entity.cbEntityUid); _stmt.setLong_6svq3l$(18, closure$entity.cbLct); _stmt.setLong_6svq3l$(19, closure$entity.cbUid); return _stmt.executeUpdate(); }; } CourseBlockDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseBlock SET cbType = ?, cbIndentLevel = ?, cbModuleParentBlockUid = ?, cbTitle = ?, cbDescription = ?, cbCompletionCriteria = ?, cbHideUntilDate = ?, cbDeadlineDate = ?, cbLateSubmissionPenalty = ?, cbGracePeriodDate = ?, cbMaxPoints = ?, cbMinPoints = ?, cbIndex = ?, cbClazzUid = ?, cbActive = ?, cbHidden = ?, cbEntityUid = ?, cbLct = ? WHERE cbUid = ?'; prepareAndUseStatement(this._db, _sql, CourseBlockDao_JdbcKt$update$lambda(entity)); }; function Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda; Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setInt_vux9f0$(1, _entity.cbType); this.local$_stmt.setInt_vux9f0$(2, _entity.cbIndentLevel); this.local$_stmt.setLong_6svq3l$(3, _entity.cbModuleParentBlockUid); this.local$_stmt.setString_vqvrqt$(4, _entity.cbTitle); this.local$_stmt.setString_vqvrqt$(5, _entity.cbDescription); this.local$_stmt.setInt_vux9f0$(6, _entity.cbCompletionCriteria); this.local$_stmt.setLong_6svq3l$(7, _entity.cbHideUntilDate); this.local$_stmt.setLong_6svq3l$(8, _entity.cbDeadlineDate); this.local$_stmt.setInt_vux9f0$(9, _entity.cbLateSubmissionPenalty); this.local$_stmt.setLong_6svq3l$(10, _entity.cbGracePeriodDate); this.local$_stmt.setInt_vux9f0$(11, _entity.cbMaxPoints); this.local$_stmt.setInt_vux9f0$(12, _entity.cbMinPoints); this.local$_stmt.setInt_vux9f0$(13, _entity.cbIndex); this.local$_stmt.setLong_6svq3l$(14, _entity.cbClazzUid); this.local$_stmt.setBoolean_fzusl$(15, _entity.cbActive); this.local$_stmt.setBoolean_fzusl$(16, _entity.cbHidden); this.local$_stmt.setLong_6svq3l$(17, _entity.cbEntityUid); this.local$_stmt.setLong_6svq3l$(18, _entity.cbLct); this.local$_stmt.setLong_6svq3l$(19, _entity.cbUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_5($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_5.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_5; Coroutine$updateListAsync_4ezy5m$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE CourseBlock SET cbType = ?, cbIndentLevel = ?, cbModuleParentBlockUid = ?, cbTitle = ?, cbDescription = ?, cbCompletionCriteria = ?, cbHideUntilDate = ?, cbDeadlineDate = ?, cbLateSubmissionPenalty = ?, cbGracePeriodDate = ?, cbMaxPoints = ?, cbMinPoints = ?, cbIndex = ?, cbClazzUid = ?, cbActive = ?, cbHidden = ?, cbEntityUid = ?, cbLct = ? WHERE cbUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CourseBlockDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_5(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_68($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_68.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_68.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_68.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_68; Coroutine$replicateOnNewNode_s8cxhz$_68.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseBlockReplicate(cbPk, cbDestination)\n | SELECT DISTINCT CourseBlock.cbUid AS cbPk,\n | ? AS cbDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN CourseBlock\n | ON CourseBlock.cbClazzUid = Clazz.clazzUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseBlock.cbLct != COALESCE(\n | (SELECT cbVersionId\n | FROM CourseBlockReplicate\n | WHERE cbPk = CourseBlock.cbUid\n | AND cbDestination = ?), 0) \n | /*psql ON CONFLICT(cbPk, cbDestination) DO UPDATE\n | SET cbPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseBlockReplicate(cbPk, cbDestination)\n | SELECT DISTINCT CourseBlock.cbUid AS cbPk,\n | ? AS cbDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN CourseBlock\n | ON CourseBlock.cbClazzUid = Clazz.clazzUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseBlock.cbLct != COALESCE(\n | (SELECT cbVersionId\n | FROM CourseBlockReplicate\n | WHERE cbPk = CourseBlock.cbUid\n | AND cbDestination = ?), 0) \n | ON CONFLICT(cbPk, cbDestination) DO UPDATE\n | SET cbPending = true\n | \n | \n |')), CourseBlockDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_68(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_65($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_65.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_65.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_65.prototype.constructor = Coroutine$replicateOnChange_65; Coroutine$replicateOnChange_65.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseBlockReplicate(cbPk, cbDestination)\n | SELECT DISTINCT CourseBlock.cbUid AS cbPk,\n | UserSession.usClientNodeId AS cbDestination\n | FROM ChangeLog\n | JOIN CourseBlock\n | ON ChangeLog.chTableId = 124\n | AND ChangeLog.chEntityPk = CourseBlock.cbUid\n | JOIN Clazz\n | ON Clazz.clazzUid = CourseBlock.cbClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseBlock.cbLct != COALESCE(\n | (SELECT cbVersionId\n | FROM CourseBlockReplicate\n | WHERE cbPk = CourseBlock.cbUid\n | AND cbDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cbPk, cbDestination) DO UPDATE\n | SET cbPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseBlockReplicate(cbPk, cbDestination)\n | SELECT DISTINCT CourseBlock.cbUid AS cbPk,\n | UserSession.usClientNodeId AS cbDestination\n | FROM ChangeLog\n | JOIN CourseBlock\n | ON ChangeLog.chTableId = 124\n | AND ChangeLog.chEntityPk = CourseBlock.cbUid\n | JOIN Clazz\n | ON Clazz.clazzUid = CourseBlock.cbClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseBlock.cbLct != COALESCE(\n | (SELECT cbVersionId\n | FROM CourseBlockReplicate\n | WHERE cbPk = CourseBlock.cbUid\n | AND cbDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cbPk, cbDestination) DO UPDATE\n | SET cbPending = true\n | \n | \n |')), CourseBlockDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_65(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseBlockDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cbUid = closure$_result.getLong_61zpoe$('cbUid'); var _tmp_cbType = closure$_result.getInt_61zpoe$('cbType'); var _tmp_cbIndentLevel = closure$_result.getInt_61zpoe$('cbIndentLevel'); var _tmp_cbModuleParentBlockUid = closure$_result.getLong_61zpoe$('cbModuleParentBlockUid'); var _tmp_cbTitle = closure$_result.getString_61zpoe$('cbTitle'); var _tmp_cbDescription = closure$_result.getString_61zpoe$('cbDescription'); var _tmp_cbCompletionCriteria = closure$_result.getInt_61zpoe$('cbCompletionCriteria'); var _tmp_cbHideUntilDate = closure$_result.getLong_61zpoe$('cbHideUntilDate'); var _tmp_cbDeadlineDate = closure$_result.getLong_61zpoe$('cbDeadlineDate'); var _tmp_cbLateSubmissionPenalty = closure$_result.getInt_61zpoe$('cbLateSubmissionPenalty'); var _tmp_cbGracePeriodDate = closure$_result.getLong_61zpoe$('cbGracePeriodDate'); var _tmp_cbMaxPoints = closure$_result.getInt_61zpoe$('cbMaxPoints'); var _tmp_cbMinPoints = closure$_result.getInt_61zpoe$('cbMinPoints'); var _tmp_cbIndex = closure$_result.getInt_61zpoe$('cbIndex'); var _tmp_cbClazzUid = closure$_result.getLong_61zpoe$('cbClazzUid'); var _tmp_cbActive = closure$_result.getBoolean_61zpoe$('cbActive'); var _tmp_cbHidden = closure$_result.getBoolean_61zpoe$('cbHidden'); var _tmp_cbEntityUid = closure$_result.getLong_61zpoe$('cbEntityUid'); var _tmp_cbLct = closure$_result.getLong_61zpoe$('cbLct'); var $receiver = new CourseBlock(); $receiver.cbUid = _tmp_cbUid; $receiver.cbType = _tmp_cbType; $receiver.cbIndentLevel = _tmp_cbIndentLevel; $receiver.cbModuleParentBlockUid = _tmp_cbModuleParentBlockUid; $receiver.cbTitle = _tmp_cbTitle; $receiver.cbDescription = _tmp_cbDescription; $receiver.cbCompletionCriteria = _tmp_cbCompletionCriteria; $receiver.cbHideUntilDate = _tmp_cbHideUntilDate; $receiver.cbDeadlineDate = _tmp_cbDeadlineDate; $receiver.cbLateSubmissionPenalty = _tmp_cbLateSubmissionPenalty; $receiver.cbGracePeriodDate = _tmp_cbGracePeriodDate; $receiver.cbMaxPoints = _tmp_cbMaxPoints; $receiver.cbMinPoints = _tmp_cbMinPoints; $receiver.cbIndex = _tmp_cbIndex; $receiver.cbClazzUid = _tmp_cbClazzUid; $receiver.cbActive = _tmp_cbActive; $receiver.cbHidden = _tmp_cbHidden; $receiver.cbEntityUid = _tmp_cbEntityUid; $receiver.cbLct = _tmp_cbLct; return $receiver; }; } function CourseBlockDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, CourseBlockDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda; Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseBlockDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseBlockDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM CourseBlock WHERE cbUid = ?'), CourseBlockDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cbUid = closure$_result.getLong_61zpoe$('cbUid'); var _tmp_cbType = closure$_result.getInt_61zpoe$('cbType'); var _tmp_cbIndentLevel = closure$_result.getInt_61zpoe$('cbIndentLevel'); var _tmp_cbModuleParentBlockUid = closure$_result.getLong_61zpoe$('cbModuleParentBlockUid'); var _tmp_cbTitle = closure$_result.getString_61zpoe$('cbTitle'); var _tmp_cbDescription = closure$_result.getString_61zpoe$('cbDescription'); var _tmp_cbCompletionCriteria = closure$_result.getInt_61zpoe$('cbCompletionCriteria'); var _tmp_cbHideUntilDate = closure$_result.getLong_61zpoe$('cbHideUntilDate'); var _tmp_cbDeadlineDate = closure$_result.getLong_61zpoe$('cbDeadlineDate'); var _tmp_cbLateSubmissionPenalty = closure$_result.getInt_61zpoe$('cbLateSubmissionPenalty'); var _tmp_cbGracePeriodDate = closure$_result.getLong_61zpoe$('cbGracePeriodDate'); var _tmp_cbMaxPoints = closure$_result.getInt_61zpoe$('cbMaxPoints'); var _tmp_cbMinPoints = closure$_result.getInt_61zpoe$('cbMinPoints'); var _tmp_cbIndex = closure$_result.getInt_61zpoe$('cbIndex'); var _tmp_cbClazzUid = closure$_result.getLong_61zpoe$('cbClazzUid'); var _tmp_cbActive = closure$_result.getBoolean_61zpoe$('cbActive'); var _tmp_cbHidden = closure$_result.getBoolean_61zpoe$('cbHidden'); var _tmp_cbEntityUid = closure$_result.getLong_61zpoe$('cbEntityUid'); var _tmp_cbLct = closure$_result.getLong_61zpoe$('cbLct'); var _tmp_ClazzAssignment_nullCount = 0; var _tmp_caUid = closure$_result.getLong_61zpoe$('caUid'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caTitle = closure$_result.getString_61zpoe$('caTitle'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caDescription = closure$_result.getString_61zpoe$('caDescription'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caGroupUid = closure$_result.getLong_61zpoe$('caGroupUid'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caActive = closure$_result.getBoolean_61zpoe$('caActive'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caClassCommentEnabled = closure$_result.getBoolean_61zpoe$('caClassCommentEnabled'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caPrivateCommentsEnabled = closure$_result.getBoolean_61zpoe$('caPrivateCommentsEnabled'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caCompletionCriteria = closure$_result.getInt_61zpoe$('caCompletionCriteria'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caRequireFileSubmission = closure$_result.getBoolean_61zpoe$('caRequireFileSubmission'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caFileType = closure$_result.getInt_61zpoe$('caFileType'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caSizeLimit = closure$_result.getInt_61zpoe$('caSizeLimit'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caNumberOfFiles = closure$_result.getInt_61zpoe$('caNumberOfFiles'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caSubmissionPolicy = closure$_result.getInt_61zpoe$('caSubmissionPolicy'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caMarkingType = closure$_result.getInt_61zpoe$('caMarkingType'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caRequireTextSubmission = closure$_result.getBoolean_61zpoe$('caRequireTextSubmission'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caTextLimitType = closure$_result.getInt_61zpoe$('caTextLimitType'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caTextLimit = closure$_result.getInt_61zpoe$('caTextLimit'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caXObjectUid = closure$_result.getLong_61zpoe$('caXObjectUid'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caClazzUid = closure$_result.getLong_61zpoe$('caClazzUid'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caLocalChangeSeqNum = closure$_result.getLong_61zpoe$('caLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caMasterChangeSeqNum = closure$_result.getLong_61zpoe$('caMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caLastChangedBy = closure$_result.getInt_61zpoe$('caLastChangedBy'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_caLct = closure$_result.getLong_61zpoe$('caLct'); if (closure$_result.wasNull()) { _tmp_ClazzAssignment_nullCount = _tmp_ClazzAssignment_nullCount + 1 | 0; } var _tmp_ClazzAssignment_isAllNull = _tmp_ClazzAssignment_nullCount === 23; var _tmp_ContentEntry_nullCount = 0; var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_title = closure$_result.getString_61zpoe$('title'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_description = closure$_result.getString_61zpoe$('description'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_author = closure$_result.getString_61zpoe$('author'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); if (closure$_result.wasNull()) { _tmp_ContentEntry_nullCount = _tmp_ContentEntry_nullCount + 1 | 0; } var _tmp_ContentEntry_isAllNull = _tmp_ContentEntry_nullCount === 26; var _tmp_CourseDiscussion_nullCount = 0; var _tmp_courseDiscussionUid = closure$_result.getLong_61zpoe$('courseDiscussionUid'); if (closure$_result.wasNull()) { _tmp_CourseDiscussion_nullCount = _tmp_CourseDiscussion_nullCount + 1 | 0; } var _tmp_courseDiscussionTitle = closure$_result.getString_61zpoe$('courseDiscussionTitle'); if (closure$_result.wasNull()) { _tmp_CourseDiscussion_nullCount = _tmp_CourseDiscussion_nullCount + 1 | 0; } var _tmp_courseDiscussionDesc = closure$_result.getString_61zpoe$('courseDiscussionDesc'); if (closure$_result.wasNull()) { _tmp_CourseDiscussion_nullCount = _tmp_CourseDiscussion_nullCount + 1 | 0; } var _tmp_courseDiscussionClazzUid = closure$_result.getLong_61zpoe$('courseDiscussionClazzUid'); if (closure$_result.wasNull()) { _tmp_CourseDiscussion_nullCount = _tmp_CourseDiscussion_nullCount + 1 | 0; } var _tmp_courseDiscussionActive = closure$_result.getBoolean_61zpoe$('courseDiscussionActive'); if (closure$_result.wasNull()) { _tmp_CourseDiscussion_nullCount = _tmp_CourseDiscussion_nullCount + 1 | 0; } var _tmp_courseDiscussionLct = closure$_result.getLong_61zpoe$('courseDiscussionLct'); if (closure$_result.wasNull()) { _tmp_CourseDiscussion_nullCount = _tmp_CourseDiscussion_nullCount + 1 | 0; } var _tmp_CourseDiscussion_isAllNull = _tmp_CourseDiscussion_nullCount === 6; var _tmp_Language_nullCount = 0; var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_name = closure$_result.getString_61zpoe$('name'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_isAllNull = _tmp_Language_nullCount === 11; var $receiver = new CourseBlockWithEntityDb(); $receiver.cbUid = _tmp_cbUid; $receiver.cbType = _tmp_cbType; $receiver.cbIndentLevel = _tmp_cbIndentLevel; $receiver.cbModuleParentBlockUid = _tmp_cbModuleParentBlockUid; $receiver.cbTitle = _tmp_cbTitle; $receiver.cbDescription = _tmp_cbDescription; $receiver.cbCompletionCriteria = _tmp_cbCompletionCriteria; $receiver.cbHideUntilDate = _tmp_cbHideUntilDate; $receiver.cbDeadlineDate = _tmp_cbDeadlineDate; $receiver.cbLateSubmissionPenalty = _tmp_cbLateSubmissionPenalty; $receiver.cbGracePeriodDate = _tmp_cbGracePeriodDate; $receiver.cbMaxPoints = _tmp_cbMaxPoints; $receiver.cbMinPoints = _tmp_cbMinPoints; $receiver.cbIndex = _tmp_cbIndex; $receiver.cbClazzUid = _tmp_cbClazzUid; $receiver.cbActive = _tmp_cbActive; $receiver.cbHidden = _tmp_cbHidden; $receiver.cbEntityUid = _tmp_cbEntityUid; $receiver.cbLct = _tmp_cbLct; if (!_tmp_ClazzAssignment_isAllNull) { var $receiver_0 = new ClazzAssignment(); $receiver_0.caUid = _tmp_caUid; $receiver_0.caTitle = _tmp_caTitle; $receiver_0.caDescription = _tmp_caDescription; $receiver_0.caGroupUid = _tmp_caGroupUid; $receiver_0.caActive = _tmp_caActive; $receiver_0.caClassCommentEnabled = _tmp_caClassCommentEnabled; $receiver_0.caPrivateCommentsEnabled = _tmp_caPrivateCommentsEnabled; $receiver_0.caCompletionCriteria = _tmp_caCompletionCriteria; $receiver_0.caRequireFileSubmission = _tmp_caRequireFileSubmission; $receiver_0.caFileType = _tmp_caFileType; $receiver_0.caSizeLimit = _tmp_caSizeLimit; $receiver_0.caNumberOfFiles = _tmp_caNumberOfFiles; $receiver_0.caSubmissionPolicy = _tmp_caSubmissionPolicy; $receiver_0.caMarkingType = _tmp_caMarkingType; $receiver_0.caRequireTextSubmission = _tmp_caRequireTextSubmission; $receiver_0.caTextLimitType = _tmp_caTextLimitType; $receiver_0.caTextLimit = _tmp_caTextLimit; $receiver_0.caXObjectUid = _tmp_caXObjectUid; $receiver_0.caClazzUid = _tmp_caClazzUid; $receiver_0.caLocalChangeSeqNum = _tmp_caLocalChangeSeqNum; $receiver_0.caMasterChangeSeqNum = _tmp_caMasterChangeSeqNum; $receiver_0.caLastChangedBy = _tmp_caLastChangedBy; $receiver_0.caLct = _tmp_caLct; $receiver.assignment = $receiver_0; } if (!_tmp_ContentEntry_isAllNull) { var $receiver_1 = new ContentEntry(); $receiver_1.contentEntryUid = _tmp_contentEntryUid; $receiver_1.title = _tmp_title; $receiver_1.description = _tmp_description; $receiver_1.entryId = _tmp_entryId; $receiver_1.author = _tmp_author; $receiver_1.publisher = _tmp_publisher; $receiver_1.licenseType = _tmp_licenseType; $receiver_1.licenseName = _tmp_licenseName; $receiver_1.licenseUrl = _tmp_licenseUrl; $receiver_1.sourceUrl = _tmp_sourceUrl; $receiver_1.thumbnailUrl = _tmp_thumbnailUrl; $receiver_1.lastModified = _tmp_lastModified; $receiver_1.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver_1.languageVariantUid = _tmp_languageVariantUid; $receiver_1.contentFlags = _tmp_contentFlags; $receiver_1.leaf = _tmp_leaf; $receiver_1.publik = _tmp_publik; $receiver_1.ceInactive = _tmp_ceInactive; $receiver_1.completionCriteria = _tmp_completionCriteria; $receiver_1.minScore = _tmp_minScore; $receiver_1.contentTypeFlag = _tmp_contentTypeFlag; $receiver_1.contentOwner = _tmp_contentOwner; $receiver_1.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver_1.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver_1.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver_1.contentEntryLct = _tmp_contentEntryLct; $receiver.entry = $receiver_1; } if (!_tmp_CourseDiscussion_isAllNull) { var $receiver_2 = new CourseDiscussion(); $receiver_2.courseDiscussionUid = _tmp_courseDiscussionUid; $receiver_2.courseDiscussionTitle = _tmp_courseDiscussionTitle; $receiver_2.courseDiscussionDesc = _tmp_courseDiscussionDesc; $receiver_2.courseDiscussionClazzUid = _tmp_courseDiscussionClazzUid; $receiver_2.courseDiscussionActive = _tmp_courseDiscussionActive; $receiver_2.courseDiscussionLct = _tmp_courseDiscussionLct; $receiver.courseDiscussion = $receiver_2; } if (!_tmp_Language_isAllNull) { var $receiver_3 = new Language(); $receiver_3.langUid = _tmp_langUid; $receiver_3.name = _tmp_name; $receiver_3.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver_3.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver_3.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver_3.Language_Type = _tmp_Language_Type; $receiver_3.languageActive = _tmp_languageActive; $receiver_3.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver_3.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver_3.langLastChangedBy = _tmp_langLastChangedBy; $receiver_3.langLct = _tmp_langLct; $receiver.language = $receiver_3; } return $receiver; }; } function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda$lambda(_result) { return mapRows(_result, CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda(closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda(closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda(closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseBlockDao_JdbcKt.prototype.findAllCourseBlockByClazzUidAsync_s8cxhz$ = function (clazzUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseBlock \n | LEFT JOIN ClazzAssignment as assignment\n | ON assignment.caUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 103\n | LEFT JOIN CourseDiscussion as courseDiscussion\n | ON CourseDiscussion.courseDiscussionUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 105\n | LEFT JOIN ContentEntry as entry\n | ON entry.contentEntryUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 104\n | \n | LEFT JOIN Language\n | ON Language.langUid = entry.primaryLanguageUid\n | AND CourseBlock.cbType = 104\n | \n | WHERE cbClazzUid = ?\n | AND cbActive\n | ORDER BY cbIndex\n | \n ')), CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidAsync$lambda(clazzUid), continuation); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral(this$CourseBlockDao_JdbcKt, closure$clazzUid, closure$personUid, closure$collapseList, closure$currentTime) { this.this$CourseBlockDao_JdbcKt = this$CourseBlockDao_JdbcKt; this.closure$clazzUid = closure$clazzUid; this.closure$personUid = closure$personUid; this.closure$collapseList = closure$collapseList; this.closure$currentTime = closure$currentTime; DataSourceFactory.call(this); } function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_expanded = closure$_result.getBoolean_61zpoe$('expanded'); var _tmp_cbUid = closure$_result.getLong_61zpoe$('cbUid'); var _tmp_cbType = closure$_result.getInt_61zpoe$('cbType'); var _tmp_cbIndentLevel = closure$_result.getInt_61zpoe$('cbIndentLevel'); var _tmp_cbModuleParentBlockUid = closure$_result.getLong_61zpoe$('cbModuleParentBlockUid'); var _tmp_cbTitle = closure$_result.getString_61zpoe$('cbTitle'); var _tmp_cbDescription = closure$_result.getString_61zpoe$('cbDescription'); var _tmp_cbCompletionCriteria = closure$_result.getInt_61zpoe$('cbCompletionCriteria'); var _tmp_cbHideUntilDate = closure$_result.getLong_61zpoe$('cbHideUntilDate'); var _tmp_cbDeadlineDate = closure$_result.getLong_61zpoe$('cbDeadlineDate'); var _tmp_cbLateSubmissionPenalty = closure$_result.getInt_61zpoe$('cbLateSubmissionPenalty'); var _tmp_cbGracePeriodDate = closure$_result.getLong_61zpoe$('cbGracePeriodDate'); var _tmp_cbMaxPoints = closure$_result.getInt_61zpoe$('cbMaxPoints'); var _tmp_cbMinPoints = closure$_result.getInt_61zpoe$('cbMinPoints'); var _tmp_cbIndex = closure$_result.getInt_61zpoe$('cbIndex'); var _tmp_cbClazzUid = closure$_result.getLong_61zpoe$('cbClazzUid'); var _tmp_cbActive = closure$_result.getBoolean_61zpoe$('cbActive'); var _tmp_cbHidden = closure$_result.getBoolean_61zpoe$('cbHidden'); var _tmp_cbEntityUid = closure$_result.getLong_61zpoe$('cbEntityUid'); var _tmp_cbLct = closure$_result.getLong_61zpoe$('cbLct'); var _tmp_ClazzAssignmentWithMetrics_nullCount = 0; var _tmp_fileSubmissionStatus = closure$_result.getInt_61zpoe$('fileSubmissionStatus'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caUid = closure$_result.getLong_61zpoe$('caUid'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caTitle = closure$_result.getString_61zpoe$('caTitle'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caDescription = closure$_result.getString_61zpoe$('caDescription'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caGroupUid = closure$_result.getLong_61zpoe$('caGroupUid'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caActive = closure$_result.getBoolean_61zpoe$('caActive'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caClassCommentEnabled = closure$_result.getBoolean_61zpoe$('caClassCommentEnabled'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caPrivateCommentsEnabled = closure$_result.getBoolean_61zpoe$('caPrivateCommentsEnabled'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caCompletionCriteria = closure$_result.getInt_61zpoe$('caCompletionCriteria'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caRequireFileSubmission = closure$_result.getBoolean_61zpoe$('caRequireFileSubmission'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caFileType = closure$_result.getInt_61zpoe$('caFileType'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caSizeLimit = closure$_result.getInt_61zpoe$('caSizeLimit'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caNumberOfFiles = closure$_result.getInt_61zpoe$('caNumberOfFiles'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caSubmissionPolicy = closure$_result.getInt_61zpoe$('caSubmissionPolicy'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caMarkingType = closure$_result.getInt_61zpoe$('caMarkingType'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caRequireTextSubmission = closure$_result.getBoolean_61zpoe$('caRequireTextSubmission'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caTextLimitType = closure$_result.getInt_61zpoe$('caTextLimitType'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caTextLimit = closure$_result.getInt_61zpoe$('caTextLimit'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caXObjectUid = closure$_result.getLong_61zpoe$('caXObjectUid'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caClazzUid = closure$_result.getLong_61zpoe$('caClazzUid'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caLocalChangeSeqNum = closure$_result.getLong_61zpoe$('caLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caMasterChangeSeqNum = closure$_result.getLong_61zpoe$('caMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caLastChangedBy = closure$_result.getInt_61zpoe$('caLastChangedBy'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_caLct = closure$_result.getLong_61zpoe$('caLct'); if (closure$_result.wasNull()) { _tmp_ClazzAssignmentWithMetrics_nullCount = _tmp_ClazzAssignmentWithMetrics_nullCount + 1 | 0; } var _tmp_ClazzAssignmentWithMetrics_isAllNull = _tmp_ClazzAssignmentWithMetrics_nullCount === 24; var _tmp_AssignmentProgressSummary_nullCount = 0; var _tmp_notSubmittedStudents = closure$_result.getInt_61zpoe$('notSubmittedStudents'); if (closure$_result.wasNull()) { _tmp_AssignmentProgressSummary_nullCount = _tmp_AssignmentProgressSummary_nullCount + 1 | 0; } var _tmp_submittedStudents = closure$_result.getInt_61zpoe$('submittedStudents'); if (closure$_result.wasNull()) { _tmp_AssignmentProgressSummary_nullCount = _tmp_AssignmentProgressSummary_nullCount + 1 | 0; } var _tmp_totalStudents = closure$_result.getInt_61zpoe$('totalStudents'); if (closure$_result.wasNull()) { _tmp_AssignmentProgressSummary_nullCount = _tmp_AssignmentProgressSummary_nullCount + 1 | 0; } var _tmp_markedStudents = closure$_result.getInt_61zpoe$('markedStudents'); if (closure$_result.wasNull()) { _tmp_AssignmentProgressSummary_nullCount = _tmp_AssignmentProgressSummary_nullCount + 1 | 0; } var _tmp_hasMetricsPermission = closure$_result.getBoolean_61zpoe$('hasMetricsPermission'); if (closure$_result.wasNull()) { _tmp_AssignmentProgressSummary_nullCount = _tmp_AssignmentProgressSummary_nullCount + 1 | 0; } var _tmp_AssignmentProgressSummary_isAllNull = _tmp_AssignmentProgressSummary_nullCount === 5; var _tmp_CourseAssignmentMark_nullCount = 0; var _tmp_camUid = closure$_result.getLong_61zpoe$('camUid'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentMark_nullCount = _tmp_CourseAssignmentMark_nullCount + 1 | 0; } var _tmp_camAssignmentUid = closure$_result.getLong_61zpoe$('camAssignmentUid'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentMark_nullCount = _tmp_CourseAssignmentMark_nullCount + 1 | 0; } var _tmp_camSubmitterUid = closure$_result.getLong_61zpoe$('camSubmitterUid'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentMark_nullCount = _tmp_CourseAssignmentMark_nullCount + 1 | 0; } var _tmp_camMark = closure$_result.getFloat_61zpoe$('camMark'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentMark_nullCount = _tmp_CourseAssignmentMark_nullCount + 1 | 0; } var _tmp_camPenalty = closure$_result.getInt_61zpoe$('camPenalty'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentMark_nullCount = _tmp_CourseAssignmentMark_nullCount + 1 | 0; } var _tmp_camLct = closure$_result.getLong_61zpoe$('camLct'); if (closure$_result.wasNull()) { _tmp_CourseAssignmentMark_nullCount = _tmp_CourseAssignmentMark_nullCount + 1 | 0; } var _tmp_CourseAssignmentMark_isAllNull = _tmp_CourseAssignmentMark_nullCount === 6; var _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = 0; var _tmp_assignmentContentWeight = closure$_result.getInt_61zpoe$('assignmentContentWeight'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_contentEntryUid = closure$_result.getLong_61zpoe$('contentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_title = closure$_result.getString_61zpoe$('title'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_description = closure$_result.getString_61zpoe$('description'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_entryId = closure$_result.getString_61zpoe$('entryId'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_author = closure$_result.getString_61zpoe$('author'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_publisher = closure$_result.getString_61zpoe$('publisher'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_licenseType = closure$_result.getInt_61zpoe$('licenseType'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_licenseName = closure$_result.getString_61zpoe$('licenseName'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_licenseUrl = closure$_result.getString_61zpoe$('licenseUrl'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_sourceUrl = closure$_result.getString_61zpoe$('sourceUrl'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_thumbnailUrl = closure$_result.getString_61zpoe$('thumbnailUrl'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_lastModified = closure$_result.getLong_61zpoe$('lastModified'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_primaryLanguageUid = closure$_result.getLong_61zpoe$('primaryLanguageUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_languageVariantUid = closure$_result.getLong_61zpoe$('languageVariantUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_contentFlags = closure$_result.getInt_61zpoe$('contentFlags'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_leaf = closure$_result.getBoolean_61zpoe$('leaf'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_publik = closure$_result.getBoolean_61zpoe$('publik'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_ceInactive = closure$_result.getBoolean_61zpoe$('ceInactive'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_completionCriteria = closure$_result.getInt_61zpoe$('completionCriteria'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_minScore = closure$_result.getInt_61zpoe$('minScore'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_contentTypeFlag = closure$_result.getInt_61zpoe$('contentTypeFlag'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_contentOwner = closure$_result.getLong_61zpoe$('contentOwner'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_contentEntryLocalChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_contentEntryMasterChangeSeqNum = closure$_result.getLong_61zpoe$('contentEntryMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_contentEntryLastChangedBy = closure$_result.getInt_61zpoe$('contentEntryLastChangedBy'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_contentEntryLct = closure$_result.getLong_61zpoe$('contentEntryLct'); if (closure$_result.wasNull()) { _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount + 1 | 0; } var _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_isAllNull = _tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_nullCount === 27; var _tmp_Container_nullCount = 0; var _tmp_containerUid = closure$_result.getLong_61zpoe$('containerUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLocalCsn = closure$_result.getLong_61zpoe$('cntLocalCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntMasterCsn = closure$_result.getLong_61zpoe$('cntMasterCsn'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModBy = closure$_result.getInt_61zpoe$('cntLastModBy'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLct = closure$_result.getLong_61zpoe$('cntLct'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_fileSize = closure$_result.getLong_61zpoe$('fileSize'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_containerContentEntryUid = closure$_result.getLong_61zpoe$('containerContentEntryUid'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntLastModified = closure$_result.getLong_61zpoe$('cntLastModified'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_remarks = closure$_result.getString_61zpoe$('remarks'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_mobileOptimized = closure$_result.getBoolean_61zpoe$('mobileOptimized'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_cntNumEntries = closure$_result.getInt_61zpoe$('cntNumEntries'); if (closure$_result.wasNull()) { _tmp_Container_nullCount = _tmp_Container_nullCount + 1 | 0; } var _tmp_Container_isAllNull = _tmp_Container_nullCount === 12; var _tmp_ContentEntryParentChildJoin_nullCount = 0; var _tmp_cepcjUid = closure$_result.getLong_61zpoe$('cepcjUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLocalChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjMasterChangeSeqNum = closure$_result.getLong_61zpoe$('cepcjMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLastChangedBy = closure$_result.getInt_61zpoe$('cepcjLastChangedBy'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjLct = closure$_result.getLong_61zpoe$('cepcjLct'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjParentContentEntryUid = closure$_result.getLong_61zpoe$('cepcjParentContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_cepcjChildContentEntryUid = closure$_result.getLong_61zpoe$('cepcjChildContentEntryUid'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_childIndex = closure$_result.getInt_61zpoe$('childIndex'); if (closure$_result.wasNull()) { _tmp_ContentEntryParentChildJoin_nullCount = _tmp_ContentEntryParentChildJoin_nullCount + 1 | 0; } var _tmp_ContentEntryParentChildJoin_isAllNull = _tmp_ContentEntryParentChildJoin_nullCount === 8; var _tmp_ContentEntryStatementScoreProgress_nullCount = 0; var _tmp_resultScore = closure$_result.getInt_61zpoe$('resultScore'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultMax = closure$_result.getInt_61zpoe$('resultMax'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultScaled = closure$_result.getFloat_61zpoe$('resultScaled'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultWeight = closure$_result.getInt_61zpoe$('resultWeight'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_contentComplete = closure$_result.getBoolean_61zpoe$('contentComplete'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_progress = closure$_result.getInt_61zpoe$('progress'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_success = closure$_result.getByte_61zpoe$('success'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_penalty = closure$_result.getInt_61zpoe$('penalty'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalContent = closure$_result.getInt_61zpoe$('totalContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalCompletedContent = closure$_result.getInt_61zpoe$('totalCompletedContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_ContentEntryStatementScoreProgress_isAllNull = _tmp_ContentEntryStatementScoreProgress_nullCount === 10; var _tmp_CourseDiscussion_nullCount = 0; var _tmp_courseDiscussionUid = closure$_result.getLong_61zpoe$('courseDiscussionUid'); if (closure$_result.wasNull()) { _tmp_CourseDiscussion_nullCount = _tmp_CourseDiscussion_nullCount + 1 | 0; } var _tmp_courseDiscussionTitle = closure$_result.getString_61zpoe$('courseDiscussionTitle'); if (closure$_result.wasNull()) { _tmp_CourseDiscussion_nullCount = _tmp_CourseDiscussion_nullCount + 1 | 0; } var _tmp_courseDiscussionDesc = closure$_result.getString_61zpoe$('courseDiscussionDesc'); if (closure$_result.wasNull()) { _tmp_CourseDiscussion_nullCount = _tmp_CourseDiscussion_nullCount + 1 | 0; } var _tmp_courseDiscussionClazzUid = closure$_result.getLong_61zpoe$('courseDiscussionClazzUid'); if (closure$_result.wasNull()) { _tmp_CourseDiscussion_nullCount = _tmp_CourseDiscussion_nullCount + 1 | 0; } var _tmp_courseDiscussionActive = closure$_result.getBoolean_61zpoe$('courseDiscussionActive'); if (closure$_result.wasNull()) { _tmp_CourseDiscussion_nullCount = _tmp_CourseDiscussion_nullCount + 1 | 0; } var _tmp_courseDiscussionLct = closure$_result.getLong_61zpoe$('courseDiscussionLct'); if (closure$_result.wasNull()) { _tmp_CourseDiscussion_nullCount = _tmp_CourseDiscussion_nullCount + 1 | 0; } var _tmp_CourseDiscussion_isAllNull = _tmp_CourseDiscussion_nullCount === 6; var $receiver = new CourseBlockWithCompleteEntity(); $receiver.expanded = _tmp_expanded; $receiver.cbUid = _tmp_cbUid; $receiver.cbType = _tmp_cbType; $receiver.cbIndentLevel = _tmp_cbIndentLevel; $receiver.cbModuleParentBlockUid = _tmp_cbModuleParentBlockUid; $receiver.cbTitle = _tmp_cbTitle; $receiver.cbDescription = _tmp_cbDescription; $receiver.cbCompletionCriteria = _tmp_cbCompletionCriteria; $receiver.cbHideUntilDate = _tmp_cbHideUntilDate; $receiver.cbDeadlineDate = _tmp_cbDeadlineDate; $receiver.cbLateSubmissionPenalty = _tmp_cbLateSubmissionPenalty; $receiver.cbGracePeriodDate = _tmp_cbGracePeriodDate; $receiver.cbMaxPoints = _tmp_cbMaxPoints; $receiver.cbMinPoints = _tmp_cbMinPoints; $receiver.cbIndex = _tmp_cbIndex; $receiver.cbClazzUid = _tmp_cbClazzUid; $receiver.cbActive = _tmp_cbActive; $receiver.cbHidden = _tmp_cbHidden; $receiver.cbEntityUid = _tmp_cbEntityUid; $receiver.cbLct = _tmp_cbLct; if (!_tmp_ClazzAssignmentWithMetrics_isAllNull) { var $receiver_0 = new ClazzAssignmentWithMetrics(); $receiver_0.fileSubmissionStatus = _tmp_fileSubmissionStatus; $receiver_0.caUid = _tmp_caUid; $receiver_0.caTitle = _tmp_caTitle; $receiver_0.caDescription = _tmp_caDescription; $receiver_0.caGroupUid = _tmp_caGroupUid; $receiver_0.caActive = _tmp_caActive; $receiver_0.caClassCommentEnabled = _tmp_caClassCommentEnabled; $receiver_0.caPrivateCommentsEnabled = _tmp_caPrivateCommentsEnabled; $receiver_0.caCompletionCriteria = _tmp_caCompletionCriteria; $receiver_0.caRequireFileSubmission = _tmp_caRequireFileSubmission; $receiver_0.caFileType = _tmp_caFileType; $receiver_0.caSizeLimit = _tmp_caSizeLimit; $receiver_0.caNumberOfFiles = _tmp_caNumberOfFiles; $receiver_0.caSubmissionPolicy = _tmp_caSubmissionPolicy; $receiver_0.caMarkingType = _tmp_caMarkingType; $receiver_0.caRequireTextSubmission = _tmp_caRequireTextSubmission; $receiver_0.caTextLimitType = _tmp_caTextLimitType; $receiver_0.caTextLimit = _tmp_caTextLimit; $receiver_0.caXObjectUid = _tmp_caXObjectUid; $receiver_0.caClazzUid = _tmp_caClazzUid; $receiver_0.caLocalChangeSeqNum = _tmp_caLocalChangeSeqNum; $receiver_0.caMasterChangeSeqNum = _tmp_caMasterChangeSeqNum; $receiver_0.caLastChangedBy = _tmp_caLastChangedBy; $receiver_0.caLct = _tmp_caLct; if (!_tmp_AssignmentProgressSummary_isAllNull) { var $receiver_1 = new AssignmentProgressSummary(); $receiver_1.notSubmittedStudents = _tmp_notSubmittedStudents; $receiver_1.submittedStudents = _tmp_submittedStudents; $receiver_1.totalStudents = _tmp_totalStudents; $receiver_1.markedStudents = _tmp_markedStudents; $receiver_1.hasMetricsPermission = _tmp_hasMetricsPermission; $receiver_0.progressSummary = $receiver_1; } if (!_tmp_CourseAssignmentMark_isAllNull) { var $receiver_2 = new CourseAssignmentMark(); $receiver_2.camUid = _tmp_camUid; $receiver_2.camAssignmentUid = _tmp_camAssignmentUid; $receiver_2.camSubmitterUid = _tmp_camSubmitterUid; $receiver_2.camMark = _tmp_camMark; $receiver_2.camPenalty = _tmp_camPenalty; $receiver_2.camLct = _tmp_camLct; $receiver_0.mark = $receiver_2; } $receiver.assignment = $receiver_0; } if (!_tmp_ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_isAllNull) { var $receiver_3 = new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer(); $receiver_3.assignmentContentWeight = _tmp_assignmentContentWeight; $receiver_3.contentEntryUid = _tmp_contentEntryUid; $receiver_3.title = _tmp_title; $receiver_3.description = _tmp_description; $receiver_3.entryId = _tmp_entryId; $receiver_3.author = _tmp_author; $receiver_3.publisher = _tmp_publisher; $receiver_3.licenseType = _tmp_licenseType; $receiver_3.licenseName = _tmp_licenseName; $receiver_3.licenseUrl = _tmp_licenseUrl; $receiver_3.sourceUrl = _tmp_sourceUrl; $receiver_3.thumbnailUrl = _tmp_thumbnailUrl; $receiver_3.lastModified = _tmp_lastModified; $receiver_3.primaryLanguageUid = _tmp_primaryLanguageUid; $receiver_3.languageVariantUid = _tmp_languageVariantUid; $receiver_3.contentFlags = _tmp_contentFlags; $receiver_3.leaf = _tmp_leaf; $receiver_3.publik = _tmp_publik; $receiver_3.ceInactive = _tmp_ceInactive; $receiver_3.completionCriteria = _tmp_completionCriteria; $receiver_3.minScore = _tmp_minScore; $receiver_3.contentTypeFlag = _tmp_contentTypeFlag; $receiver_3.contentOwner = _tmp_contentOwner; $receiver_3.contentEntryLocalChangeSeqNum = _tmp_contentEntryLocalChangeSeqNum; $receiver_3.contentEntryMasterChangeSeqNum = _tmp_contentEntryMasterChangeSeqNum; $receiver_3.contentEntryLastChangedBy = _tmp_contentEntryLastChangedBy; $receiver_3.contentEntryLct = _tmp_contentEntryLct; if (!_tmp_Container_isAllNull) { var $receiver_4 = new Container(); $receiver_4.containerUid = _tmp_containerUid; $receiver_4.cntLocalCsn = _tmp_cntLocalCsn; $receiver_4.cntMasterCsn = _tmp_cntMasterCsn; $receiver_4.cntLastModBy = _tmp_cntLastModBy; $receiver_4.cntLct = _tmp_cntLct; $receiver_4.fileSize = _tmp_fileSize; $receiver_4.containerContentEntryUid = _tmp_containerContentEntryUid; $receiver_4.cntLastModified = _tmp_cntLastModified; $receiver_4.mimeType = _tmp_mimeType; $receiver_4.remarks = _tmp_remarks; $receiver_4.mobileOptimized = _tmp_mobileOptimized; $receiver_4.cntNumEntries = _tmp_cntNumEntries; $receiver_3.mostRecentContainer = $receiver_4; } if (!_tmp_ContentEntryParentChildJoin_isAllNull) { var $receiver_5 = new ContentEntryParentChildJoin(); $receiver_5.cepcjUid = _tmp_cepcjUid; $receiver_5.cepcjLocalChangeSeqNum = _tmp_cepcjLocalChangeSeqNum; $receiver_5.cepcjMasterChangeSeqNum = _tmp_cepcjMasterChangeSeqNum; $receiver_5.cepcjLastChangedBy = _tmp_cepcjLastChangedBy; $receiver_5.cepcjLct = _tmp_cepcjLct; $receiver_5.cepcjParentContentEntryUid = _tmp_cepcjParentContentEntryUid; $receiver_5.cepcjChildContentEntryUid = _tmp_cepcjChildContentEntryUid; $receiver_5.childIndex = _tmp_childIndex; $receiver_3.contentEntryParentChildJoin = $receiver_5; } if (!_tmp_ContentEntryStatementScoreProgress_isAllNull) { var $receiver_6 = new ContentEntryStatementScoreProgress(); $receiver_6.resultScore = _tmp_resultScore; $receiver_6.resultMax = _tmp_resultMax; $receiver_6.resultScaled = _tmp_resultScaled; $receiver_6.resultWeight = _tmp_resultWeight; $receiver_6.contentComplete = _tmp_contentComplete; $receiver_6.progress = _tmp_progress; $receiver_6.success = _tmp_success; $receiver_6.penalty = _tmp_penalty; $receiver_6.totalContent = _tmp_totalContent; $receiver_6.totalCompletedContent = _tmp_totalCompletedContent; $receiver_3.scoreProgress = $receiver_6; } $receiver.entry = $receiver_3; } if (!_tmp_CourseDiscussion_isAllNull) { var $receiver_7 = new CourseDiscussion(); $receiver_7.courseDiscussionUid = _tmp_courseDiscussionUid; $receiver_7.courseDiscussionTitle = _tmp_courseDiscussionTitle; $receiver_7.courseDiscussionDesc = _tmp_courseDiscussionDesc; $receiver_7.courseDiscussionClazzUid = _tmp_courseDiscussionClazzUid; $receiver_7.courseDiscussionActive = _tmp_courseDiscussionActive; $receiver_7.courseDiscussionLct = _tmp_courseDiscussionLct; $receiver.courseDiscussion = $receiver_7; } return $receiver; }; } function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$collapseList = closure$collapseList_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$clazzUid); this.local$_stmt.setArray_wqp8hw$(6, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$collapseList))); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$currentTime); this.local$_stmt.setArray_wqp8hw$(15, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$collapseList))); this.local$_stmt.setInt_vux9f0$(16, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(17, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda(this$CourseBlockDao_JdbcKt_0, closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseBlockDao_JdbcKt = this$CourseBlockDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$collapseList = closure$collapseList_0; this.local$closure$currentTime = closure$currentTime_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseBlockDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | WITH CtePermissionCheck (hasPermission) \n | AS (SELECT EXISTS( \n | SELECT PrsGrpMbr.groupMemberPersonUid\n | FROM Clazz\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 549755813888\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | WHERE Clazz.clazzUid = ?\n | AND PrsGrpMbr.groupMemberPersonUid = ?)), \n | \n | \n | SubmitterList (submitterId, assignmentUid)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId,\n | ClazzAssignment.caUid AS assignmentUid\n | \n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, assignmentUid\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ClazzAssignment.caUid AS assignmentUid\n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, assignmentUid\n | )\n | \n | \n |\n | SELECT CourseBlock.*, ClazzAssignment.*, ContentEntry.*, CourseDiscussion.*, ContentEntryParentChildJoin.*, \n | Container.*, CourseAssignmentMark.*, (CourseBlock.cbUid NOT IN (?)) AS expanded,\n | \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | \n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 AS assignmentContentWeight,\n | 1 as totalContent, \n | 0 as penalty,\n | \n | (SELECT hasPermission FROM CtePermissionCheck) AS hasMetricsPermission,\n | \n | \n | (SELECT COUNT(*) \n | FROM SubmitterList \n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid) \n | AS totalStudents, \n | \n | 0 AS notSubmittedStudents,\n | \n | (CASE WHEN (SELECT hasPermission \n | FROM CtePermissionCheck)\n | THEN (SELECT COUNT(DISTINCT CourseAssignmentSubmission.casSubmitterUid) \n | FROM CourseAssignmentSubmission\n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentMark.camAssignmentUid = CourseAssignmentSubmission.casAssignmentUid\n | WHERE CourseAssignmentMark.camUid IS NULL\n | AND CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | AND CourseAssignmentSubmission.casSubmitterUid IN \n | (SELECT submitterId \n | FROM SubmitterList\n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid)) \n | ELSE 0 END) AS submittedStudents, \n | \n | (CASE WHEN (SELECT hasPermission \n | FROM CtePermissionCheck) \n | THEN (SELECT COUNT(DISTINCT CourseAssignmentMark.camSubmitterUid) \n | FROM CourseAssignmentMark\n | \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentSubmission.casAssignmentUid = CourseAssignmentMark.camAssignmentUid\n | \n | WHERE CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid \n | AND CourseAssignmentMark.camSubmitterUid IN (SELECT submitterId \n | FROM SubmitterList\n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid))\n | ELSE 0 END) AS markedStudents,\n | \n | COALESCE((CASE WHEN CourseAssignmentMark.camUid IS NOT NULL \n | THEN 2 \n | WHEN CourseAssignmentSubmission.casUid IS NOT NULL \n | THEN 1 \n | ELSE 0 END), \n | 0) AS fileSubmissionStatus\n | \n | \n | FROM CourseBlock \n | \n | LEFT JOIN CourseBlock AS parentBlock\n | ON CourseBlock.cbModuleParentBlockUid = parentBlock.cbUid\n | AND CourseBlock.cbTYpe != 100\n | \n | LEFT JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 103\n | \n | LEFT JOIN ContentEntry\n | ON ContentEntry.contentEntryUid = CourseBlock.cbEntityUid\n | AND NOT ceInactive\n | AND CourseBlock.cbType = 104\n | \n | LEFT JOIN CourseDiscussion \n | ON CourseDiscussion.courseDiscussionUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 105\n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid\n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | LEFT JOIN StatementEntity\n |\t\t\t\t ON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, \n | extensionProgress DESC, \n | resultSuccess DESC \n | LIMIT 1) \n | \n | LEFT JOIN CourseAssignmentSubmission\n | ON casUid = (SELECT casUid \n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ClazzAssignment.caUid\n | AND casSubmitterUid = (SELECT (CASE WHEN ref.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber \n | END) as submitterUid\n | FROM ClazzAssignment AS ref\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE ref.caUid = ClazzAssignment.caUid)\n | ORDER BY casTimestamp DESC\n | LIMIT 1)\n | \n | LEFT JOIN CourseAssignmentMark\n | ON camUid = (SELECT camUid \n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ClazzAssignment.caUid\n | AND camSubmitterUid = (SELECT (CASE WHEN ref.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber \n | END) as submitterUid\n | FROM ClazzAssignment AS ref\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE ref.caUid = ClazzAssignment.caUid)\n | ORDER BY camLct DESC\n | LIMIT 1) \n | WHERE CourseBlock.cbClazzUid = ?\n | AND CourseBlock.cbActive\n | AND NOT CourseBlock.cbHidden\n | AND ? > CourseBlock.cbHideUntilDate\n | AND ? > COALESCE(parentBlock.cbHideUntilDate,0)\n | AND CourseBlock.cbModuleParentBlockUid NOT IN (?)\n | ORDER BY CourseBlock.cbIndex\n | ) LIMIT ? OFFSET ?\n "), true), CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda$lambda(this.local$closure$clazzUid, this.local$closure$personUid, this.local$closure$collapseList, this.local$closure$currentTime, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda(this$CourseBlockDao_JdbcKt_0, closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda(this$CourseBlockDao_JdbcKt_0, closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$CourseBlockDao_JdbcKt._db, listOf(['CourseBlock', 'ClazzAssignment', 'CourseDiscussion', 'ContentEntry', 'CourseAssignmentMark', 'StatementEntity', 'Container', 'ContentEntryParentChildJoin', 'PersonGroupMember', 'Clazz', 'ScopedGrant', 'ClazzEnrolment', 'CourseAssignmentSubmission', 'CourseGroupMember']), CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getData$lambda(this.this$CourseBlockDao_JdbcKt, this.closure$clazzUid, this.closure$personUid, this.closure$collapseList, this.closure$currentTime, _limit, _offset)); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$collapseList = closure$collapseList_0; this.local$closure$currentTime = closure$currentTime_0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$clazzUid); this.local$_stmt.setArray_wqp8hw$(6, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$collapseList))); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$clazzUid); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$currentTime); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$currentTime); this.local$_stmt.setArray_wqp8hw$(15, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$collapseList))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda(this$CourseBlockDao_JdbcKt_0, closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseBlockDao_JdbcKt = this$CourseBlockDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$collapseList = closure$collapseList_0; this.local$closure$currentTime = closure$currentTime_0; } Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda; Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseBlockDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | WITH CtePermissionCheck (hasPermission) \n | AS (SELECT EXISTS( \n | SELECT PrsGrpMbr.groupMemberPersonUid\n | FROM Clazz\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 549755813888\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | WHERE Clazz.clazzUid = ?\n | AND PrsGrpMbr.groupMemberPersonUid = ?)), \n | \n | \n | SubmitterList (submitterId, assignmentUid)\n | AS (SELECT DISTINCT ClazzEnrolment.clazzEnrolmentPersonUid AS submitterId,\n | ClazzAssignment.caUid AS assignmentUid\n | \n | FROM ClazzEnrolment\n | \n | JOIN Person \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | \n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = ?\n |\n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | WHERE ClazzAssignment.caGroupUid = 0\n | AND clazzEnrolmentClazzUid = ?\n | AND clazzEnrolmentActive\n | AND clazzEnrolmentRole = 1000\n | AND CourseBlock.cbGracePeriodDate <= ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentDateJoined <= CourseBlock.cbGracePeriodDate\n | GROUP BY submitterId, assignmentUid\n | UNION \n | SELECT DISTINCT CourseGroupMember.cgmGroupNumber AS submitterId,\n | ClazzAssignment.caUid AS assignmentUid\n | FROM CourseGroupMember\n | JOIN ClazzAssignment\n | ON ClazzAssignment.caClazzUid = ?\n | WHERE CourseGroupMember.cgmSetUid = ClazzAssignment.caGroupUid\n | AND ClazzAssignment.caGroupUid != 0\n | AND CourseGroupMember.cgmGroupNumber != 0\n | GROUP BY submitterId, assignmentUid\n | )\n | \n | \n |\n | SELECT CourseBlock.*, ClazzAssignment.*, ContentEntry.*, CourseDiscussion.*, ContentEntryParentChildJoin.*, \n | Container.*, CourseAssignmentMark.*, (CourseBlock.cbUid NOT IN (?)) AS expanded,\n | \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | \n | COALESCE((CASE WHEN StatementEntity.resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 0 AS assignmentContentWeight,\n | 1 as totalContent, \n | 0 as penalty,\n | \n | (SELECT hasPermission FROM CtePermissionCheck) AS hasMetricsPermission,\n | \n | \n | (SELECT COUNT(*) \n | FROM SubmitterList \n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid) \n | AS totalStudents, \n | \n | 0 AS notSubmittedStudents,\n | \n | (CASE WHEN (SELECT hasPermission \n | FROM CtePermissionCheck)\n | THEN (SELECT COUNT(DISTINCT CourseAssignmentSubmission.casSubmitterUid) \n | FROM CourseAssignmentSubmission\n | LEFT JOIN CourseAssignmentMark\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentMark.camAssignmentUid = CourseAssignmentSubmission.casAssignmentUid\n | WHERE CourseAssignmentMark.camUid IS NULL\n | AND CourseAssignmentSubmission.casAssignmentUid = ClazzAssignment.caUid\n | AND CourseAssignmentSubmission.casSubmitterUid IN \n | (SELECT submitterId \n | FROM SubmitterList\n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid)) \n | ELSE 0 END) AS submittedStudents, \n | \n | (CASE WHEN (SELECT hasPermission \n | FROM CtePermissionCheck) \n | THEN (SELECT COUNT(DISTINCT CourseAssignmentMark.camSubmitterUid) \n | FROM CourseAssignmentMark\n | \n | JOIN CourseAssignmentSubmission\n | ON CourseAssignmentSubmission.casSubmitterUid = CourseAssignmentMark.camSubmitterUid\n | AND CourseAssignmentSubmission.casAssignmentUid = CourseAssignmentMark.camAssignmentUid\n | \n | WHERE CourseAssignmentMark.camAssignmentUid = ClazzAssignment.caUid \n | AND CourseAssignmentMark.camSubmitterUid IN (SELECT submitterId \n | FROM SubmitterList\n | WHERE SubmitterList.assignmentUid = ClazzAssignment.caUid))\n | ELSE 0 END) AS markedStudents,\n | \n | COALESCE((CASE WHEN CourseAssignmentMark.camUid IS NOT NULL \n | THEN 2 \n | WHEN CourseAssignmentSubmission.casUid IS NOT NULL \n | THEN 1 \n | ELSE 0 END), \n | 0) AS fileSubmissionStatus\n | \n | \n | FROM CourseBlock \n | \n | LEFT JOIN CourseBlock AS parentBlock\n | ON CourseBlock.cbModuleParentBlockUid = parentBlock.cbUid\n | AND CourseBlock.cbTYpe != 100\n | \n | LEFT JOIN ClazzAssignment\n | ON ClazzAssignment.caUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 103\n | \n | LEFT JOIN ContentEntry\n | ON ContentEntry.contentEntryUid = CourseBlock.cbEntityUid\n | AND NOT ceInactive\n | AND CourseBlock.cbType = 104\n | \n | LEFT JOIN CourseDiscussion \n | ON CourseDiscussion.courseDiscussionUid = CourseBlock.cbEntityUid\n | AND CourseBlock.cbType = 105\n | \n | LEFT JOIN ContentEntryParentChildJoin \n | ON ContentEntryParentChildJoin.cepcjChildContentEntryUid = ContentEntry.contentEntryUid\n | \n | LEFT JOIN Container \n | ON Container.containerUid = \n | (SELECT containerUid \n | FROM Container \n | WHERE containerContentEntryUid = ContentEntry.contentEntryUid \n | ORDER BY cntLastModified DESC LIMIT 1)\n | \n | LEFT JOIN StatementEntity\n |\t\t\t\t ON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, \n | extensionProgress DESC, \n | resultSuccess DESC \n | LIMIT 1) \n | \n | LEFT JOIN CourseAssignmentSubmission\n | ON casUid = (SELECT casUid \n | FROM CourseAssignmentSubmission\n | WHERE casAssignmentUid = ClazzAssignment.caUid\n | AND casSubmitterUid = (SELECT (CASE WHEN ref.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber \n | END) as submitterUid\n | FROM ClazzAssignment AS ref\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE ref.caUid = ClazzAssignment.caUid)\n | ORDER BY casTimestamp DESC\n | LIMIT 1)\n | \n | LEFT JOIN CourseAssignmentMark\n | ON camUid = (SELECT camUid \n | FROM CourseAssignmentMark\n | WHERE camAssignmentUid = ClazzAssignment.caUid\n | AND camSubmitterUid = (SELECT (CASE WHEN ref.caGroupUid = 0 \n | THEN ? \n | WHEN CourseGroupMember.cgmUid IS NULL \n | THEN 0 \n | ELSE CourseGroupMember.cgmGroupNumber \n | END) as submitterUid\n | FROM ClazzAssignment AS ref\n | LEFT JOIN CourseGroupMember\n | ON cgmSetUid = ClazzAssignment.caGroupUid\n | AND cgmPersonUid = ?\n | WHERE ref.caUid = ClazzAssignment.caUid)\n | ORDER BY camLct DESC\n | LIMIT 1) \n | WHERE CourseBlock.cbClazzUid = ?\n | AND CourseBlock.cbActive\n | AND NOT CourseBlock.cbHidden\n | AND ? > CourseBlock.cbHideUntilDate\n | AND ? > COALESCE(parentBlock.cbHideUntilDate,0)\n | AND CourseBlock.cbModuleParentBlockUid NOT IN (?)\n | ORDER BY CourseBlock.cbIndex\n | ) \n "), true), CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda$lambda(this.local$closure$clazzUid, this.local$closure$personUid, this.local$closure$collapseList, this.local$closure$currentTime), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda(this$CourseBlockDao_JdbcKt_0, closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda(this$CourseBlockDao_JdbcKt_0, closure$clazzUid_0, closure$personUid_0, closure$collapseList_0, closure$currentTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$CourseBlockDao_JdbcKt._db, listOf(['CourseBlock', 'ClazzAssignment', 'CourseDiscussion', 'ContentEntry', 'CourseAssignmentMark', 'StatementEntity', 'Container', 'ContentEntryParentChildJoin', 'PersonGroupMember', 'Clazz', 'ScopedGrant', 'ClazzEnrolment', 'CourseAssignmentSubmission', 'CourseGroupMember']), CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral$getLength$lambda(this.this$CourseBlockDao_JdbcKt, this.closure$clazzUid, this.closure$personUid, this.closure$collapseList, this.closure$currentTime)); }; CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; CourseBlockDao_JdbcKt.prototype.findAllCourseBlockByClazzUidLive_uwwcm7$ = function (clazzUid, personUid, collapseList, currentTime) { return new CourseBlockDao_JdbcKt$findAllCourseBlockByClazzUidLive$ObjectLiteral(this, clazzUid, personUid, collapseList, currentTime); }; function Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$cbUid = closure$cbUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda.prototype.constructor = Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda; Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$cbUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseBlockDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseBlockDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateActiveByUid_zaz62j$_2($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_2.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_2; Coroutine$updateActiveByUid_zaz62j$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE CourseBlock \n | SET cbActive = ?, \n | cbLct = ?\n | WHERE cbUid = ?\n ')), CourseBlockDao_JdbcKt$updateActiveByUid$lambda(this.local$active, this.local$changeTime, this.local$cbUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_JdbcKt.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_2(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO CourseBlock (cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints, cbMinPoints, cbIndex, cbClazzUid, cbActive, cbHidden, cbEntityUid, cbLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cbUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cbUid); } stmt.setInt_vux9f0$(2, entity.cbType); stmt.setInt_vux9f0$(3, entity.cbIndentLevel); stmt.setLong_6svq3l$(4, entity.cbModuleParentBlockUid); stmt.setString_vqvrqt$(5, entity.cbTitle); stmt.setString_vqvrqt$(6, entity.cbDescription); stmt.setInt_vux9f0$(7, entity.cbCompletionCriteria); stmt.setLong_6svq3l$(8, entity.cbHideUntilDate); stmt.setLong_6svq3l$(9, entity.cbDeadlineDate); stmt.setInt_vux9f0$(10, entity.cbLateSubmissionPenalty); stmt.setLong_6svq3l$(11, entity.cbGracePeriodDate); stmt.setInt_vux9f0$(12, entity.cbMaxPoints); stmt.setInt_vux9f0$(13, entity.cbMinPoints); stmt.setInt_vux9f0$(14, entity.cbIndex); stmt.setLong_6svq3l$(15, entity.cbClazzUid); stmt.setBoolean_fzusl$(16, entity.cbActive); stmt.setBoolean_fzusl$(17, entity.cbHidden); stmt.setLong_6svq3l$(18, entity.cbEntityUid); stmt.setLong_6svq3l$(19, entity.cbLct); }; CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO CourseBlock (cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints, cbMinPoints, cbIndex, cbClazzUid, cbActive, cbHidden, cbEntityUid, cbLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cbUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cbUid); } stmt.setInt_vux9f0$(2, entity.cbType); stmt.setInt_vux9f0$(3, entity.cbIndentLevel); stmt.setLong_6svq3l$(4, entity.cbModuleParentBlockUid); stmt.setString_vqvrqt$(5, entity.cbTitle); stmt.setString_vqvrqt$(6, entity.cbDescription); stmt.setInt_vux9f0$(7, entity.cbCompletionCriteria); stmt.setLong_6svq3l$(8, entity.cbHideUntilDate); stmt.setLong_6svq3l$(9, entity.cbDeadlineDate); stmt.setInt_vux9f0$(10, entity.cbLateSubmissionPenalty); stmt.setLong_6svq3l$(11, entity.cbGracePeriodDate); stmt.setInt_vux9f0$(12, entity.cbMaxPoints); stmt.setInt_vux9f0$(13, entity.cbMinPoints); stmt.setInt_vux9f0$(14, entity.cbIndex); stmt.setLong_6svq3l$(15, entity.cbClazzUid); stmt.setBoolean_fzusl$(16, entity.cbActive); stmt.setBoolean_fzusl$(17, entity.cbHidden); stmt.setLong_6svq3l$(18, entity.cbEntityUid); stmt.setLong_6svq3l$(19, entity.cbLct); }; CourseBlockDao_JdbcKt$_insertAdapterCourseBlock_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseBlockDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseBlockDao_JdbcKt', interfaces: [CourseBlockDao]}; function CourseBlockDao_ReplicateWrapper(_db, _dao) { CourseBlockDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_69($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_69.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_69.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_69.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_69; Coroutine$replicateOnNewNode_s8cxhz$_69.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_69(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_66($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_66.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_66.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_66.prototype.constructor = Coroutine$replicateOnChange_66; Coroutine$replicateOnChange_66.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_66(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; CourseBlockDao_ReplicateWrapper.prototype.updateAsync_dk05ec$ = function (entity, continuation) { entity.cbLct = systemTimeInMillis(); return this._dao_0.updateAsync_dk05ec$(entity, continuation); }; function Coroutine$replaceListAsync_u9gaf9$_0($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$list = list_0; } Coroutine$replaceListAsync_u9gaf9$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_u9gaf9$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_u9gaf9$_0.prototype.constructor = Coroutine$replaceListAsync_u9gaf9$_0; Coroutine$replaceListAsync_u9gaf9$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$list.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.cbUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(124, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.cbUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.cbLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.replaceListAsync_u9gaf9$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.replaceListAsync_u9gaf9$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_u9gaf9$_0(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_ReplicateWrapper.prototype.findAllCourseBlockByClazzUidAsync_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.findAllCourseBlockByClazzUidAsync_s8cxhz$(clazzUid, continuation); }; CourseBlockDao_ReplicateWrapper.prototype.findAllCourseBlockByClazzUidLive_uwwcm7$ = function (clazzUid, personUid, collapseList, currentTime) { return this._dao_0.findAllCourseBlockByClazzUidLive_uwwcm7$(clazzUid, personUid, collapseList, currentTime); }; function Coroutine$updateActiveByUid_zaz62j$_3($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_3.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_3; Coroutine$updateActiveByUid_zaz62j$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateActiveByUid_zaz62j$(this.local$cbUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_3(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_75($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_75.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_75.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_75.prototype.constructor = Coroutine$insertAsync_75; Coroutine$insertAsync_75.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cbUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(124, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.cbUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cbLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.cbUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_75(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseBlockDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseBlockDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_6($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_6.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_6; Coroutine$insertListAsync_4ezy5m$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.cbUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(124, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.cbUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.cbLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_6(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_6($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_6.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_6; Coroutine$updateListAsync_4ezy5m$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.cbLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_6(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseBlockDao_ReplicateWrapper', interfaces: [CourseBlockDao]}; function CourseBlockDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseBlockDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_70($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_70.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_70.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_70.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_70; Coroutine$replicateOnNewNode_s8cxhz$_70.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_70(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_67($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_67.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_67.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_67.prototype.constructor = Coroutine$replicateOnChange_67; Coroutine$replicateOnChange_67.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_67(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$_4($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_4.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_4; Coroutine$findByUidAsync_s8cxhz$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_4(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_dk05ec$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_dk05ec$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_dk05ec$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_dk05ec$_0.prototype.constructor = Coroutine$updateAsync_dk05ec$_0; Coroutine$updateAsync_dk05ec$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_dk05ec$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.updateAsync_dk05ec$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_dk05ec$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceListAsync_u9gaf9$_1($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$replaceListAsync_u9gaf9$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_u9gaf9$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_u9gaf9$_1.prototype.constructor = Coroutine$replaceListAsync_u9gaf9$_1; Coroutine$replaceListAsync_u9gaf9$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replaceListAsync_u9gaf9$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.replaceListAsync_u9gaf9$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_u9gaf9$_1(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$.prototype.constructor = Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$; Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllCourseBlockByClazzUidAsync_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.findAllCourseBlockByClazzUidAsync_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllCourseBlockByClazzUidAsync_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_Repo.prototype.findAllCourseBlockByClazzUidLive_uwwcm7$ = function (clazzUid, personUid, collapseList, currentTime) { var _result = this._dao.findAllCourseBlockByClazzUidLive_uwwcm7$(clazzUid, personUid, collapseList, currentTime); return _result; }; function Coroutine$updateActiveByUid_zaz62j$_4($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_4.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_4; Coroutine$updateActiveByUid_zaz62j$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateActiveByUid_zaz62j$(this.local$cbUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_4(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_76($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_76.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_76.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_76.prototype.constructor = Coroutine$insertAsync_76; Coroutine$insertAsync_76.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_76(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseBlockDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseBlockDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_7($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_7.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_7; Coroutine$insertListAsync_4ezy5m$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_7(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_7($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_7.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_7; Coroutine$updateListAsync_4ezy5m$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseBlockDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_7(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseBlockDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseBlockDao_Repo', interfaces: [CourseBlockDao]}; function CourseDiscussionDao() { } CourseDiscussionDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseDiscussionDao', interfaces: [OneToManyJoinDao, BaseDao]}; function CourseDiscussionDao_JdbcKt(_db) { CourseDiscussionDao.call(this); this._db = _db; this._insertAdapterCourseDiscussion_upsert = new CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral(this._db); this._insertAdapterCourseDiscussion_ = new CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral(this._db); } function Coroutine$replaceListAsync_4f5xb2$($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$replaceListAsync_4f5xb2$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_4f5xb2$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_4f5xb2$.prototype.constructor = Coroutine$replaceListAsync_4f5xb2$; Coroutine$replaceListAsync_4f5xb2$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseDiscussion_upsert.insertListAsync_4ezy5m$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.replaceListAsync_4f5xb2$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_4f5xb2$(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseDiscussion_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_77($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_77.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_77.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_77.prototype.constructor = Coroutine$insertAsync_77; Coroutine$insertAsync_77.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseDiscussion_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_77(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseDiscussion_.insertList_4ezy5m$(entityList); }; function Coroutine$insertListAsync_4ezy5m$_8($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_8.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_8; Coroutine$insertListAsync_4ezy5m$_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseDiscussion_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_8(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseDiscussionDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.courseDiscussionTitle); _stmt.setString_vqvrqt$(2, _entity.courseDiscussionDesc); _stmt.setLong_6svq3l$(3, _entity.courseDiscussionClazzUid); _stmt.setBoolean_fzusl$(4, _entity.courseDiscussionActive); _stmt.setLong_6svq3l$(5, _entity.courseDiscussionLct); _stmt.setLong_6svq3l$(6, _entity.courseDiscussionUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseDiscussionDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseDiscussion SET courseDiscussionTitle = ?, courseDiscussionDesc = ?, courseDiscussionClazzUid = ?, courseDiscussionActive = ?, courseDiscussionLct = ? WHERE courseDiscussionUid = ?'; prepareAndUseStatement(this._db, _sql, CourseDiscussionDao_JdbcKt$updateList$lambda(entityList)); }; function CourseDiscussionDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.courseDiscussionTitle); _stmt.setString_vqvrqt$(2, closure$entity.courseDiscussionDesc); _stmt.setLong_6svq3l$(3, closure$entity.courseDiscussionClazzUid); _stmt.setBoolean_fzusl$(4, closure$entity.courseDiscussionActive); _stmt.setLong_6svq3l$(5, closure$entity.courseDiscussionLct); _stmt.setLong_6svq3l$(6, closure$entity.courseDiscussionUid); return _stmt.executeUpdate(); }; } CourseDiscussionDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseDiscussion SET courseDiscussionTitle = ?, courseDiscussionDesc = ?, courseDiscussionClazzUid = ?, courseDiscussionActive = ?, courseDiscussionLct = ? WHERE courseDiscussionUid = ?'; prepareAndUseStatement(this._db, _sql, CourseDiscussionDao_JdbcKt$update$lambda(entity)); }; function Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda; Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setString_vqvrqt$(1, _entity.courseDiscussionTitle); this.local$_stmt.setString_vqvrqt$(2, _entity.courseDiscussionDesc); this.local$_stmt.setLong_6svq3l$(3, _entity.courseDiscussionClazzUid); this.local$_stmt.setBoolean_fzusl$(4, _entity.courseDiscussionActive); this.local$_stmt.setLong_6svq3l$(5, _entity.courseDiscussionLct); this.local$_stmt.setLong_6svq3l$(6, _entity.courseDiscussionUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseDiscussionDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseDiscussionDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_8($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_8.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_8; Coroutine$updateListAsync_4ezy5m$_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE CourseDiscussion SET courseDiscussionTitle = ?, courseDiscussionDesc = ?, courseDiscussionClazzUid = ?, courseDiscussionActive = ?, courseDiscussionLct = ? WHERE courseDiscussionUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CourseDiscussionDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_8(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_71($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_71.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_71.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_71.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_71; Coroutine$replicateOnNewNode_s8cxhz$_71.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseDiscussionReplicate(courseDiscussionPk, courseDiscussionDestination)\n | SELECT DISTINCT CourseDiscussion.courseDiscussionUid AS courseDiscussionPk,\n | ? AS courseDiscussionDestination\n | \n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN CourseDiscussion \n | ON CourseDiscussion.courseDiscussionClazzUid = Clazz.clazzUid\n | \n | WHERE CourseDiscussion.courseDiscussionLct != COALESCE(\n | (SELECT courseDiscussionVersionId\n | FROM courseDiscussionReplicate\n | WHERE courseDiscussionPk = CourseDiscussion.courseDiscussionUid\n | AND courseDiscussionDestination = ?), 0) \n | /*psql ON CONFLICT(courseDiscussionPk, courseDiscussionDestination) DO UPDATE\n | SET courseDiscussionPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseDiscussionReplicate(courseDiscussionPk, courseDiscussionDestination)\n | SELECT DISTINCT CourseDiscussion.courseDiscussionUid AS courseDiscussionPk,\n | ? AS courseDiscussionDestination\n | \n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN CourseDiscussion \n | ON CourseDiscussion.courseDiscussionClazzUid = Clazz.clazzUid\n | \n | WHERE CourseDiscussion.courseDiscussionLct != COALESCE(\n | (SELECT courseDiscussionVersionId\n | FROM courseDiscussionReplicate\n | WHERE courseDiscussionPk = CourseDiscussion.courseDiscussionUid\n | AND courseDiscussionDestination = ?), 0) \n | ON CONFLICT(courseDiscussionPk, courseDiscussionDestination) DO UPDATE\n | SET courseDiscussionPending = true\n | \n | \n |')), CourseDiscussionDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_71(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseDiscussionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseDiscussionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_68($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_68.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_68.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_68.prototype.constructor = Coroutine$replicateOnChange_68; Coroutine$replicateOnChange_68.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseDiscussionReplicate(courseDiscussionPk, courseDiscussionDestination)\n | SELECT DISTINCT CourseDiscussion.courseDiscussionUid AS courseDiscussionUid,\n | UserSession.usClientNodeId AS courseDiscussionDestination\n | FROM ChangeLog\n | JOIN CourseDiscussion\n | ON ChangeLog.chTableId = 130\n | AND ChangeLog.chEntityPk = CourseDiscussion.courseDiscussionUid\n | JOIN Clazz\n | ON Clazz.clazzUid = CourseDiscussion.courseDiscussionClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseDiscussion.courseDiscussionLct != COALESCE(\n | (SELECT courseDiscussionVersionId\n | FROM courseDiscussionReplicate\n | WHERE courseDiscussionPk = CourseDiscussion.courseDiscussionUid\n | AND courseDiscussionDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(courseDiscussionPk, courseDiscussionDestination) DO UPDATE\n | SET courseDiscussionPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseDiscussionReplicate(courseDiscussionPk, courseDiscussionDestination)\n | SELECT DISTINCT CourseDiscussion.courseDiscussionUid AS courseDiscussionUid,\n | UserSession.usClientNodeId AS courseDiscussionDestination\n | FROM ChangeLog\n | JOIN CourseDiscussion\n | ON ChangeLog.chTableId = 130\n | AND ChangeLog.chEntityPk = CourseDiscussion.courseDiscussionUid\n | JOIN Clazz\n | ON Clazz.clazzUid = CourseDiscussion.courseDiscussionClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseDiscussion.courseDiscussionLct != COALESCE(\n | (SELECT courseDiscussionVersionId\n | FROM courseDiscussionReplicate\n | WHERE courseDiscussionPk = CourseDiscussion.courseDiscussionUid\n | AND courseDiscussionDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(courseDiscussionPk, courseDiscussionDestination) DO UPDATE\n | SET courseDiscussionPending = true\n | \n | \n |')), CourseDiscussionDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_68(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$cbUid = closure$cbUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda.prototype.constructor = Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda; Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$cbUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$cbUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateActiveByUid_zaz62j$_5($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_5.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_5; Coroutine$updateActiveByUid_zaz62j$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE CourseDiscussion \n | SET courseDiscussionActive = ?, \n | courseDiscussionLct = ?\n | WHERE courseDiscussionUid = ?\n ')), CourseDiscussionDao_JdbcKt$updateActiveByUid$lambda(this.local$active, this.local$changeTime, this.local$cbUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_JdbcKt.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_5(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_courseDiscussionUid = closure$_result.getLong_61zpoe$('courseDiscussionUid'); var _tmp_courseDiscussionTitle = closure$_result.getString_61zpoe$('courseDiscussionTitle'); var _tmp_courseDiscussionDesc = closure$_result.getString_61zpoe$('courseDiscussionDesc'); var _tmp_courseDiscussionClazzUid = closure$_result.getLong_61zpoe$('courseDiscussionClazzUid'); var _tmp_courseDiscussionActive = closure$_result.getBoolean_61zpoe$('courseDiscussionActive'); var _tmp_courseDiscussionLct = closure$_result.getLong_61zpoe$('courseDiscussionLct'); var $receiver = new CourseDiscussion(); $receiver.courseDiscussionUid = _tmp_courseDiscussionUid; $receiver.courseDiscussionTitle = _tmp_courseDiscussionTitle; $receiver.courseDiscussionDesc = _tmp_courseDiscussionDesc; $receiver.courseDiscussionClazzUid = _tmp_courseDiscussionClazzUid; $receiver.courseDiscussionActive = _tmp_courseDiscussionActive; $receiver.courseDiscussionLct = _tmp_courseDiscussionLct; return $receiver; }; } function CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda(closure$courseDiscussionUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$courseDiscussionUid = closure$courseDiscussionUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda.prototype.constructor = Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda; Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$courseDiscussionUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda(closure$courseDiscussionUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda(closure$courseDiscussionUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda(this$CourseDiscussionDao_JdbcKt_0, closure$courseDiscussionUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseDiscussionDao_JdbcKt = this$CourseDiscussionDao_JdbcKt_0; this.local$closure$courseDiscussionUid = closure$courseDiscussionUid_0; } Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda.prototype.constructor = Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda; Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseDiscussionDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT CourseDiscussion.* \n | FROM CourseDiscussion\n | WHERE CourseDiscussion.courseDiscussionUid = ? \n | AND CAST(CourseDiscussion.courseDiscussionActive AS INTEGER) = 1 \n | \n | \n ')), CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda$lambda(this.local$closure$courseDiscussionUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda(this$CourseDiscussionDao_JdbcKt_0, closure$courseDiscussionUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda(this$CourseDiscussionDao_JdbcKt_0, closure$courseDiscussionUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseDiscussionDao_JdbcKt.prototype.getCourseDiscussionByUid_s8cxhz$ = function (courseDiscussionUid) { return new LiveDataImpl(this._db, listOf_0('CourseDiscussion'), CourseDiscussionDao_JdbcKt$getCourseDiscussionByUid$lambda(this, courseDiscussionUid)); }; function CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO CourseDiscussion (courseDiscussionUid, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionActive, courseDiscussionLct) VALUES(?, ?, ?, ?, ?, ?)'; }; CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.courseDiscussionUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.courseDiscussionUid); } stmt.setString_vqvrqt$(2, entity.courseDiscussionTitle); stmt.setString_vqvrqt$(3, entity.courseDiscussionDesc); stmt.setLong_6svq3l$(4, entity.courseDiscussionClazzUid); stmt.setBoolean_fzusl$(5, entity.courseDiscussionActive); stmt.setLong_6svq3l$(6, entity.courseDiscussionLct); }; CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO CourseDiscussion (courseDiscussionUid, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionActive, courseDiscussionLct) VALUES(?, ?, ?, ?, ?, ?)'; }; CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.courseDiscussionUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.courseDiscussionUid); } stmt.setString_vqvrqt$(2, entity.courseDiscussionTitle); stmt.setString_vqvrqt$(3, entity.courseDiscussionDesc); stmt.setLong_6svq3l$(4, entity.courseDiscussionClazzUid); stmt.setBoolean_fzusl$(5, entity.courseDiscussionActive); stmt.setLong_6svq3l$(6, entity.courseDiscussionLct); }; CourseDiscussionDao_JdbcKt$_insertAdapterCourseDiscussion_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseDiscussionDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseDiscussionDao_JdbcKt', interfaces: [CourseDiscussionDao]}; function CourseDiscussionDao_ReplicateWrapper(_db, _dao) { CourseDiscussionDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_72($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_72.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_72.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_72.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_72; Coroutine$replicateOnNewNode_s8cxhz$_72.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_72(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_69($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_69.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_69.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_69.prototype.constructor = Coroutine$replicateOnChange_69; Coroutine$replicateOnChange_69.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_69(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateActiveByUid_zaz62j$_6($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_6.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_6; Coroutine$updateActiveByUid_zaz62j$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateActiveByUid_zaz62j$(this.local$cbUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_6(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_ReplicateWrapper.prototype.getCourseDiscussionByUid_s8cxhz$ = function (courseDiscussionUid) { return this._dao_0.getCourseDiscussionByUid_s8cxhz$(courseDiscussionUid); }; function Coroutine$replaceListAsync_4f5xb2$_0($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$list = list_0; } Coroutine$replaceListAsync_4f5xb2$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_4f5xb2$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_4f5xb2$_0.prototype.constructor = Coroutine$replaceListAsync_4f5xb2$_0; Coroutine$replaceListAsync_4f5xb2$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$list.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.courseDiscussionUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(130, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.courseDiscussionUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.courseDiscussionLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.replaceListAsync_4f5xb2$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.replaceListAsync_4f5xb2$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_4f5xb2$_0(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_78($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_78.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_78.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_78.prototype.constructor = Coroutine$insertAsync_78; Coroutine$insertAsync_78.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.courseDiscussionUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(130, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.courseDiscussionUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.courseDiscussionLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.courseDiscussionUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_78(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseDiscussionDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseDiscussionDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_9($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_9.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_9; Coroutine$insertListAsync_4ezy5m$_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.courseDiscussionUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(130, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.courseDiscussionUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.courseDiscussionLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_9(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_9($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_9.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_9; Coroutine$updateListAsync_4ezy5m$_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.courseDiscussionLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_9(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseDiscussionDao_ReplicateWrapper', interfaces: [CourseDiscussionDao]}; function CourseDiscussionDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseDiscussionDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_73($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_73.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_73.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_73.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_73; Coroutine$replicateOnNewNode_s8cxhz$_73.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_73(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_70($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_70.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_70.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_70.prototype.constructor = Coroutine$replicateOnChange_70; Coroutine$replicateOnChange_70.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_70(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateActiveByUid_zaz62j$_7($this, cbUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$cbUid = cbUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_7.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_7; Coroutine$updateActiveByUid_zaz62j$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateActiveByUid_zaz62j$(this.local$cbUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.updateActiveByUid_zaz62j$ = function (cbUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_7(this, cbUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_Repo.prototype.getCourseDiscussionByUid_s8cxhz$ = function (courseDiscussionUid) { var _result = this._dao.getCourseDiscussionByUid_s8cxhz$(courseDiscussionUid); return _result; }; function Coroutine$replaceListAsync_4f5xb2$_1($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$replaceListAsync_4f5xb2$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_4f5xb2$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_4f5xb2$_1.prototype.constructor = Coroutine$replaceListAsync_4f5xb2$_1; Coroutine$replaceListAsync_4f5xb2$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replaceListAsync_4f5xb2$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.replaceListAsync_4f5xb2$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_4f5xb2$_1(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_79($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_79.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_79.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_79.prototype.constructor = Coroutine$insertAsync_79; Coroutine$insertAsync_79.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_79(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseDiscussionDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseDiscussionDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_10($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_10.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_10; Coroutine$insertListAsync_4ezy5m$_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_10(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_10($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_10.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_10; Coroutine$updateListAsync_4ezy5m$_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseDiscussionDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_10(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseDiscussionDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseDiscussionDao_Repo', interfaces: [CourseDiscussionDao]}; function CourseGroupMemberDao() { } CourseGroupMemberDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupMemberDao', interfaces: [BaseDao]}; function CourseGroupMemberDao_JdbcKt(_db) { CourseGroupMemberDao.call(this); this._db = _db; this._insertAdapterCourseGroupMember_ = new CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral(this._db); } function Coroutine$insertListAsync_23fuft$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_23fuft$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_23fuft$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_23fuft$.prototype.constructor = Coroutine$insertListAsync_23fuft$; Coroutine$insertListAsync_23fuft$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseGroupMember_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_JdbcKt.prototype.insertListAsync_23fuft$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_23fuft$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseGroupMember_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_80($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_80.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_80.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_80.prototype.constructor = Coroutine$insertAsync_80; Coroutine$insertAsync_80.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseGroupMember_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_80(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseGroupMember_.insertList_4ezy5m$(entityList); }; function Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda; Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setLong_6svq3l$(1, _entity.cgmSetUid); this.local$_stmt.setInt_vux9f0$(2, _entity.cgmGroupNumber); this.local$_stmt.setLong_6svq3l$(3, _entity.cgmPersonUid); this.local$_stmt.setLong_6svq3l$(4, _entity.cgmLct); this.local$_stmt.setLong_6svq3l$(5, _entity.cgmUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupMemberDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupMemberDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_23fuft$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_23fuft$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_23fuft$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_23fuft$.prototype.constructor = Coroutine$updateListAsync_23fuft$; Coroutine$updateListAsync_23fuft$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE CourseGroupMember SET cgmSetUid = ?, cgmGroupNumber = ?, cgmPersonUid = ?, cgmLct = ? WHERE cgmUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CourseGroupMemberDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_JdbcKt.prototype.updateListAsync_23fuft$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_23fuft$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseGroupMemberDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.cgmSetUid); _stmt.setInt_vux9f0$(2, _entity.cgmGroupNumber); _stmt.setLong_6svq3l$(3, _entity.cgmPersonUid); _stmt.setLong_6svq3l$(4, _entity.cgmLct); _stmt.setLong_6svq3l$(5, _entity.cgmUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseGroupMemberDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseGroupMember SET cgmSetUid = ?, cgmGroupNumber = ?, cgmPersonUid = ?, cgmLct = ? WHERE cgmUid = ?'; prepareAndUseStatement(this._db, _sql, CourseGroupMemberDao_JdbcKt$updateList$lambda(entityList)); }; function CourseGroupMemberDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.cgmSetUid); _stmt.setInt_vux9f0$(2, closure$entity.cgmGroupNumber); _stmt.setLong_6svq3l$(3, closure$entity.cgmPersonUid); _stmt.setLong_6svq3l$(4, closure$entity.cgmLct); _stmt.setLong_6svq3l$(5, closure$entity.cgmUid); return _stmt.executeUpdate(); }; } CourseGroupMemberDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseGroupMember SET cgmSetUid = ?, cgmGroupNumber = ?, cgmPersonUid = ?, cgmLct = ? WHERE cgmUid = ?'; prepareAndUseStatement(this._db, _sql, CourseGroupMemberDao_JdbcKt$update$lambda(entity)); }; function Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_74($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_74.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_74.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_74.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_74; Coroutine$replicateOnNewNode_s8cxhz$_74.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseGroupMemberReplicate(cgmPk, cgmDestination)\n | SELECT DISTINCT CourseGroupMember.cgmUid AS cgmUid,\n | ? AS cgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN CourseGroupSet\n | ON CourseGroupSet.cgsClazzUid = Clazz.clazzUid\n | JOIN CourseGroupMember\n | ON CourseGroupMember.cgmSetUid = CourseGroupSet.cgsUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseGroupMember.cgmLct != COALESCE(\n | (SELECT cgmVersionId\n | FROM CourseGroupMemberReplicate\n | WHERE cgmPk = CourseGroupMember.cgmUid\n | AND cgmDestination = ?), 0) \n | /*psql ON CONFLICT(cgmPk, cgmDestination) DO UPDATE\n | SET cgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseGroupMemberReplicate(cgmPk, cgmDestination)\n | SELECT DISTINCT CourseGroupMember.cgmUid AS cgmUid,\n | ? AS cgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN CourseGroupSet\n | ON CourseGroupSet.cgsClazzUid = Clazz.clazzUid\n | JOIN CourseGroupMember\n | ON CourseGroupMember.cgmSetUid = CourseGroupSet.cgsUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseGroupMember.cgmLct != COALESCE(\n | (SELECT cgmVersionId\n | FROM CourseGroupMemberReplicate\n | WHERE cgmPk = CourseGroupMember.cgmUid\n | AND cgmDestination = ?), 0) \n | ON CONFLICT(cgmPk, cgmDestination) DO UPDATE\n | SET cgmPending = true\n | \n | \n |')), CourseGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_74(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_71($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_71.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_71.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_71.prototype.constructor = Coroutine$replicateOnChange_71; Coroutine$replicateOnChange_71.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseGroupMemberReplicate(cgmPk, cgmDestination)\n | SELECT DISTINCT CourseGroupMember.cgmUid AS cgmUid,\n | UserSession.usClientNodeId AS cgmDestination\n | FROM ChangeLog\n | JOIN CourseGroupMember\n | ON ChangeLog.chTableId = 243\n | AND ChangeLog.chEntityPk = CourseGroupMember.cgmUid\n | JOIN CourseGroupSet\n | ON CourseGroupSet.cgsUid = CourseGroupMember.cgmSetUid \n | JOIN Clazz \n | ON Clazz.clazzUid = CourseGroupSet.cgsClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseGroupMember.cgmLct != COALESCE(\n | (SELECT cgmVersionId\n | FROM CourseGroupMemberReplicate\n | WHERE cgmPk = CourseGroupMember.cgmUid\n | AND cgmDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cgmPk, cgmDestination) DO UPDATE\n | SET cgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseGroupMemberReplicate(cgmPk, cgmDestination)\n | SELECT DISTINCT CourseGroupMember.cgmUid AS cgmUid,\n | UserSession.usClientNodeId AS cgmDestination\n | FROM ChangeLog\n | JOIN CourseGroupMember\n | ON ChangeLog.chTableId = 243\n | AND ChangeLog.chEntityPk = CourseGroupMember.cgmUid\n | JOIN CourseGroupSet\n | ON CourseGroupSet.cgsUid = CourseGroupMember.cgmSetUid \n | JOIN Clazz \n | ON Clazz.clazzUid = CourseGroupSet.cgsClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseGroupMember.cgmLct != COALESCE(\n | (SELECT cgmVersionId\n | FROM CourseGroupMemberReplicate\n | WHERE cgmPk = CourseGroupMember.cgmUid\n | AND cgmDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cgmPk, cgmDestination) DO UPDATE\n | SET cgmPending = true\n | \n | \n |')), CourseGroupMemberDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_71(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var _tmp_CourseGroupMember_nullCount = 0; var _tmp_cgmUid = closure$_result.getLong_61zpoe$('cgmUid'); if (closure$_result.wasNull()) { _tmp_CourseGroupMember_nullCount = _tmp_CourseGroupMember_nullCount + 1 | 0; } var _tmp_cgmSetUid = closure$_result.getLong_61zpoe$('cgmSetUid'); if (closure$_result.wasNull()) { _tmp_CourseGroupMember_nullCount = _tmp_CourseGroupMember_nullCount + 1 | 0; } var _tmp_cgmGroupNumber = closure$_result.getInt_61zpoe$('cgmGroupNumber'); if (closure$_result.wasNull()) { _tmp_CourseGroupMember_nullCount = _tmp_CourseGroupMember_nullCount + 1 | 0; } var _tmp_cgmPersonUid = closure$_result.getLong_61zpoe$('cgmPersonUid'); if (closure$_result.wasNull()) { _tmp_CourseGroupMember_nullCount = _tmp_CourseGroupMember_nullCount + 1 | 0; } var _tmp_cgmLct = closure$_result.getLong_61zpoe$('cgmLct'); if (closure$_result.wasNull()) { _tmp_CourseGroupMember_nullCount = _tmp_CourseGroupMember_nullCount + 1 | 0; } var _tmp_CourseGroupMember_isAllNull = _tmp_CourseGroupMember_nullCount === 5; var $receiver = new CourseGroupMemberPerson(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; if (!_tmp_CourseGroupMember_isAllNull) { var $receiver_0 = new CourseGroupMember(); $receiver_0.cgmUid = _tmp_cgmUid; $receiver_0.cgmSetUid = _tmp_cgmSetUid; $receiver_0.cgmGroupNumber = _tmp_cgmGroupNumber; $receiver_0.cgmPersonUid = _tmp_cgmPersonUid; $receiver_0.cgmLct = _tmp_cgmLct; $receiver.member = $receiver_0; } return $receiver; }; } function CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda$lambda(_result) { return mapRows(_result, CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda$lambda$lambda(_result)); } function Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda(closure$setUid_0, closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$setUid = closure$setUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda.prototype.constructor = Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda; Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$setUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda(closure$setUid_0, closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda(closure$setUid_0, closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseGroupMemberDao_JdbcKt.prototype.findByGroupSetAsync_3pjtqy$ = function (setUid, clazzUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Person.*, CourseGroupMember.* \n | FROM Person\n | JOIN ClazzEnrolment \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | \n | LEFT JOIN CourseGroupMember\n | ON CourseGroupMember.cgmPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND CourseGroupMember.cgmSetUid = ?\n | \n | WHERE clazzEnrolmentClazzUid = ?\n | ORDER BY Person.firstNames\n | \n ')), CourseGroupMemberDao_JdbcKt$findByGroupSetAsync$lambda(setUid, clazzUid), continuation); }; function CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var _tmp_CourseGroupMember_nullCount = 0; var _tmp_cgmUid = closure$_result.getLong_61zpoe$('cgmUid'); if (closure$_result.wasNull()) { _tmp_CourseGroupMember_nullCount = _tmp_CourseGroupMember_nullCount + 1 | 0; } var _tmp_cgmSetUid = closure$_result.getLong_61zpoe$('cgmSetUid'); if (closure$_result.wasNull()) { _tmp_CourseGroupMember_nullCount = _tmp_CourseGroupMember_nullCount + 1 | 0; } var _tmp_cgmGroupNumber = closure$_result.getInt_61zpoe$('cgmGroupNumber'); if (closure$_result.wasNull()) { _tmp_CourseGroupMember_nullCount = _tmp_CourseGroupMember_nullCount + 1 | 0; } var _tmp_cgmPersonUid = closure$_result.getLong_61zpoe$('cgmPersonUid'); if (closure$_result.wasNull()) { _tmp_CourseGroupMember_nullCount = _tmp_CourseGroupMember_nullCount + 1 | 0; } var _tmp_cgmLct = closure$_result.getLong_61zpoe$('cgmLct'); if (closure$_result.wasNull()) { _tmp_CourseGroupMember_nullCount = _tmp_CourseGroupMember_nullCount + 1 | 0; } var _tmp_CourseGroupMember_isAllNull = _tmp_CourseGroupMember_nullCount === 5; var $receiver = new CourseGroupMemberPerson(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; if (!_tmp_CourseGroupMember_isAllNull) { var $receiver_0 = new CourseGroupMember(); $receiver_0.cgmUid = _tmp_cgmUid; $receiver_0.cgmSetUid = _tmp_cgmSetUid; $receiver_0.cgmGroupNumber = _tmp_cgmGroupNumber; $receiver_0.cgmPersonUid = _tmp_cgmPersonUid; $receiver_0.cgmLct = _tmp_cgmLct; $receiver.member = $receiver_0; } return $receiver; }; } function CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda$lambda(_result) { return mapRows(_result, CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda$lambda$lambda(_result)); } function Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda(closure$setUid_0, closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$setUid = closure$setUid_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda.prototype.constructor = Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda; Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$setUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda(closure$setUid_0, closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda(closure$setUid_0, closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseGroupMemberDao_JdbcKt.prototype.findByGroupSetOrderedAsync_3pjtqy$ = function (setUid, clazzUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Person.*, CourseGroupMember.* \n | FROM Person\n | JOIN ClazzEnrolment \n | ON Person.personUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND ClazzEnrolment.clazzEnrolmentRole = 1000 \n | AND ClazzEnrolment.clazzEnrolmentOutcome = 200\n | \n | LEFT JOIN CourseGroupMember\n | ON CourseGroupMember.cgmPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND CourseGroupMember.cgmSetUid = ?\n | \n | WHERE clazzEnrolmentClazzUid = ?\n | ORDER BY CourseGroupMember.cgmGroupNumber, Person.firstNames\n | \n ')), CourseGroupMemberDao_JdbcKt$findByGroupSetOrderedAsync$lambda(setUid, clazzUid), continuation); }; function CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cgmUid = closure$_result.getLong_61zpoe$('cgmUid'); var _tmp_cgmSetUid = closure$_result.getLong_61zpoe$('cgmSetUid'); var _tmp_cgmGroupNumber = closure$_result.getInt_61zpoe$('cgmGroupNumber'); var _tmp_cgmPersonUid = closure$_result.getLong_61zpoe$('cgmPersonUid'); var _tmp_cgmLct = closure$_result.getLong_61zpoe$('cgmLct'); var $receiver = new CourseGroupMember(); $receiver.cgmUid = _tmp_cgmUid; $receiver.cgmSetUid = _tmp_cgmSetUid; $receiver.cgmGroupNumber = _tmp_cgmGroupNumber; $receiver.cgmPersonUid = _tmp_cgmPersonUid; $receiver.cgmLct = _tmp_cgmLct; return $receiver; }; } function CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda$lambda(_result) { return mapNextRow(_result, null, CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda$lambda$lambda(_result)); } function Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda(closure$studentUid_0, closure$groupSetUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$studentUid = closure$studentUid_0; this.local$closure$groupSetUid = closure$groupSetUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda.prototype.constructor = Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda; Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$studentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$groupSetUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda(closure$studentUid_0, closure$groupSetUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda(closure$studentUid_0, closure$groupSetUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseGroupMemberDao_JdbcKt.prototype.findByPersonUid_3pjtqy$ = function (groupSetUid, studentUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseGroupMember\n | WHERE cgmPersonUid = ? \n | AND cgmSetUid = ?\n | LIMIT 1\n | \n ')), CourseGroupMemberDao_JdbcKt$findByPersonUid$lambda(studentUid, groupSetUid), continuation); }; function CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO CourseGroupMember (cgmUid, cgmSetUid, cgmGroupNumber, cgmPersonUid, cgmLct) VALUES(?, ?, ?, ?, ?)'; }; CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cgmUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cgmUid); } stmt.setLong_6svq3l$(2, entity.cgmSetUid); stmt.setInt_vux9f0$(3, entity.cgmGroupNumber); stmt.setLong_6svq3l$(4, entity.cgmPersonUid); stmt.setLong_6svq3l$(5, entity.cgmLct); }; CourseGroupMemberDao_JdbcKt$_insertAdapterCourseGroupMember_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseGroupMemberDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupMemberDao_JdbcKt', interfaces: [CourseGroupMemberDao]}; function CourseGroupMemberDao_ReplicateWrapper(_db, _dao) { CourseGroupMemberDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_75($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_75.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_75.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_75.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_75; Coroutine$replicateOnNewNode_s8cxhz$_75.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_75(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_72($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_72.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_72.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_72.prototype.constructor = Coroutine$replicateOnChange_72; Coroutine$replicateOnChange_72.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_72(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_ReplicateWrapper.prototype.findByGroupSetAsync_3pjtqy$ = function (setUid, clazzUid, continuation) { return this._dao_0.findByGroupSetAsync_3pjtqy$(setUid, clazzUid, continuation); }; CourseGroupMemberDao_ReplicateWrapper.prototype.findByGroupSetOrderedAsync_3pjtqy$ = function (setUid, clazzUid, continuation) { return this._dao_0.findByGroupSetOrderedAsync_3pjtqy$(setUid, clazzUid, continuation); }; CourseGroupMemberDao_ReplicateWrapper.prototype.findByPersonUid_3pjtqy$ = function (groupSetUid, studentUid, continuation) { return this._dao_0.findByPersonUid_3pjtqy$(groupSetUid, studentUid, continuation); }; function Coroutine$insertListAsync_23fuft$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_23fuft$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_23fuft$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_23fuft$_0.prototype.constructor = Coroutine$insertListAsync_23fuft$_0; Coroutine$insertListAsync_23fuft$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.cgmUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(243, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.cgmUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.cgmLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_23fuft$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_ReplicateWrapper.prototype.insertListAsync_23fuft$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_23fuft$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_23fuft$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_23fuft$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_23fuft$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_23fuft$_0.prototype.constructor = Coroutine$updateListAsync_23fuft$_0; Coroutine$updateListAsync_23fuft$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.cgmLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_23fuft$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_ReplicateWrapper.prototype.updateListAsync_23fuft$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_23fuft$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_81($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_81.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_81.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_81.prototype.constructor = Coroutine$insertAsync_81; Coroutine$insertAsync_81.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cgmUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(243, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.cgmUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cgmLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.cgmUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_81(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupMemberDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupMemberDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupMemberDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupMemberDao_ReplicateWrapper', interfaces: [CourseGroupMemberDao]}; function CourseGroupMemberDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseGroupMemberDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_76($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_76.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_76.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_76.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_76; Coroutine$replicateOnNewNode_s8cxhz$_76.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_76(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_73($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_73.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_73.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_73.prototype.constructor = Coroutine$replicateOnChange_73; Coroutine$replicateOnChange_73.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_73(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByGroupSetAsync_3pjtqy$($this, setUid_0, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$setUid = setUid_0; this.local$clazzUid = clazzUid_0; } Coroutine$findByGroupSetAsync_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByGroupSetAsync_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByGroupSetAsync_3pjtqy$.prototype.constructor = Coroutine$findByGroupSetAsync_3pjtqy$; Coroutine$findByGroupSetAsync_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByGroupSetAsync_3pjtqy$(this.local$setUid, this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.findByGroupSetAsync_3pjtqy$ = function (setUid_0, clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findByGroupSetAsync_3pjtqy$(this, setUid_0, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByGroupSetOrderedAsync_3pjtqy$($this, setUid_0, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$setUid = setUid_0; this.local$clazzUid = clazzUid_0; } Coroutine$findByGroupSetOrderedAsync_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByGroupSetOrderedAsync_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByGroupSetOrderedAsync_3pjtqy$.prototype.constructor = Coroutine$findByGroupSetOrderedAsync_3pjtqy$; Coroutine$findByGroupSetOrderedAsync_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByGroupSetOrderedAsync_3pjtqy$(this.local$setUid, this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.findByGroupSetOrderedAsync_3pjtqy$ = function (setUid_0, clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findByGroupSetOrderedAsync_3pjtqy$(this, setUid_0, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByPersonUid_3pjtqy$($this, groupSetUid_0, studentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$groupSetUid = groupSetUid_0; this.local$studentUid = studentUid_0; } Coroutine$findByPersonUid_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUid_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUid_3pjtqy$.prototype.constructor = Coroutine$findByPersonUid_3pjtqy$; Coroutine$findByPersonUid_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByPersonUid_3pjtqy$(this.local$groupSetUid, this.local$studentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.findByPersonUid_3pjtqy$ = function (groupSetUid_0, studentUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUid_3pjtqy$(this, groupSetUid_0, studentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_23fuft$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_23fuft$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_23fuft$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_23fuft$_1.prototype.constructor = Coroutine$insertListAsync_23fuft$_1; Coroutine$insertListAsync_23fuft$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_23fuft$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.insertListAsync_23fuft$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_23fuft$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_23fuft$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_23fuft$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_23fuft$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_23fuft$_1.prototype.constructor = Coroutine$updateListAsync_23fuft$_1; Coroutine$updateListAsync_23fuft$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_23fuft$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.updateListAsync_23fuft$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_23fuft$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_82($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_82.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_82.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_82.prototype.constructor = Coroutine$insertAsync_82; Coroutine$insertAsync_82.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupMemberDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_82(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupMemberDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseGroupMemberDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseGroupMemberDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CourseGroupMemberDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupMemberDao_Repo', interfaces: [CourseGroupMemberDao]}; function CourseGroupSetDao() { } CourseGroupSetDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupSetDao', interfaces: [BaseDao]}; function CourseGroupSetDao_JdbcKt(_db) { CourseGroupSetDao.call(this); this._db = _db; this._insertAdapterCourseGroupSet_ = new CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral(this._db); } CourseGroupSetDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseGroupSet_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_83($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_83.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_83.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_83.prototype.constructor = Coroutine$insertAsync_83; Coroutine$insertAsync_83.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseGroupSet_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_83(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupSetDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseGroupSet_.insertList_4ezy5m$(entityList); }; function Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda; Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.cgsName); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$entity.cgsTotalGroups); this.local$_stmt.setBoolean_fzusl$(3, this.local$closure$entity.cgsActive); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.cgsClazzUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$entity.cgsLct); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$entity.cgsUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_6xk07w$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_6xk07w$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_6xk07w$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_6xk07w$.prototype.constructor = Coroutine$updateAsync_6xk07w$; Coroutine$updateAsync_6xk07w$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE CourseGroupSet SET cgsName = ?, cgsTotalGroups = ?, cgsActive = ?, cgsClazzUid = ?, cgsLct = ? WHERE cgsUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CourseGroupSetDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_JdbcKt.prototype.updateAsync_6xk07w$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_6xk07w$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseGroupSetDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.cgsName); _stmt.setInt_vux9f0$(2, _entity.cgsTotalGroups); _stmt.setBoolean_fzusl$(3, _entity.cgsActive); _stmt.setLong_6svq3l$(4, _entity.cgsClazzUid); _stmt.setLong_6svq3l$(5, _entity.cgsLct); _stmt.setLong_6svq3l$(6, _entity.cgsUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseGroupSetDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseGroupSet SET cgsName = ?, cgsTotalGroups = ?, cgsActive = ?, cgsClazzUid = ?, cgsLct = ? WHERE cgsUid = ?'; prepareAndUseStatement(this._db, _sql, CourseGroupSetDao_JdbcKt$updateList$lambda(entityList)); }; function CourseGroupSetDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.cgsName); _stmt.setInt_vux9f0$(2, closure$entity.cgsTotalGroups); _stmt.setBoolean_fzusl$(3, closure$entity.cgsActive); _stmt.setLong_6svq3l$(4, closure$entity.cgsClazzUid); _stmt.setLong_6svq3l$(5, closure$entity.cgsLct); _stmt.setLong_6svq3l$(6, closure$entity.cgsUid); return _stmt.executeUpdate(); }; } CourseGroupSetDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseGroupSet SET cgsName = ?, cgsTotalGroups = ?, cgsActive = ?, cgsClazzUid = ?, cgsLct = ? WHERE cgsUid = ?'; prepareAndUseStatement(this._db, _sql, CourseGroupSetDao_JdbcKt$update$lambda(entity)); }; function Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_77($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_77.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_77.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_77.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_77; Coroutine$replicateOnNewNode_s8cxhz$_77.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseGroupSetReplicate(cgsPk, cgsDestination)\n | SELECT DISTINCT CourseGroupSet.cgsUid AS cgsUid,\n | ? AS cgsDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN CourseGroupSet\n | ON CourseGroupSet.cgsClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseGroupSet.cgsLct != COALESCE(\n | (SELECT cgsVersionId\n | FROM CourseGroupSetReplicate\n | WHERE cgsPk = CourseGroupSet.cgsUid\n | AND cgsDestination = ?), 0) \n | /*psql ON CONFLICT(cgsPk, cgsDestination) DO UPDATE\n | SET cgsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseGroupSetReplicate(cgsPk, cgsDestination)\n | SELECT DISTINCT CourseGroupSet.cgsUid AS cgsUid,\n | ? AS cgsDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN CourseGroupSet\n | ON CourseGroupSet.cgsClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CourseGroupSet.cgsLct != COALESCE(\n | (SELECT cgsVersionId\n | FROM CourseGroupSetReplicate\n | WHERE cgsPk = CourseGroupSet.cgsUid\n | AND cgsDestination = ?), 0) \n | ON CONFLICT(cgsPk, cgsDestination) DO UPDATE\n | SET cgsPending = true\n | \n | \n |')), CourseGroupSetDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_77(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_74($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_74.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_74.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_74.prototype.constructor = Coroutine$replicateOnChange_74; Coroutine$replicateOnChange_74.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseGroupSetReplicate(cgsPk, cgsDestination)\n | SELECT DISTINCT CourseGroupSet.cgsUid AS cgsUid,\n | UserSession.usClientNodeId AS cgsDestination\n | FROM ChangeLog\n | JOIN CourseGroupSet\n | ON ChangeLog.chTableId = 242\n | AND ChangeLog.chEntityPk = CourseGroupSet.cgsUid\n | JOIN Clazz \n | ON Clazz.clazzUid = CourseGroupSet.cgsClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseGroupSet.cgsLct != COALESCE(\n | (SELECT cgsVersionId\n | FROM CourseGroupSetReplicate\n | WHERE cgsPk = CourseGroupSet.cgsUid\n | AND cgsDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cgsPk, cgsDestination) DO UPDATE\n | SET cgsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseGroupSetReplicate(cgsPk, cgsDestination)\n | SELECT DISTINCT CourseGroupSet.cgsUid AS cgsUid,\n | UserSession.usClientNodeId AS cgsDestination\n | FROM ChangeLog\n | JOIN CourseGroupSet\n | ON ChangeLog.chTableId = 242\n | AND ChangeLog.chEntityPk = CourseGroupSet.cgsUid\n | JOIN Clazz \n | ON Clazz.clazzUid = CourseGroupSet.cgsClazzUid \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 8388608\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseGroupSet.cgsLct != COALESCE(\n | (SELECT cgsVersionId\n | FROM CourseGroupSetReplicate\n | WHERE cgsPk = CourseGroupSet.cgsUid\n | AND cgsDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cgsPk, cgsDestination) DO UPDATE\n | SET cgsPending = true\n | \n | \n |')), CourseGroupSetDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_74(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral(this$CourseGroupSetDao_JdbcKt, closure$clazzUid) { this.this$CourseGroupSetDao_JdbcKt = this$CourseGroupSetDao_JdbcKt; this.closure$clazzUid = closure$clazzUid; DataSourceFactory.call(this); } function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cgsUid = closure$_result.getLong_61zpoe$('cgsUid'); var _tmp_cgsName = closure$_result.getString_61zpoe$('cgsName'); var _tmp_cgsTotalGroups = closure$_result.getInt_61zpoe$('cgsTotalGroups'); var _tmp_cgsActive = closure$_result.getBoolean_61zpoe$('cgsActive'); var _tmp_cgsClazzUid = closure$_result.getLong_61zpoe$('cgsClazzUid'); var _tmp_cgsLct = closure$_result.getLong_61zpoe$('cgsLct'); var $receiver = new CourseGroupSet(); $receiver.cgsUid = _tmp_cgsUid; $receiver.cgsName = _tmp_cgsName; $receiver.cgsTotalGroups = _tmp_cgsTotalGroups; $receiver.cgsActive = _tmp_cgsActive; $receiver.cgsClazzUid = _tmp_cgsClazzUid; $receiver.cgsLct = _tmp_cgsLct; return $receiver; }; } function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda(this$CourseGroupSetDao_JdbcKt_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseGroupSetDao_JdbcKt = this$CourseGroupSetDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseGroupSetDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT *\n | FROM CourseGroupSet\n | WHERE cgsActive\n | AND cgsClazzUid = ?\n | ORDER BY cgsName \n | ) LIMIT ? OFFSET ?\n ')), CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda$lambda(this.local$closure$clazzUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda(this$CourseGroupSetDao_JdbcKt_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda(this$CourseGroupSetDao_JdbcKt_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$CourseGroupSetDao_JdbcKt._db, listOf_0('CourseGroupSet'), CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getData$lambda(this.this$CourseGroupSetDao_JdbcKt, this.closure$clazzUid, _limit, _offset)); }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda(this$CourseGroupSetDao_JdbcKt_0, closure$clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseGroupSetDao_JdbcKt = this$CourseGroupSetDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; } Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda; Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseGroupSetDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT *\n | FROM CourseGroupSet\n | WHERE cgsActive\n | AND cgsClazzUid = ?\n | ORDER BY cgsName \n | ) \n ')), CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda$lambda(this.local$closure$clazzUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda(this$CourseGroupSetDao_JdbcKt_0, closure$clazzUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda(this$CourseGroupSetDao_JdbcKt_0, closure$clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$CourseGroupSetDao_JdbcKt._db, listOf_0('CourseGroupSet'), CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral$getLength$lambda(this.this$CourseGroupSetDao_JdbcKt, this.closure$clazzUid)); }; CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; CourseGroupSetDao_JdbcKt.prototype.findAllCourseGroupSetForClazz_s8cxhz$ = function (clazzUid) { return new CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazz$ObjectLiteral(this, clazzUid); }; function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazzList$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cgsUid = closure$_result.getLong_61zpoe$('cgsUid'); var _tmp_cgsName = closure$_result.getString_61zpoe$('cgsName'); var _tmp_cgsTotalGroups = closure$_result.getInt_61zpoe$('cgsTotalGroups'); var _tmp_cgsActive = closure$_result.getBoolean_61zpoe$('cgsActive'); var _tmp_cgsClazzUid = closure$_result.getLong_61zpoe$('cgsClazzUid'); var _tmp_cgsLct = closure$_result.getLong_61zpoe$('cgsLct'); var $receiver = new CourseGroupSet(); $receiver.cgsUid = _tmp_cgsUid; $receiver.cgsName = _tmp_cgsName; $receiver.cgsTotalGroups = _tmp_cgsTotalGroups; $receiver.cgsActive = _tmp_cgsActive; $receiver.cgsClazzUid = _tmp_cgsClazzUid; $receiver.cgsLct = _tmp_cgsLct; return $receiver; }; } function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazzList$lambda$lambda(_result) { return mapRows(_result, CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazzList$lambda$lambda$lambda(_result)); } function CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazzList$lambda(closure$clazzUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$clazzUid); return useResults(_stmt.executeQuery(), CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazzList$lambda$lambda); }; } CourseGroupSetDao_JdbcKt.prototype.findAllCourseGroupSetForClazzList_s8cxhz$ = function (clazzUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT *\n | FROM CourseGroupSet\n | WHERE cgsActive\n | AND cgsClazzUid = ?\n | ORDER BY cgsName \n | \n ')), CourseGroupSetDao_JdbcKt$findAllCourseGroupSetForClazzList$lambda(clazzUid)); }; function CourseGroupSetDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_cgsUid = closure$_result.getLong_61zpoe$('cgsUid'); var _tmp_cgsName = closure$_result.getString_61zpoe$('cgsName'); var _tmp_cgsTotalGroups = closure$_result.getInt_61zpoe$('cgsTotalGroups'); var _tmp_cgsActive = closure$_result.getBoolean_61zpoe$('cgsActive'); var _tmp_cgsClazzUid = closure$_result.getLong_61zpoe$('cgsClazzUid'); var _tmp_cgsLct = closure$_result.getLong_61zpoe$('cgsLct'); var $receiver = new CourseGroupSet(); $receiver.cgsUid = _tmp_cgsUid; $receiver.cgsName = _tmp_cgsName; $receiver.cgsTotalGroups = _tmp_cgsTotalGroups; $receiver.cgsActive = _tmp_cgsActive; $receiver.cgsClazzUid = _tmp_cgsClazzUid; $receiver.cgsLct = _tmp_cgsLct; return $receiver; }; } function CourseGroupSetDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, CourseGroupSetDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda; Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseGroupSetDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseGroupSetDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseGroupSetDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseGroupSetDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseGroupSet \n | WHERE cgsUid = ?\n | \n ')), CourseGroupSetDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO CourseGroupSet (cgsUid, cgsName, cgsTotalGroups, cgsActive, cgsClazzUid, cgsLct) VALUES(?, ?, ?, ?, ?, ?)'; }; CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.cgsUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.cgsUid); } stmt.setString_vqvrqt$(2, entity.cgsName); stmt.setInt_vux9f0$(3, entity.cgsTotalGroups); stmt.setBoolean_fzusl$(4, entity.cgsActive); stmt.setLong_6svq3l$(5, entity.cgsClazzUid); stmt.setLong_6svq3l$(6, entity.cgsLct); }; CourseGroupSetDao_JdbcKt$_insertAdapterCourseGroupSet_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseGroupSetDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupSetDao_JdbcKt', interfaces: [CourseGroupSetDao]}; function CourseGroupSetDao_ReplicateWrapper(_db, _dao) { CourseGroupSetDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_78($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_78.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_78.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_78.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_78; Coroutine$replicateOnNewNode_s8cxhz$_78.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_78(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_75($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_75.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_75.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_75.prototype.constructor = Coroutine$replicateOnChange_75; Coroutine$replicateOnChange_75.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_75(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupSetDao_ReplicateWrapper.prototype.updateAsync_6xk07w$ = function (entity, continuation) { entity.cgsLct = systemTimeInMillis(); return this._dao_0.updateAsync_6xk07w$(entity, continuation); }; CourseGroupSetDao_ReplicateWrapper.prototype.findAllCourseGroupSetForClazz_s8cxhz$ = function (clazzUid) { return this._dao_0.findAllCourseGroupSetForClazz_s8cxhz$(clazzUid); }; CourseGroupSetDao_ReplicateWrapper.prototype.findAllCourseGroupSetForClazzList_s8cxhz$ = function (clazzUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupSetDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; CourseGroupSetDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_84($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_84.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_84.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_84.prototype.constructor = Coroutine$insertAsync_84; Coroutine$insertAsync_84.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.cgsUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(242, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.cgsUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.cgsLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.cgsUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_84(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupSetDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupSetDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupSetDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseGroupSetDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupSetDao_ReplicateWrapper', interfaces: [CourseGroupSetDao]}; function CourseGroupSetDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseGroupSetDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_79($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_79.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_79.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_79.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_79; Coroutine$replicateOnNewNode_s8cxhz$_79.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_79(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_76($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_76.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_76.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_76.prototype.constructor = Coroutine$replicateOnChange_76; Coroutine$replicateOnChange_76.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_76(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_6xk07w$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_6xk07w$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_6xk07w$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_6xk07w$_0.prototype.constructor = Coroutine$updateAsync_6xk07w$_0; Coroutine$updateAsync_6xk07w$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_6xk07w$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_Repo.prototype.updateAsync_6xk07w$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_6xk07w$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupSetDao_Repo.prototype.findAllCourseGroupSetForClazz_s8cxhz$ = function (clazzUid) { var _result = this._dao.findAllCourseGroupSetForClazz_s8cxhz$(clazzUid); return _result; }; CourseGroupSetDao_Repo.prototype.findAllCourseGroupSetForClazzList_s8cxhz$ = function (clazzUid) { var _result = this._dao.findAllCourseGroupSetForClazzList_s8cxhz$(clazzUid); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_5($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_5.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_5; Coroutine$findByUidAsync_s8cxhz$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_5(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupSetDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_85($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_85.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_85.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_85.prototype.constructor = Coroutine$insertAsync_85; Coroutine$insertAsync_85.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseGroupSetDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_85(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseGroupSetDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseGroupSetDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseGroupSetDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CourseGroupSetDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupSetDao_Repo', interfaces: [CourseGroupSetDao]}; function CoursePictureDao() { } CoursePictureDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'CoursePictureDao', interfaces: [BaseDao]}; function CoursePictureDao_JdbcKt(_db) { CoursePictureDao.call(this); this._db = _db; this._insertAdapterCoursePicture_ = new CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral(this._db); } CoursePictureDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCoursePicture_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_86($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_86.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_86.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_86.prototype.constructor = Coroutine$insertAsync_86; Coroutine$insertAsync_86.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCoursePicture_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_86(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCoursePicture_.insertList_4ezy5m$(entityList); }; function Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda(closure$coursePicture_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$coursePicture = closure$coursePicture_0; this.local$_stmt = _stmt_0; } Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda; Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$coursePicture.coursePictureClazzUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$coursePicture.coursePictureMasterCsn); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$coursePicture.coursePictureLocalCsn); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$coursePicture.coursePictureLastChangedBy); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$coursePicture.coursePictureLct); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$coursePicture.coursePictureUri); this.local$_stmt.setString_vqvrqt$(7, this.local$closure$coursePicture.coursePictureMd5); this.local$_stmt.setInt_vux9f0$(8, this.local$closure$coursePicture.coursePictureFileSize); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$coursePicture.coursePictureTimestamp); this.local$_stmt.setString_vqvrqt$(10, this.local$closure$coursePicture.coursePictureMimeType); this.local$_stmt.setBoolean_fzusl$(11, this.local$closure$coursePicture.coursePictureActive); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$coursePicture.coursePictureUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CoursePictureDao_JdbcKt$updateAsync$lambda(closure$coursePicture_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CoursePictureDao_JdbcKt$updateAsync$lambda(closure$coursePicture_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_xhijq5$($this, coursePicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$coursePicture = coursePicture_0; } Coroutine$updateAsync_xhijq5$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_xhijq5$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_xhijq5$.prototype.constructor = Coroutine$updateAsync_xhijq5$; Coroutine$updateAsync_xhijq5$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE CoursePicture SET coursePictureClazzUid = ?, coursePictureMasterCsn = ?, coursePictureLocalCsn = ?, coursePictureLastChangedBy = ?, coursePictureLct = ?, coursePictureUri = ?, coursePictureMd5 = ?, coursePictureFileSize = ?, coursePictureTimestamp = ?, coursePictureMimeType = ?, coursePictureActive = ? WHERE coursePictureUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CoursePictureDao_JdbcKt$updateAsync$lambda(this.local$coursePicture), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_JdbcKt.prototype.updateAsync_xhijq5$ = function (coursePicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_xhijq5$(this, coursePicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CoursePictureDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.coursePictureClazzUid); _stmt.setLong_6svq3l$(2, _entity.coursePictureMasterCsn); _stmt.setLong_6svq3l$(3, _entity.coursePictureLocalCsn); _stmt.setInt_vux9f0$(4, _entity.coursePictureLastChangedBy); _stmt.setLong_6svq3l$(5, _entity.coursePictureLct); _stmt.setString_vqvrqt$(6, _entity.coursePictureUri); _stmt.setString_vqvrqt$(7, _entity.coursePictureMd5); _stmt.setInt_vux9f0$(8, _entity.coursePictureFileSize); _stmt.setLong_6svq3l$(9, _entity.coursePictureTimestamp); _stmt.setString_vqvrqt$(10, _entity.coursePictureMimeType); _stmt.setBoolean_fzusl$(11, _entity.coursePictureActive); _stmt.setLong_6svq3l$(12, _entity.coursePictureUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CoursePictureDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CoursePicture SET coursePictureClazzUid = ?, coursePictureMasterCsn = ?, coursePictureLocalCsn = ?, coursePictureLastChangedBy = ?, coursePictureLct = ?, coursePictureUri = ?, coursePictureMd5 = ?, coursePictureFileSize = ?, coursePictureTimestamp = ?, coursePictureMimeType = ?, coursePictureActive = ? WHERE coursePictureUid = ?'; prepareAndUseStatement(this._db, _sql, CoursePictureDao_JdbcKt$updateList$lambda(entityList)); }; function CoursePictureDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.coursePictureClazzUid); _stmt.setLong_6svq3l$(2, closure$entity.coursePictureMasterCsn); _stmt.setLong_6svq3l$(3, closure$entity.coursePictureLocalCsn); _stmt.setInt_vux9f0$(4, closure$entity.coursePictureLastChangedBy); _stmt.setLong_6svq3l$(5, closure$entity.coursePictureLct); _stmt.setString_vqvrqt$(6, closure$entity.coursePictureUri); _stmt.setString_vqvrqt$(7, closure$entity.coursePictureMd5); _stmt.setInt_vux9f0$(8, closure$entity.coursePictureFileSize); _stmt.setLong_6svq3l$(9, closure$entity.coursePictureTimestamp); _stmt.setString_vqvrqt$(10, closure$entity.coursePictureMimeType); _stmt.setBoolean_fzusl$(11, closure$entity.coursePictureActive); _stmt.setLong_6svq3l$(12, closure$entity.coursePictureUid); return _stmt.executeUpdate(); }; } CoursePictureDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CoursePicture SET coursePictureClazzUid = ?, coursePictureMasterCsn = ?, coursePictureLocalCsn = ?, coursePictureLastChangedBy = ?, coursePictureLct = ?, coursePictureUri = ?, coursePictureMd5 = ?, coursePictureFileSize = ?, coursePictureTimestamp = ?, coursePictureMimeType = ?, coursePictureActive = ? WHERE coursePictureUid = ?'; prepareAndUseStatement(this._db, _sql, CoursePictureDao_JdbcKt$update$lambda(entity)); }; function Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CoursePictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CoursePictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_80($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_80.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_80.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_80.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_80; Coroutine$replicateOnNewNode_s8cxhz$_80.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CoursePictureReplicate(cpPk, cpDestination)\n | SELECT DISTINCT CoursePicture.coursePictureUid AS cpPk,\n | ? AS cpDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN CoursePicture\n | ON CoursePicture.coursePictureClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CoursePicture.coursePictureLct != COALESCE(\n | (SELECT cpVersionId\n | FROM CoursePictureReplicate\n | WHERE cpPk = CoursePicture.coursePictureUid\n | AND cpDestination = ?), 0) \n | /*psql ON CONFLICT(cpPk, cpDestination) DO UPDATE\n | SET cpPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CoursePictureReplicate(cpPk, cpDestination)\n | SELECT DISTINCT CoursePicture.coursePictureUid AS cpPk,\n | ? AS cpDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN CoursePicture\n | ON CoursePicture.coursePictureClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND CoursePicture.coursePictureLct != COALESCE(\n | (SELECT cpVersionId\n | FROM CoursePictureReplicate\n | WHERE cpPk = CoursePicture.coursePictureUid\n | AND cpDestination = ?), 0) \n | ON CONFLICT(cpPk, cpDestination) DO UPDATE\n | SET cpPending = true\n | \n | \n |')), CoursePictureDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_80(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda; Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CoursePictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CoursePictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_77($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_77.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_77.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_77.prototype.constructor = Coroutine$replicateOnChange_77; Coroutine$replicateOnChange_77.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CoursePictureReplicate(cpPk, cpDestination)\n | SELECT DISTINCT CoursePicture.coursePictureUid AS cpUid,\n | UserSession.usClientNodeId AS cpDestination\n | FROM ChangeLog\n | JOIN CoursePicture\n | ON ChangeLog.chTableId = 125\n | AND ChangeLog.chEntityPk = CoursePicture.coursePictureUid\n | JOIN Clazz \n | ON CoursePicture.coursePictureClazzUid = Clazz.clazzUid\n | \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | \n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CoursePicture.coursePictureLct != COALESCE(\n | (SELECT cpVersionId\n | FROM CoursePictureReplicate\n | WHERE cpPk = CoursePicture.coursePictureUid\n | AND cpDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(cpPk, cpDestination) DO UPDATE\n | SET cpPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CoursePictureReplicate(cpPk, cpDestination)\n | SELECT DISTINCT CoursePicture.coursePictureUid AS cpUid,\n | UserSession.usClientNodeId AS cpDestination\n | FROM ChangeLog\n | JOIN CoursePicture\n | ON ChangeLog.chTableId = 125\n | AND ChangeLog.chEntityPk = CoursePicture.coursePictureUid\n | JOIN Clazz \n | ON CoursePicture.coursePictureClazzUid = Clazz.clazzUid\n | \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | \n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CoursePicture.coursePictureLct != COALESCE(\n | (SELECT cpVersionId\n | FROM CoursePictureReplicate\n | WHERE cpPk = CoursePicture.coursePictureUid\n | AND cpDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(cpPk, cpDestination) DO UPDATE\n | SET cpPending = true\n | \n | \n |')), CoursePictureDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_77(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_coursePictureUid = closure$_result.getLong_61zpoe$('coursePictureUid'); var _tmp_coursePictureClazzUid = closure$_result.getLong_61zpoe$('coursePictureClazzUid'); var _tmp_coursePictureMasterCsn = closure$_result.getLong_61zpoe$('coursePictureMasterCsn'); var _tmp_coursePictureLocalCsn = closure$_result.getLong_61zpoe$('coursePictureLocalCsn'); var _tmp_coursePictureLastChangedBy = closure$_result.getInt_61zpoe$('coursePictureLastChangedBy'); var _tmp_coursePictureLct = closure$_result.getLong_61zpoe$('coursePictureLct'); var _tmp_coursePictureUri = closure$_result.getString_61zpoe$('coursePictureUri'); var _tmp_coursePictureMd5 = closure$_result.getString_61zpoe$('coursePictureMd5'); var _tmp_coursePictureFileSize = closure$_result.getInt_61zpoe$('coursePictureFileSize'); var _tmp_coursePictureTimestamp = closure$_result.getLong_61zpoe$('coursePictureTimestamp'); var _tmp_coursePictureMimeType = closure$_result.getString_61zpoe$('coursePictureMimeType'); var _tmp_coursePictureActive = closure$_result.getBoolean_61zpoe$('coursePictureActive'); var $receiver = new CoursePicture(); $receiver.coursePictureUid = _tmp_coursePictureUid; $receiver.coursePictureClazzUid = _tmp_coursePictureClazzUid; $receiver.coursePictureMasterCsn = _tmp_coursePictureMasterCsn; $receiver.coursePictureLocalCsn = _tmp_coursePictureLocalCsn; $receiver.coursePictureLastChangedBy = _tmp_coursePictureLastChangedBy; $receiver.coursePictureLct = _tmp_coursePictureLct; $receiver.coursePictureUri = _tmp_coursePictureUri; $receiver.coursePictureMd5 = _tmp_coursePictureMd5; $receiver.coursePictureFileSize = _tmp_coursePictureFileSize; $receiver.coursePictureTimestamp = _tmp_coursePictureTimestamp; $receiver.coursePictureMimeType = _tmp_coursePictureMimeType; $receiver.coursePictureActive = _tmp_coursePictureActive; return $receiver; }; } function CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda(closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda.prototype.constructor = Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda; Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda(closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda(closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CoursePictureDao_JdbcKt.prototype.findByClazzUidAsync_s8cxhz$ = function (clazzUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM CoursePicture \n | WHERE coursePictureClazzUid = ?\n | AND CAST(coursePictureActive AS INTEGER) = 1\n | ORDER BY coursePictureTimestamp DESC LIMIT 1\n ')), CoursePictureDao_JdbcKt$findByClazzUidAsync$lambda(clazzUid), continuation); }; function CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_coursePictureUid = closure$_result.getLong_61zpoe$('coursePictureUid'); var _tmp_coursePictureClazzUid = closure$_result.getLong_61zpoe$('coursePictureClazzUid'); var _tmp_coursePictureMasterCsn = closure$_result.getLong_61zpoe$('coursePictureMasterCsn'); var _tmp_coursePictureLocalCsn = closure$_result.getLong_61zpoe$('coursePictureLocalCsn'); var _tmp_coursePictureLastChangedBy = closure$_result.getInt_61zpoe$('coursePictureLastChangedBy'); var _tmp_coursePictureLct = closure$_result.getLong_61zpoe$('coursePictureLct'); var _tmp_coursePictureUri = closure$_result.getString_61zpoe$('coursePictureUri'); var _tmp_coursePictureMd5 = closure$_result.getString_61zpoe$('coursePictureMd5'); var _tmp_coursePictureFileSize = closure$_result.getInt_61zpoe$('coursePictureFileSize'); var _tmp_coursePictureTimestamp = closure$_result.getLong_61zpoe$('coursePictureTimestamp'); var _tmp_coursePictureMimeType = closure$_result.getString_61zpoe$('coursePictureMimeType'); var _tmp_coursePictureActive = closure$_result.getBoolean_61zpoe$('coursePictureActive'); var $receiver = new CoursePicture(); $receiver.coursePictureUid = _tmp_coursePictureUid; $receiver.coursePictureClazzUid = _tmp_coursePictureClazzUid; $receiver.coursePictureMasterCsn = _tmp_coursePictureMasterCsn; $receiver.coursePictureLocalCsn = _tmp_coursePictureLocalCsn; $receiver.coursePictureLastChangedBy = _tmp_coursePictureLastChangedBy; $receiver.coursePictureLct = _tmp_coursePictureLct; $receiver.coursePictureUri = _tmp_coursePictureUri; $receiver.coursePictureMd5 = _tmp_coursePictureMd5; $receiver.coursePictureFileSize = _tmp_coursePictureFileSize; $receiver.coursePictureTimestamp = _tmp_coursePictureTimestamp; $receiver.coursePictureMimeType = _tmp_coursePictureMimeType; $receiver.coursePictureActive = _tmp_coursePictureActive; return $receiver; }; } function CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda(closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda.prototype.constructor = Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda; Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda(closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda(closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda(this$CoursePictureDao_JdbcKt_0, closure$clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CoursePictureDao_JdbcKt = this$CoursePictureDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; } Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda.prototype.constructor = Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda; Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CoursePictureDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM CoursePicture where coursePictureClazzUid = ? ORDER BY coursePictureTimestamp DESC LIMIT 1'), CoursePictureDao_JdbcKt$findByClazzUidLive$lambda$lambda(this.local$closure$clazzUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CoursePictureDao_JdbcKt$findByClazzUidLive$lambda(this$CoursePictureDao_JdbcKt_0, closure$clazzUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CoursePictureDao_JdbcKt$findByClazzUidLive$lambda(this$CoursePictureDao_JdbcKt_0, closure$clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CoursePictureDao_JdbcKt.prototype.findByClazzUidLive_s8cxhz$ = function (clazzUid) { return new LiveDataImpl(this._db, listOf_0('CoursePicture'), CoursePictureDao_JdbcKt$findByClazzUidLive$lambda(this, clazzUid)); }; function CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO CoursePicture (coursePictureUid, coursePictureClazzUid, coursePictureMasterCsn, coursePictureLocalCsn, coursePictureLastChangedBy, coursePictureLct, coursePictureUri, coursePictureMd5, coursePictureFileSize, coursePictureTimestamp, coursePictureMimeType, coursePictureActive) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.coursePictureUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.coursePictureUid); } stmt.setLong_6svq3l$(2, entity.coursePictureClazzUid); stmt.setLong_6svq3l$(3, entity.coursePictureMasterCsn); stmt.setLong_6svq3l$(4, entity.coursePictureLocalCsn); stmt.setInt_vux9f0$(5, entity.coursePictureLastChangedBy); stmt.setLong_6svq3l$(6, entity.coursePictureLct); stmt.setString_vqvrqt$(7, entity.coursePictureUri); stmt.setString_vqvrqt$(8, entity.coursePictureMd5); stmt.setInt_vux9f0$(9, entity.coursePictureFileSize); stmt.setLong_6svq3l$(10, entity.coursePictureTimestamp); stmt.setString_vqvrqt$(11, entity.coursePictureMimeType); stmt.setBoolean_fzusl$(12, entity.coursePictureActive); }; CoursePictureDao_JdbcKt$_insertAdapterCoursePicture_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CoursePictureDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CoursePictureDao_JdbcKt', interfaces: [CoursePictureDao]}; function CoursePictureDao_ReplicateWrapper(_db, _dao) { CoursePictureDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_81($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_81.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_81.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_81.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_81; Coroutine$replicateOnNewNode_s8cxhz$_81.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_81(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_78($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_78.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_78.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_78.prototype.constructor = Coroutine$replicateOnChange_78; Coroutine$replicateOnChange_78.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_78(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_ReplicateWrapper.prototype.findByClazzUidAsync_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.findByClazzUidAsync_s8cxhz$(clazzUid, continuation); }; CoursePictureDao_ReplicateWrapper.prototype.findByClazzUidLive_s8cxhz$ = function (clazzUid) { return this._dao_0.findByClazzUidLive_s8cxhz$(clazzUid); }; function Coroutine$updateAsync_xhijq5$_0($this, coursePicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$coursePicture = coursePicture_0; } Coroutine$updateAsync_xhijq5$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_xhijq5$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_xhijq5$_0.prototype.constructor = Coroutine$updateAsync_xhijq5$_0; Coroutine$updateAsync_xhijq5$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new CoursePicture_EwaAdapter(this.local$coursePicture), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.local$coursePicture.coursePictureLct = systemTimeInMillis(); this.state_0 = 3; this.result_0 = this.$this._dao_0.updateAsync_xhijq5$(this.local$coursePicture, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_ReplicateWrapper.prototype.updateAsync_xhijq5$ = function (coursePicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_xhijq5$_0(this, coursePicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_87($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_87.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_87.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_87.prototype.constructor = Coroutine$insertAsync_87; Coroutine$insertAsync_87.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new CoursePicture_EwaAdapter(this.local$entity), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.coursePictureUid, L0)) { this.state_0 = 3; this.result_0 = _pkManager.nextIdAsync_za3lpa$(125, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$entity.coursePictureUid = _newPk; this.state_0 = 4; continue; case 4: this.local$entity.coursePictureLct = systemTimeInMillis(); this.state_0 = 5; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: return this.local$entity.coursePictureUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_87(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CoursePictureDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CoursePictureDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CoursePictureDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CoursePictureDao_ReplicateWrapper', interfaces: [CoursePictureDao]}; function CoursePictureDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CoursePictureDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_82($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_82.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_82.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_82.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_82; Coroutine$replicateOnNewNode_s8cxhz$_82.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_82(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_79($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_79.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_79.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_79.prototype.constructor = Coroutine$replicateOnChange_79; Coroutine$replicateOnChange_79.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_79(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByClazzUidAsync_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$findByClazzUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByClazzUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByClazzUidAsync_s8cxhz$.prototype.constructor = Coroutine$findByClazzUidAsync_s8cxhz$; Coroutine$findByClazzUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByClazzUidAsync_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_Repo.prototype.findByClazzUidAsync_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findByClazzUidAsync_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_Repo.prototype.findByClazzUidLive_s8cxhz$ = function (clazzUid) { var _result = this._dao.findByClazzUidLive_s8cxhz$(clazzUid); return _result; }; function Coroutine$updateAsync_xhijq5$_1($this, coursePicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$coursePicture = coursePicture_0; } Coroutine$updateAsync_xhijq5$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_xhijq5$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_xhijq5$_1.prototype.constructor = Coroutine$updateAsync_xhijq5$_1; Coroutine$updateAsync_xhijq5$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_xhijq5$(this.local$coursePicture, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_Repo.prototype.updateAsync_xhijq5$ = function (coursePicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_xhijq5$_1(this, coursePicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_88($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_88.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_88.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_88.prototype.constructor = Coroutine$insertAsync_88; Coroutine$insertAsync_88.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CoursePictureDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_88(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CoursePictureDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CoursePictureDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CoursePictureDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CoursePictureDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CoursePictureDao_Repo', interfaces: [CoursePictureDao]}; function CourseTerminologyDao() { } CourseTerminologyDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseTerminologyDao', interfaces: [BaseDao]}; function CourseTerminologyDao_JdbcKt(_db) { CourseTerminologyDao.call(this); this._db = _db; this._insertAdapterCourseTerminology_ = new CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral(this._db); } CourseTerminologyDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterCourseTerminology_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_89($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_89.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_89.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_89.prototype.constructor = Coroutine$insertAsync_89; Coroutine$insertAsync_89.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterCourseTerminology_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_89(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseTerminologyDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterCourseTerminology_.insertList_4ezy5m$(entityList); }; function Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda; Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.ctTitle); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.ctTerminology); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.ctLct); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.ctUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_9k9ym$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_9k9ym$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_9k9ym$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_9k9ym$.prototype.constructor = Coroutine$updateAsync_9k9ym$; Coroutine$updateAsync_9k9ym$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE CourseTerminology SET ctTitle = ?, ctTerminology = ?, ctLct = ? WHERE ctUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, CourseTerminologyDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_JdbcKt.prototype.updateAsync_9k9ym$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_9k9ym$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseTerminologyDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.ctTitle); _stmt.setString_vqvrqt$(2, _entity.ctTerminology); _stmt.setLong_6svq3l$(3, _entity.ctLct); _stmt.setLong_6svq3l$(4, _entity.ctUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } CourseTerminologyDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE CourseTerminology SET ctTitle = ?, ctTerminology = ?, ctLct = ? WHERE ctUid = ?'; prepareAndUseStatement(this._db, _sql, CourseTerminologyDao_JdbcKt$updateList$lambda(entityList)); }; function CourseTerminologyDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.ctTitle); _stmt.setString_vqvrqt$(2, closure$entity.ctTerminology); _stmt.setLong_6svq3l$(3, closure$entity.ctLct); _stmt.setLong_6svq3l$(4, closure$entity.ctUid); return _stmt.executeUpdate(); }; } CourseTerminologyDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE CourseTerminology SET ctTitle = ?, ctTerminology = ?, ctLct = ? WHERE ctUid = ?'; prepareAndUseStatement(this._db, _sql, CourseTerminologyDao_JdbcKt$update$lambda(entity)); }; function Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_83($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_83.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_83.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_83.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_83; Coroutine$replicateOnNewNode_s8cxhz$_83.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseTerminologyReplicate(ctPk, ctDestination)\n | SELECT DISTINCT CourseTerminology.ctUid AS ctPk,\n | ? AS ctDestination\n | FROM CourseTerminology\n | WHERE CourseTerminology.ctLct != COALESCE(\n | (SELECT ctVersionId\n | FROM CourseTerminologyReplicate\n | WHERE ctPk = CourseTerminology.ctUid\n | AND ctDestination = ?), 0) \n | /*psql ON CONFLICT(ctPk, ctDestination) DO UPDATE\n | SET ctPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseTerminologyReplicate(ctPk, ctDestination)\n | SELECT DISTINCT CourseTerminology.ctUid AS ctPk,\n | ? AS ctDestination\n | FROM CourseTerminology\n | WHERE CourseTerminology.ctLct != COALESCE(\n | (SELECT ctVersionId\n | FROM CourseTerminologyReplicate\n | WHERE ctPk = CourseTerminology.ctUid\n | AND ctDestination = ?), 0) \n | ON CONFLICT(ctPk, ctDestination) DO UPDATE\n | SET ctPending = true\n | \n | \n |')), CourseTerminologyDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_83(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda; Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_80($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_80.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_80.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_80.prototype.constructor = Coroutine$replicateOnChange_80; Coroutine$replicateOnChange_80.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO CourseTerminologyReplicate(ctPk, ctDestination)\n | SELECT DISTINCT CourseTerminology.ctUid AS ctUid,\n | UserSession.usClientNodeId AS ctDestination\n | FROM ChangeLog\n | JOIN CourseTerminology\n | ON ChangeLog.chTableId = 450\n | AND ChangeLog.chEntityPk = CourseTerminology.ctUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseTerminology.ctLct != COALESCE(\n | (SELECT ctVersionId\n | FROM CourseTerminologyReplicate\n | WHERE ctPk = CourseTerminology.ctUid\n | AND ctDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ctPk, ctDestination) DO UPDATE\n | SET ctPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO CourseTerminologyReplicate(ctPk, ctDestination)\n | SELECT DISTINCT CourseTerminology.ctUid AS ctUid,\n | UserSession.usClientNodeId AS ctDestination\n | FROM ChangeLog\n | JOIN CourseTerminology\n | ON ChangeLog.chTableId = 450\n | AND ChangeLog.chEntityPk = CourseTerminology.ctUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND CourseTerminology.ctLct != COALESCE(\n | (SELECT ctVersionId\n | FROM CourseTerminologyReplicate\n | WHERE ctPk = CourseTerminology.ctUid\n | AND ctDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ctPk, ctDestination) DO UPDATE\n | SET ctPending = true\n | \n | \n |')), CourseTerminologyDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_80(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral(this$CourseTerminologyDao_JdbcKt) { this.this$CourseTerminologyDao_JdbcKt = this$CourseTerminologyDao_JdbcKt; DataSourceFactory.call(this); } function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_ctUid = closure$_result.getLong_61zpoe$('ctUid'); var _tmp_ctTitle = closure$_result.getString_61zpoe$('ctTitle'); var _tmp_ctTerminology = closure$_result.getString_61zpoe$('ctTerminology'); var _tmp_ctLct = closure$_result.getLong_61zpoe$('ctLct'); var $receiver = new CourseTerminology(); $receiver.ctUid = _tmp_ctUid; $receiver.ctTitle = _tmp_ctTitle; $receiver.ctTerminology = _tmp_ctTerminology; $receiver.ctLct = _tmp_ctLct; return $receiver; }; } function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda(this$CourseTerminologyDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseTerminologyDao_JdbcKt = this$CourseTerminologyDao_JdbcKt_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseTerminologyDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT *\n | FROM CourseTerminology\n | ORDER BY ctTitle \n | ) LIMIT ? OFFSET ?\n ')), CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda$lambda(this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda(this$CourseTerminologyDao_JdbcKt_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda(this$CourseTerminologyDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$CourseTerminologyDao_JdbcKt._db, listOf_0('CourseTerminology'), CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getData$lambda(this.this$CourseTerminologyDao_JdbcKt, _limit, _offset)); }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda(this$CourseTerminologyDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$CourseTerminologyDao_JdbcKt = this$CourseTerminologyDao_JdbcKt_0; } Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda; Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$CourseTerminologyDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT *\n | FROM CourseTerminology\n | ORDER BY ctTitle \n | ) \n ')), CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda(this$CourseTerminologyDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda(this$CourseTerminologyDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$CourseTerminologyDao_JdbcKt._db, listOf_0('CourseTerminology'), CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral$getLength$lambda(this.this$CourseTerminologyDao_JdbcKt)); }; CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; CourseTerminologyDao_JdbcKt.prototype.findAllCourseTerminology = function () { return new CourseTerminologyDao_JdbcKt$findAllCourseTerminology$ObjectLiteral(this); }; function CourseTerminologyDao_JdbcKt$findAllCourseTerminologyList$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_ctUid = closure$_result.getLong_61zpoe$('ctUid'); var _tmp_ctTitle = closure$_result.getString_61zpoe$('ctTitle'); var _tmp_ctTerminology = closure$_result.getString_61zpoe$('ctTerminology'); var _tmp_ctLct = closure$_result.getLong_61zpoe$('ctLct'); var $receiver = new CourseTerminology(); $receiver.ctUid = _tmp_ctUid; $receiver.ctTitle = _tmp_ctTitle; $receiver.ctTerminology = _tmp_ctTerminology; $receiver.ctLct = _tmp_ctLct; return $receiver; }; } function CourseTerminologyDao_JdbcKt$findAllCourseTerminologyList$lambda$lambda(_result) { return mapRows(_result, CourseTerminologyDao_JdbcKt$findAllCourseTerminologyList$lambda$lambda$lambda(_result)); } function CourseTerminologyDao_JdbcKt$findAllCourseTerminologyList$lambda(_stmt) { return useResults(_stmt.executeQuery(), CourseTerminologyDao_JdbcKt$findAllCourseTerminologyList$lambda$lambda); } CourseTerminologyDao_JdbcKt.prototype.findAllCourseTerminologyList = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT *\n | FROM CourseTerminology\n | ORDER BY ctTitle \n | \n ')), CourseTerminologyDao_JdbcKt$findAllCourseTerminologyList$lambda); }; function CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_ctUid = closure$_result.getLong_61zpoe$('ctUid'); var _tmp_ctTitle = closure$_result.getString_61zpoe$('ctTitle'); var _tmp_ctTerminology = closure$_result.getString_61zpoe$('ctTerminology'); var _tmp_ctLct = closure$_result.getLong_61zpoe$('ctLct'); var $receiver = new CourseTerminology(); $receiver.ctUid = _tmp_ctUid; $receiver.ctTitle = _tmp_ctTitle; $receiver.ctTerminology = _tmp_ctTerminology; $receiver.ctLct = _tmp_ctLct; return $receiver; }; } function CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda$lambda(_result) { return mapNextRow(_result, null, CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda$lambda$lambda(_result)); } function Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda(closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda; Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda(closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda(closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseTerminologyDao_JdbcKt.prototype.getTerminologyForClazz_s8cxhz$ = function (clazzUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT *\n | FROM CourseTerminology\n | JOIN Clazz \n | ON Clazz.clazzTerminologyUid = CourseTerminology.ctUid\n | WHERE Clazz.clazzUid = ?\n | \n ')), CourseTerminologyDao_JdbcKt$getTerminologyForClazz$lambda(clazzUid), continuation); }; function CourseTerminologyDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_ctUid = closure$_result.getLong_61zpoe$('ctUid'); var _tmp_ctTitle = closure$_result.getString_61zpoe$('ctTitle'); var _tmp_ctTerminology = closure$_result.getString_61zpoe$('ctTerminology'); var _tmp_ctLct = closure$_result.getLong_61zpoe$('ctLct'); var $receiver = new CourseTerminology(); $receiver.ctUid = _tmp_ctUid; $receiver.ctTitle = _tmp_ctTitle; $receiver.ctTerminology = _tmp_ctTerminology; $receiver.ctLct = _tmp_ctLct; return $receiver; }; } function CourseTerminologyDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, CourseTerminologyDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda; Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, CourseTerminologyDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function CourseTerminologyDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$CourseTerminologyDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } CourseTerminologyDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM CourseTerminology \n | WHERE ctUid = ?\n | \n ')), CourseTerminologyDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO CourseTerminology (ctUid, ctTitle, ctTerminology, ctLct) VALUES(?, ?, ?, ?)'; }; CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.ctUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.ctUid); } stmt.setString_vqvrqt$(2, entity.ctTitle); stmt.setString_vqvrqt$(3, entity.ctTerminology); stmt.setLong_6svq3l$(4, entity.ctLct); }; CourseTerminologyDao_JdbcKt$_insertAdapterCourseTerminology_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; CourseTerminologyDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseTerminologyDao_JdbcKt', interfaces: [CourseTerminologyDao]}; function CourseTerminologyDao_ReplicateWrapper(_db, _dao) { CourseTerminologyDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_84($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_84.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_84.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_84.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_84; Coroutine$replicateOnNewNode_s8cxhz$_84.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_84(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_81($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_81.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_81.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_81.prototype.constructor = Coroutine$replicateOnChange_81; Coroutine$replicateOnChange_81.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_81(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseTerminologyDao_ReplicateWrapper.prototype.findAllCourseTerminology = function () { return this._dao_0.findAllCourseTerminology(); }; CourseTerminologyDao_ReplicateWrapper.prototype.findAllCourseTerminologyList = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseTerminologyDao_ReplicateWrapper.prototype.getTerminologyForClazz_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.getTerminologyForClazz_s8cxhz$(clazzUid, continuation); }; CourseTerminologyDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; CourseTerminologyDao_ReplicateWrapper.prototype.updateAsync_9k9ym$ = function (entity, continuation) { entity.ctLct = systemTimeInMillis(); return this._dao_0.updateAsync_9k9ym$(entity, continuation); }; CourseTerminologyDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_90($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_90.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_90.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_90.prototype.constructor = Coroutine$insertAsync_90; Coroutine$insertAsync_90.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.ctUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(450, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.ctUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.ctLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.ctUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_90(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseTerminologyDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseTerminologyDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseTerminologyDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; CourseTerminologyDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseTerminologyDao_ReplicateWrapper', interfaces: [CourseTerminologyDao]}; function CourseTerminologyDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { CourseTerminologyDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_85($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_85.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_85.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_85.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_85; Coroutine$replicateOnNewNode_s8cxhz$_85.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_85(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_82($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_82.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_82.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_82.prototype.constructor = Coroutine$replicateOnChange_82; Coroutine$replicateOnChange_82.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_82(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseTerminologyDao_Repo.prototype.findAllCourseTerminology = function () { var _result = this._dao.findAllCourseTerminology(); return _result; }; CourseTerminologyDao_Repo.prototype.findAllCourseTerminologyList = function () { var _result = this._dao.findAllCourseTerminologyList(); return _result; }; function Coroutine$getTerminologyForClazz_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$getTerminologyForClazz_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getTerminologyForClazz_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getTerminologyForClazz_s8cxhz$.prototype.constructor = Coroutine$getTerminologyForClazz_s8cxhz$; Coroutine$getTerminologyForClazz_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getTerminologyForClazz_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_Repo.prototype.getTerminologyForClazz_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$getTerminologyForClazz_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$_6($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_6.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_6; Coroutine$findByUidAsync_s8cxhz$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_6(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_9k9ym$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_9k9ym$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_9k9ym$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_9k9ym$_0.prototype.constructor = Coroutine$updateAsync_9k9ym$_0; Coroutine$updateAsync_9k9ym$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_9k9ym$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_Repo.prototype.updateAsync_9k9ym$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_9k9ym$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseTerminologyDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_91($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_91.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_91.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_91.prototype.constructor = Coroutine$insertAsync_91; Coroutine$insertAsync_91.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; CourseTerminologyDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_91(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; CourseTerminologyDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; CourseTerminologyDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; CourseTerminologyDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; CourseTerminologyDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseTerminologyDao_Repo', interfaces: [CourseTerminologyDao]}; function DiscussionPostDao() { } DiscussionPostDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionPostDao', interfaces: [BaseDao]}; function DiscussionPostDao_JdbcKt(_db) { DiscussionPostDao.call(this); this._db = _db; this._insertAdapterDiscussionPost_ = new DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral(this._db); } DiscussionPostDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterDiscussionPost_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_92($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_92.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_92.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_92.prototype.constructor = Coroutine$insertAsync_92; Coroutine$insertAsync_92.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterDiscussionPost_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_92(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterDiscussionPost_.insertList_4ezy5m$(entityList); }; function Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda; Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.discussionPostTitle); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.discussionPostMessage); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.discussionPostStartDate); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.discussionPostDiscussionTopicUid); this.local$_stmt.setBoolean_fzusl$(5, this.local$closure$entity.discussionPostVisible); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$entity.discussionPostArchive); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.discussionPostStartedPersonUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.discussionPostClazzUid); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$entity.discussionPostLct); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.discussionPostUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_ttuxpq$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_ttuxpq$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_ttuxpq$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_ttuxpq$.prototype.constructor = Coroutine$updateAsync_ttuxpq$; Coroutine$updateAsync_ttuxpq$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE DiscussionPost SET discussionPostTitle = ?, discussionPostMessage = ?, discussionPostStartDate = ?, discussionPostDiscussionTopicUid = ?, discussionPostVisible = ?, discussionPostArchive = ?, discussionPostStartedPersonUid = ?, discussionPostClazzUid = ?, discussionPostLct = ? WHERE discussionPostUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, DiscussionPostDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_JdbcKt.prototype.updateAsync_ttuxpq$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_ttuxpq$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function DiscussionPostDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.discussionPostTitle); _stmt.setString_vqvrqt$(2, _entity.discussionPostMessage); _stmt.setLong_6svq3l$(3, _entity.discussionPostStartDate); _stmt.setLong_6svq3l$(4, _entity.discussionPostDiscussionTopicUid); _stmt.setBoolean_fzusl$(5, _entity.discussionPostVisible); _stmt.setBoolean_fzusl$(6, _entity.discussionPostArchive); _stmt.setLong_6svq3l$(7, _entity.discussionPostStartedPersonUid); _stmt.setLong_6svq3l$(8, _entity.discussionPostClazzUid); _stmt.setLong_6svq3l$(9, _entity.discussionPostLct); _stmt.setLong_6svq3l$(10, _entity.discussionPostUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } DiscussionPostDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE DiscussionPost SET discussionPostTitle = ?, discussionPostMessage = ?, discussionPostStartDate = ?, discussionPostDiscussionTopicUid = ?, discussionPostVisible = ?, discussionPostArchive = ?, discussionPostStartedPersonUid = ?, discussionPostClazzUid = ?, discussionPostLct = ? WHERE discussionPostUid = ?'; prepareAndUseStatement(this._db, _sql, DiscussionPostDao_JdbcKt$updateList$lambda(entityList)); }; function DiscussionPostDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.discussionPostTitle); _stmt.setString_vqvrqt$(2, closure$entity.discussionPostMessage); _stmt.setLong_6svq3l$(3, closure$entity.discussionPostStartDate); _stmt.setLong_6svq3l$(4, closure$entity.discussionPostDiscussionTopicUid); _stmt.setBoolean_fzusl$(5, closure$entity.discussionPostVisible); _stmt.setBoolean_fzusl$(6, closure$entity.discussionPostArchive); _stmt.setLong_6svq3l$(7, closure$entity.discussionPostStartedPersonUid); _stmt.setLong_6svq3l$(8, closure$entity.discussionPostClazzUid); _stmt.setLong_6svq3l$(9, closure$entity.discussionPostLct); _stmt.setLong_6svq3l$(10, closure$entity.discussionPostUid); return _stmt.executeUpdate(); }; } DiscussionPostDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE DiscussionPost SET discussionPostTitle = ?, discussionPostMessage = ?, discussionPostStartDate = ?, discussionPostDiscussionTopicUid = ?, discussionPostVisible = ?, discussionPostArchive = ?, discussionPostStartedPersonUid = ?, discussionPostClazzUid = ?, discussionPostLct = ? WHERE discussionPostUid = ?'; prepareAndUseStatement(this._db, _sql, DiscussionPostDao_JdbcKt$update$lambda(entity)); }; function Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_86($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_86.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_86.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_86.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_86; Coroutine$replicateOnNewNode_s8cxhz$_86.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO DiscussionPostReplicate(discussionPostPk, discussionPostDestination)\n | SELECT DISTINCT DiscussionPost.discussionPostUid AS discussionPostPk,\n | ? AS discussionPostDestination\n | \n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN DiscussionPost \n | ON DiscussionPost.discussionPostClazzUid = Clazz.clazzUid\n | \n | WHERE DiscussionPost.discussionPostLct != COALESCE(\n | (SELECT discussionPostVersionId\n | FROM discussionPostReplicate\n | WHERE discussionPostPk = DiscussionPost.discussionPostUid\n | AND discussionPostDestination = ?), 0) \n | /*psql ON CONFLICT(discussionPostPk, discussionPostDestination) DO UPDATE\n | SET discussionPostPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO DiscussionPostReplicate(discussionPostPk, discussionPostDestination)\n | SELECT DISTINCT DiscussionPost.discussionPostUid AS discussionPostPk,\n | ? AS discussionPostDestination\n | \n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN DiscussionPost \n | ON DiscussionPost.discussionPostClazzUid = Clazz.clazzUid\n | \n | WHERE DiscussionPost.discussionPostLct != COALESCE(\n | (SELECT discussionPostVersionId\n | FROM discussionPostReplicate\n | WHERE discussionPostPk = DiscussionPost.discussionPostUid\n | AND discussionPostDestination = ?), 0) \n | ON CONFLICT(discussionPostPk, discussionPostDestination) DO UPDATE\n | SET discussionPostPending = true\n | \n | \n |')), DiscussionPostDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_86(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda; Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_83($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_83.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_83.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_83.prototype.constructor = Coroutine$replicateOnChange_83; Coroutine$replicateOnChange_83.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO DiscussionPostReplicate(discussionPostPk, discussionPostDestination)\n | SELECT DISTINCT DiscussionPost.discussionPostUid AS discussionPostUid,\n | UserSession.usClientNodeId AS discussionPostDestination\n | FROM ChangeLog\n | JOIN DiscussionPost\n | ON ChangeLog.chTableId = 132\n | AND ChangeLog.chEntityPk = DiscussionPost.discussionPostUid\n | \n | \n | JOIN Clazz \n | ON Clazz.clazzUid = DiscussionPost.discussionPostClazzUid\n | \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND DiscussionPost.discussionPostLct != COALESCE(\n | (SELECT discussionPostVersionId\n | FROM discussionPostReplicate\n | WHERE discussionPostPk = DiscussionPost.discussionPostUid\n | AND DiscussionPostDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(discussionPostPk, discussionPostDestination) DO UPDATE\n | SET discussionPostPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO DiscussionPostReplicate(discussionPostPk, discussionPostDestination)\n | SELECT DISTINCT DiscussionPost.discussionPostUid AS discussionPostUid,\n | UserSession.usClientNodeId AS discussionPostDestination\n | FROM ChangeLog\n | JOIN DiscussionPost\n | ON ChangeLog.chTableId = 132\n | AND ChangeLog.chEntityPk = DiscussionPost.discussionPostUid\n | \n | \n | JOIN Clazz \n | ON Clazz.clazzUid = DiscussionPost.discussionPostClazzUid\n | \n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND DiscussionPost.discussionPostLct != COALESCE(\n | (SELECT discussionPostVersionId\n | FROM discussionPostReplicate\n | WHERE discussionPostPk = DiscussionPost.discussionPostUid\n | AND DiscussionPostDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(discussionPostPk, discussionPostDestination) DO UPDATE\n | SET discussionPostPending = true\n | \n | \n |')), DiscussionPostDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_83(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral(this$DiscussionPostDao_JdbcKt, closure$discussionTopicUid) { this.this$DiscussionPostDao_JdbcKt = this$DiscussionPostDao_JdbcKt; this.closure$discussionTopicUid = closure$discussionTopicUid; DataSourceFactory.call(this); } function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_authorPersonFirstNames = closure$_result.getString_61zpoe$('authorPersonFirstNames'); var _tmp_authorPersonLastName = closure$_result.getString_61zpoe$('authorPersonLastName'); var _tmp_postLatestMessage = closure$_result.getString_61zpoe$('postLatestMessage'); var _tmp_postRepliesCount = closure$_result.getInt_61zpoe$('postRepliesCount'); var _tmp_postLatestMessageTimestamp = closure$_result.getLong_61zpoe$('postLatestMessageTimestamp'); var _tmp_discussionPostUid = closure$_result.getLong_61zpoe$('discussionPostUid'); var _tmp_discussionPostTitle = closure$_result.getString_61zpoe$('discussionPostTitle'); var _tmp_discussionPostMessage = closure$_result.getString_61zpoe$('discussionPostMessage'); var _tmp_discussionPostStartDate = closure$_result.getLong_61zpoe$('discussionPostStartDate'); var _tmp_discussionPostDiscussionTopicUid = closure$_result.getLong_61zpoe$('discussionPostDiscussionTopicUid'); var _tmp_discussionPostVisible = closure$_result.getBoolean_61zpoe$('discussionPostVisible'); var _tmp_discussionPostArchive = closure$_result.getBoolean_61zpoe$('discussionPostArchive'); var _tmp_discussionPostStartedPersonUid = closure$_result.getLong_61zpoe$('discussionPostStartedPersonUid'); var _tmp_discussionPostClazzUid = closure$_result.getLong_61zpoe$('discussionPostClazzUid'); var _tmp_discussionPostLct = closure$_result.getLong_61zpoe$('discussionPostLct'); var $receiver = new DiscussionPostWithDetails(); $receiver.authorPersonFirstNames = _tmp_authorPersonFirstNames; $receiver.authorPersonLastName = _tmp_authorPersonLastName; $receiver.postLatestMessage = _tmp_postLatestMessage; $receiver.postRepliesCount = _tmp_postRepliesCount; $receiver.postLatestMessageTimestamp = _tmp_postLatestMessageTimestamp; $receiver.discussionPostUid = _tmp_discussionPostUid; $receiver.discussionPostTitle = _tmp_discussionPostTitle; $receiver.discussionPostMessage = _tmp_discussionPostMessage; $receiver.discussionPostStartDate = _tmp_discussionPostStartDate; $receiver.discussionPostDiscussionTopicUid = _tmp_discussionPostDiscussionTopicUid; $receiver.discussionPostVisible = _tmp_discussionPostVisible; $receiver.discussionPostArchive = _tmp_discussionPostArchive; $receiver.discussionPostStartedPersonUid = _tmp_discussionPostStartedPersonUid; $receiver.discussionPostClazzUid = _tmp_discussionPostClazzUid; $receiver.discussionPostLct = _tmp_discussionPostLct; return $receiver; }; } function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda(closure$discussionTopicUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$discussionTopicUid = closure$discussionTopicUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$discussionTopicUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda(closure$discussionTopicUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda(closure$discussionTopicUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda(this$DiscussionPostDao_JdbcKt_0, closure$discussionTopicUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$DiscussionPostDao_JdbcKt = this$DiscussionPostDao_JdbcKt_0; this.local$closure$discussionTopicUid = closure$discussionTopicUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$DiscussionPostDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT DiscussionPost.*,\n | Person.firstNames as authorPersonFirstNames,\n | Person.lastName as authorPersonLastName,\n | (\n | SELECT Message.messageText \n | FROM Message \n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | ORDER BY messageTimestamp \n | DESC LIMIT 1\n | ) AS postLatestMessage,\n | (\n | SELECT COUNT(*) \n | FROM Message\n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | \n | ) AS postRepliesCount, \n | \n | (\n | SELECT Message.messageTimestamp \n | FROM Message \n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | ORDER BY messageTimestamp \n | DESC LIMIT 1\n | ) AS postLatestMessageTimestamp\n | \n | FROM DiscussionPost \n | LEFT JOIN Person ON Person.personUid = DiscussionPost.discussionPostStartedPersonUid\n | WHERE DiscussionPost.discussionPostDiscussionTopicUid = ?\n | AND CAST(DiscussionPost.discussionPostVisible AS INTEGER) = 1\n | AND CAST(DiscussionPost.discussionPostArchive AS INTEGER) = 0\n | ORDER BY DiscussionPost.discussionPostStartDate DESC\n | ) LIMIT ? OFFSET ?\n ')), DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda$lambda(this.local$closure$discussionTopicUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda(this$DiscussionPostDao_JdbcKt_0, closure$discussionTopicUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda(this$DiscussionPostDao_JdbcKt_0, closure$discussionTopicUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$DiscussionPostDao_JdbcKt._db, listOf(['Message', 'DiscussionPost', 'Person']), DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getData$lambda(this.this$DiscussionPostDao_JdbcKt, this.closure$discussionTopicUid, _limit, _offset)); }; function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda(closure$discussionTopicUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$discussionTopicUid = closure$discussionTopicUid_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$discussionTopicUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda(closure$discussionTopicUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda(closure$discussionTopicUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda(this$DiscussionPostDao_JdbcKt_0, closure$discussionTopicUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$DiscussionPostDao_JdbcKt = this$DiscussionPostDao_JdbcKt_0; this.local$closure$discussionTopicUid = closure$discussionTopicUid_0; } Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda; Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$DiscussionPostDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT DiscussionPost.*,\n | Person.firstNames as authorPersonFirstNames,\n | Person.lastName as authorPersonLastName,\n | (\n | SELECT Message.messageText \n | FROM Message \n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | ORDER BY messageTimestamp \n | DESC LIMIT 1\n | ) AS postLatestMessage,\n | (\n | SELECT COUNT(*) \n | FROM Message\n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | \n | ) AS postRepliesCount, \n | \n | (\n | SELECT Message.messageTimestamp \n | FROM Message \n | WHERE Message.messageTableId = 132\n | AND Message.messageEntityUid = DiscussionPost.discussionPostUid \n | ORDER BY messageTimestamp \n | DESC LIMIT 1\n | ) AS postLatestMessageTimestamp\n | \n | FROM DiscussionPost \n | LEFT JOIN Person ON Person.personUid = DiscussionPost.discussionPostStartedPersonUid\n | WHERE DiscussionPost.discussionPostDiscussionTopicUid = ?\n | AND CAST(DiscussionPost.discussionPostVisible AS INTEGER) = 1\n | AND CAST(DiscussionPost.discussionPostArchive AS INTEGER) = 0\n | ORDER BY DiscussionPost.discussionPostStartDate DESC\n | ) \n ')), DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda$lambda(this.local$closure$discussionTopicUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda(this$DiscussionPostDao_JdbcKt_0, closure$discussionTopicUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda(this$DiscussionPostDao_JdbcKt_0, closure$discussionTopicUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$DiscussionPostDao_JdbcKt._db, listOf(['Message', 'DiscussionPost', 'Person']), DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral$getLength$lambda(this.this$DiscussionPostDao_JdbcKt, this.closure$discussionTopicUid)); }; DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; DiscussionPostDao_JdbcKt.prototype.getPostsByDiscussionTopic_s8cxhz$ = function (discussionTopicUid) { return new DiscussionPostDao_JdbcKt$getPostsByDiscussionTopic$ObjectLiteral(this, discussionTopicUid); }; function DiscussionPostDao_JdbcKt$getPostTitle$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getString_za3lpa$(1); }; } function DiscussionPostDao_JdbcKt$getPostTitle$lambda$lambda(_result) { return mapNextRow(_result, null, DiscussionPostDao_JdbcKt$getPostTitle$lambda$lambda$lambda(_result)); } function Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda(closure$postUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$postUid = closure$postUid_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda; Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$postUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionPostDao_JdbcKt$getPostTitle$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$getPostTitle$lambda(closure$postUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$getPostTitle$lambda(closure$postUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionPostDao_JdbcKt.prototype.getPostTitle_s8cxhz$ = function (postUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT DiscussionPost.discussionPostTitle \n | FROM DiscussionPost \n | WHERE DiscussionPost.discussionPostUid = ?\n | \n ')), DiscussionPostDao_JdbcKt$getPostTitle$lambda(postUid), continuation); }; function DiscussionPostDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_discussionPostUid = closure$_result.getLong_61zpoe$('discussionPostUid'); var _tmp_discussionPostTitle = closure$_result.getString_61zpoe$('discussionPostTitle'); var _tmp_discussionPostMessage = closure$_result.getString_61zpoe$('discussionPostMessage'); var _tmp_discussionPostStartDate = closure$_result.getLong_61zpoe$('discussionPostStartDate'); var _tmp_discussionPostDiscussionTopicUid = closure$_result.getLong_61zpoe$('discussionPostDiscussionTopicUid'); var _tmp_discussionPostVisible = closure$_result.getBoolean_61zpoe$('discussionPostVisible'); var _tmp_discussionPostArchive = closure$_result.getBoolean_61zpoe$('discussionPostArchive'); var _tmp_discussionPostStartedPersonUid = closure$_result.getLong_61zpoe$('discussionPostStartedPersonUid'); var _tmp_discussionPostClazzUid = closure$_result.getLong_61zpoe$('discussionPostClazzUid'); var _tmp_discussionPostLct = closure$_result.getLong_61zpoe$('discussionPostLct'); var $receiver = new DiscussionPost(); $receiver.discussionPostUid = _tmp_discussionPostUid; $receiver.discussionPostTitle = _tmp_discussionPostTitle; $receiver.discussionPostMessage = _tmp_discussionPostMessage; $receiver.discussionPostStartDate = _tmp_discussionPostStartDate; $receiver.discussionPostDiscussionTopicUid = _tmp_discussionPostDiscussionTopicUid; $receiver.discussionPostVisible = _tmp_discussionPostVisible; $receiver.discussionPostArchive = _tmp_discussionPostArchive; $receiver.discussionPostStartedPersonUid = _tmp_discussionPostStartedPersonUid; $receiver.discussionPostClazzUid = _tmp_discussionPostClazzUid; $receiver.discussionPostLct = _tmp_discussionPostLct; return $receiver; }; } function DiscussionPostDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, DiscussionPostDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda; Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionPostDao_JdbcKt$findByUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$findByUid$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$findByUid$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionPostDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM DiscussionPost\n | WHERE DiscussionPost.discussionPostUid = ?\n | \n ')), DiscussionPostDao_JdbcKt$findByUid$lambda(uid), continuation); }; function DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_authorPersonFirstNames = closure$_result.getString_61zpoe$('authorPersonFirstNames'); var _tmp_authorPersonLastName = closure$_result.getString_61zpoe$('authorPersonLastName'); var _tmp_postLatestMessage = closure$_result.getString_61zpoe$('postLatestMessage'); var _tmp_postRepliesCount = closure$_result.getInt_61zpoe$('postRepliesCount'); var _tmp_postLatestMessageTimestamp = closure$_result.getLong_61zpoe$('postLatestMessageTimestamp'); var _tmp_discussionPostUid = closure$_result.getLong_61zpoe$('discussionPostUid'); var _tmp_discussionPostTitle = closure$_result.getString_61zpoe$('discussionPostTitle'); var _tmp_discussionPostMessage = closure$_result.getString_61zpoe$('discussionPostMessage'); var _tmp_discussionPostStartDate = closure$_result.getLong_61zpoe$('discussionPostStartDate'); var _tmp_discussionPostDiscussionTopicUid = closure$_result.getLong_61zpoe$('discussionPostDiscussionTopicUid'); var _tmp_discussionPostVisible = closure$_result.getBoolean_61zpoe$('discussionPostVisible'); var _tmp_discussionPostArchive = closure$_result.getBoolean_61zpoe$('discussionPostArchive'); var _tmp_discussionPostStartedPersonUid = closure$_result.getLong_61zpoe$('discussionPostStartedPersonUid'); var _tmp_discussionPostClazzUid = closure$_result.getLong_61zpoe$('discussionPostClazzUid'); var _tmp_discussionPostLct = closure$_result.getLong_61zpoe$('discussionPostLct'); var $receiver = new DiscussionPostWithDetails(); $receiver.authorPersonFirstNames = _tmp_authorPersonFirstNames; $receiver.authorPersonLastName = _tmp_authorPersonLastName; $receiver.postLatestMessage = _tmp_postLatestMessage; $receiver.postRepliesCount = _tmp_postRepliesCount; $receiver.postLatestMessageTimestamp = _tmp_postLatestMessageTimestamp; $receiver.discussionPostUid = _tmp_discussionPostUid; $receiver.discussionPostTitle = _tmp_discussionPostTitle; $receiver.discussionPostMessage = _tmp_discussionPostMessage; $receiver.discussionPostStartDate = _tmp_discussionPostStartDate; $receiver.discussionPostDiscussionTopicUid = _tmp_discussionPostDiscussionTopicUid; $receiver.discussionPostVisible = _tmp_discussionPostVisible; $receiver.discussionPostArchive = _tmp_discussionPostArchive; $receiver.discussionPostStartedPersonUid = _tmp_discussionPostStartedPersonUid; $receiver.discussionPostClazzUid = _tmp_discussionPostClazzUid; $receiver.discussionPostLct = _tmp_discussionPostLct; return $receiver; }; } function DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda$lambda(_result) { return mapNextRow(_result, null, DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda$lambda$lambda(_result)); } function Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda; Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionPostDao_JdbcKt.prototype.findWithDetailsByUid_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin("\n |\n | SELECT DiscussionPost.*,\n | Person.firstNames as authorPersonFirstNames,\n | Person.lastName as authorPersonLastName,\n | '' AS postLatestMessage,\n | 0 AS postRepliesCount, \n | DiscussionPost.discussionPostLct AS postLatestMessageTimestamp\n | \n | FROM DiscussionPost \n | LEFT JOIN Person ON Person.personUid = DiscussionPost.discussionPostStartedPersonUid\n | WHERE DiscussionPost.discussionPostUid = ?\n | \n | \n ")), DiscussionPostDao_JdbcKt$findWithDetailsByUid$lambda(uid), continuation); }; function DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_authorPersonFirstNames = closure$_result.getString_61zpoe$('authorPersonFirstNames'); var _tmp_authorPersonLastName = closure$_result.getString_61zpoe$('authorPersonLastName'); var _tmp_postLatestMessage = closure$_result.getString_61zpoe$('postLatestMessage'); var _tmp_postRepliesCount = closure$_result.getInt_61zpoe$('postRepliesCount'); var _tmp_postLatestMessageTimestamp = closure$_result.getLong_61zpoe$('postLatestMessageTimestamp'); var _tmp_discussionPostUid = closure$_result.getLong_61zpoe$('discussionPostUid'); var _tmp_discussionPostTitle = closure$_result.getString_61zpoe$('discussionPostTitle'); var _tmp_discussionPostMessage = closure$_result.getString_61zpoe$('discussionPostMessage'); var _tmp_discussionPostStartDate = closure$_result.getLong_61zpoe$('discussionPostStartDate'); var _tmp_discussionPostDiscussionTopicUid = closure$_result.getLong_61zpoe$('discussionPostDiscussionTopicUid'); var _tmp_discussionPostVisible = closure$_result.getBoolean_61zpoe$('discussionPostVisible'); var _tmp_discussionPostArchive = closure$_result.getBoolean_61zpoe$('discussionPostArchive'); var _tmp_discussionPostStartedPersonUid = closure$_result.getLong_61zpoe$('discussionPostStartedPersonUid'); var _tmp_discussionPostClazzUid = closure$_result.getLong_61zpoe$('discussionPostClazzUid'); var _tmp_discussionPostLct = closure$_result.getLong_61zpoe$('discussionPostLct'); var $receiver = new DiscussionPostWithDetails(); $receiver.authorPersonFirstNames = _tmp_authorPersonFirstNames; $receiver.authorPersonLastName = _tmp_authorPersonLastName; $receiver.postLatestMessage = _tmp_postLatestMessage; $receiver.postRepliesCount = _tmp_postRepliesCount; $receiver.postLatestMessageTimestamp = _tmp_postLatestMessageTimestamp; $receiver.discussionPostUid = _tmp_discussionPostUid; $receiver.discussionPostTitle = _tmp_discussionPostTitle; $receiver.discussionPostMessage = _tmp_discussionPostMessage; $receiver.discussionPostStartDate = _tmp_discussionPostStartDate; $receiver.discussionPostDiscussionTopicUid = _tmp_discussionPostDiscussionTopicUid; $receiver.discussionPostVisible = _tmp_discussionPostVisible; $receiver.discussionPostArchive = _tmp_discussionPostArchive; $receiver.discussionPostStartedPersonUid = _tmp_discussionPostStartedPersonUid; $receiver.discussionPostClazzUid = _tmp_discussionPostClazzUid; $receiver.discussionPostLct = _tmp_discussionPostLct; return $receiver; }; } function DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda; Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda(this$DiscussionPostDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$DiscussionPostDao_JdbcKt = this$DiscussionPostDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; } Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda.prototype.constructor = Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda; Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$DiscussionPostDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |\n | SELECT DiscussionPost.*,\n | Person.firstNames as authorPersonFirstNames,\n | Person.lastName as authorPersonLastName,\n | '' AS postLatestMessage,\n | 0 AS postRepliesCount, \n | DiscussionPost.discussionPostLct AS postLatestMessageTimestamp\n | \n | FROM DiscussionPost \n | LEFT JOIN Person ON Person.personUid = DiscussionPost.discussionPostStartedPersonUid\n | WHERE DiscussionPost.discussionPostUid = ?\n | \n | \n ")), DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda$lambda(this.local$closure$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda(this$DiscussionPostDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda(this$DiscussionPostDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionPostDao_JdbcKt.prototype.findWithDetailsByUidLive_s8cxhz$ = function (uid) { return new LiveDataImpl(this._db, listOf(['DiscussionPost', 'Person']), DiscussionPostDao_JdbcKt$findWithDetailsByUidLive$lambda(this, uid)); }; function DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO DiscussionPost (discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.discussionPostUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.discussionPostUid); } stmt.setString_vqvrqt$(2, entity.discussionPostTitle); stmt.setString_vqvrqt$(3, entity.discussionPostMessage); stmt.setLong_6svq3l$(4, entity.discussionPostStartDate); stmt.setLong_6svq3l$(5, entity.discussionPostDiscussionTopicUid); stmt.setBoolean_fzusl$(6, entity.discussionPostVisible); stmt.setBoolean_fzusl$(7, entity.discussionPostArchive); stmt.setLong_6svq3l$(8, entity.discussionPostStartedPersonUid); stmt.setLong_6svq3l$(9, entity.discussionPostClazzUid); stmt.setLong_6svq3l$(10, entity.discussionPostLct); }; DiscussionPostDao_JdbcKt$_insertAdapterDiscussionPost_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; DiscussionPostDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionPostDao_JdbcKt', interfaces: [DiscussionPostDao]}; function DiscussionPostDao_ReplicateWrapper(_db, _dao) { DiscussionPostDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_87($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_87.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_87.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_87.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_87; Coroutine$replicateOnNewNode_s8cxhz$_87.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_87(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_84($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_84.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_84.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_84.prototype.constructor = Coroutine$replicateOnChange_84; Coroutine$replicateOnChange_84.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_84(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_ReplicateWrapper.prototype.getPostsByDiscussionTopic_s8cxhz$ = function (discussionTopicUid) { return this._dao_0.getPostsByDiscussionTopic_s8cxhz$(discussionTopicUid); }; DiscussionPostDao_ReplicateWrapper.prototype.getPostTitle_s8cxhz$ = function (postUid, continuation) { return this._dao_0.getPostTitle_s8cxhz$(postUid, continuation); }; DiscussionPostDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUid_s8cxhz$(uid, continuation); }; DiscussionPostDao_ReplicateWrapper.prototype.findWithDetailsByUid_s8cxhz$ = function (uid, continuation) { return this._dao_0.findWithDetailsByUid_s8cxhz$(uid, continuation); }; DiscussionPostDao_ReplicateWrapper.prototype.findWithDetailsByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findWithDetailsByUidLive_s8cxhz$(uid); }; DiscussionPostDao_ReplicateWrapper.prototype.updateAsync_ttuxpq$ = function (entity, continuation) { entity.discussionPostLct = systemTimeInMillis(); return this._dao_0.updateAsync_ttuxpq$(entity, continuation); }; DiscussionPostDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_93($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_93.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_93.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_93.prototype.constructor = Coroutine$insertAsync_93; Coroutine$insertAsync_93.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.discussionPostUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(132, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.discussionPostUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.discussionPostLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.discussionPostUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_93(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; DiscussionPostDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; DiscussionPostDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; DiscussionPostDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionPostDao_ReplicateWrapper', interfaces: [DiscussionPostDao]}; function DiscussionPostDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { DiscussionPostDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_88($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_88.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_88.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_88.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_88; Coroutine$replicateOnNewNode_s8cxhz$_88.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_88(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_85($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_85.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_85.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_85.prototype.constructor = Coroutine$replicateOnChange_85; Coroutine$replicateOnChange_85.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_85(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_Repo.prototype.getPostsByDiscussionTopic_s8cxhz$ = function (discussionTopicUid) { var _result = this._dao.getPostsByDiscussionTopic_s8cxhz$(discussionTopicUid); return _result; }; function Coroutine$getPostTitle_s8cxhz$($this, postUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$postUid = postUid_0; } Coroutine$getPostTitle_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getPostTitle_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getPostTitle_s8cxhz$.prototype.constructor = Coroutine$getPostTitle_s8cxhz$; Coroutine$getPostTitle_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getPostTitle_s8cxhz$(this.local$postUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.getPostTitle_s8cxhz$ = function (postUid_0, continuation_0, suspended) { var instance = new Coroutine$getPostTitle_s8cxhz$(this, postUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUid_s8cxhz$_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUid_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$_0.prototype.constructor = Coroutine$findByUid_s8cxhz$_0; Coroutine$findByUid_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.findByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findWithDetailsByUid_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findWithDetailsByUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findWithDetailsByUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findWithDetailsByUid_s8cxhz$.prototype.constructor = Coroutine$findWithDetailsByUid_s8cxhz$; Coroutine$findWithDetailsByUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findWithDetailsByUid_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.findWithDetailsByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findWithDetailsByUid_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_Repo.prototype.findWithDetailsByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findWithDetailsByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$updateAsync_ttuxpq$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_ttuxpq$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_ttuxpq$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_ttuxpq$_0.prototype.constructor = Coroutine$updateAsync_ttuxpq$_0; Coroutine$updateAsync_ttuxpq$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_ttuxpq$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.updateAsync_ttuxpq$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_ttuxpq$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_94($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_94.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_94.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_94.prototype.constructor = Coroutine$insertAsync_94; Coroutine$insertAsync_94.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionPostDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_94(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionPostDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; DiscussionPostDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; DiscussionPostDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; DiscussionPostDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionPostDao_Repo', interfaces: [DiscussionPostDao]}; function DiscussionTopicDao() { } DiscussionTopicDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionTopicDao', interfaces: [OneToManyJoinDao, BaseDao]}; function DiscussionTopicDao_JdbcKt(_db) { DiscussionTopicDao.call(this); this._db = _db; this._insertAdapterDiscussionTopic_upsert = new DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral(this._db); this._insertAdapterDiscussionTopic_ = new DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral(this._db); } function Coroutine$replaceListAsync_twfw7k$($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$replaceListAsync_twfw7k$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_twfw7k$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_twfw7k$.prototype.constructor = Coroutine$replaceListAsync_twfw7k$; Coroutine$replaceListAsync_twfw7k$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterDiscussionTopic_upsert.insertListAsync_4ezy5m$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.replaceListAsync_twfw7k$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_twfw7k$(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterDiscussionTopic_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_95($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_95.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_95.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_95.prototype.constructor = Coroutine$insertAsync_95; Coroutine$insertAsync_95.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterDiscussionTopic_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_95(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterDiscussionTopic_.insertList_4ezy5m$(entityList); }; function Coroutine$insertListAsync_4ezy5m$_11($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_11.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_11; Coroutine$insertListAsync_4ezy5m$_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterDiscussionTopic_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_11(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function DiscussionTopicDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.discussionTopicTitle); _stmt.setString_vqvrqt$(2, _entity.discussionTopicDesc); _stmt.setLong_6svq3l$(3, _entity.discussionTopicStartDate); _stmt.setLong_6svq3l$(4, _entity.discussionTopicCourseDiscussionUid); _stmt.setBoolean_fzusl$(5, _entity.discussionTopicVisible); _stmt.setBoolean_fzusl$(6, _entity.discussionTopicArchive); _stmt.setInt_vux9f0$(7, _entity.discussionTopicIndex); _stmt.setLong_6svq3l$(8, _entity.discussionTopicClazzUid); _stmt.setLong_6svq3l$(9, _entity.discussionTopicLct); _stmt.setLong_6svq3l$(10, _entity.discussionTopicUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } DiscussionTopicDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE DiscussionTopic SET discussionTopicTitle = ?, discussionTopicDesc = ?, discussionTopicStartDate = ?, discussionTopicCourseDiscussionUid = ?, discussionTopicVisible = ?, discussionTopicArchive = ?, discussionTopicIndex = ?, discussionTopicClazzUid = ?, discussionTopicLct = ? WHERE discussionTopicUid = ?'; prepareAndUseStatement(this._db, _sql, DiscussionTopicDao_JdbcKt$updateList$lambda(entityList)); }; function DiscussionTopicDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.discussionTopicTitle); _stmt.setString_vqvrqt$(2, closure$entity.discussionTopicDesc); _stmt.setLong_6svq3l$(3, closure$entity.discussionTopicStartDate); _stmt.setLong_6svq3l$(4, closure$entity.discussionTopicCourseDiscussionUid); _stmt.setBoolean_fzusl$(5, closure$entity.discussionTopicVisible); _stmt.setBoolean_fzusl$(6, closure$entity.discussionTopicArchive); _stmt.setInt_vux9f0$(7, closure$entity.discussionTopicIndex); _stmt.setLong_6svq3l$(8, closure$entity.discussionTopicClazzUid); _stmt.setLong_6svq3l$(9, closure$entity.discussionTopicLct); _stmt.setLong_6svq3l$(10, closure$entity.discussionTopicUid); return _stmt.executeUpdate(); }; } DiscussionTopicDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE DiscussionTopic SET discussionTopicTitle = ?, discussionTopicDesc = ?, discussionTopicStartDate = ?, discussionTopicCourseDiscussionUid = ?, discussionTopicVisible = ?, discussionTopicArchive = ?, discussionTopicIndex = ?, discussionTopicClazzUid = ?, discussionTopicLct = ? WHERE discussionTopicUid = ?'; prepareAndUseStatement(this._db, _sql, DiscussionTopicDao_JdbcKt$update$lambda(entity)); }; function Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda; Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setString_vqvrqt$(1, _entity.discussionTopicTitle); this.local$_stmt.setString_vqvrqt$(2, _entity.discussionTopicDesc); this.local$_stmt.setLong_6svq3l$(3, _entity.discussionTopicStartDate); this.local$_stmt.setLong_6svq3l$(4, _entity.discussionTopicCourseDiscussionUid); this.local$_stmt.setBoolean_fzusl$(5, _entity.discussionTopicVisible); this.local$_stmt.setBoolean_fzusl$(6, _entity.discussionTopicArchive); this.local$_stmt.setInt_vux9f0$(7, _entity.discussionTopicIndex); this.local$_stmt.setLong_6svq3l$(8, _entity.discussionTopicClazzUid); this.local$_stmt.setLong_6svq3l$(9, _entity.discussionTopicLct); this.local$_stmt.setLong_6svq3l$(10, _entity.discussionTopicUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_11($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_11.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_11; Coroutine$updateListAsync_4ezy5m$_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE DiscussionTopic SET discussionTopicTitle = ?, discussionTopicDesc = ?, discussionTopicStartDate = ?, discussionTopicCourseDiscussionUid = ?, discussionTopicVisible = ?, discussionTopicArchive = ?, discussionTopicIndex = ?, discussionTopicClazzUid = ?, discussionTopicLct = ? WHERE discussionTopicUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, DiscussionTopicDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_11(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_89($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_89.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_89.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_89.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_89; Coroutine$replicateOnNewNode_s8cxhz$_89.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO DiscussionTopicReplicate(discussionTopicPk, discussionTopicDestination)\n | SELECT DISTINCT DiscussionTopic.discussionTopicUid AS discussionTopicPk,\n | ? AS discussionTopicDestination\n | \n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN DiscussionTopic \n | ON DiscussionTopic.discussionTopicClazzUid = Clazz.clazzUid\n | \n | WHERE DiscussionTopic.discussionTopicLct != COALESCE(\n | (SELECT discussionTopicVersionId\n | FROM discussionTopicReplicate\n | WHERE discussionTopicPk = DiscussionTopic.discussionTopicUid\n | AND discussionTopicDestination = ?), 0) \n | /*psql ON CONFLICT(discussionTopicPk, discussionTopicDestination) DO UPDATE\n | SET discussionTopicPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO DiscussionTopicReplicate(discussionTopicPk, discussionTopicDestination)\n | SELECT DISTINCT DiscussionTopic.discussionTopicUid AS discussionTopicPk,\n | ? AS discussionTopicDestination\n | \n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN DiscussionTopic \n | ON DiscussionTopic.discussionTopicClazzUid = Clazz.clazzUid\n | \n | WHERE DiscussionTopic.discussionTopicLct != COALESCE(\n | (SELECT discussionTopicVersionId\n | FROM discussionTopicReplicate\n | WHERE discussionTopicPk = DiscussionTopic.discussionTopicUid\n | AND discussionTopicDestination = ?), 0) \n | ON CONFLICT(discussionTopicPk, discussionTopicDestination) DO UPDATE\n | SET discussionTopicPending = true\n | \n | \n |')), DiscussionTopicDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_89(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda; Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_86($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_86.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_86.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_86.prototype.constructor = Coroutine$replicateOnChange_86; Coroutine$replicateOnChange_86.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO DiscussionTopicReplicate(discussionTopicPk, discussionTopicDestination)\n | SELECT DISTINCT DiscussionTopic.discussionTopicUid AS discussionTopicUid,\n | UserSession.usClientNodeId AS discussionTopicDestination\n | FROM ChangeLog\n | JOIN DiscussionTopic\n | ON ChangeLog.chTableId = 131\n | AND ChangeLog.chEntityPk = DiscussionTopic.discussionTopicUid\n | \n | \n | JOIN Clazz\n | ON Clazz.clazzUid = DiscussionTopic.discussionTopicClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND DiscussionTopic.discussionTopicLct != COALESCE(\n | (SELECT discussionTopicVersionId\n | FROM discussionTopicReplicate\n | WHERE discussionTopicPk = DiscussionTopic.discussionTopicUid\n | AND DiscussionTopicDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(discussionTopicPk, discussionTopicDestination) DO UPDATE\n | SET discussionTopicPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO DiscussionTopicReplicate(discussionTopicPk, discussionTopicDestination)\n | SELECT DISTINCT DiscussionTopic.discussionTopicUid AS discussionTopicUid,\n | UserSession.usClientNodeId AS discussionTopicDestination\n | FROM ChangeLog\n | JOIN DiscussionTopic\n | ON ChangeLog.chTableId = 131\n | AND ChangeLog.chEntityPk = DiscussionTopic.discussionTopicUid\n | \n | \n | JOIN Clazz\n | ON Clazz.clazzUid = DiscussionTopic.discussionTopicClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND DiscussionTopic.discussionTopicLct != COALESCE(\n | (SELECT discussionTopicVersionId\n | FROM discussionTopicReplicate\n | WHERE discussionTopicPk = DiscussionTopic.discussionTopicUid\n | AND DiscussionTopicDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(discussionTopicPk, discussionTopicDestination) DO UPDATE\n | SET discussionTopicPending = true\n | \n | \n |')), DiscussionTopicDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_86(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral(this$DiscussionTopicDao_JdbcKt, closure$discussionUid) { this.this$DiscussionTopicDao_JdbcKt = this$DiscussionTopicDao_JdbcKt; this.closure$discussionUid = closure$discussionUid; DataSourceFactory.call(this); } function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_numPosts = closure$_result.getInt_61zpoe$('numPosts'); var _tmp_lastActiveTimestamp = closure$_result.getLong_61zpoe$('lastActiveTimestamp'); var _tmp_discussionTopicUid = closure$_result.getLong_61zpoe$('discussionTopicUid'); var _tmp_discussionTopicTitle = closure$_result.getString_61zpoe$('discussionTopicTitle'); var _tmp_discussionTopicDesc = closure$_result.getString_61zpoe$('discussionTopicDesc'); var _tmp_discussionTopicStartDate = closure$_result.getLong_61zpoe$('discussionTopicStartDate'); var _tmp_discussionTopicCourseDiscussionUid = closure$_result.getLong_61zpoe$('discussionTopicCourseDiscussionUid'); var _tmp_discussionTopicVisible = closure$_result.getBoolean_61zpoe$('discussionTopicVisible'); var _tmp_discussionTopicArchive = closure$_result.getBoolean_61zpoe$('discussionTopicArchive'); var _tmp_discussionTopicIndex = closure$_result.getInt_61zpoe$('discussionTopicIndex'); var _tmp_discussionTopicClazzUid = closure$_result.getLong_61zpoe$('discussionTopicClazzUid'); var _tmp_discussionTopicLct = closure$_result.getLong_61zpoe$('discussionTopicLct'); var $receiver = new DiscussionTopicListDetail(); $receiver.numPosts = _tmp_numPosts; $receiver.lastActiveTimestamp = _tmp_lastActiveTimestamp; $receiver.discussionTopicUid = _tmp_discussionTopicUid; $receiver.discussionTopicTitle = _tmp_discussionTopicTitle; $receiver.discussionTopicDesc = _tmp_discussionTopicDesc; $receiver.discussionTopicStartDate = _tmp_discussionTopicStartDate; $receiver.discussionTopicCourseDiscussionUid = _tmp_discussionTopicCourseDiscussionUid; $receiver.discussionTopicVisible = _tmp_discussionTopicVisible; $receiver.discussionTopicArchive = _tmp_discussionTopicArchive; $receiver.discussionTopicIndex = _tmp_discussionTopicIndex; $receiver.discussionTopicClazzUid = _tmp_discussionTopicClazzUid; $receiver.discussionTopicLct = _tmp_discussionTopicLct; return $receiver; }; } function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda(closure$discussionUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$discussionUid = closure$discussionUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$discussionUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda(closure$discussionUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda(closure$discussionUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$DiscussionTopicDao_JdbcKt = this$DiscussionTopicDao_JdbcKt_0; this.local$closure$discussionUid = closure$discussionUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$DiscussionTopicDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT DiscussionTopic.*,\n | ( \n | SELECT COUNT(*) \n | FROM DiscussionPost \n | WHERE DiscussionPost.discussionPostDiscussionTopicUid = DiscussionTopic.discussionTopicUid\n | ) as numPosts,\n | (\n | 0\n | )as lastActiveTimestamp\n | FROM DiscussionTopic \n | WHERE DiscussionTopic.discussionTopicCourseDiscussionUid = ? \n | AND CAST(DiscussionTopic.discussionTopicVisible AS INTEGER) = 1\n | AND CAST(DiscussionTopic.discussionTopicArchive AS INTEGER) = 0\n | ORDER BY DiscussionTopic.discussionTopicIndex\n | ) LIMIT ? OFFSET ?\n ')), DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda$lambda(this.local$closure$discussionUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$DiscussionTopicDao_JdbcKt._db, listOf(['DiscussionPost', 'DiscussionTopic']), DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getData$lambda(this.this$DiscussionTopicDao_JdbcKt, this.closure$discussionUid, _limit, _offset)); }; function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda(closure$discussionUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$discussionUid = closure$discussionUid_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$discussionUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda(closure$discussionUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda(closure$discussionUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$DiscussionTopicDao_JdbcKt = this$DiscussionTopicDao_JdbcKt_0; this.local$closure$discussionUid = closure$discussionUid_0; } Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$DiscussionTopicDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT DiscussionTopic.*,\n | ( \n | SELECT COUNT(*) \n | FROM DiscussionPost \n | WHERE DiscussionPost.discussionPostDiscussionTopicUid = DiscussionTopic.discussionTopicUid\n | ) as numPosts,\n | (\n | 0\n | )as lastActiveTimestamp\n | FROM DiscussionTopic \n | WHERE DiscussionTopic.discussionTopicCourseDiscussionUid = ? \n | AND CAST(DiscussionTopic.discussionTopicVisible AS INTEGER) = 1\n | AND CAST(DiscussionTopic.discussionTopicArchive AS INTEGER) = 0\n | ORDER BY DiscussionTopic.discussionTopicIndex\n | ) \n ')), DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda$lambda(this.local$closure$discussionUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$DiscussionTopicDao_JdbcKt._db, listOf(['DiscussionPost', 'DiscussionTopic']), DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral$getLength$lambda(this.this$DiscussionTopicDao_JdbcKt, this.closure$discussionUid)); }; DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; DiscussionTopicDao_JdbcKt.prototype.getListOfTopicsByDiscussion_s8cxhz$ = function (discussionUid) { return new DiscussionTopicDao_JdbcKt$getListOfTopicsByDiscussion$ObjectLiteral(this, discussionUid); }; function DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_discussionTopicUid = closure$_result.getLong_61zpoe$('discussionTopicUid'); var _tmp_discussionTopicTitle = closure$_result.getString_61zpoe$('discussionTopicTitle'); var _tmp_discussionTopicDesc = closure$_result.getString_61zpoe$('discussionTopicDesc'); var _tmp_discussionTopicStartDate = closure$_result.getLong_61zpoe$('discussionTopicStartDate'); var _tmp_discussionTopicCourseDiscussionUid = closure$_result.getLong_61zpoe$('discussionTopicCourseDiscussionUid'); var _tmp_discussionTopicVisible = closure$_result.getBoolean_61zpoe$('discussionTopicVisible'); var _tmp_discussionTopicArchive = closure$_result.getBoolean_61zpoe$('discussionTopicArchive'); var _tmp_discussionTopicIndex = closure$_result.getInt_61zpoe$('discussionTopicIndex'); var _tmp_discussionTopicClazzUid = closure$_result.getLong_61zpoe$('discussionTopicClazzUid'); var _tmp_discussionTopicLct = closure$_result.getLong_61zpoe$('discussionTopicLct'); var $receiver = new DiscussionTopic(); $receiver.discussionTopicUid = _tmp_discussionTopicUid; $receiver.discussionTopicTitle = _tmp_discussionTopicTitle; $receiver.discussionTopicDesc = _tmp_discussionTopicDesc; $receiver.discussionTopicStartDate = _tmp_discussionTopicStartDate; $receiver.discussionTopicCourseDiscussionUid = _tmp_discussionTopicCourseDiscussionUid; $receiver.discussionTopicVisible = _tmp_discussionTopicVisible; $receiver.discussionTopicArchive = _tmp_discussionTopicArchive; $receiver.discussionTopicIndex = _tmp_discussionTopicIndex; $receiver.discussionTopicClazzUid = _tmp_discussionTopicClazzUid; $receiver.discussionTopicLct = _tmp_discussionTopicLct; return $receiver; }; } function DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda$lambda(_result) { return mapRows(_result, DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda$lambda$lambda(_result)); } function Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda(closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda(closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda(closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionTopicDao_JdbcKt.prototype.getTopicsByClazz_s8cxhz$ = function (clazzUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT DiscussionTopic.*\n | FROM DiscussionTopic\n | WHERE DiscussionTopic.discussionTopicCourseDiscussionUid IN \n | (SELECT CourseDiscussion.courseDiscussionUid \n | FROM CourseDiscussion\n | WHERE CourseDiscussion.courseDiscussionClazzUid = ? ) \n | AND CAST(DiscussionTopic.discussionTopicVisible AS INTEGER) = 1\n | AND CAST(DiscussionTopic.discussionTopicArchive AS INTEGER) = 0\n | \n | \n ')), DiscussionTopicDao_JdbcKt$getTopicsByClazz$lambda(clazzUid), continuation); }; function DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_discussionTopicUid = closure$_result.getLong_61zpoe$('discussionTopicUid'); var _tmp_discussionTopicTitle = closure$_result.getString_61zpoe$('discussionTopicTitle'); var _tmp_discussionTopicDesc = closure$_result.getString_61zpoe$('discussionTopicDesc'); var _tmp_discussionTopicStartDate = closure$_result.getLong_61zpoe$('discussionTopicStartDate'); var _tmp_discussionTopicCourseDiscussionUid = closure$_result.getLong_61zpoe$('discussionTopicCourseDiscussionUid'); var _tmp_discussionTopicVisible = closure$_result.getBoolean_61zpoe$('discussionTopicVisible'); var _tmp_discussionTopicArchive = closure$_result.getBoolean_61zpoe$('discussionTopicArchive'); var _tmp_discussionTopicIndex = closure$_result.getInt_61zpoe$('discussionTopicIndex'); var _tmp_discussionTopicClazzUid = closure$_result.getLong_61zpoe$('discussionTopicClazzUid'); var _tmp_discussionTopicLct = closure$_result.getLong_61zpoe$('discussionTopicLct'); var $receiver = new DiscussionTopic(); $receiver.discussionTopicUid = _tmp_discussionTopicUid; $receiver.discussionTopicTitle = _tmp_discussionTopicTitle; $receiver.discussionTopicDesc = _tmp_discussionTopicDesc; $receiver.discussionTopicStartDate = _tmp_discussionTopicStartDate; $receiver.discussionTopicCourseDiscussionUid = _tmp_discussionTopicCourseDiscussionUid; $receiver.discussionTopicVisible = _tmp_discussionTopicVisible; $receiver.discussionTopicArchive = _tmp_discussionTopicArchive; $receiver.discussionTopicIndex = _tmp_discussionTopicIndex; $receiver.discussionTopicClazzUid = _tmp_discussionTopicClazzUid; $receiver.discussionTopicLct = _tmp_discussionTopicLct; return $receiver; }; } function DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda$lambda$lambda(_result)); } function Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda(closure$discussionTopicUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$discussionTopicUid = closure$discussionTopicUid_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$discussionTopicUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda(closure$discussionTopicUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda(closure$discussionTopicUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionTopicUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$DiscussionTopicDao_JdbcKt = this$DiscussionTopicDao_JdbcKt_0; this.local$closure$discussionTopicUid = closure$discussionTopicUid_0; } Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda; Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$DiscussionTopicDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT DiscussionTopic.*\n | FROM DiscussionTopic\n | WHERE DiscussionTopic.discussionTopicUid = ?\n | \n | \n ')), DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda$lambda(this.local$closure$discussionTopicUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionTopicUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda(this$DiscussionTopicDao_JdbcKt_0, closure$discussionTopicUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } DiscussionTopicDao_JdbcKt.prototype.getDiscussionTopicByUid_s8cxhz$ = function (discussionTopicUid) { return new LiveDataImpl(this._db, listOf_0('DiscussionTopic'), DiscussionTopicDao_JdbcKt$getDiscussionTopicByUid$lambda(this, discussionTopicUid)); }; function Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda.prototype.constructor = Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda; Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateActiveByUid_zaz62j$_8($this, uid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_8.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_8; Coroutine$updateActiveByUid_zaz62j$_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE DiscussionTopic \n | SET discussionTopicVisible = ?, \n | discussionTopicLct = ?\n | WHERE discussionTopicUid = ?\n ')), DiscussionTopicDao_JdbcKt$updateActiveByUid$lambda(this.local$active, this.local$changeTime, this.local$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_JdbcKt.prototype.updateActiveByUid_zaz62j$ = function (uid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_8(this, uid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO DiscussionTopic (discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.discussionTopicUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.discussionTopicUid); } stmt.setString_vqvrqt$(2, entity.discussionTopicTitle); stmt.setString_vqvrqt$(3, entity.discussionTopicDesc); stmt.setLong_6svq3l$(4, entity.discussionTopicStartDate); stmt.setLong_6svq3l$(5, entity.discussionTopicCourseDiscussionUid); stmt.setBoolean_fzusl$(6, entity.discussionTopicVisible); stmt.setBoolean_fzusl$(7, entity.discussionTopicArchive); stmt.setInt_vux9f0$(8, entity.discussionTopicIndex); stmt.setLong_6svq3l$(9, entity.discussionTopicClazzUid); stmt.setLong_6svq3l$(10, entity.discussionTopicLct); }; DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO DiscussionTopic (discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.discussionTopicUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.discussionTopicUid); } stmt.setString_vqvrqt$(2, entity.discussionTopicTitle); stmt.setString_vqvrqt$(3, entity.discussionTopicDesc); stmt.setLong_6svq3l$(4, entity.discussionTopicStartDate); stmt.setLong_6svq3l$(5, entity.discussionTopicCourseDiscussionUid); stmt.setBoolean_fzusl$(6, entity.discussionTopicVisible); stmt.setBoolean_fzusl$(7, entity.discussionTopicArchive); stmt.setInt_vux9f0$(8, entity.discussionTopicIndex); stmt.setLong_6svq3l$(9, entity.discussionTopicClazzUid); stmt.setLong_6svq3l$(10, entity.discussionTopicLct); }; DiscussionTopicDao_JdbcKt$_insertAdapterDiscussionTopic_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; DiscussionTopicDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionTopicDao_JdbcKt', interfaces: [DiscussionTopicDao]}; function DiscussionTopicDao_ReplicateWrapper(_db, _dao) { DiscussionTopicDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_90($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_90.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_90.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_90.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_90; Coroutine$replicateOnNewNode_s8cxhz$_90.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_90(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_87($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_87.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_87.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_87.prototype.constructor = Coroutine$replicateOnChange_87; Coroutine$replicateOnChange_87.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_87(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_ReplicateWrapper.prototype.getListOfTopicsByDiscussion_s8cxhz$ = function (discussionUid) { return this._dao_0.getListOfTopicsByDiscussion_s8cxhz$(discussionUid); }; DiscussionTopicDao_ReplicateWrapper.prototype.getTopicsByClazz_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.getTopicsByClazz_s8cxhz$(clazzUid, continuation); }; DiscussionTopicDao_ReplicateWrapper.prototype.getDiscussionTopicByUid_s8cxhz$ = function (discussionTopicUid) { return this._dao_0.getDiscussionTopicByUid_s8cxhz$(discussionTopicUid); }; function Coroutine$updateActiveByUid_zaz62j$_9($this, uid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_9.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_9; Coroutine$updateActiveByUid_zaz62j$_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateActiveByUid_zaz62j$(this.local$uid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.updateActiveByUid_zaz62j$ = function (uid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_9(this, uid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceListAsync_twfw7k$_0($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$list = list_0; } Coroutine$replaceListAsync_twfw7k$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_twfw7k$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_twfw7k$_0.prototype.constructor = Coroutine$replaceListAsync_twfw7k$_0; Coroutine$replaceListAsync_twfw7k$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$list.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.discussionTopicUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(131, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.discussionTopicUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.discussionTopicLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.replaceListAsync_twfw7k$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.replaceListAsync_twfw7k$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_twfw7k$_0(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_96($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_96.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_96.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_96.prototype.constructor = Coroutine$insertAsync_96; Coroutine$insertAsync_96.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.discussionTopicUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(131, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.discussionTopicUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.discussionTopicLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.discussionTopicUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_96(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; DiscussionTopicDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; DiscussionTopicDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_12($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_12.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_12; Coroutine$insertListAsync_4ezy5m$_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.discussionTopicUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(131, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.discussionTopicUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.discussionTopicLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_12(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_12($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_12.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_12; Coroutine$updateListAsync_4ezy5m$_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.discussionTopicLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_12(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionTopicDao_ReplicateWrapper', interfaces: [DiscussionTopicDao]}; function DiscussionTopicDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { DiscussionTopicDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_91($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_91.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_91.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_91.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_91; Coroutine$replicateOnNewNode_s8cxhz$_91.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_91(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_88($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_88.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_88.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_88.prototype.constructor = Coroutine$replicateOnChange_88; Coroutine$replicateOnChange_88.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_88(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_Repo.prototype.getListOfTopicsByDiscussion_s8cxhz$ = function (discussionUid) { var _result = this._dao.getListOfTopicsByDiscussion_s8cxhz$(discussionUid); return _result; }; function Coroutine$getTopicsByClazz_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$getTopicsByClazz_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getTopicsByClazz_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getTopicsByClazz_s8cxhz$.prototype.constructor = Coroutine$getTopicsByClazz_s8cxhz$; Coroutine$getTopicsByClazz_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getTopicsByClazz_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.getTopicsByClazz_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$getTopicsByClazz_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_Repo.prototype.getDiscussionTopicByUid_s8cxhz$ = function (discussionTopicUid) { var _result = this._dao.getDiscussionTopicByUid_s8cxhz$(discussionTopicUid); return _result; }; function Coroutine$updateActiveByUid_zaz62j$_10($this, uid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_10.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_10; Coroutine$updateActiveByUid_zaz62j$_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateActiveByUid_zaz62j$(this.local$uid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.updateActiveByUid_zaz62j$ = function (uid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_10(this, uid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceListAsync_twfw7k$_1($this, list_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$list = list_0; } Coroutine$replaceListAsync_twfw7k$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceListAsync_twfw7k$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceListAsync_twfw7k$_1.prototype.constructor = Coroutine$replaceListAsync_twfw7k$_1; Coroutine$replaceListAsync_twfw7k$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replaceListAsync_twfw7k$(this.local$list, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.replaceListAsync_twfw7k$ = function (list_0, continuation_0, suspended) { var instance = new Coroutine$replaceListAsync_twfw7k$_1(this, list_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_97($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_97.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_97.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_97.prototype.constructor = Coroutine$insertAsync_97; Coroutine$insertAsync_97.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_97(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; DiscussionTopicDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; DiscussionTopicDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_13($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_13.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_13; Coroutine$insertListAsync_4ezy5m$_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_13(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_13($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_13.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_13; Coroutine$updateListAsync_4ezy5m$_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; DiscussionTopicDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_13(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; DiscussionTopicDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionTopicDao_Repo', interfaces: [DiscussionTopicDao]}; function EntityRoleDao() { } EntityRoleDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'EntityRoleDao', interfaces: []}; function EntityRoleDao_JdbcKt(_db) { EntityRoleDao.call(this); this._db = _db; this._insertAdapterEntityRole_upsert = new EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral(this._db); } function Coroutine$insertOrReplace_fqnpoh$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertOrReplace_fqnpoh$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertOrReplace_fqnpoh$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertOrReplace_fqnpoh$.prototype.constructor = Coroutine$insertOrReplace_fqnpoh$; Coroutine$insertOrReplace_fqnpoh$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterEntityRole_upsert.insertAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_JdbcKt.prototype.insertOrReplace_fqnpoh$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertOrReplace_fqnpoh$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda; Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entity.erMasterCsn); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entity.erLocalCsn); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$entity.erLastChangedBy); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.erLct); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$entity.erTableId); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$entity.erEntityUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.erGroupUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.erRoleUid); this.local$_stmt.setBoolean_fzusl$(9, this.local$closure$entity.erActive); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.erUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_fqnpoh$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_fqnpoh$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_fqnpoh$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_fqnpoh$.prototype.constructor = Coroutine$updateAsync_fqnpoh$; Coroutine$updateAsync_fqnpoh$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE EntityRole SET erMasterCsn = ?, erLocalCsn = ?, erLastChangedBy = ?, erLct = ?, erTableId = ?, erEntityUid = ?, erGroupUid = ?, erRoleUid = ?, erActive = ? WHERE erUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, EntityRoleDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_JdbcKt.prototype.updateAsync_fqnpoh$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_fqnpoh$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda$lambda(_result) { return mapNextRow(_result, false, EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda$lambda$lambda(_result)); } function Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda(closure$accountPersonUid_0, closure$permission_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$permission = closure$permission_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda; Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$permission); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda(closure$accountPersonUid_0, closure$permission_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda(closure$accountPersonUid_0, closure$permission_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } EntityRoleDao_JdbcKt.prototype.userHasTableLevelPermission_3pjtqy$ = function (accountPersonUid, permission, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((\n | SELECT admin \n | FROM Person \n | WHERE personUid = ?), 0)\n | OR EXISTS(SELECT EntityRole.erUid FROM EntityRole \n | JOIN Role \n | ON EntityRole.erRoleUid = Role.roleUid \n | JOIN PersonGroupMember \n | ON EntityRole.erGroupUid = PersonGroupMember.groupMemberGroupUid\n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND (Role.rolePermissions & ?) > 0) AS hasPermission\n '), void 0, void 0, void 0, trimMargin('\n |\n | SELECT COALESCE((\n | SELECT admin \n | FROM Person \n | WHERE personUid = ?), false)\n | OR EXISTS(SELECT EntityRole.erUid FROM EntityRole \n | JOIN Role \n | ON EntityRole.erRoleUid = Role.roleUid \n | JOIN PersonGroupMember \n | ON EntityRole.erGroupUid = PersonGroupMember.groupMemberGroupUid\n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND (Role.rolePermissions & ?) > 0) AS hasPermission\n | \n ')), EntityRoleDao_JdbcKt$userHasTableLevelPermission$lambda(accountPersonUid, permission), continuation); }; function EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_erUid = closure$_result.getLong_61zpoe$('erUid'); var _tmp_erMasterCsn = closure$_result.getLong_61zpoe$('erMasterCsn'); var _tmp_erLocalCsn = closure$_result.getLong_61zpoe$('erLocalCsn'); var _tmp_erLastChangedBy = closure$_result.getInt_61zpoe$('erLastChangedBy'); var _tmp_erLct = closure$_result.getLong_61zpoe$('erLct'); var _tmp_erTableId = closure$_result.getInt_61zpoe$('erTableId'); var _tmp_erEntityUid = closure$_result.getLong_61zpoe$('erEntityUid'); var _tmp_erGroupUid = closure$_result.getLong_61zpoe$('erGroupUid'); var _tmp_erRoleUid = closure$_result.getLong_61zpoe$('erRoleUid'); var _tmp_erActive = closure$_result.getBoolean_61zpoe$('erActive'); var $receiver = new EntityRole(); $receiver.erUid = _tmp_erUid; $receiver.erMasterCsn = _tmp_erMasterCsn; $receiver.erLocalCsn = _tmp_erLocalCsn; $receiver.erLastChangedBy = _tmp_erLastChangedBy; $receiver.erLct = _tmp_erLct; $receiver.erTableId = _tmp_erTableId; $receiver.erEntityUid = _tmp_erEntityUid; $receiver.erGroupUid = _tmp_erGroupUid; $receiver.erRoleUid = _tmp_erRoleUid; $receiver.erActive = _tmp_erActive; return $receiver; }; } function EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda$lambda(_result) { return mapRows(_result, EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda$lambda$lambda(_result)); } function Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda(closure$tableId_0, closure$entityUid_0, closure$groupUid_0, closure$roleUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$groupUid = closure$groupUid_0; this.local$closure$roleUid = closure$roleUid_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda; Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$tableId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$groupUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$roleUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda(closure$tableId_0, closure$entityUid_0, closure$groupUid_0, closure$roleUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda(closure$tableId_0, closure$entityUid_0, closure$groupUid_0, closure$roleUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } EntityRoleDao_JdbcKt.prototype.findByEntitiyAndPersonGroupAndRole_tmkdev$ = function (tableId, entityUid, groupUid, roleUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM EntityRole WHERE erTableId = ? AND erEntityUid = ? AND erGroupUid = ? AND erRoleUid = ? '), EntityRoleDao_JdbcKt$findByEntitiyAndPersonGroupAndRole$lambda(tableId, entityUid, groupUid, roleUid), continuation); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral(this$EntityRoleDao_JdbcKt, closure$personGroupUid) { this.this$EntityRoleDao_JdbcKt = this$EntityRoleDao_JdbcKt; this.closure$personGroupUid = closure$personGroupUid; DataSourceFactory.call(this); } function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_entityRoleScopeName = closure$_result.getString_61zpoe$('entityRoleScopeName'); var _tmp_erUid = closure$_result.getLong_61zpoe$('erUid'); var _tmp_erMasterCsn = closure$_result.getLong_61zpoe$('erMasterCsn'); var _tmp_erLocalCsn = closure$_result.getLong_61zpoe$('erLocalCsn'); var _tmp_erLastChangedBy = closure$_result.getInt_61zpoe$('erLastChangedBy'); var _tmp_erLct = closure$_result.getLong_61zpoe$('erLct'); var _tmp_erTableId = closure$_result.getInt_61zpoe$('erTableId'); var _tmp_erEntityUid = closure$_result.getLong_61zpoe$('erEntityUid'); var _tmp_erGroupUid = closure$_result.getLong_61zpoe$('erGroupUid'); var _tmp_erRoleUid = closure$_result.getLong_61zpoe$('erRoleUid'); var _tmp_erActive = closure$_result.getBoolean_61zpoe$('erActive'); var _tmp_Role_nullCount = 0; var _tmp_roleUid = closure$_result.getLong_61zpoe$('roleUid'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_roleName = closure$_result.getString_61zpoe$('roleName'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_roleActive = closure$_result.getBoolean_61zpoe$('roleActive'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_roleMasterCsn = closure$_result.getLong_61zpoe$('roleMasterCsn'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_roleLocalCsn = closure$_result.getLong_61zpoe$('roleLocalCsn'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_roleLastChangedBy = closure$_result.getInt_61zpoe$('roleLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_roleLct = closure$_result.getLong_61zpoe$('roleLct'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_rolePermissions = closure$_result.getLong_61zpoe$('rolePermissions'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_Role_isAllNull = _tmp_Role_nullCount === 8; var $receiver = new EntityRoleWithNameAndRole(); $receiver.entityRoleScopeName = _tmp_entityRoleScopeName; $receiver.erUid = _tmp_erUid; $receiver.erMasterCsn = _tmp_erMasterCsn; $receiver.erLocalCsn = _tmp_erLocalCsn; $receiver.erLastChangedBy = _tmp_erLastChangedBy; $receiver.erLct = _tmp_erLct; $receiver.erTableId = _tmp_erTableId; $receiver.erEntityUid = _tmp_erEntityUid; $receiver.erGroupUid = _tmp_erGroupUid; $receiver.erRoleUid = _tmp_erRoleUid; $receiver.erActive = _tmp_erActive; if (!_tmp_Role_isAllNull) { var $receiver_0 = new Role(); $receiver_0.roleUid = _tmp_roleUid; $receiver_0.roleName = _tmp_roleName; $receiver_0.roleActive = _tmp_roleActive; $receiver_0.roleMasterCsn = _tmp_roleMasterCsn; $receiver_0.roleLocalCsn = _tmp_roleLocalCsn; $receiver_0.roleLastChangedBy = _tmp_roleLastChangedBy; $receiver_0.roleLct = _tmp_roleLct; $receiver_0.rolePermissions = _tmp_rolePermissions; $receiver.entityRoleRole = $receiver_0; } return $receiver; }; } function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda(closure$personGroupUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personGroupUid = closure$personGroupUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personGroupUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda(closure$personGroupUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda(closure$personGroupUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda(this$EntityRoleDao_JdbcKt_0, closure$personGroupUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$EntityRoleDao_JdbcKt = this$EntityRoleDao_JdbcKt_0; this.local$closure$personGroupUid = closure$personGroupUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$EntityRoleDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT \n | (CASE \n | WHEN EntityRole.erTableId = 6\tTHEN (SELECT Clazz.clazzName FROM Clazz WHERE Clazz.clazzUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 9\tTHEN (SELECT Person.firstNames||' '||Person.lastName FROM Person WHERE Person.personUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 164\tTHEN (SELECT School.schoolName FROM School WHERE School.schoolUid = EntityRole.erEntityUid)\n | ELSE '' \n | END) as entityRoleScopeName,\n | Role.*, EntityRole.* FROM EntityRole\n | LEFT JOIN Role ON EntityRole.erRoleUid = Role.roleUid \n | WHERE EntityRole.erGroupUid = ?\n | AND CAST(EntityRole.erActive AS INTEGER) = 1 \n | ) LIMIT ? OFFSET ?\n ")), EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda$lambda(this.local$closure$personGroupUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda(this$EntityRoleDao_JdbcKt_0, closure$personGroupUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda(this$EntityRoleDao_JdbcKt_0, closure$personGroupUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$EntityRoleDao_JdbcKt._db, listOf(['Clazz', 'Person', 'School', 'EntityRole', 'Role']), EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getData$lambda(this.this$EntityRoleDao_JdbcKt, this.closure$personGroupUid, _limit, _offset)); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda(closure$personGroupUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personGroupUid = closure$personGroupUid_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personGroupUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda(closure$personGroupUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda(closure$personGroupUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda(this$EntityRoleDao_JdbcKt_0, closure$personGroupUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$EntityRoleDao_JdbcKt = this$EntityRoleDao_JdbcKt_0; this.local$closure$personGroupUid = closure$personGroupUid_0; } Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$EntityRoleDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT \n | (CASE \n | WHEN EntityRole.erTableId = 6\tTHEN (SELECT Clazz.clazzName FROM Clazz WHERE Clazz.clazzUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 9\tTHEN (SELECT Person.firstNames||' '||Person.lastName FROM Person WHERE Person.personUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 164\tTHEN (SELECT School.schoolName FROM School WHERE School.schoolUid = EntityRole.erEntityUid)\n | ELSE '' \n | END) as entityRoleScopeName,\n | Role.*, EntityRole.* FROM EntityRole\n | LEFT JOIN Role ON EntityRole.erRoleUid = Role.roleUid \n | WHERE EntityRole.erGroupUid = ?\n | AND CAST(EntityRole.erActive AS INTEGER) = 1 \n | ) \n ")), EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personGroupUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda(this$EntityRoleDao_JdbcKt_0, closure$personGroupUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda(this$EntityRoleDao_JdbcKt_0, closure$personGroupUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$EntityRoleDao_JdbcKt._db, listOf(['Clazz', 'Person', 'School', 'EntityRole', 'Role']), EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral$getLength$lambda(this.this$EntityRoleDao_JdbcKt, this.closure$personGroupUid)); }; EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; EntityRoleDao_JdbcKt.prototype.filterByPersonWithExtra_s8cxhz$ = function (personGroupUid) { return new EntityRoleDao_JdbcKt$filterByPersonWithExtra$ObjectLiteral(this, personGroupUid); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_entityRoleScopeName = closure$_result.getString_61zpoe$('entityRoleScopeName'); var _tmp_erUid = closure$_result.getLong_61zpoe$('erUid'); var _tmp_erMasterCsn = closure$_result.getLong_61zpoe$('erMasterCsn'); var _tmp_erLocalCsn = closure$_result.getLong_61zpoe$('erLocalCsn'); var _tmp_erLastChangedBy = closure$_result.getInt_61zpoe$('erLastChangedBy'); var _tmp_erLct = closure$_result.getLong_61zpoe$('erLct'); var _tmp_erTableId = closure$_result.getInt_61zpoe$('erTableId'); var _tmp_erEntityUid = closure$_result.getLong_61zpoe$('erEntityUid'); var _tmp_erGroupUid = closure$_result.getLong_61zpoe$('erGroupUid'); var _tmp_erRoleUid = closure$_result.getLong_61zpoe$('erRoleUid'); var _tmp_erActive = closure$_result.getBoolean_61zpoe$('erActive'); var _tmp_Role_nullCount = 0; var _tmp_roleUid = closure$_result.getLong_61zpoe$('roleUid'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_roleName = closure$_result.getString_61zpoe$('roleName'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_roleActive = closure$_result.getBoolean_61zpoe$('roleActive'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_roleMasterCsn = closure$_result.getLong_61zpoe$('roleMasterCsn'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_roleLocalCsn = closure$_result.getLong_61zpoe$('roleLocalCsn'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_roleLastChangedBy = closure$_result.getInt_61zpoe$('roleLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_roleLct = closure$_result.getLong_61zpoe$('roleLct'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_rolePermissions = closure$_result.getLong_61zpoe$('rolePermissions'); if (closure$_result.wasNull()) { _tmp_Role_nullCount = _tmp_Role_nullCount + 1 | 0; } var _tmp_Role_isAllNull = _tmp_Role_nullCount === 8; var $receiver = new EntityRoleWithNameAndRole(); $receiver.entityRoleScopeName = _tmp_entityRoleScopeName; $receiver.erUid = _tmp_erUid; $receiver.erMasterCsn = _tmp_erMasterCsn; $receiver.erLocalCsn = _tmp_erLocalCsn; $receiver.erLastChangedBy = _tmp_erLastChangedBy; $receiver.erLct = _tmp_erLct; $receiver.erTableId = _tmp_erTableId; $receiver.erEntityUid = _tmp_erEntityUid; $receiver.erGroupUid = _tmp_erGroupUid; $receiver.erRoleUid = _tmp_erRoleUid; $receiver.erActive = _tmp_erActive; if (!_tmp_Role_isAllNull) { var $receiver_0 = new Role(); $receiver_0.roleUid = _tmp_roleUid; $receiver_0.roleName = _tmp_roleName; $receiver_0.roleActive = _tmp_roleActive; $receiver_0.roleMasterCsn = _tmp_roleMasterCsn; $receiver_0.roleLocalCsn = _tmp_roleLocalCsn; $receiver_0.roleLastChangedBy = _tmp_roleLastChangedBy; $receiver_0.roleLct = _tmp_roleLct; $receiver_0.rolePermissions = _tmp_rolePermissions; $receiver.entityRoleRole = $receiver_0; } return $receiver; }; } function EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda$lambda(_result) { return mapRows(_result, EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda$lambda$lambda(_result)); } function Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda(closure$personGroupUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personGroupUid = closure$personGroupUid_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda; Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personGroupUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda(closure$personGroupUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda(closure$personGroupUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } EntityRoleDao_JdbcKt.prototype.filterByPersonWithExtraAsList_s8cxhz$ = function (personGroupUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin("\n |\n | SELECT \n | (CASE \n | WHEN EntityRole.erTableId = 6\tTHEN (SELECT Clazz.clazzName FROM Clazz WHERE Clazz.clazzUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 9\tTHEN (SELECT Person.firstNames||' '||Person.lastName FROM Person WHERE Person.personUid = EntityRole.erEntityUid)\n | WHEN EntityRole.erTableId = 164\tTHEN (SELECT School.schoolName FROM School WHERE School.schoolUid = EntityRole.erEntityUid)\n | ELSE '' \n | END) as entityRoleScopeName,\n | Role.*, EntityRole.* FROM EntityRole\n | LEFT JOIN Role ON EntityRole.erRoleUid = Role.roleUid \n | WHERE EntityRole.erGroupUid = ?\n | AND CAST(EntityRole.erActive AS INTEGER) = 1 \n | \n ")), EntityRoleDao_JdbcKt$filterByPersonWithExtraAsList$lambda(personGroupUid), continuation); }; function EntityRoleDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_erUid = closure$_result.getLong_61zpoe$('erUid'); var _tmp_erMasterCsn = closure$_result.getLong_61zpoe$('erMasterCsn'); var _tmp_erLocalCsn = closure$_result.getLong_61zpoe$('erLocalCsn'); var _tmp_erLastChangedBy = closure$_result.getInt_61zpoe$('erLastChangedBy'); var _tmp_erLct = closure$_result.getLong_61zpoe$('erLct'); var _tmp_erTableId = closure$_result.getInt_61zpoe$('erTableId'); var _tmp_erEntityUid = closure$_result.getLong_61zpoe$('erEntityUid'); var _tmp_erGroupUid = closure$_result.getLong_61zpoe$('erGroupUid'); var _tmp_erRoleUid = closure$_result.getLong_61zpoe$('erRoleUid'); var _tmp_erActive = closure$_result.getBoolean_61zpoe$('erActive'); var $receiver = new EntityRole(); $receiver.erUid = _tmp_erUid; $receiver.erMasterCsn = _tmp_erMasterCsn; $receiver.erLocalCsn = _tmp_erLocalCsn; $receiver.erLastChangedBy = _tmp_erLastChangedBy; $receiver.erLct = _tmp_erLct; $receiver.erTableId = _tmp_erTableId; $receiver.erEntityUid = _tmp_erEntityUid; $receiver.erGroupUid = _tmp_erGroupUid; $receiver.erRoleUid = _tmp_erRoleUid; $receiver.erActive = _tmp_erActive; return $receiver; }; } function EntityRoleDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, EntityRoleDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda; Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } EntityRoleDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM EntityRole WHERE erUid = ?'), EntityRoleDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_erUid = closure$_result.getLong_61zpoe$('erUid'); var _tmp_erMasterCsn = closure$_result.getLong_61zpoe$('erMasterCsn'); var _tmp_erLocalCsn = closure$_result.getLong_61zpoe$('erLocalCsn'); var _tmp_erLastChangedBy = closure$_result.getInt_61zpoe$('erLastChangedBy'); var _tmp_erLct = closure$_result.getLong_61zpoe$('erLct'); var _tmp_erTableId = closure$_result.getInt_61zpoe$('erTableId'); var _tmp_erEntityUid = closure$_result.getLong_61zpoe$('erEntityUid'); var _tmp_erGroupUid = closure$_result.getLong_61zpoe$('erGroupUid'); var _tmp_erRoleUid = closure$_result.getLong_61zpoe$('erRoleUid'); var _tmp_erActive = closure$_result.getBoolean_61zpoe$('erActive'); var $receiver = new EntityRole(); $receiver.erUid = _tmp_erUid; $receiver.erMasterCsn = _tmp_erMasterCsn; $receiver.erLocalCsn = _tmp_erLocalCsn; $receiver.erLastChangedBy = _tmp_erLastChangedBy; $receiver.erLct = _tmp_erLct; $receiver.erTableId = _tmp_erTableId; $receiver.erEntityUid = _tmp_erEntityUid; $receiver.erGroupUid = _tmp_erGroupUid; $receiver.erRoleUid = _tmp_erRoleUid; $receiver.erActive = _tmp_erActive; return $receiver; }; } function EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda(this$EntityRoleDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$EntityRoleDao_JdbcKt = this$EntityRoleDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; } Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda; Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$EntityRoleDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM EntityRole WHERE erUid = ?'), EntityRoleDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function EntityRoleDao_JdbcKt$findByUidLive$lambda(this$EntityRoleDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$EntityRoleDao_JdbcKt$findByUidLive$lambda(this$EntityRoleDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } EntityRoleDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { return new LiveDataImpl(this._db, listOf_0('EntityRole'), EntityRoleDao_JdbcKt$findByUidLive$lambda(this, uid)); }; function EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO EntityRole (erUid, erMasterCsn, erLocalCsn, erLastChangedBy, erLct, erTableId, erEntityUid, erGroupUid, erRoleUid, erActive) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.erUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.erUid); } stmt.setLong_6svq3l$(2, entity.erMasterCsn); stmt.setLong_6svq3l$(3, entity.erLocalCsn); stmt.setInt_vux9f0$(4, entity.erLastChangedBy); stmt.setLong_6svq3l$(5, entity.erLct); stmt.setInt_vux9f0$(6, entity.erTableId); stmt.setLong_6svq3l$(7, entity.erEntityUid); stmt.setLong_6svq3l$(8, entity.erGroupUid); stmt.setLong_6svq3l$(9, entity.erRoleUid); stmt.setBoolean_fzusl$(10, entity.erActive); }; EntityRoleDao_JdbcKt$_insertAdapterEntityRole_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; EntityRoleDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'EntityRoleDao_JdbcKt', interfaces: [EntityRoleDao]}; function EntityRoleDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { EntityRoleDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$userHasTableLevelPermission_3pjtqy$($this, accountPersonUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$permission = permission_0; } Coroutine$userHasTableLevelPermission_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$userHasTableLevelPermission_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$userHasTableLevelPermission_3pjtqy$.prototype.constructor = Coroutine$userHasTableLevelPermission_3pjtqy$; Coroutine$userHasTableLevelPermission_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.userHasTableLevelPermission_3pjtqy$(this.local$accountPersonUid, this.local$permission, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_Repo.prototype.userHasTableLevelPermission_3pjtqy$ = function (accountPersonUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$userHasTableLevelPermission_3pjtqy$(this, accountPersonUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$($this, tableId_0, entityUid_0, groupUid_0, roleUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$tableId = tableId_0; this.local$entityUid = entityUid_0; this.local$groupUid = groupUid_0; this.local$roleUid = roleUid_0; } Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$.prototype.constructor = Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$; Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByEntitiyAndPersonGroupAndRole_tmkdev$(this.local$tableId, this.local$entityUid, this.local$groupUid, this.local$roleUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_Repo.prototype.findByEntitiyAndPersonGroupAndRole_tmkdev$ = function (tableId_0, entityUid_0, groupUid_0, roleUid_0, continuation_0, suspended) { var instance = new Coroutine$findByEntitiyAndPersonGroupAndRole_tmkdev$(this, tableId_0, entityUid_0, groupUid_0, roleUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; EntityRoleDao_Repo.prototype.filterByPersonWithExtra_s8cxhz$ = function (personGroupUid) { var _result = this._dao.filterByPersonWithExtra_s8cxhz$(personGroupUid); return _result; }; function Coroutine$filterByPersonWithExtraAsList_s8cxhz$($this, personGroupUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroupUid = personGroupUid_0; } Coroutine$filterByPersonWithExtraAsList_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$filterByPersonWithExtraAsList_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$filterByPersonWithExtraAsList_s8cxhz$.prototype.constructor = Coroutine$filterByPersonWithExtraAsList_s8cxhz$; Coroutine$filterByPersonWithExtraAsList_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.filterByPersonWithExtraAsList_s8cxhz$(this.local$personGroupUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_Repo.prototype.filterByPersonWithExtraAsList_s8cxhz$ = function (personGroupUid_0, continuation_0, suspended) { var instance = new Coroutine$filterByPersonWithExtraAsList_s8cxhz$(this, personGroupUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$_7($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_7.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_7; Coroutine$findByUidAsync_s8cxhz$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_7(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; EntityRoleDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$updateAsync_fqnpoh$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_fqnpoh$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_fqnpoh$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_fqnpoh$_0.prototype.constructor = Coroutine$updateAsync_fqnpoh$_0; Coroutine$updateAsync_fqnpoh$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_fqnpoh$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_Repo.prototype.updateAsync_fqnpoh$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_fqnpoh$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertOrReplace_fqnpoh$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertOrReplace_fqnpoh$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertOrReplace_fqnpoh$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertOrReplace_fqnpoh$_0.prototype.constructor = Coroutine$insertOrReplace_fqnpoh$_0; Coroutine$insertOrReplace_fqnpoh$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertOrReplace_fqnpoh$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; EntityRoleDao_Repo.prototype.insertOrReplace_fqnpoh$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertOrReplace_fqnpoh$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; EntityRoleDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'EntityRoleDao_Repo', interfaces: [EntityRoleDao]}; function ErrorReportDao() { } ErrorReportDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ErrorReportDao', interfaces: []}; function ErrorReportDao_JdbcKt(_db) { ErrorReportDao.call(this); this._db = _db; this._insertAdapterErrorReport_ = new ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral(this._db); } function Coroutine$insertAsync_vn2wbu$($this, errorReport_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$errorReport = errorReport_0; } Coroutine$insertAsync_vn2wbu$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_vn2wbu$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_vn2wbu$.prototype.constructor = Coroutine$insertAsync_vn2wbu$; Coroutine$insertAsync_vn2wbu$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterErrorReport_.insertAndReturnIdAsync_11rb$(this.local$errorReport, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_JdbcKt.prototype.insertAsync_vn2wbu$ = function (errorReport_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_vn2wbu$(this, errorReport_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda; Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ErrorReportDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ErrorReportDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_89($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_89.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_89.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_89.prototype.constructor = Coroutine$replicateOnChange_89; Coroutine$replicateOnChange_89.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ErrorReportReplicate(erPk, erDestination)\n | SELECT DISTINCT ErrorReport.errUid AS erUid,\n | UserSession.usClientNodeId AS erDestination\n | FROM ChangeLog\n | JOIN ErrorReport\n | ON ChangeLog.chTableId = 419\n | AND ChangeLog.chEntityPk = ErrorReport.errUid\n | JOIN UserSession ON UserSession.usSessionType = 2\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ErrorReport.errLct != COALESCE(\n | (SELECT erVersionId\n | FROM ErrorReportReplicate\n | WHERE erPk = ErrorReport.errUid\n | AND erDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(erPk, erDestination) DO UPDATE\n | SET erPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ErrorReportReplicate(erPk, erDestination)\n | SELECT DISTINCT ErrorReport.errUid AS erUid,\n | UserSession.usClientNodeId AS erDestination\n | FROM ChangeLog\n | JOIN ErrorReport\n | ON ChangeLog.chTableId = 419\n | AND ChangeLog.chEntityPk = ErrorReport.errUid\n | JOIN UserSession ON UserSession.usSessionType = 2\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ErrorReport.errLct != COALESCE(\n | (SELECT erVersionId\n | FROM ErrorReportReplicate\n | WHERE erPk = ErrorReport.errUid\n | AND erDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(erPk, erDestination) DO UPDATE\n | SET erPending = true\n | \n | \n |')), ErrorReportDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_89(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ErrorReportDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_errUid = closure$_result.getLong_61zpoe$('errUid'); var _tmp_errPcsn = closure$_result.getLong_61zpoe$('errPcsn'); var _tmp_errLcsn = closure$_result.getLong_61zpoe$('errLcsn'); var _tmp_errLcb = closure$_result.getInt_61zpoe$('errLcb'); var _tmp_errLct = closure$_result.getLong_61zpoe$('errLct'); var _tmp_severity = closure$_result.getInt_61zpoe$('severity'); var _tmp_timestamp = closure$_result.getLong_61zpoe$('timestamp'); var _tmp_presenterUri = closure$_result.getString_61zpoe$('presenterUri'); var _tmp_appVersion = closure$_result.getString_61zpoe$('appVersion'); var _tmp_versionCode = closure$_result.getInt_61zpoe$('versionCode'); var _tmp_errorCode = closure$_result.getInt_61zpoe$('errorCode'); var _tmp_operatingSys = closure$_result.getString_61zpoe$('operatingSys'); var _tmp_osVersion = closure$_result.getString_61zpoe$('osVersion'); var _tmp_stackTrace = closure$_result.getString_61zpoe$('stackTrace'); var _tmp_message = closure$_result.getString_61zpoe$('message'); var $receiver = new ErrorReport(); $receiver.errUid = _tmp_errUid; $receiver.errPcsn = _tmp_errPcsn; $receiver.errLcsn = _tmp_errLcsn; $receiver.errLcb = _tmp_errLcb; $receiver.errLct = _tmp_errLct; $receiver.severity = _tmp_severity; $receiver.timestamp = _tmp_timestamp; $receiver.presenterUri = _tmp_presenterUri; $receiver.appVersion = _tmp_appVersion; $receiver.versionCode = _tmp_versionCode; $receiver.errorCode = _tmp_errorCode; $receiver.operatingSys = _tmp_operatingSys; $receiver.osVersion = _tmp_osVersion; $receiver.stackTrace = _tmp_stackTrace; $receiver.message = _tmp_message; return $receiver; }; } function ErrorReportDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ErrorReportDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda(closure$errUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$errUid = closure$errUid_0; this.local$_stmt = _stmt_0; } Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda; Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$errUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ErrorReportDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ErrorReportDao_JdbcKt$findByUidAsync$lambda(closure$errUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ErrorReportDao_JdbcKt$findByUidAsync$lambda(closure$errUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ErrorReportDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (errUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ErrorReport.* \n | FROM ErrorReport\n | WHERE errUid = ?\n | \n ')), ErrorReportDao_JdbcKt$findByUidAsync$lambda(errUid), continuation); }; function ErrorReportDao_JdbcKt$findByErrorCode$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_errUid = closure$_result.getLong_61zpoe$('errUid'); var _tmp_errPcsn = closure$_result.getLong_61zpoe$('errPcsn'); var _tmp_errLcsn = closure$_result.getLong_61zpoe$('errLcsn'); var _tmp_errLcb = closure$_result.getInt_61zpoe$('errLcb'); var _tmp_errLct = closure$_result.getLong_61zpoe$('errLct'); var _tmp_severity = closure$_result.getInt_61zpoe$('severity'); var _tmp_timestamp = closure$_result.getLong_61zpoe$('timestamp'); var _tmp_presenterUri = closure$_result.getString_61zpoe$('presenterUri'); var _tmp_appVersion = closure$_result.getString_61zpoe$('appVersion'); var _tmp_versionCode = closure$_result.getInt_61zpoe$('versionCode'); var _tmp_errorCode = closure$_result.getInt_61zpoe$('errorCode'); var _tmp_operatingSys = closure$_result.getString_61zpoe$('operatingSys'); var _tmp_osVersion = closure$_result.getString_61zpoe$('osVersion'); var _tmp_stackTrace = closure$_result.getString_61zpoe$('stackTrace'); var _tmp_message = closure$_result.getString_61zpoe$('message'); var $receiver = new ErrorReport(); $receiver.errUid = _tmp_errUid; $receiver.errPcsn = _tmp_errPcsn; $receiver.errLcsn = _tmp_errLcsn; $receiver.errLcb = _tmp_errLcb; $receiver.errLct = _tmp_errLct; $receiver.severity = _tmp_severity; $receiver.timestamp = _tmp_timestamp; $receiver.presenterUri = _tmp_presenterUri; $receiver.appVersion = _tmp_appVersion; $receiver.versionCode = _tmp_versionCode; $receiver.errorCode = _tmp_errorCode; $receiver.operatingSys = _tmp_operatingSys; $receiver.osVersion = _tmp_osVersion; $receiver.stackTrace = _tmp_stackTrace; $receiver.message = _tmp_message; return $receiver; }; } function ErrorReportDao_JdbcKt$findByErrorCode$lambda$lambda(_result) { return mapRows(_result, ErrorReportDao_JdbcKt$findByErrorCode$lambda$lambda$lambda(_result)); } function Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda(closure$errCode_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$errCode = closure$errCode_0; this.local$_stmt = _stmt_0; } Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda.prototype.constructor = Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda; Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$errCode); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ErrorReportDao_JdbcKt$findByErrorCode$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ErrorReportDao_JdbcKt$findByErrorCode$lambda(closure$errCode_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ErrorReportDao_JdbcKt$findByErrorCode$lambda(closure$errCode_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ErrorReportDao_JdbcKt.prototype.findByErrorCode_za3lpa$ = function (errCode, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ErrorReport.*\n | FROM ErrorReport\n | WHERE errorCode = ? \n | \n ')), ErrorReportDao_JdbcKt$findByErrorCode$lambda(errCode), continuation); }; function ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ErrorReport (errUid, errPcsn, errLcsn, errLcb, errLct, severity, timestamp, presenterUri, appVersion, versionCode, errorCode, operatingSys, osVersion, stackTrace, message) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.errUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.errUid); } stmt.setLong_6svq3l$(2, entity.errPcsn); stmt.setLong_6svq3l$(3, entity.errLcsn); stmt.setInt_vux9f0$(4, entity.errLcb); stmt.setLong_6svq3l$(5, entity.errLct); stmt.setInt_vux9f0$(6, entity.severity); stmt.setLong_6svq3l$(7, entity.timestamp); stmt.setString_vqvrqt$(8, entity.presenterUri); stmt.setString_vqvrqt$(9, entity.appVersion); stmt.setInt_vux9f0$(10, entity.versionCode); stmt.setInt_vux9f0$(11, entity.errorCode); stmt.setString_vqvrqt$(12, entity.operatingSys); stmt.setString_vqvrqt$(13, entity.osVersion); stmt.setString_vqvrqt$(14, entity.stackTrace); stmt.setString_vqvrqt$(15, entity.message); }; ErrorReportDao_JdbcKt$_insertAdapterErrorReport_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ErrorReportDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ErrorReportDao_JdbcKt', interfaces: [ErrorReportDao]}; function ErrorReportDao_ReplicateWrapper(_db, _dao) { ErrorReportDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnChange_90($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_90.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_90.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_90.prototype.constructor = Coroutine$replicateOnChange_90; Coroutine$replicateOnChange_90.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_90(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_vn2wbu$_0($this, errorReport_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$errorReport = errorReport_0; } Coroutine$insertAsync_vn2wbu$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_vn2wbu$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_vn2wbu$_0.prototype.constructor = Coroutine$insertAsync_vn2wbu$_0; Coroutine$insertAsync_vn2wbu$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$errorReport.errUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(419, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$errorReport.errUid = _newPk; this.state_0 = 3; continue; case 3: this.local$errorReport.errLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync_vn2wbu$(this.local$errorReport, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$errorReport.errUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_ReplicateWrapper.prototype.insertAsync_vn2wbu$ = function (errorReport_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_vn2wbu$_0(this, errorReport_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ErrorReportDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (errUid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(errUid, continuation); }; ErrorReportDao_ReplicateWrapper.prototype.findByErrorCode_za3lpa$ = function (errCode, continuation) { return this._dao_0.findByErrorCode_za3lpa$(errCode, continuation); }; ErrorReportDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ErrorReportDao_ReplicateWrapper', interfaces: [ErrorReportDao]}; function ErrorReportDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ErrorReportDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnChange_91($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_91.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_91.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_91.prototype.constructor = Coroutine$replicateOnChange_91; Coroutine$replicateOnChange_91.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_91(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_vn2wbu$_1($this, errorReport_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$errorReport = errorReport_0; } Coroutine$insertAsync_vn2wbu$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_vn2wbu$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_vn2wbu$_1.prototype.constructor = Coroutine$insertAsync_vn2wbu$_1; Coroutine$insertAsync_vn2wbu$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync_vn2wbu$(this.local$errorReport, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_Repo.prototype.insertAsync_vn2wbu$ = function (errorReport_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_vn2wbu$_1(this, errorReport_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$_8($this, errUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$errUid = errUid_0; } Coroutine$findByUidAsync_s8cxhz$_8.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_8.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_8.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_8; Coroutine$findByUidAsync_s8cxhz$_8.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$errUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (errUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_8(this, errUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByErrorCode_za3lpa$($this, errCode_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$errCode = errCode_0; } Coroutine$findByErrorCode_za3lpa$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByErrorCode_za3lpa$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByErrorCode_za3lpa$.prototype.constructor = Coroutine$findByErrorCode_za3lpa$; Coroutine$findByErrorCode_za3lpa$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByErrorCode_za3lpa$(this.local$errCode, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ErrorReportDao_Repo.prototype.findByErrorCode_za3lpa$ = function (errCode_0, continuation_0, suspended) { var instance = new Coroutine$findByErrorCode_za3lpa$(this, errCode_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ErrorReportDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ErrorReportDao_Repo', interfaces: [ErrorReportDao]}; function GroupLearningSessionDao() { } GroupLearningSessionDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'GroupLearningSessionDao', interfaces: [BaseDao]}; function GroupLearningSessionDao_JdbcKt(_db) { GroupLearningSessionDao.call(this); this._db = _db; this._insertAdapterGroupLearningSession_ = new GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral(this._db); } GroupLearningSessionDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterGroupLearningSession_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_98($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_98.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_98.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_98.prototype.constructor = Coroutine$insertAsync_98; Coroutine$insertAsync_98.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterGroupLearningSession_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_98(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; GroupLearningSessionDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterGroupLearningSession_.insertList_4ezy5m$(entityList); }; function GroupLearningSessionDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.groupLearningSessionContentUid); _stmt.setLong_6svq3l$(2, _entity.groupLearningSessionLearnerGroupUid); _stmt.setBoolean_fzusl$(3, _entity.groupLearningSessionInactive); _stmt.setLong_6svq3l$(4, _entity.groupLearningSessionMCSN); _stmt.setLong_6svq3l$(5, _entity.groupLearningSessionCSN); _stmt.setInt_vux9f0$(6, _entity.groupLearningSessionLCB); _stmt.setLong_6svq3l$(7, _entity.groupLearningSessionLct); _stmt.setLong_6svq3l$(8, _entity.groupLearningSessionUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } GroupLearningSessionDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE GroupLearningSession SET groupLearningSessionContentUid = ?, groupLearningSessionLearnerGroupUid = ?, groupLearningSessionInactive = ?, groupLearningSessionMCSN = ?, groupLearningSessionCSN = ?, groupLearningSessionLCB = ?, groupLearningSessionLct = ? WHERE groupLearningSessionUid = ?'; prepareAndUseStatement(this._db, _sql, GroupLearningSessionDao_JdbcKt$updateList$lambda(entityList)); }; function GroupLearningSessionDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.groupLearningSessionContentUid); _stmt.setLong_6svq3l$(2, closure$entity.groupLearningSessionLearnerGroupUid); _stmt.setBoolean_fzusl$(3, closure$entity.groupLearningSessionInactive); _stmt.setLong_6svq3l$(4, closure$entity.groupLearningSessionMCSN); _stmt.setLong_6svq3l$(5, closure$entity.groupLearningSessionCSN); _stmt.setInt_vux9f0$(6, closure$entity.groupLearningSessionLCB); _stmt.setLong_6svq3l$(7, closure$entity.groupLearningSessionLct); _stmt.setLong_6svq3l$(8, closure$entity.groupLearningSessionUid); return _stmt.executeUpdate(); }; } GroupLearningSessionDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE GroupLearningSession SET groupLearningSessionContentUid = ?, groupLearningSessionLearnerGroupUid = ?, groupLearningSessionInactive = ?, groupLearningSessionMCSN = ?, groupLearningSessionCSN = ?, groupLearningSessionLCB = ?, groupLearningSessionLct = ? WHERE groupLearningSessionUid = ?'; prepareAndUseStatement(this._db, _sql, GroupLearningSessionDao_JdbcKt$update$lambda(entity)); }; function Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_92($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_92.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_92.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_92.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_92; Coroutine$replicateOnNewNode_s8cxhz$_92.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO GroupLearningSessionReplicate(glsPk, glsDestination)\n | SELECT DISTINCT GroupLearningSession.groupLearningSessionUid AS glsPk,\n | ? AS glsDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid\n | JOIN GroupLearningSession\n | ON GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND GroupLearningSession.groupLearningSessionLct != COALESCE(\n | (SELECT glsVersionId\n | FROM GroupLearningSessionReplicate\n | WHERE glsPk = GroupLearningSession.groupLearningSessionUid\n | AND glsDestination = ?), 0) \n | /*psql ON CONFLICT(glsPk, glsDestination) DO UPDATE\n | SET glsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO GroupLearningSessionReplicate(glsPk, glsDestination)\n | SELECT DISTINCT GroupLearningSession.groupLearningSessionUid AS glsPk,\n | ? AS glsDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid\n | JOIN GroupLearningSession\n | ON GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND GroupLearningSession.groupLearningSessionLct != COALESCE(\n | (SELECT glsVersionId\n | FROM GroupLearningSessionReplicate\n | WHERE glsPk = GroupLearningSession.groupLearningSessionUid\n | AND glsDestination = ?), 0) \n | ON CONFLICT(glsPk, glsDestination) DO UPDATE\n | SET glsPending = true\n | \n | \n |')), GroupLearningSessionDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_92(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda; Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_92($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_92.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_92.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_92.prototype.constructor = Coroutine$replicateOnChange_92; Coroutine$replicateOnChange_92.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO GroupLearningSessionReplicate(glsPk, glsDestination)\n | SELECT DISTINCT GroupLearningSession.groupLearningSessionUid AS glsUid,\n | UserSession.usClientNodeId AS glsDestination\n | FROM ChangeLog\n | JOIN GroupLearningSession\n | ON ChangeLog.chTableId = 302\n | AND ChangeLog.chEntityPk = GroupLearningSession.groupLearningSessionUid\n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberLgUid = GroupLearningSession.groupLearningSessionLearnerGroupUid\n | JOIN Person\n | ON Person.personUid = LearnerGroupMember.learnerGroupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND GroupLearningSession.groupLearningSessionLct != COALESCE(\n | (SELECT glsVersionId\n | FROM GroupLearningSessionReplicate\n | WHERE glsPk = GroupLearningSession.groupLearningSessionUid\n | AND glsDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(glsPk, glsDestination) DO UPDATE\n | SET glsPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO GroupLearningSessionReplicate(glsPk, glsDestination)\n | SELECT DISTINCT GroupLearningSession.groupLearningSessionUid AS glsUid,\n | UserSession.usClientNodeId AS glsDestination\n | FROM ChangeLog\n | JOIN GroupLearningSession\n | ON ChangeLog.chTableId = 302\n | AND ChangeLog.chEntityPk = GroupLearningSession.groupLearningSessionUid\n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberLgUid = GroupLearningSession.groupLearningSessionLearnerGroupUid\n | JOIN Person\n | ON Person.personUid = LearnerGroupMember.learnerGroupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND GroupLearningSession.groupLearningSessionLct != COALESCE(\n | (SELECT glsVersionId\n | FROM GroupLearningSessionReplicate\n | WHERE glsPk = GroupLearningSession.groupLearningSessionUid\n | AND glsDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(glsPk, glsDestination) DO UPDATE\n | SET glsPending = true\n | \n | \n |')), GroupLearningSessionDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_92(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO GroupLearningSession (groupLearningSessionUid, groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid, groupLearningSessionInactive, groupLearningSessionMCSN, groupLearningSessionCSN, groupLearningSessionLCB, groupLearningSessionLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.groupLearningSessionUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.groupLearningSessionUid); } stmt.setLong_6svq3l$(2, entity.groupLearningSessionContentUid); stmt.setLong_6svq3l$(3, entity.groupLearningSessionLearnerGroupUid); stmt.setBoolean_fzusl$(4, entity.groupLearningSessionInactive); stmt.setLong_6svq3l$(5, entity.groupLearningSessionMCSN); stmt.setLong_6svq3l$(6, entity.groupLearningSessionCSN); stmt.setInt_vux9f0$(7, entity.groupLearningSessionLCB); stmt.setLong_6svq3l$(8, entity.groupLearningSessionLct); }; GroupLearningSessionDao_JdbcKt$_insertAdapterGroupLearningSession_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; GroupLearningSessionDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'GroupLearningSessionDao_JdbcKt', interfaces: [GroupLearningSessionDao]}; function GroupLearningSessionDao_ReplicateWrapper(_db, _dao) { GroupLearningSessionDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_93($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_93.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_93.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_93.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_93; Coroutine$replicateOnNewNode_s8cxhz$_93.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_93(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_93($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_93.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_93.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_93.prototype.constructor = Coroutine$replicateOnChange_93; Coroutine$replicateOnChange_93.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_93(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; GroupLearningSessionDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_99($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_99.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_99.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_99.prototype.constructor = Coroutine$insertAsync_99; Coroutine$insertAsync_99.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.groupLearningSessionUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(302, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.groupLearningSessionUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.groupLearningSessionLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.groupLearningSessionUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_99(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; GroupLearningSessionDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; GroupLearningSessionDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; GroupLearningSessionDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; GroupLearningSessionDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'GroupLearningSessionDao_ReplicateWrapper', interfaces: [GroupLearningSessionDao]}; function GroupLearningSessionDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { GroupLearningSessionDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_94($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_94.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_94.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_94.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_94; Coroutine$replicateOnNewNode_s8cxhz$_94.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_94(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_94($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_94.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_94.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_94.prototype.constructor = Coroutine$replicateOnChange_94; Coroutine$replicateOnChange_94.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_94(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; GroupLearningSessionDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_100($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_100.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_100.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_100.prototype.constructor = Coroutine$insertAsync_100; Coroutine$insertAsync_100.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; GroupLearningSessionDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_100(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; GroupLearningSessionDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; GroupLearningSessionDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; GroupLearningSessionDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; GroupLearningSessionDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'GroupLearningSessionDao_Repo', interfaces: [GroupLearningSessionDao]}; function HolidayCalendarDao() { } HolidayCalendarDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayCalendarDao', interfaces: [BaseDao]}; function HolidayCalendarDao_JdbcKt(_db) { HolidayCalendarDao.call(this); this._db = _db; this._insertAdapterHolidayCalendar_upsert = new HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral(this._db); this._insertAdapterHolidayCalendar_ = new HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral(this._db); } HolidayCalendarDao_JdbcKt.prototype.replaceList_qyl16p$ = function (list) { this._insertAdapterHolidayCalendar_upsert.insertList_4ezy5m$(list); }; HolidayCalendarDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterHolidayCalendar_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_101($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_101.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_101.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_101.prototype.constructor = Coroutine$insertAsync_101; Coroutine$insertAsync_101.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterHolidayCalendar_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_101(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayCalendarDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterHolidayCalendar_.insertList_4ezy5m$(entityList); }; function Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda; Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.umCalendarName); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$entity.umCalendarCategory); this.local$_stmt.setBoolean_fzusl$(3, this.local$closure$entity.umCalendarActive); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.umCalendarMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$entity.umCalendarLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$entity.umCalendarLastChangedBy); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.umCalendarLct); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.umCalendarUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_wzqrsg$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_wzqrsg$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_wzqrsg$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_wzqrsg$.prototype.constructor = Coroutine$updateAsync_wzqrsg$; Coroutine$updateAsync_wzqrsg$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE HolidayCalendar SET umCalendarName = ?, umCalendarCategory = ?, umCalendarActive = ?, umCalendarMasterChangeSeqNum = ?, umCalendarLocalChangeSeqNum = ?, umCalendarLastChangedBy = ?, umCalendarLct = ? WHERE umCalendarUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, HolidayCalendarDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_JdbcKt.prototype.updateAsync_wzqrsg$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_wzqrsg$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function HolidayCalendarDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.umCalendarName); _stmt.setInt_vux9f0$(2, _entity.umCalendarCategory); _stmt.setBoolean_fzusl$(3, _entity.umCalendarActive); _stmt.setLong_6svq3l$(4, _entity.umCalendarMasterChangeSeqNum); _stmt.setLong_6svq3l$(5, _entity.umCalendarLocalChangeSeqNum); _stmt.setInt_vux9f0$(6, _entity.umCalendarLastChangedBy); _stmt.setLong_6svq3l$(7, _entity.umCalendarLct); _stmt.setLong_6svq3l$(8, _entity.umCalendarUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } HolidayCalendarDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE HolidayCalendar SET umCalendarName = ?, umCalendarCategory = ?, umCalendarActive = ?, umCalendarMasterChangeSeqNum = ?, umCalendarLocalChangeSeqNum = ?, umCalendarLastChangedBy = ?, umCalendarLct = ? WHERE umCalendarUid = ?'; prepareAndUseStatement(this._db, _sql, HolidayCalendarDao_JdbcKt$updateList$lambda(entityList)); }; function HolidayCalendarDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.umCalendarName); _stmt.setInt_vux9f0$(2, closure$entity.umCalendarCategory); _stmt.setBoolean_fzusl$(3, closure$entity.umCalendarActive); _stmt.setLong_6svq3l$(4, closure$entity.umCalendarMasterChangeSeqNum); _stmt.setLong_6svq3l$(5, closure$entity.umCalendarLocalChangeSeqNum); _stmt.setInt_vux9f0$(6, closure$entity.umCalendarLastChangedBy); _stmt.setLong_6svq3l$(7, closure$entity.umCalendarLct); _stmt.setLong_6svq3l$(8, closure$entity.umCalendarUid); return _stmt.executeUpdate(); }; } HolidayCalendarDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE HolidayCalendar SET umCalendarName = ?, umCalendarCategory = ?, umCalendarActive = ?, umCalendarMasterChangeSeqNum = ?, umCalendarLocalChangeSeqNum = ?, umCalendarLastChangedBy = ?, umCalendarLct = ? WHERE umCalendarUid = ?'; prepareAndUseStatement(this._db, _sql, HolidayCalendarDao_JdbcKt$update$lambda(entity)); }; function Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_95($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_95.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_95.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_95.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_95; Coroutine$replicateOnNewNode_s8cxhz$_95.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO HolidayCalendarReplicate(hcPk, hcDestination)\n | SELECT DISTINCT HolidayCalendar.umCalendarUid AS hcPk,\n | ? AS hcDestination\n | FROM HolidayCalendar\n | JOIN UserSession\n | ON UserSession.usClientNodeId = ?\n | --notpsql \n | WHERE HolidayCalendar.umCalendarLct != COALESCE(\n | (SELECT hcVersionId\n | FROM HolidayCalendarReplicate\n | WHERE hcPk = HolidayCalendar.umCalendarUid\n | AND hcDestination = UserSession.usClientNodeId), 0) \n | --endnotpsql \n | /*psql ON CONFLICT(hcPk, hcDestination) DO UPDATE\n | SET hcPending = (SELECT HolidayCalendar.umCalendarLct\n | FROM HolidayCalendar\n | WHERE HolidayCalendar.umCalendarUid = EXCLUDED.hcPk ) \n | != HolidayCalendarReplicate.hcPk\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO HolidayCalendarReplicate(hcPk, hcDestination)\n | SELECT DISTINCT HolidayCalendar.umCalendarUid AS hcPk,\n | ? AS hcDestination\n | FROM HolidayCalendar\n | JOIN UserSession\n | ON UserSession.usClientNodeId = ?\n | ON CONFLICT(hcPk, hcDestination) DO UPDATE\n | SET hcPending = (SELECT HolidayCalendar.umCalendarLct\n | FROM HolidayCalendar\n | WHERE HolidayCalendar.umCalendarUid = EXCLUDED.hcPk ) \n | != HolidayCalendarReplicate.hcPk\n | \n | \n |')), HolidayCalendarDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_95(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda; Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_95($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_95.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_95.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_95.prototype.constructor = Coroutine$replicateOnChange_95; Coroutine$replicateOnChange_95.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO HolidayCalendarReplicate(hcPk, hcDestination)\n | SELECT DISTINCT HolidayCalendar.umCalendarUid AS hcUid,\n | UserSession.usClientNodeId AS hcDestination\n | FROM ChangeLog\n | JOIN HolidayCalendar\n | ON ChangeLog.chTableId = 28\n | AND ChangeLog.chEntityPk = HolidayCalendar.umCalendarUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | --notpsql \n | AND HolidayCalendar.umCalendarLct != COALESCE(\n | (SELECT hcVersionId\n | FROM HolidayCalendarReplicate\n | WHERE hcPk = HolidayCalendar.umCalendarUid\n | AND hcDestination = UserSession.usClientNodeId), 0) \n | --endnotpsql \n | /*psql ON CONFLICT(hcPk, hcDestination) DO UPDATE\n | SET hcPending = (SELECT HolidayCalendar.umCalendarLct\n | FROM HolidayCalendar\n | WHERE HolidayCalendar.umCalendarUid = EXCLUDED.hcPk ) \n | != HolidayCalendarReplicate.hcPk \n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO HolidayCalendarReplicate(hcPk, hcDestination)\n | SELECT DISTINCT HolidayCalendar.umCalendarUid AS hcUid,\n | UserSession.usClientNodeId AS hcDestination\n | FROM ChangeLog\n | JOIN HolidayCalendar\n | ON ChangeLog.chTableId = 28\n | AND ChangeLog.chEntityPk = HolidayCalendar.umCalendarUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | ON CONFLICT(hcPk, hcDestination) DO UPDATE\n | SET hcPending = (SELECT HolidayCalendar.umCalendarLct\n | FROM HolidayCalendar\n | WHERE HolidayCalendar.umCalendarUid = EXCLUDED.hcPk ) \n | != HolidayCalendarReplicate.hcPk \n | \n | \n |')), HolidayCalendarDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_95(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral(this$HolidayCalendarDao_JdbcKt) { this.this$HolidayCalendarDao_JdbcKt = this$HolidayCalendarDao_JdbcKt; DataSourceFactory.call(this); } function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_numEntries = closure$_result.getInt_61zpoe$('numEntries'); var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); var _tmp_umCalendarName = closure$_result.getString_61zpoe$('umCalendarName'); var _tmp_umCalendarCategory = closure$_result.getInt_61zpoe$('umCalendarCategory'); var _tmp_umCalendarActive = closure$_result.getBoolean_61zpoe$('umCalendarActive'); var _tmp_umCalendarMasterChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); var _tmp_umCalendarLocalChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); var _tmp_umCalendarLastChangedBy = closure$_result.getInt_61zpoe$('umCalendarLastChangedBy'); var _tmp_umCalendarLct = closure$_result.getLong_61zpoe$('umCalendarLct'); var $receiver = new HolidayCalendarWithNumEntries(); $receiver.numEntries = _tmp_numEntries; $receiver.umCalendarUid = _tmp_umCalendarUid; $receiver.umCalendarName = _tmp_umCalendarName; $receiver.umCalendarCategory = _tmp_umCalendarCategory; $receiver.umCalendarActive = _tmp_umCalendarActive; $receiver.umCalendarMasterChangeSeqNum = _tmp_umCalendarMasterChangeSeqNum; $receiver.umCalendarLocalChangeSeqNum = _tmp_umCalendarLocalChangeSeqNum; $receiver.umCalendarLastChangedBy = _tmp_umCalendarLastChangedBy; $receiver.umCalendarLct = _tmp_umCalendarLct; return $receiver; }; } function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda(this$HolidayCalendarDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$HolidayCalendarDao_JdbcKt = this$HolidayCalendarDao_JdbcKt_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$HolidayCalendarDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT HolidayCalendar.* ,\n | (SELECT COUNT(*) FROM Holiday \n | WHERE holHolidayCalendarUid = HolidayCalendar.umCalendarUid \n | AND CAST(holActive AS INTEGER) = 1) AS numEntries \n | FROM HolidayCalendar WHERE CAST(umCalendarActive AS INTEGER) = 1 AND \n | umCalendarCategory = 1) LIMIT ? OFFSET ?\n ')), HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda$lambda(this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda(this$HolidayCalendarDao_JdbcKt_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda(this$HolidayCalendarDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$HolidayCalendarDao_JdbcKt._db, listOf(['Holiday', 'HolidayCalendar']), HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getData$lambda(this.this$HolidayCalendarDao_JdbcKt, _limit, _offset)); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda(this$HolidayCalendarDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$HolidayCalendarDao_JdbcKt = this$HolidayCalendarDao_JdbcKt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$HolidayCalendarDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT HolidayCalendar.* ,\n | (SELECT COUNT(*) FROM Holiday \n | WHERE holHolidayCalendarUid = HolidayCalendar.umCalendarUid \n | AND CAST(holActive AS INTEGER) = 1) AS numEntries \n | FROM HolidayCalendar WHERE CAST(umCalendarActive AS INTEGER) = 1 AND \n | umCalendarCategory = 1) \n ')), HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda(this$HolidayCalendarDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda(this$HolidayCalendarDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$HolidayCalendarDao_JdbcKt._db, listOf(['Holiday', 'HolidayCalendar']), HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral$getLength$lambda(this.this$HolidayCalendarDao_JdbcKt)); }; HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; HolidayCalendarDao_JdbcKt.prototype.findAllHolidaysWithEntriesCount = function () { return new HolidayCalendarDao_JdbcKt$findAllHolidaysWithEntriesCount$ObjectLiteral(this); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); var _tmp_umCalendarName = closure$_result.getString_61zpoe$('umCalendarName'); var _tmp_umCalendarCategory = closure$_result.getInt_61zpoe$('umCalendarCategory'); var _tmp_umCalendarActive = closure$_result.getBoolean_61zpoe$('umCalendarActive'); var _tmp_umCalendarMasterChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); var _tmp_umCalendarLocalChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); var _tmp_umCalendarLastChangedBy = closure$_result.getInt_61zpoe$('umCalendarLastChangedBy'); var _tmp_umCalendarLct = closure$_result.getLong_61zpoe$('umCalendarLct'); var $receiver = new HolidayCalendar(); $receiver.umCalendarUid = _tmp_umCalendarUid; $receiver.umCalendarName = _tmp_umCalendarName; $receiver.umCalendarCategory = _tmp_umCalendarCategory; $receiver.umCalendarActive = _tmp_umCalendarActive; $receiver.umCalendarMasterChangeSeqNum = _tmp_umCalendarMasterChangeSeqNum; $receiver.umCalendarLocalChangeSeqNum = _tmp_umCalendarLocalChangeSeqNum; $receiver.umCalendarLastChangedBy = _tmp_umCalendarLastChangedBy; $receiver.umCalendarLct = _tmp_umCalendarLct; return $receiver; }; } function HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda$lambda(_result) { return mapRows(_result, HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda(this$HolidayCalendarDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$HolidayCalendarDao_JdbcKt = this$HolidayCalendarDao_JdbcKt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$HolidayCalendarDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM HolidayCalendar WHERE CAST(umCalendarActive AS INTEGER) = 1 AND umCalendarCategory = 1'), HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda(this$HolidayCalendarDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda(this$HolidayCalendarDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } HolidayCalendarDao_JdbcKt.prototype.findAllHolidaysLiveData = function () { return new LiveDataImpl(this._db, listOf_0('HolidayCalendar'), HolidayCalendarDao_JdbcKt$findAllHolidaysLiveData$lambda(this)); }; function HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); var _tmp_umCalendarName = closure$_result.getString_61zpoe$('umCalendarName'); var _tmp_umCalendarCategory = closure$_result.getInt_61zpoe$('umCalendarCategory'); var _tmp_umCalendarActive = closure$_result.getBoolean_61zpoe$('umCalendarActive'); var _tmp_umCalendarMasterChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); var _tmp_umCalendarLocalChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); var _tmp_umCalendarLastChangedBy = closure$_result.getInt_61zpoe$('umCalendarLastChangedBy'); var _tmp_umCalendarLct = closure$_result.getLong_61zpoe$('umCalendarLct'); var $receiver = new HolidayCalendar(); $receiver.umCalendarUid = _tmp_umCalendarUid; $receiver.umCalendarName = _tmp_umCalendarName; $receiver.umCalendarCategory = _tmp_umCalendarCategory; $receiver.umCalendarActive = _tmp_umCalendarActive; $receiver.umCalendarMasterChangeSeqNum = _tmp_umCalendarMasterChangeSeqNum; $receiver.umCalendarLocalChangeSeqNum = _tmp_umCalendarLocalChangeSeqNum; $receiver.umCalendarLastChangedBy = _tmp_umCalendarLastChangedBy; $receiver.umCalendarLct = _tmp_umCalendarLct; return $receiver; }; } function HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda(this$HolidayCalendarDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$HolidayCalendarDao_JdbcKt = this$HolidayCalendarDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; } Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$HolidayCalendarDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM HolidayCalendar WHERE umCalendarUid = ? AND CAST(umCalendarActive AS INTEGER) = 1'), HolidayCalendarDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findByUidLive$lambda(this$HolidayCalendarDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findByUidLive$lambda(this$HolidayCalendarDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } HolidayCalendarDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { return new LiveDataImpl(this._db, listOf_0('HolidayCalendar'), HolidayCalendarDao_JdbcKt$findByUidLive$lambda(this, uid)); }; function HolidayCalendarDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); var _tmp_umCalendarName = closure$_result.getString_61zpoe$('umCalendarName'); var _tmp_umCalendarCategory = closure$_result.getInt_61zpoe$('umCalendarCategory'); var _tmp_umCalendarActive = closure$_result.getBoolean_61zpoe$('umCalendarActive'); var _tmp_umCalendarMasterChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); var _tmp_umCalendarLocalChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); var _tmp_umCalendarLastChangedBy = closure$_result.getInt_61zpoe$('umCalendarLastChangedBy'); var _tmp_umCalendarLct = closure$_result.getLong_61zpoe$('umCalendarLct'); var $receiver = new HolidayCalendar(); $receiver.umCalendarUid = _tmp_umCalendarUid; $receiver.umCalendarName = _tmp_umCalendarName; $receiver.umCalendarCategory = _tmp_umCalendarCategory; $receiver.umCalendarActive = _tmp_umCalendarActive; $receiver.umCalendarMasterChangeSeqNum = _tmp_umCalendarMasterChangeSeqNum; $receiver.umCalendarLocalChangeSeqNum = _tmp_umCalendarLocalChangeSeqNum; $receiver.umCalendarLastChangedBy = _tmp_umCalendarLastChangedBy; $receiver.umCalendarLct = _tmp_umCalendarLct; return $receiver; }; } function HolidayCalendarDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, HolidayCalendarDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayCalendarDao_JdbcKt$findByUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findByUid$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findByUid$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } HolidayCalendarDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM HolidayCalendar WHERE umCalendarUid = ?'), HolidayCalendarDao_JdbcKt$findByUid$lambda(uid), continuation); }; function HolidayCalendarDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); var _tmp_umCalendarName = closure$_result.getString_61zpoe$('umCalendarName'); var _tmp_umCalendarCategory = closure$_result.getInt_61zpoe$('umCalendarCategory'); var _tmp_umCalendarActive = closure$_result.getBoolean_61zpoe$('umCalendarActive'); var _tmp_umCalendarMasterChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); var _tmp_umCalendarLocalChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); var _tmp_umCalendarLastChangedBy = closure$_result.getInt_61zpoe$('umCalendarLastChangedBy'); var _tmp_umCalendarLct = closure$_result.getLong_61zpoe$('umCalendarLct'); var $receiver = new HolidayCalendar(); $receiver.umCalendarUid = _tmp_umCalendarUid; $receiver.umCalendarName = _tmp_umCalendarName; $receiver.umCalendarCategory = _tmp_umCalendarCategory; $receiver.umCalendarActive = _tmp_umCalendarActive; $receiver.umCalendarMasterChangeSeqNum = _tmp_umCalendarMasterChangeSeqNum; $receiver.umCalendarLocalChangeSeqNum = _tmp_umCalendarLocalChangeSeqNum; $receiver.umCalendarLastChangedBy = _tmp_umCalendarLastChangedBy; $receiver.umCalendarLct = _tmp_umCalendarLct; return $receiver; }; } function HolidayCalendarDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, HolidayCalendarDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda; Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayCalendarDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayCalendarDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayCalendarDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } HolidayCalendarDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM HolidayCalendar WHERE umCalendarUid = ?'), HolidayCalendarDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO HolidayCalendar (umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.umCalendarUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.umCalendarUid); } stmt.setString_vqvrqt$(2, entity.umCalendarName); stmt.setInt_vux9f0$(3, entity.umCalendarCategory); stmt.setBoolean_fzusl$(4, entity.umCalendarActive); stmt.setLong_6svq3l$(5, entity.umCalendarMasterChangeSeqNum); stmt.setLong_6svq3l$(6, entity.umCalendarLocalChangeSeqNum); stmt.setInt_vux9f0$(7, entity.umCalendarLastChangedBy); stmt.setLong_6svq3l$(8, entity.umCalendarLct); }; HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO HolidayCalendar (umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.umCalendarUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.umCalendarUid); } stmt.setString_vqvrqt$(2, entity.umCalendarName); stmt.setInt_vux9f0$(3, entity.umCalendarCategory); stmt.setBoolean_fzusl$(4, entity.umCalendarActive); stmt.setLong_6svq3l$(5, entity.umCalendarMasterChangeSeqNum); stmt.setLong_6svq3l$(6, entity.umCalendarLocalChangeSeqNum); stmt.setInt_vux9f0$(7, entity.umCalendarLastChangedBy); stmt.setLong_6svq3l$(8, entity.umCalendarLct); }; HolidayCalendarDao_JdbcKt$_insertAdapterHolidayCalendar_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; HolidayCalendarDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayCalendarDao_JdbcKt', interfaces: [HolidayCalendarDao]}; function HolidayCalendarDao_ReplicateWrapper(_db, _dao) { HolidayCalendarDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_96($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_96.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_96.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_96.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_96; Coroutine$replicateOnNewNode_s8cxhz$_96.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_96(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_96($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_96.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_96.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_96.prototype.constructor = Coroutine$replicateOnChange_96; Coroutine$replicateOnChange_96.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_96(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayCalendarDao_ReplicateWrapper.prototype.findAllHolidaysWithEntriesCount = function () { return this._dao_0.findAllHolidaysWithEntriesCount(); }; HolidayCalendarDao_ReplicateWrapper.prototype.replaceList_qyl16p$ = function (list) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayCalendarDao_ReplicateWrapper.prototype.findAllHolidaysLiveData = function () { return this._dao_0.findAllHolidaysLiveData(); }; HolidayCalendarDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; HolidayCalendarDao_ReplicateWrapper.prototype.updateAsync_wzqrsg$ = function (entity, continuation) { entity.umCalendarLct = systemTimeInMillis(); return this._dao_0.updateAsync_wzqrsg$(entity, continuation); }; HolidayCalendarDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUid_s8cxhz$(uid, continuation); }; HolidayCalendarDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; HolidayCalendarDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_102($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_102.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_102.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_102.prototype.constructor = Coroutine$insertAsync_102; Coroutine$insertAsync_102.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.umCalendarUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(28, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.umCalendarUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.umCalendarLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.umCalendarUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_102(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayCalendarDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayCalendarDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayCalendarDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayCalendarDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayCalendarDao_ReplicateWrapper', interfaces: [HolidayCalendarDao]}; function HolidayCalendarDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { HolidayCalendarDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_97($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_97.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_97.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_97.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_97; Coroutine$replicateOnNewNode_s8cxhz$_97.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_97(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_97($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_97.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_97.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_97.prototype.constructor = Coroutine$replicateOnChange_97; Coroutine$replicateOnChange_97.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_97(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayCalendarDao_Repo.prototype.findAllHolidaysWithEntriesCount = function () { var _result = this._dao.findAllHolidaysWithEntriesCount(); return _result; }; HolidayCalendarDao_Repo.prototype.replaceList_qyl16p$ = function (list) { this._dao.replaceList_qyl16p$(list); }; HolidayCalendarDao_Repo.prototype.findAllHolidaysLiveData = function () { var _result = this._dao.findAllHolidaysLiveData(); return _result; }; HolidayCalendarDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$updateAsync_wzqrsg$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_wzqrsg$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_wzqrsg$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_wzqrsg$_0.prototype.constructor = Coroutine$updateAsync_wzqrsg$_0; Coroutine$updateAsync_wzqrsg$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_wzqrsg$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_Repo.prototype.updateAsync_wzqrsg$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_wzqrsg$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUid_s8cxhz$_1($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUid_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$_1.prototype.constructor = Coroutine$findByUid_s8cxhz$_1; Coroutine$findByUid_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_Repo.prototype.findByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$_1(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$_9($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_9.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_9.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_9.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_9; Coroutine$findByUidAsync_s8cxhz$_9.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_9(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayCalendarDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_103($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_103.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_103.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_103.prototype.constructor = Coroutine$insertAsync_103; Coroutine$insertAsync_103.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayCalendarDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_103(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayCalendarDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; HolidayCalendarDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; HolidayCalendarDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; HolidayCalendarDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayCalendarDao_Repo', interfaces: [HolidayCalendarDao]}; function HolidayDao() { } HolidayDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayDao', interfaces: [OneToManyJoinDao, BaseDao]}; function HolidayDao_JdbcKt(_db) { HolidayDao.call(this); this._db = _db; this._insertAdapterHoliday_ = new HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral(this._db); } function Coroutine$updateAsync_cqv1si$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_cqv1si$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_cqv1si$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_cqv1si$.prototype.constructor = Coroutine$updateAsync_cqv1si$; Coroutine$updateAsync_cqv1si$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterHoliday_.insertAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_JdbcKt.prototype.updateAsync_cqv1si$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_cqv1si$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterHoliday_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_104($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_104.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_104.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_104.prototype.constructor = Coroutine$insertAsync_104; Coroutine$insertAsync_104.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterHoliday_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_104(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterHoliday_.insertList_4ezy5m$(entityList); }; function Coroutine$insertListAsync_4ezy5m$_14($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_14.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_14.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_14.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_14; Coroutine$insertListAsync_4ezy5m$_14.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterHoliday_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_14(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function HolidayDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.holMasterCsn); _stmt.setLong_6svq3l$(2, _entity.holLocalCsn); _stmt.setInt_vux9f0$(3, _entity.holLastModBy); _stmt.setLong_6svq3l$(4, _entity.holLct); _stmt.setBoolean_fzusl$(5, _entity.holActive); _stmt.setLong_6svq3l$(6, _entity.holHolidayCalendarUid); _stmt.setLong_6svq3l$(7, _entity.holStartTime); _stmt.setLong_6svq3l$(8, _entity.holEndTime); _stmt.setString_vqvrqt$(9, _entity.holName); _stmt.setLong_6svq3l$(10, _entity.holUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } HolidayDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Holiday SET holMasterCsn = ?, holLocalCsn = ?, holLastModBy = ?, holLct = ?, holActive = ?, holHolidayCalendarUid = ?, holStartTime = ?, holEndTime = ?, holName = ? WHERE holUid = ?'; prepareAndUseStatement(this._db, _sql, HolidayDao_JdbcKt$updateList$lambda(entityList)); }; function HolidayDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.holMasterCsn); _stmt.setLong_6svq3l$(2, closure$entity.holLocalCsn); _stmt.setInt_vux9f0$(3, closure$entity.holLastModBy); _stmt.setLong_6svq3l$(4, closure$entity.holLct); _stmt.setBoolean_fzusl$(5, closure$entity.holActive); _stmt.setLong_6svq3l$(6, closure$entity.holHolidayCalendarUid); _stmt.setLong_6svq3l$(7, closure$entity.holStartTime); _stmt.setLong_6svq3l$(8, closure$entity.holEndTime); _stmt.setString_vqvrqt$(9, closure$entity.holName); _stmt.setLong_6svq3l$(10, closure$entity.holUid); return _stmt.executeUpdate(); }; } HolidayDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Holiday SET holMasterCsn = ?, holLocalCsn = ?, holLastModBy = ?, holLct = ?, holActive = ?, holHolidayCalendarUid = ?, holStartTime = ?, holEndTime = ?, holName = ? WHERE holUid = ?'; prepareAndUseStatement(this._db, _sql, HolidayDao_JdbcKt$update$lambda(entity)); }; function Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda; Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setLong_6svq3l$(1, _entity.holMasterCsn); this.local$_stmt.setLong_6svq3l$(2, _entity.holLocalCsn); this.local$_stmt.setInt_vux9f0$(3, _entity.holLastModBy); this.local$_stmt.setLong_6svq3l$(4, _entity.holLct); this.local$_stmt.setBoolean_fzusl$(5, _entity.holActive); this.local$_stmt.setLong_6svq3l$(6, _entity.holHolidayCalendarUid); this.local$_stmt.setLong_6svq3l$(7, _entity.holStartTime); this.local$_stmt.setLong_6svq3l$(8, _entity.holEndTime); this.local$_stmt.setString_vqvrqt$(9, _entity.holName); this.local$_stmt.setLong_6svq3l$(10, _entity.holUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_14($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_14.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_14.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_14.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_14; Coroutine$updateListAsync_4ezy5m$_14.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE Holiday SET holMasterCsn = ?, holLocalCsn = ?, holLastModBy = ?, holLct = ?, holActive = ?, holHolidayCalendarUid = ?, holStartTime = ?, holEndTime = ?, holName = ? WHERE holUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, HolidayDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_14(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_98($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_98.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_98.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_98.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_98; Coroutine$replicateOnNewNode_s8cxhz$_98.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO HolidayReplicate(holidayPk, holidayDestination)\n | SELECT DISTINCT Holiday.holUid AS holidayPk,\n | ? AS holidayDestination\n | FROM Holiday\n | WHERE Holiday.holLct != COALESCE(\n | (SELECT holidayVersionId\n | FROM HolidayReplicate\n | WHERE holidayPk = Holiday.holUid\n | AND holidayDestination = ?), 0) \n | /*psql ON CONFLICT(holidayPk, holidayDestination) DO UPDATE\n | SET holidayPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO HolidayReplicate(holidayPk, holidayDestination)\n | SELECT DISTINCT Holiday.holUid AS holidayPk,\n | ? AS holidayDestination\n | FROM Holiday\n | WHERE Holiday.holLct != COALESCE(\n | (SELECT holidayVersionId\n | FROM HolidayReplicate\n | WHERE holidayPk = Holiday.holUid\n | AND holidayDestination = ?), 0) \n | ON CONFLICT(holidayPk, holidayDestination) DO UPDATE\n | SET holidayPending = true\n | \n | \n |')), HolidayDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_98(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda; Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_98($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_98.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_98.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_98.prototype.constructor = Coroutine$replicateOnChange_98; Coroutine$replicateOnChange_98.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO HolidayReplicate(holidayPk, holidayDestination)\n | SELECT DISTINCT Holiday.holUid AS holidayUid,\n | UserSession.usClientNodeId AS holidayDestination\n | FROM ChangeLog\n | JOIN Holiday\n | ON ChangeLog.chTableId = 99\n | AND ChangeLog.chEntityPk = Holiday.holUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Holiday.holLct != COALESCE(\n | (SELECT holidayVersionId\n | FROM HolidayReplicate\n | WHERE holidayPk = Holiday.holUid\n | AND holidayDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(holidayPk, holidayDestination) DO UPDATE\n | SET holidayPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO HolidayReplicate(holidayPk, holidayDestination)\n | SELECT DISTINCT Holiday.holUid AS holidayUid,\n | UserSession.usClientNodeId AS holidayDestination\n | FROM ChangeLog\n | JOIN Holiday\n | ON ChangeLog.chTableId = 99\n | AND ChangeLog.chEntityPk = Holiday.holUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Holiday.holLct != COALESCE(\n | (SELECT holidayVersionId\n | FROM HolidayReplicate\n | WHERE holidayPk = Holiday.holUid\n | AND holidayDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(holidayPk, holidayDestination) DO UPDATE\n | SET holidayPending = true\n | \n | \n |')), HolidayDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_98(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function HolidayDao_JdbcKt$findByHolidayCalendaUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_holUid = closure$_result.getLong_61zpoe$('holUid'); var _tmp_holMasterCsn = closure$_result.getLong_61zpoe$('holMasterCsn'); var _tmp_holLocalCsn = closure$_result.getLong_61zpoe$('holLocalCsn'); var _tmp_holLastModBy = closure$_result.getInt_61zpoe$('holLastModBy'); var _tmp_holLct = closure$_result.getLong_61zpoe$('holLct'); var _tmp_holActive = closure$_result.getBoolean_61zpoe$('holActive'); var _tmp_holHolidayCalendarUid = closure$_result.getLong_61zpoe$('holHolidayCalendarUid'); var _tmp_holStartTime = closure$_result.getLong_61zpoe$('holStartTime'); var _tmp_holEndTime = closure$_result.getLong_61zpoe$('holEndTime'); var _tmp_holName = closure$_result.getString_61zpoe$('holName'); var $receiver = new Holiday(); $receiver.holUid = _tmp_holUid; $receiver.holMasterCsn = _tmp_holMasterCsn; $receiver.holLocalCsn = _tmp_holLocalCsn; $receiver.holLastModBy = _tmp_holLastModBy; $receiver.holLct = _tmp_holLct; $receiver.holActive = _tmp_holActive; $receiver.holHolidayCalendarUid = _tmp_holHolidayCalendarUid; $receiver.holStartTime = _tmp_holStartTime; $receiver.holEndTime = _tmp_holEndTime; $receiver.holName = _tmp_holName; return $receiver; }; } function HolidayDao_JdbcKt$findByHolidayCalendaUid$lambda$lambda(_result) { return mapRows(_result, HolidayDao_JdbcKt$findByHolidayCalendaUid$lambda$lambda$lambda(_result)); } function HolidayDao_JdbcKt$findByHolidayCalendaUid$lambda(closure$holidayCalendarUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$holidayCalendarUid); return useResults(_stmt.executeQuery(), HolidayDao_JdbcKt$findByHolidayCalendaUid$lambda$lambda); }; } HolidayDao_JdbcKt.prototype.findByHolidayCalendaUid_s8cxhz$ = function (holidayCalendarUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Holiday WHERE holHolidayCalendarUid = ?'), HolidayDao_JdbcKt$findByHolidayCalendaUid$lambda(holidayCalendarUid)); }; function HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_holUid = closure$_result.getLong_61zpoe$('holUid'); var _tmp_holMasterCsn = closure$_result.getLong_61zpoe$('holMasterCsn'); var _tmp_holLocalCsn = closure$_result.getLong_61zpoe$('holLocalCsn'); var _tmp_holLastModBy = closure$_result.getInt_61zpoe$('holLastModBy'); var _tmp_holLct = closure$_result.getLong_61zpoe$('holLct'); var _tmp_holActive = closure$_result.getBoolean_61zpoe$('holActive'); var _tmp_holHolidayCalendarUid = closure$_result.getLong_61zpoe$('holHolidayCalendarUid'); var _tmp_holStartTime = closure$_result.getLong_61zpoe$('holStartTime'); var _tmp_holEndTime = closure$_result.getLong_61zpoe$('holEndTime'); var _tmp_holName = closure$_result.getString_61zpoe$('holName'); var $receiver = new Holiday(); $receiver.holUid = _tmp_holUid; $receiver.holMasterCsn = _tmp_holMasterCsn; $receiver.holLocalCsn = _tmp_holLocalCsn; $receiver.holLastModBy = _tmp_holLastModBy; $receiver.holLct = _tmp_holLct; $receiver.holActive = _tmp_holActive; $receiver.holHolidayCalendarUid = _tmp_holHolidayCalendarUid; $receiver.holStartTime = _tmp_holStartTime; $receiver.holEndTime = _tmp_holEndTime; $receiver.holName = _tmp_holName; return $receiver; }; } function HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda$lambda(_result) { return mapRows(_result, HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda(closure$holidayCalendarUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$holidayCalendarUid = closure$holidayCalendarUid_0; this.local$_stmt = _stmt_0; } Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda.prototype.constructor = Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda; Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$holidayCalendarUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda(closure$holidayCalendarUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda(closure$holidayCalendarUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } HolidayDao_JdbcKt.prototype.findByHolidayCalendaUidAsync_s8cxhz$ = function (holidayCalendarUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM Holiday WHERE holHolidayCalendarUid = ?'), HolidayDao_JdbcKt$findByHolidayCalendaUidAsync$lambda(holidayCalendarUid), continuation); }; function HolidayDao_JdbcKt$updateActiveByUid$lambda(closure$active, closure$changeTime, closure$holidayUid) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$active); _stmt.setLong_6svq3l$(2, closure$changeTime); _stmt.setLong_6svq3l$(3, closure$holidayUid); return _stmt.executeUpdate(); }; } HolidayDao_JdbcKt.prototype.updateActiveByUid_zaz62j$ = function (holidayUid, active, changeTime) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Holiday \n | SET holActive = ?, \n | holLct = ?\n | WHERE holUid = ?\n ')), HolidayDao_JdbcKt$updateActiveByUid$lambda(active, changeTime, holidayUid)); }; function HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO Holiday (holUid, holMasterCsn, holLocalCsn, holLastModBy, holLct, holActive, holHolidayCalendarUid, holStartTime, holEndTime, holName) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.holUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.holUid); } stmt.setLong_6svq3l$(2, entity.holMasterCsn); stmt.setLong_6svq3l$(3, entity.holLocalCsn); stmt.setInt_vux9f0$(4, entity.holLastModBy); stmt.setLong_6svq3l$(5, entity.holLct); stmt.setBoolean_fzusl$(6, entity.holActive); stmt.setLong_6svq3l$(7, entity.holHolidayCalendarUid); stmt.setLong_6svq3l$(8, entity.holStartTime); stmt.setLong_6svq3l$(9, entity.holEndTime); stmt.setString_vqvrqt$(10, entity.holName); }; HolidayDao_JdbcKt$_insertAdapterHoliday_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; HolidayDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayDao_JdbcKt', interfaces: [HolidayDao]}; function HolidayDao_ReplicateWrapper(_db, _dao) { HolidayDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_99($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_99.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_99.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_99.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_99; Coroutine$replicateOnNewNode_s8cxhz$_99.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_99(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_99($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_99.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_99.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_99.prototype.constructor = Coroutine$replicateOnChange_99; Coroutine$replicateOnChange_99.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_99(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_ReplicateWrapper.prototype.findByHolidayCalendaUid_s8cxhz$ = function (holidayCalendarUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayDao_ReplicateWrapper.prototype.findByHolidayCalendaUidAsync_s8cxhz$ = function (holidayCalendarUid, continuation) { return this._dao_0.findByHolidayCalendaUidAsync_s8cxhz$(holidayCalendarUid, continuation); }; HolidayDao_ReplicateWrapper.prototype.updateActiveByUid_zaz62j$ = function (holidayUid, active, changeTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$updateAsync_cqv1si$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_cqv1si$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_cqv1si$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_cqv1si$_0.prototype.constructor = Coroutine$updateAsync_cqv1si$_0; Coroutine$updateAsync_cqv1si$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.holUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(99, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.holUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.holLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.updateAsync_cqv1si$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_ReplicateWrapper.prototype.updateAsync_cqv1si$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_cqv1si$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_105($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_105.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_105.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_105.prototype.constructor = Coroutine$insertAsync_105; Coroutine$insertAsync_105.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.holUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(99, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.holUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.holLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.holUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_105(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; HolidayDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_15($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_15.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_15.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_15.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_15; Coroutine$insertListAsync_4ezy5m$_15.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.holUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(99, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.holUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.holLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_15(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_15($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_15.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_15.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_15.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_15; Coroutine$updateListAsync_4ezy5m$_15.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.holLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_15(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayDao_ReplicateWrapper', interfaces: [HolidayDao]}; function HolidayDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { HolidayDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_100($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_100.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_100.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_100.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_100; Coroutine$replicateOnNewNode_s8cxhz$_100.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_100(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_100($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_100.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_100.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_100.prototype.constructor = Coroutine$replicateOnChange_100; Coroutine$replicateOnChange_100.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_100(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_Repo.prototype.findByHolidayCalendaUid_s8cxhz$ = function (holidayCalendarUid) { var _result = this._dao.findByHolidayCalendaUid_s8cxhz$(holidayCalendarUid); return _result; }; function Coroutine$findByHolidayCalendaUidAsync_s8cxhz$($this, holidayCalendarUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$holidayCalendarUid = holidayCalendarUid_0; } Coroutine$findByHolidayCalendaUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByHolidayCalendaUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByHolidayCalendaUidAsync_s8cxhz$.prototype.constructor = Coroutine$findByHolidayCalendaUidAsync_s8cxhz$; Coroutine$findByHolidayCalendaUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByHolidayCalendaUidAsync_s8cxhz$(this.local$holidayCalendarUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.findByHolidayCalendaUidAsync_s8cxhz$ = function (holidayCalendarUid_0, continuation_0, suspended) { var instance = new Coroutine$findByHolidayCalendaUidAsync_s8cxhz$(this, holidayCalendarUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_Repo.prototype.updateActiveByUid_zaz62j$ = function (holidayUid, active, changeTime) { this._dao.updateActiveByUid_zaz62j$(holidayUid, active, changeTime); }; function Coroutine$updateAsync_cqv1si$_1($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_cqv1si$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_cqv1si$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_cqv1si$_1.prototype.constructor = Coroutine$updateAsync_cqv1si$_1; Coroutine$updateAsync_cqv1si$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_cqv1si$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.updateAsync_cqv1si$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_cqv1si$_1(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_106($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_106.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_106.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_106.prototype.constructor = Coroutine$insertAsync_106; Coroutine$insertAsync_106.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_106(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; HolidayDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; HolidayDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_16($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_16.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_16.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_16.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_16; Coroutine$insertListAsync_4ezy5m$_16.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_16(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_16($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_16.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_16.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_16.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_16; Coroutine$updateListAsync_4ezy5m$_16.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; HolidayDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_16(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; HolidayDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayDao_Repo', interfaces: [HolidayDao]}; function LanguageDao() { } LanguageDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageDao', interfaces: [BaseDao]}; function LanguageDao_JdbcKt(_db) { LanguageDao.call(this); this._db = _db; this._insertAdapterLanguage_ = new LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral(this._db); this._insertAdapterLanguage_upsert = new LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral(this._db); } function Coroutine$insertListAsync_ib5eyb$($this, languageList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$languageList = languageList_0; } Coroutine$insertListAsync_ib5eyb$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_ib5eyb$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_ib5eyb$.prototype.constructor = Coroutine$insertListAsync_ib5eyb$; Coroutine$insertListAsync_ib5eyb$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLanguage_.insertListAsync_4ezy5m$(this.local$languageList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.insertListAsync_ib5eyb$ = function (languageList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_ib5eyb$(this, languageList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_JdbcKt.prototype.replaceList_ib5eyb$ = function (entityList) { this._insertAdapterLanguage_upsert.insertList_4ezy5m$(entityList); }; LanguageDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterLanguage_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_107($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_107.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_107.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_107.prototype.constructor = Coroutine$insertAsync_107; Coroutine$insertAsync_107.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLanguage_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_107(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterLanguage_.insertList_4ezy5m$(entityList); }; function LanguageDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.name); _stmt.setString_vqvrqt$(2, closure$entity.iso_639_1_standard); _stmt.setString_vqvrqt$(3, closure$entity.iso_639_2_standard); _stmt.setString_vqvrqt$(4, closure$entity.iso_639_3_standard); _stmt.setString_vqvrqt$(5, closure$entity.Language_Type); _stmt.setBoolean_fzusl$(6, closure$entity.languageActive); _stmt.setLong_6svq3l$(7, closure$entity.langLocalChangeSeqNum); _stmt.setLong_6svq3l$(8, closure$entity.langMasterChangeSeqNum); _stmt.setInt_vux9f0$(9, closure$entity.langLastChangedBy); _stmt.setLong_6svq3l$(10, closure$entity.langLct); _stmt.setLong_6svq3l$(11, closure$entity.langUid); return _stmt.executeUpdate(); }; } LanguageDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Language SET name = ?, iso_639_1_standard = ?, iso_639_2_standard = ?, iso_639_3_standard = ?, Language_Type = ?, languageActive = ?, langLocalChangeSeqNum = ?, langMasterChangeSeqNum = ?, langLastChangedBy = ?, langLct = ? WHERE langUid = ?'; prepareAndUseStatement(this._db, _sql, LanguageDao_JdbcKt$update$lambda(entity)); }; function Coroutine$LanguageDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$updateAsync$lambda; Coroutine$LanguageDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.name); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.iso_639_1_standard); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$entity.iso_639_2_standard); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$entity.iso_639_3_standard); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$entity.Language_Type); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$entity.languageActive); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.langLocalChangeSeqNum); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.langMasterChangeSeqNum); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$entity.langLastChangedBy); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.langLct); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$entity.langUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_lqiqse$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_lqiqse$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_lqiqse$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_lqiqse$.prototype.constructor = Coroutine$updateAsync_lqiqse$; Coroutine$updateAsync_lqiqse$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE Language SET name = ?, iso_639_1_standard = ?, iso_639_2_standard = ?, iso_639_3_standard = ?, Language_Type = ?, languageActive = ?, langLocalChangeSeqNum = ?, langMasterChangeSeqNum = ?, langLastChangedBy = ?, langLct = ? WHERE langUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, LanguageDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.updateAsync_lqiqse$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_lqiqse$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LanguageDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.name); _stmt.setString_vqvrqt$(2, _entity.iso_639_1_standard); _stmt.setString_vqvrqt$(3, _entity.iso_639_2_standard); _stmt.setString_vqvrqt$(4, _entity.iso_639_3_standard); _stmt.setString_vqvrqt$(5, _entity.Language_Type); _stmt.setBoolean_fzusl$(6, _entity.languageActive); _stmt.setLong_6svq3l$(7, _entity.langLocalChangeSeqNum); _stmt.setLong_6svq3l$(8, _entity.langMasterChangeSeqNum); _stmt.setInt_vux9f0$(9, _entity.langLastChangedBy); _stmt.setLong_6svq3l$(10, _entity.langLct); _stmt.setLong_6svq3l$(11, _entity.langUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } LanguageDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Language SET name = ?, iso_639_1_standard = ?, iso_639_2_standard = ?, iso_639_3_standard = ?, Language_Type = ?, languageActive = ?, langLocalChangeSeqNum = ?, langMasterChangeSeqNum = ?, langLastChangedBy = ?, langLct = ? WHERE langUid = ?'; prepareAndUseStatement(this._db, _sql, LanguageDao_JdbcKt$updateList$lambda(entityList)); }; function Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_101($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_101.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_101.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_101.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_101; Coroutine$replicateOnNewNode_s8cxhz$_101.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LanguageReplicate(languagePk, languageDestination)\n | SELECT DISTINCT Language.langUid AS languagePk,\n | ? AS languageDestination\n | FROM Language\n | WHERE Language.langLct != COALESCE(\n | (SELECT languageVersionId\n | FROM LanguageReplicate\n | WHERE languagePk = Language.langUid\n | AND languageDestination = ?), 0) \n | /*psql ON CONFLICT(languagePk, languageDestination) DO UPDATE\n | SET languagePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LanguageReplicate(languagePk, languageDestination)\n | SELECT DISTINCT Language.langUid AS languagePk,\n | ? AS languageDestination\n | FROM Language\n | WHERE Language.langLct != COALESCE(\n | (SELECT languageVersionId\n | FROM LanguageReplicate\n | WHERE languagePk = Language.langUid\n | AND languageDestination = ?), 0) \n | ON CONFLICT(languagePk, languageDestination) DO UPDATE\n | SET languagePending = true\n | \n | \n |')), LanguageDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_101(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda; Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_101($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_101.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_101.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_101.prototype.constructor = Coroutine$replicateOnChange_101; Coroutine$replicateOnChange_101.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LanguageReplicate(languagePk, languageDestination)\n | SELECT DISTINCT Language.langUid AS languageUid,\n | UserSession.usClientNodeId AS languageDestination\n | FROM ChangeLog\n | JOIN Language\n | ON ChangeLog.chTableId = 13\n | AND ChangeLog.chEntityPk = Language.langUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Language.langLct != COALESCE(\n | (SELECT languageVersionId\n | FROM LanguageReplicate\n | WHERE languagePk = Language.langUid\n | AND languageDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(languagePk, languageDestination) DO UPDATE\n | SET languagePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LanguageReplicate(languagePk, languageDestination)\n | SELECT DISTINCT Language.langUid AS languageUid,\n | UserSession.usClientNodeId AS languageDestination\n | FROM ChangeLog\n | JOIN Language\n | ON ChangeLog.chTableId = 13\n | AND ChangeLog.chEntityPk = Language.langUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Language.langLct != COALESCE(\n | (SELECT languageVersionId\n | FROM LanguageReplicate\n | WHERE languagePk = Language.langUid\n | AND languageDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(languagePk, languageDestination) DO UPDATE\n | SET languagePending = true\n | \n | \n |')), LanguageDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_101(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral(this$LanguageDao_JdbcKt, closure$searchText, closure$sortOrder) { this.this$LanguageDao_JdbcKt = this$LanguageDao_JdbcKt; this.closure$searchText = closure$searchText; this.closure$sortOrder = closure$sortOrder; DataSourceFactory.call(this); } function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); var $receiver = new Language(); $receiver.langUid = _tmp_langUid; $receiver.name = _tmp_name; $receiver.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver.Language_Type = _tmp_Language_Type; $receiver.languageActive = _tmp_languageActive; $receiver.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver.langLastChangedBy = _tmp_langLastChangedBy; $receiver.langLct = _tmp_langLct; return $receiver; }; } function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda(closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda(closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda(closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda(this$LanguageDao_JdbcKt_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LanguageDao_JdbcKt = this$LanguageDao_JdbcKt_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LanguageDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT Language.* \n | FROM Language\n | WHERE name LIKE ?\n | ORDER BY CASE(?)\n | WHEN 1 THEN Language.name \n | WHEN 3 THEN Language.iso_639_1_standard \n | WHEN 5 THEN Language.iso_639_2_standard \n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Language.name \n | WHEN 4 THEN Language.iso_639_1_standard \n | WHEN 6 THEN Language.iso_639_2_standard \n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ?\n ")), LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda$lambda(this.local$closure$searchText, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda(this$LanguageDao_JdbcKt_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda(this$LanguageDao_JdbcKt_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$LanguageDao_JdbcKt._db, listOf_0('Language'), LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getData$lambda(this.this$LanguageDao_JdbcKt, this.closure$searchText, this.closure$sortOrder, _limit, _offset)); }; function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda(closure$searchText_0, closure$sortOrder_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda(closure$searchText_0, closure$sortOrder_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda(closure$searchText_0, closure$sortOrder_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda(this$LanguageDao_JdbcKt_0, closure$searchText_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LanguageDao_JdbcKt = this$LanguageDao_JdbcKt_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; } Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda; Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LanguageDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Language.* \n | FROM Language\n | WHERE name LIKE ?\n | ORDER BY CASE(?)\n | WHEN 1 THEN Language.name \n | WHEN 3 THEN Language.iso_639_1_standard \n | WHEN 5 THEN Language.iso_639_2_standard \n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Language.name \n | WHEN 4 THEN Language.iso_639_1_standard \n | WHEN 6 THEN Language.iso_639_2_standard \n | ELSE ''\n | END DESC\n | ) \n ")), LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda$lambda(this.local$closure$searchText, this.local$closure$sortOrder), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda(this$LanguageDao_JdbcKt_0, closure$searchText_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda(this$LanguageDao_JdbcKt_0, closure$searchText_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$LanguageDao_JdbcKt._db, listOf_0('Language'), LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral$getLength$lambda(this.this$LanguageDao_JdbcKt, this.closure$searchText, this.closure$sortOrder)); }; LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; LanguageDao_JdbcKt.prototype.findLanguagesAsSource_19mbxw$ = function (sortOrder, searchText) { return new LanguageDao_JdbcKt$findLanguagesAsSource$ObjectLiteral(this, searchText, sortOrder); }; function LanguageDao_JdbcKt$findLanguagesList$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); var $receiver = new Language(); $receiver.langUid = _tmp_langUid; $receiver.name = _tmp_name; $receiver.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver.Language_Type = _tmp_Language_Type; $receiver.languageActive = _tmp_languageActive; $receiver.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver.langLastChangedBy = _tmp_langLastChangedBy; $receiver.langLct = _tmp_langLct; return $receiver; }; } function LanguageDao_JdbcKt$findLanguagesList$lambda$lambda(_result) { return mapRows(_result, LanguageDao_JdbcKt$findLanguagesList$lambda$lambda$lambda(_result)); } function LanguageDao_JdbcKt$findLanguagesList$lambda(_stmt) { return useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$findLanguagesList$lambda$lambda); } LanguageDao_JdbcKt.prototype.findLanguagesList = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Language'), LanguageDao_JdbcKt$findLanguagesList$lambda); }; function LanguageDao_JdbcKt$findByName$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); var $receiver = new Language(); $receiver.langUid = _tmp_langUid; $receiver.name = _tmp_name; $receiver.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver.Language_Type = _tmp_Language_Type; $receiver.languageActive = _tmp_languageActive; $receiver.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver.langLastChangedBy = _tmp_langLastChangedBy; $receiver.langLct = _tmp_langLct; return $receiver; }; } function LanguageDao_JdbcKt$findByName$lambda$lambda(_result) { return mapNextRow(_result, null, LanguageDao_JdbcKt$findByName$lambda$lambda$lambda(_result)); } function LanguageDao_JdbcKt$findByName$lambda(closure$name) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$name); return useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$findByName$lambda$lambda); }; } LanguageDao_JdbcKt.prototype.findByName_61zpoe$ = function (name) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Language WHERE name = ? LIMIT 1'), LanguageDao_JdbcKt$findByName$lambda(name)); }; function LanguageDao_JdbcKt$findByTwoCode$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); var $receiver = new Language(); $receiver.langUid = _tmp_langUid; $receiver.name = _tmp_name; $receiver.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver.Language_Type = _tmp_Language_Type; $receiver.languageActive = _tmp_languageActive; $receiver.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver.langLastChangedBy = _tmp_langLastChangedBy; $receiver.langLct = _tmp_langLct; return $receiver; }; } function LanguageDao_JdbcKt$findByTwoCode$lambda$lambda(_result) { return mapNextRow(_result, null, LanguageDao_JdbcKt$findByTwoCode$lambda$lambda$lambda(_result)); } function LanguageDao_JdbcKt$findByTwoCode$lambda(closure$langCode) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$langCode); return useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$findByTwoCode$lambda$lambda); }; } LanguageDao_JdbcKt.prototype.findByTwoCode_61zpoe$ = function (langCode) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Language WHERE iso_639_1_standard = ? LIMIT 1'), LanguageDao_JdbcKt$findByTwoCode$lambda(langCode)); }; function LanguageDao_JdbcKt$findByTwoCodeAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); var $receiver = new Language(); $receiver.langUid = _tmp_langUid; $receiver.name = _tmp_name; $receiver.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver.Language_Type = _tmp_Language_Type; $receiver.languageActive = _tmp_languageActive; $receiver.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver.langLastChangedBy = _tmp_langLastChangedBy; $receiver.langLct = _tmp_langLct; return $receiver; }; } function LanguageDao_JdbcKt$findByTwoCodeAsync$lambda$lambda(_result) { return mapNextRow(_result, null, LanguageDao_JdbcKt$findByTwoCodeAsync$lambda$lambda$lambda(_result)); } function Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda(closure$langCode_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$langCode = closure$langCode_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda; Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$langCode); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LanguageDao_JdbcKt$findByTwoCodeAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findByTwoCodeAsync$lambda(closure$langCode_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findByTwoCodeAsync$lambda(closure$langCode_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LanguageDao_JdbcKt.prototype.findByTwoCodeAsync_61zpoe$ = function (langCode, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM Language WHERE iso_639_1_standard = ? LIMIT 1'), LanguageDao_JdbcKt$findByTwoCodeAsync$lambda(langCode), continuation); }; function LanguageDao_JdbcKt$findByThreeCode$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); var $receiver = new Language(); $receiver.langUid = _tmp_langUid; $receiver.name = _tmp_name; $receiver.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver.Language_Type = _tmp_Language_Type; $receiver.languageActive = _tmp_languageActive; $receiver.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver.langLastChangedBy = _tmp_langLastChangedBy; $receiver.langLct = _tmp_langLct; return $receiver; }; } function LanguageDao_JdbcKt$findByThreeCode$lambda$lambda(_result) { return mapNextRow(_result, null, LanguageDao_JdbcKt$findByThreeCode$lambda$lambda$lambda(_result)); } function LanguageDao_JdbcKt$findByThreeCode$lambda(closure$langCode) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$langCode); _stmt.setString_vqvrqt$(2, closure$langCode); return useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$findByThreeCode$lambda$lambda); }; } LanguageDao_JdbcKt.prototype.findByThreeCode_61zpoe$ = function (langCode) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM LANGUAGE WHERE iso_639_3_standard = ? OR iso_639_2_standard = ? LIMIT 1 '), LanguageDao_JdbcKt$findByThreeCode$lambda(langCode)); }; function LanguageDao_JdbcKt$totalLanguageCount$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function LanguageDao_JdbcKt$totalLanguageCount$lambda$lambda(_result) { return mapNextRow(_result, 0, LanguageDao_JdbcKt$totalLanguageCount$lambda$lambda$lambda(_result)); } function LanguageDao_JdbcKt$totalLanguageCount$lambda(_stmt) { return useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$totalLanguageCount$lambda$lambda); } LanguageDao_JdbcKt.prototype.totalLanguageCount = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT COUNT(*) FROM LANGUAGE'), LanguageDao_JdbcKt$totalLanguageCount$lambda); }; function LanguageDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); var $receiver = new Language(); $receiver.langUid = _tmp_langUid; $receiver.name = _tmp_name; $receiver.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver.Language_Type = _tmp_Language_Type; $receiver.languageActive = _tmp_languageActive; $receiver.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver.langLastChangedBy = _tmp_langLastChangedBy; $receiver.langLct = _tmp_langLct; return $receiver; }; } function LanguageDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, LanguageDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function LanguageDao_JdbcKt$findByUid$lambda(closure$primaryLanguageUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$primaryLanguageUid); return useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$findByUid$lambda$lambda); }; } LanguageDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (primaryLanguageUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM LANGUAGE where langUid = ? LIMIT 1'), LanguageDao_JdbcKt$findByUid$lambda(primaryLanguageUid)); }; function LanguageDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); var $receiver = new Language(); $receiver.langUid = _tmp_langUid; $receiver.name = _tmp_name; $receiver.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver.Language_Type = _tmp_Language_Type; $receiver.languageActive = _tmp_languageActive; $receiver.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver.langLastChangedBy = _tmp_langLastChangedBy; $receiver.langLct = _tmp_langLct; return $receiver; }; } function LanguageDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, LanguageDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda(closure$primaryLanguageUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$primaryLanguageUid = closure$primaryLanguageUid_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda; Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$primaryLanguageUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LanguageDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findByUidAsync$lambda(closure$primaryLanguageUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findByUidAsync$lambda(closure$primaryLanguageUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LanguageDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (primaryLanguageUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM LANGUAGE where langUid = ? LIMIT 1'), LanguageDao_JdbcKt$findByUidAsync$lambda(primaryLanguageUid), continuation); }; function LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); var $receiver = new Language(); $receiver.langUid = _tmp_langUid; $receiver.name = _tmp_name; $receiver.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver.Language_Type = _tmp_Language_Type; $receiver.languageActive = _tmp_languageActive; $receiver.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver.langLastChangedBy = _tmp_langLastChangedBy; $receiver.langLct = _tmp_langLct; return $receiver; }; } function LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda$lambda(_result) { return mapRows(_result, LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda; Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda(this$LanguageDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LanguageDao_JdbcKt = this$LanguageDao_JdbcKt_0; } Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda; Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LanguageDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM LANGUAGE'), LanguageDao_JdbcKt$findAllLanguageLive$lambda$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$findAllLanguageLive$lambda(this$LanguageDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$findAllLanguageLive$lambda(this$LanguageDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LanguageDao_JdbcKt.prototype.findAllLanguageLive = function () { return new LiveDataImpl(this._db, listOf_0('LANGUAGE'), LanguageDao_JdbcKt$findAllLanguageLive$lambda(this)); }; function LanguageDao_JdbcKt$findByUidList$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function LanguageDao_JdbcKt$findByUidList$lambda$lambda(_result) { return mapRows(_result, LanguageDao_JdbcKt$findByUidList$lambda$lambda$lambda(_result)); } function LanguageDao_JdbcKt$findByUidList$lambda(closure$uidList) { return function (_stmt) { _stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(_stmt.getConnection(), 'BIGINT', copyToArray(closure$uidList))); return useResults(_stmt.executeQuery(), LanguageDao_JdbcKt$findByUidList$lambda$lambda); }; } LanguageDao_JdbcKt.prototype.findByUidList_gox9k8$ = function (uidList) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT langUid FROM LANGUAGE WHERE langUid IN (?)', true), LanguageDao_JdbcKt$findByUidList$lambda(uidList)); }; function Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda(closure$toggleVisibility_0, closure$updateTime_0, closure$selectedItem_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$toggleVisibility = closure$toggleVisibility_0; this.local$closure$updateTime = closure$updateTime_0; this.local$closure$selectedItem = closure$selectedItem_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda.prototype.constructor = Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda; Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$toggleVisibility); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$updateTime); this.local$_stmt.setArray_wqp8hw$(3, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$selectedItem))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda(closure$toggleVisibility_0, closure$updateTime_0, closure$selectedItem_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda(closure$toggleVisibility_0, closure$updateTime_0, closure$selectedItem_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$toggleVisibilityLanguage_cbj1f0$($this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$updateTime = updateTime_0; } Coroutine$toggleVisibilityLanguage_cbj1f0$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityLanguage_cbj1f0$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityLanguage_cbj1f0$.prototype.constructor = Coroutine$toggleVisibilityLanguage_cbj1f0$; Coroutine$toggleVisibilityLanguage_cbj1f0$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Language \n | SET languageActive = ?, \n | langLct = ?\n | WHERE langUid IN (?)\n '), true), LanguageDao_JdbcKt$toggleVisibilityLanguage$lambda(this.local$toggleVisibility, this.local$updateTime, this.local$selectedItem), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_JdbcKt.prototype.toggleVisibilityLanguage_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityLanguage_cbj1f0$(this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO Language (langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.langUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.langUid); } stmt.setString_vqvrqt$(2, entity.name); stmt.setString_vqvrqt$(3, entity.iso_639_1_standard); stmt.setString_vqvrqt$(4, entity.iso_639_2_standard); stmt.setString_vqvrqt$(5, entity.iso_639_3_standard); stmt.setString_vqvrqt$(6, entity.Language_Type); stmt.setBoolean_fzusl$(7, entity.languageActive); stmt.setLong_6svq3l$(8, entity.langLocalChangeSeqNum); stmt.setLong_6svq3l$(9, entity.langMasterChangeSeqNum); stmt.setInt_vux9f0$(10, entity.langLastChangedBy); stmt.setLong_6svq3l$(11, entity.langLct); }; LanguageDao_JdbcKt$_insertAdapterLanguage_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO Language (langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.langUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.langUid); } stmt.setString_vqvrqt$(2, entity.name); stmt.setString_vqvrqt$(3, entity.iso_639_1_standard); stmt.setString_vqvrqt$(4, entity.iso_639_2_standard); stmt.setString_vqvrqt$(5, entity.iso_639_3_standard); stmt.setString_vqvrqt$(6, entity.Language_Type); stmt.setBoolean_fzusl$(7, entity.languageActive); stmt.setLong_6svq3l$(8, entity.langLocalChangeSeqNum); stmt.setLong_6svq3l$(9, entity.langMasterChangeSeqNum); stmt.setInt_vux9f0$(10, entity.langLastChangedBy); stmt.setLong_6svq3l$(11, entity.langLct); }; LanguageDao_JdbcKt$_insertAdapterLanguage_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; LanguageDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageDao_JdbcKt', interfaces: [LanguageDao]}; function LanguageDao_ReplicateWrapper(_db, _dao) { LanguageDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_102($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_102.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_102.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_102.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_102; Coroutine$replicateOnNewNode_s8cxhz$_102.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_102(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_102($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_102.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_102.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_102.prototype.constructor = Coroutine$replicateOnChange_102; Coroutine$replicateOnChange_102.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_102(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_ib5eyb$_0($this, languageList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$languageList = languageList_0; } Coroutine$insertListAsync_ib5eyb$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_ib5eyb$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_ib5eyb$_0.prototype.constructor = Coroutine$insertListAsync_ib5eyb$_0; Coroutine$insertListAsync_ib5eyb$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$languageList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.langUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(13, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.langUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.langLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_ib5eyb$(this.local$languageList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_ReplicateWrapper.prototype.insertListAsync_ib5eyb$ = function (languageList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_ib5eyb$_0(this, languageList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_ReplicateWrapper.prototype.findLanguagesAsSource_19mbxw$ = function (sortOrder, searchText) { return this._dao_0.findLanguagesAsSource_19mbxw$(sortOrder, searchText); }; LanguageDao_ReplicateWrapper.prototype.findLanguagesList = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.findByName_61zpoe$ = function (name) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.findByTwoCode_61zpoe$ = function (langCode) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.findByTwoCodeAsync_61zpoe$ = function (langCode, continuation) { return this._dao_0.findByTwoCodeAsync_61zpoe$(langCode, continuation); }; LanguageDao_ReplicateWrapper.prototype.findByThreeCode_61zpoe$ = function (langCode) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.totalLanguageCount = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (primaryLanguageUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (primaryLanguageUid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(primaryLanguageUid, continuation); }; LanguageDao_ReplicateWrapper.prototype.updateAsync_lqiqse$ = function (entity, continuation) { entity.langLct = systemTimeInMillis(); return this._dao_0.updateAsync_lqiqse$(entity, continuation); }; LanguageDao_ReplicateWrapper.prototype.findAllLanguageLive = function () { return this._dao_0.findAllLanguageLive(); }; LanguageDao_ReplicateWrapper.prototype.findByUidList_gox9k8$ = function (uidList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$toggleVisibilityLanguage_cbj1f0$_0($this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$updateTime = updateTime_0; } Coroutine$toggleVisibilityLanguage_cbj1f0$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityLanguage_cbj1f0$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityLanguage_cbj1f0$_0.prototype.constructor = Coroutine$toggleVisibilityLanguage_cbj1f0$_0; Coroutine$toggleVisibilityLanguage_cbj1f0$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.toggleVisibilityLanguage_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_ReplicateWrapper.prototype.toggleVisibilityLanguage_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityLanguage_cbj1f0$_0(this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_ReplicateWrapper.prototype.replaceList_ib5eyb$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_108($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_108.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_108.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_108.prototype.constructor = Coroutine$insertAsync_108; Coroutine$insertAsync_108.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.langUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(13, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.langUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.langLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.langUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_108(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageDao_ReplicateWrapper', interfaces: [LanguageDao]}; function LanguageDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { LanguageDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_103($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_103.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_103.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_103.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_103; Coroutine$replicateOnNewNode_s8cxhz$_103.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_103(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_103($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_103.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_103.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_103.prototype.constructor = Coroutine$replicateOnChange_103; Coroutine$replicateOnChange_103.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_103(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_ib5eyb$_1($this, languageList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$languageList = languageList_0; } Coroutine$insertListAsync_ib5eyb$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_ib5eyb$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_ib5eyb$_1.prototype.constructor = Coroutine$insertListAsync_ib5eyb$_1; Coroutine$insertListAsync_ib5eyb$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_ib5eyb$(this.local$languageList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.insertListAsync_ib5eyb$ = function (languageList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_ib5eyb$_1(this, languageList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_Repo.prototype.findLanguagesAsSource_19mbxw$ = function (sortOrder, searchText) { var _result = this._dao.findLanguagesAsSource_19mbxw$(sortOrder, searchText); return _result; }; LanguageDao_Repo.prototype.findLanguagesList = function () { var _result = this._dao.findLanguagesList(); return _result; }; LanguageDao_Repo.prototype.findByName_61zpoe$ = function (name) { var _result = this._dao.findByName_61zpoe$(name); return _result; }; LanguageDao_Repo.prototype.findByTwoCode_61zpoe$ = function (langCode) { var _result = this._dao.findByTwoCode_61zpoe$(langCode); return _result; }; function Coroutine$findByTwoCodeAsync_61zpoe$($this, langCode_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$langCode = langCode_0; } Coroutine$findByTwoCodeAsync_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByTwoCodeAsync_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByTwoCodeAsync_61zpoe$.prototype.constructor = Coroutine$findByTwoCodeAsync_61zpoe$; Coroutine$findByTwoCodeAsync_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByTwoCodeAsync_61zpoe$(this.local$langCode, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.findByTwoCodeAsync_61zpoe$ = function (langCode_0, continuation_0, suspended) { var instance = new Coroutine$findByTwoCodeAsync_61zpoe$(this, langCode_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_Repo.prototype.findByThreeCode_61zpoe$ = function (langCode) { var _result = this._dao.findByThreeCode_61zpoe$(langCode); return _result; }; LanguageDao_Repo.prototype.totalLanguageCount = function () { var _result = this._dao.totalLanguageCount(); return _result; }; LanguageDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; LanguageDao_Repo.prototype.findByUid_s8cxhz$ = function (primaryLanguageUid) { var _result = this._dao.findByUid_s8cxhz$(primaryLanguageUid); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_10($this, primaryLanguageUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$primaryLanguageUid = primaryLanguageUid_0; } Coroutine$findByUidAsync_s8cxhz$_10.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_10.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_10.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_10; Coroutine$findByUidAsync_s8cxhz$_10.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$primaryLanguageUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (primaryLanguageUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_10(this, primaryLanguageUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_lqiqse$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_lqiqse$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_lqiqse$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_lqiqse$_0.prototype.constructor = Coroutine$updateAsync_lqiqse$_0; Coroutine$updateAsync_lqiqse$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_lqiqse$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.updateAsync_lqiqse$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_lqiqse$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_Repo.prototype.findAllLanguageLive = function () { var _result = this._dao.findAllLanguageLive(); return _result; }; LanguageDao_Repo.prototype.findByUidList_gox9k8$ = function (uidList) { var _result = this._dao.findByUidList_gox9k8$(uidList); return _result; }; function Coroutine$toggleVisibilityLanguage_cbj1f0$_1($this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$updateTime = updateTime_0; } Coroutine$toggleVisibilityLanguage_cbj1f0$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityLanguage_cbj1f0$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityLanguage_cbj1f0$_1.prototype.constructor = Coroutine$toggleVisibilityLanguage_cbj1f0$_1; Coroutine$toggleVisibilityLanguage_cbj1f0$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.toggleVisibilityLanguage_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.toggleVisibilityLanguage_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityLanguage_cbj1f0$_1(this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_Repo.prototype.replaceList_ib5eyb$ = function (entityList) { this._dao.replaceList_ib5eyb$(entityList); }; LanguageDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_109($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_109.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_109.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_109.prototype.constructor = Coroutine$insertAsync_109; Coroutine$insertAsync_109.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_109(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; LanguageDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; LanguageDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageDao_Repo', interfaces: [LanguageDao]}; function LanguageVariantDao() { } LanguageVariantDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageVariantDao', interfaces: [BaseDao]}; function LanguageVariantDao_JdbcKt(_db) { LanguageVariantDao.call(this); this._db = _db; this._insertAdapterLanguageVariant_ = new LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral(this._db); } LanguageVariantDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterLanguageVariant_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_110($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_110.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_110.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_110.prototype.constructor = Coroutine$insertAsync_110; Coroutine$insertAsync_110.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLanguageVariant_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_110(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageVariantDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterLanguageVariant_.insertList_4ezy5m$(entityList); }; function LanguageVariantDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.langUid); _stmt.setString_vqvrqt$(2, _entity.countryCode); _stmt.setString_vqvrqt$(3, _entity.name); _stmt.setLong_6svq3l$(4, _entity.langVariantLocalChangeSeqNum); _stmt.setLong_6svq3l$(5, _entity.langVariantMasterChangeSeqNum); _stmt.setInt_vux9f0$(6, _entity.langVariantLastChangedBy); _stmt.setLong_6svq3l$(7, _entity.langVariantLct); _stmt.setLong_6svq3l$(8, _entity.langVariantUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } LanguageVariantDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE LanguageVariant SET langUid = ?, countryCode = ?, name = ?, langVariantLocalChangeSeqNum = ?, langVariantMasterChangeSeqNum = ?, langVariantLastChangedBy = ?, langVariantLct = ? WHERE langVariantUid = ?'; prepareAndUseStatement(this._db, _sql, LanguageVariantDao_JdbcKt$updateList$lambda(entityList)); }; function LanguageVariantDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.langUid); _stmt.setString_vqvrqt$(2, closure$entity.countryCode); _stmt.setString_vqvrqt$(3, closure$entity.name); _stmt.setLong_6svq3l$(4, closure$entity.langVariantLocalChangeSeqNum); _stmt.setLong_6svq3l$(5, closure$entity.langVariantMasterChangeSeqNum); _stmt.setInt_vux9f0$(6, closure$entity.langVariantLastChangedBy); _stmt.setLong_6svq3l$(7, closure$entity.langVariantLct); _stmt.setLong_6svq3l$(8, closure$entity.langVariantUid); return _stmt.executeUpdate(); }; } LanguageVariantDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE LanguageVariant SET langUid = ?, countryCode = ?, name = ?, langVariantLocalChangeSeqNum = ?, langVariantMasterChangeSeqNum = ?, langVariantLastChangedBy = ?, langVariantLct = ? WHERE langVariantUid = ?'; prepareAndUseStatement(this._db, _sql, LanguageVariantDao_JdbcKt$update$lambda(entity)); }; function Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_104($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_104.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_104.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_104.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_104; Coroutine$replicateOnNewNode_s8cxhz$_104.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LanguageVariantReplicate(lvPk, lvDestination)\n | SELECT DISTINCT LanguageVariant.langVariantUid AS lvPk,\n | ? AS lvDestination\n | FROM LanguageVariant\n | WHERE LanguageVariant.langVariantLct != COALESCE(\n | (SELECT lvVersionId\n | FROM LanguageVariantReplicate\n | WHERE lvPk = LanguageVariant.langVariantUid\n | AND lvDestination = ?), 0) \n | /*psql ON CONFLICT(lvPk, lvDestination) DO UPDATE\n | SET lvPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LanguageVariantReplicate(lvPk, lvDestination)\n | SELECT DISTINCT LanguageVariant.langVariantUid AS lvPk,\n | ? AS lvDestination\n | FROM LanguageVariant\n | WHERE LanguageVariant.langVariantLct != COALESCE(\n | (SELECT lvVersionId\n | FROM LanguageVariantReplicate\n | WHERE lvPk = LanguageVariant.langVariantUid\n | AND lvDestination = ?), 0) \n | ON CONFLICT(lvPk, lvDestination) DO UPDATE\n | SET lvPending = true\n | \n | \n |')), LanguageVariantDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_104(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda; Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LanguageVariantDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LanguageVariantDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_104($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_104.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_104.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_104.prototype.constructor = Coroutine$replicateOnChange_104; Coroutine$replicateOnChange_104.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LanguageVariantReplicate(lvPk, lvDestination)\n | SELECT DISTINCT LanguageVariant.langVariantUid AS lvUid,\n | UserSession.usClientNodeId AS lvDestination\n | FROM ChangeLog\n | JOIN LanguageVariant\n | ON ChangeLog.chTableId = 10\n | AND ChangeLog.chEntityPk = LanguageVariant.langVariantUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND LanguageVariant.langVariantLct != COALESCE(\n | (SELECT lvVersionId\n | FROM LanguageVariantReplicate\n | WHERE lvPk = LanguageVariant.langVariantUid\n | AND lvDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(lvPk, lvDestination) DO UPDATE\n | SET lvPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LanguageVariantReplicate(lvPk, lvDestination)\n | SELECT DISTINCT LanguageVariant.langVariantUid AS lvUid,\n | UserSession.usClientNodeId AS lvDestination\n | FROM ChangeLog\n | JOIN LanguageVariant\n | ON ChangeLog.chTableId = 10\n | AND ChangeLog.chEntityPk = LanguageVariant.langVariantUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND LanguageVariant.langVariantLct != COALESCE(\n | (SELECT lvVersionId\n | FROM LanguageVariantReplicate\n | WHERE lvPk = LanguageVariant.langVariantUid\n | AND lvDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(lvPk, lvDestination) DO UPDATE\n | SET lvPending = true\n | \n | \n |')), LanguageVariantDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_104(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LanguageVariantDao_JdbcKt$findByCode$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_langVariantUid = closure$_result.getLong_61zpoe$('langVariantUid'); var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); var _tmp_countryCode = closure$_result.getString_61zpoe$('countryCode'); var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_langVariantLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langVariantLocalChangeSeqNum'); var _tmp_langVariantMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langVariantMasterChangeSeqNum'); var _tmp_langVariantLastChangedBy = closure$_result.getInt_61zpoe$('langVariantLastChangedBy'); var _tmp_langVariantLct = closure$_result.getLong_61zpoe$('langVariantLct'); var $receiver = new LanguageVariant(); $receiver.langVariantUid = _tmp_langVariantUid; $receiver.langUid = _tmp_langUid; $receiver.countryCode = _tmp_countryCode; $receiver.name = _tmp_name; $receiver.langVariantLocalChangeSeqNum = _tmp_langVariantLocalChangeSeqNum; $receiver.langVariantMasterChangeSeqNum = _tmp_langVariantMasterChangeSeqNum; $receiver.langVariantLastChangedBy = _tmp_langVariantLastChangedBy; $receiver.langVariantLct = _tmp_langVariantLct; return $receiver; }; } function LanguageVariantDao_JdbcKt$findByCode$lambda$lambda(_result) { return mapNextRow(_result, null, LanguageVariantDao_JdbcKt$findByCode$lambda$lambda$lambda(_result)); } function LanguageVariantDao_JdbcKt$findByCode$lambda(closure$countryCode) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$countryCode); return useResults(_stmt.executeQuery(), LanguageVariantDao_JdbcKt$findByCode$lambda$lambda); }; } LanguageVariantDao_JdbcKt.prototype.findByCode_61zpoe$ = function (countryCode) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM LanguageVariant WHERE countryCode = ? LIMIT 1'), LanguageVariantDao_JdbcKt$findByCode$lambda(countryCode)); }; function LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO LanguageVariant (langVariantUid, langUid, countryCode, name, langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum, langVariantLastChangedBy, langVariantLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.langVariantUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.langVariantUid); } stmt.setLong_6svq3l$(2, entity.langUid); stmt.setString_vqvrqt$(3, entity.countryCode); stmt.setString_vqvrqt$(4, entity.name); stmt.setLong_6svq3l$(5, entity.langVariantLocalChangeSeqNum); stmt.setLong_6svq3l$(6, entity.langVariantMasterChangeSeqNum); stmt.setInt_vux9f0$(7, entity.langVariantLastChangedBy); stmt.setLong_6svq3l$(8, entity.langVariantLct); }; LanguageVariantDao_JdbcKt$_insertAdapterLanguageVariant_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; LanguageVariantDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageVariantDao_JdbcKt', interfaces: [LanguageVariantDao]}; function LanguageVariantDao_ReplicateWrapper(_db, _dao) { LanguageVariantDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_105($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_105.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_105.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_105.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_105; Coroutine$replicateOnNewNode_s8cxhz$_105.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_105(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_105($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_105.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_105.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_105.prototype.constructor = Coroutine$replicateOnChange_105; Coroutine$replicateOnChange_105.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_105(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageVariantDao_ReplicateWrapper.prototype.findByCode_61zpoe$ = function (countryCode) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageVariantDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_111($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_111.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_111.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_111.prototype.constructor = Coroutine$insertAsync_111; Coroutine$insertAsync_111.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.langVariantUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(10, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.langVariantUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.langVariantLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.langVariantUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_111(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageVariantDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageVariantDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageVariantDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LanguageVariantDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageVariantDao_ReplicateWrapper', interfaces: [LanguageVariantDao]}; function LanguageVariantDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { LanguageVariantDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_106($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_106.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_106.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_106.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_106; Coroutine$replicateOnNewNode_s8cxhz$_106.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_106(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_106($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_106.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_106.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_106.prototype.constructor = Coroutine$replicateOnChange_106; Coroutine$replicateOnChange_106.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_106(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageVariantDao_Repo.prototype.findByCode_61zpoe$ = function (countryCode) { var _result = this._dao.findByCode_61zpoe$(countryCode); return _result; }; LanguageVariantDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_112($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_112.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_112.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_112.prototype.constructor = Coroutine$insertAsync_112; Coroutine$insertAsync_112.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LanguageVariantDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_112(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LanguageVariantDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; LanguageVariantDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; LanguageVariantDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; LanguageVariantDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageVariantDao_Repo', interfaces: [LanguageVariantDao]}; function LearnerGroupDao() { } LearnerGroupDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupDao', interfaces: [BaseDao]}; function LearnerGroupDao_JdbcKt(_db) { LearnerGroupDao.call(this); this._db = _db; this._insertAdapterLearnerGroup_ = new LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral(this._db); } LearnerGroupDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterLearnerGroup_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_113($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_113.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_113.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_113.prototype.constructor = Coroutine$insertAsync_113; Coroutine$insertAsync_113.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLearnerGroup_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_113(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterLearnerGroup_.insertList_4ezy5m$(entityList); }; function LearnerGroupDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.learnerGroupName); _stmt.setString_vqvrqt$(2, _entity.learnerGroupDescription); _stmt.setBoolean_fzusl$(3, _entity.learnerGroupActive); _stmt.setLong_6svq3l$(4, _entity.learnerGroupMCSN); _stmt.setLong_6svq3l$(5, _entity.learnerGroupCSN); _stmt.setInt_vux9f0$(6, _entity.learnerGroupLCB); _stmt.setLong_6svq3l$(7, _entity.learnerGroupLct); _stmt.setLong_6svq3l$(8, _entity.learnerGroupUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } LearnerGroupDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE LearnerGroup SET learnerGroupName = ?, learnerGroupDescription = ?, learnerGroupActive = ?, learnerGroupMCSN = ?, learnerGroupCSN = ?, learnerGroupLCB = ?, learnerGroupLct = ? WHERE learnerGroupUid = ?'; prepareAndUseStatement(this._db, _sql, LearnerGroupDao_JdbcKt$updateList$lambda(entityList)); }; function LearnerGroupDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.learnerGroupName); _stmt.setString_vqvrqt$(2, closure$entity.learnerGroupDescription); _stmt.setBoolean_fzusl$(3, closure$entity.learnerGroupActive); _stmt.setLong_6svq3l$(4, closure$entity.learnerGroupMCSN); _stmt.setLong_6svq3l$(5, closure$entity.learnerGroupCSN); _stmt.setInt_vux9f0$(6, closure$entity.learnerGroupLCB); _stmt.setLong_6svq3l$(7, closure$entity.learnerGroupLct); _stmt.setLong_6svq3l$(8, closure$entity.learnerGroupUid); return _stmt.executeUpdate(); }; } LearnerGroupDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE LearnerGroup SET learnerGroupName = ?, learnerGroupDescription = ?, learnerGroupActive = ?, learnerGroupMCSN = ?, learnerGroupCSN = ?, learnerGroupLCB = ?, learnerGroupLct = ? WHERE learnerGroupUid = ?'; prepareAndUseStatement(this._db, _sql, LearnerGroupDao_JdbcKt$update$lambda(entity)); }; function Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_107($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_107.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_107.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_107.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_107; Coroutine$replicateOnNewNode_s8cxhz$_107.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LearnerGroupReplicate(lgPk, lgDestination)\n | SELECT DISTINCT LearnerGroup.learnerGroupUid AS lgPk,\n | ? AS lgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid\n | JOIN LearnerGroup\n | ON LearnerGroup.learnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND LearnerGroup.learnerGroupLct != COALESCE(\n | (SELECT lgVersionId\n | FROM LearnerGroupReplicate\n | WHERE lgPk = LearnerGroup.learnerGroupUid\n | AND lgDestination = ?), 0) \n | /*psql ON CONFLICT(lgPk, lgDestination) DO UPDATE\n | SET lgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LearnerGroupReplicate(lgPk, lgDestination)\n | SELECT DISTINCT LearnerGroup.learnerGroupUid AS lgPk,\n | ? AS lgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid\n | JOIN LearnerGroup\n | ON LearnerGroup.learnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND LearnerGroup.learnerGroupLct != COALESCE(\n | (SELECT lgVersionId\n | FROM LearnerGroupReplicate\n | WHERE lgPk = LearnerGroup.learnerGroupUid\n | AND lgDestination = ?), 0) \n | ON CONFLICT(lgPk, lgDestination) DO UPDATE\n | SET lgPending = true\n | \n | \n |')), LearnerGroupDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_107(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda; Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_107($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_107.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_107.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_107.prototype.constructor = Coroutine$replicateOnChange_107; Coroutine$replicateOnChange_107.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LearnerGroupReplicate(lgPk, lgDestination)\n | SELECT DISTINCT LearnerGroup.learnerGroupUid AS lgUid,\n | UserSession.usClientNodeId AS lgDestination\n | FROM ChangeLog\n | JOIN LearnerGroup\n | ON ChangeLog.chTableId = 301\n | AND ChangeLog.chEntityPk = LearnerGroup.learnerGroupUid\n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberLgUid = LearnerGroup.learnerGroupUid\n | JOIN Person\n | ON Person.personUid = LearnerGroupMember.learnerGroupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | /*psql ON CONFLICT(lgPk, lgDestination) DO UPDATE\n | SET lgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LearnerGroupReplicate(lgPk, lgDestination)\n | SELECT DISTINCT LearnerGroup.learnerGroupUid AS lgUid,\n | UserSession.usClientNodeId AS lgDestination\n | FROM ChangeLog\n | JOIN LearnerGroup\n | ON ChangeLog.chTableId = 301\n | AND ChangeLog.chEntityPk = LearnerGroup.learnerGroupUid\n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberLgUid = LearnerGroup.learnerGroupUid\n | JOIN Person\n | ON Person.personUid = LearnerGroupMember.learnerGroupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | ON CONFLICT(lgPk, lgDestination) DO UPDATE\n | SET lgPending = true\n | \n | \n |')), LearnerGroupDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_107(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral(this$LearnerGroupDao_JdbcKt, closure$contentEntryUid) { this.this$LearnerGroupDao_JdbcKt = this$LearnerGroupDao_JdbcKt; this.closure$contentEntryUid = closure$contentEntryUid; DataSourceFactory.call(this); } function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_learnerGroupUid = closure$_result.getLong_61zpoe$('learnerGroupUid'); var _tmp_learnerGroupName = closure$_result.getString_61zpoe$('learnerGroupName'); var _tmp_learnerGroupDescription = closure$_result.getString_61zpoe$('learnerGroupDescription'); var _tmp_learnerGroupActive = closure$_result.getBoolean_61zpoe$('learnerGroupActive'); var _tmp_learnerGroupMCSN = closure$_result.getLong_61zpoe$('learnerGroupMCSN'); var _tmp_learnerGroupCSN = closure$_result.getLong_61zpoe$('learnerGroupCSN'); var _tmp_learnerGroupLCB = closure$_result.getInt_61zpoe$('learnerGroupLCB'); var _tmp_learnerGroupLct = closure$_result.getLong_61zpoe$('learnerGroupLct'); var $receiver = new LearnerGroup(); $receiver.learnerGroupUid = _tmp_learnerGroupUid; $receiver.learnerGroupName = _tmp_learnerGroupName; $receiver.learnerGroupDescription = _tmp_learnerGroupDescription; $receiver.learnerGroupActive = _tmp_learnerGroupActive; $receiver.learnerGroupMCSN = _tmp_learnerGroupMCSN; $receiver.learnerGroupCSN = _tmp_learnerGroupCSN; $receiver.learnerGroupLCB = _tmp_learnerGroupLCB; $receiver.learnerGroupLct = _tmp_learnerGroupLct; return $receiver; }; } function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda(closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda(this$LearnerGroupDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LearnerGroupDao_JdbcKt = this$LearnerGroupDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LearnerGroupDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT LearnerGroup.* FROM LearnerGroup \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroup.learnerGroupUid \n | WHERE GroupLearningSession.groupLearningSessionContentUid = ?) LIMIT ? OFFSET ?\n ')), LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda$lambda(this.local$closure$contentEntryUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda(this$LearnerGroupDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda(this$LearnerGroupDao_JdbcKt_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$LearnerGroupDao_JdbcKt._db, listOf(['LearnerGroup', 'GroupLearningSession']), LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getData$lambda(this.this$LearnerGroupDao_JdbcKt, this.closure$contentEntryUid, _limit, _offset)); }; function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda(closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda(this$LearnerGroupDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LearnerGroupDao_JdbcKt = this$LearnerGroupDao_JdbcKt_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; } Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda; Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LearnerGroupDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT LearnerGroup.* FROM LearnerGroup \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroup.learnerGroupUid \n | WHERE GroupLearningSession.groupLearningSessionContentUid = ?) \n ')), LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda$lambda(this.local$closure$contentEntryUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda(this$LearnerGroupDao_JdbcKt_0, closure$contentEntryUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda(this$LearnerGroupDao_JdbcKt_0, closure$contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$LearnerGroupDao_JdbcKt._db, listOf(['LearnerGroup', 'GroupLearningSession']), LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral$getLength$lambda(this.this$LearnerGroupDao_JdbcKt, this.closure$contentEntryUid)); }; LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; LearnerGroupDao_JdbcKt.prototype.findGroupsForEntryAsync_s8cxhz$ = function (contentEntryUid) { return new LearnerGroupDao_JdbcKt$findGroupsForEntryAsync$ObjectLiteral(this, contentEntryUid); }; function LearnerGroupDao_JdbcKt$findGroupListForEntry$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_learnerGroupUid = closure$_result.getLong_61zpoe$('learnerGroupUid'); var _tmp_learnerGroupName = closure$_result.getString_61zpoe$('learnerGroupName'); var _tmp_learnerGroupDescription = closure$_result.getString_61zpoe$('learnerGroupDescription'); var _tmp_learnerGroupActive = closure$_result.getBoolean_61zpoe$('learnerGroupActive'); var _tmp_learnerGroupMCSN = closure$_result.getLong_61zpoe$('learnerGroupMCSN'); var _tmp_learnerGroupCSN = closure$_result.getLong_61zpoe$('learnerGroupCSN'); var _tmp_learnerGroupLCB = closure$_result.getInt_61zpoe$('learnerGroupLCB'); var _tmp_learnerGroupLct = closure$_result.getLong_61zpoe$('learnerGroupLct'); var $receiver = new LearnerGroup(); $receiver.learnerGroupUid = _tmp_learnerGroupUid; $receiver.learnerGroupName = _tmp_learnerGroupName; $receiver.learnerGroupDescription = _tmp_learnerGroupDescription; $receiver.learnerGroupActive = _tmp_learnerGroupActive; $receiver.learnerGroupMCSN = _tmp_learnerGroupMCSN; $receiver.learnerGroupCSN = _tmp_learnerGroupCSN; $receiver.learnerGroupLCB = _tmp_learnerGroupLCB; $receiver.learnerGroupLct = _tmp_learnerGroupLct; return $receiver; }; } function LearnerGroupDao_JdbcKt$findGroupListForEntry$lambda$lambda(_result) { return mapRows(_result, LearnerGroupDao_JdbcKt$findGroupListForEntry$lambda$lambda$lambda(_result)); } function LearnerGroupDao_JdbcKt$findGroupListForEntry$lambda(closure$contentEntryUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$contentEntryUid); return useResults(_stmt.executeQuery(), LearnerGroupDao_JdbcKt$findGroupListForEntry$lambda$lambda); }; } LearnerGroupDao_JdbcKt.prototype.findGroupListForEntry_s8cxhz$ = function (contentEntryUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT LearnerGroup.* FROM LearnerGroup \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroup.learnerGroupUid \n | WHERE GroupLearningSession.groupLearningSessionContentUid = ?\n ')), LearnerGroupDao_JdbcKt$findGroupListForEntry$lambda(contentEntryUid)); }; function LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO LearnerGroup (learnerGroupUid, learnerGroupName, learnerGroupDescription, learnerGroupActive, learnerGroupMCSN, learnerGroupCSN, learnerGroupLCB, learnerGroupLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.learnerGroupUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.learnerGroupUid); } stmt.setString_vqvrqt$(2, entity.learnerGroupName); stmt.setString_vqvrqt$(3, entity.learnerGroupDescription); stmt.setBoolean_fzusl$(4, entity.learnerGroupActive); stmt.setLong_6svq3l$(5, entity.learnerGroupMCSN); stmt.setLong_6svq3l$(6, entity.learnerGroupCSN); stmt.setInt_vux9f0$(7, entity.learnerGroupLCB); stmt.setLong_6svq3l$(8, entity.learnerGroupLct); }; LearnerGroupDao_JdbcKt$_insertAdapterLearnerGroup_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; LearnerGroupDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupDao_JdbcKt', interfaces: [LearnerGroupDao]}; function LearnerGroupDao_ReplicateWrapper(_db, _dao) { LearnerGroupDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_108($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_108.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_108.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_108.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_108; Coroutine$replicateOnNewNode_s8cxhz$_108.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_108(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_108($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_108.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_108.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_108.prototype.constructor = Coroutine$replicateOnChange_108; Coroutine$replicateOnChange_108.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_108(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupDao_ReplicateWrapper.prototype.findGroupsForEntryAsync_s8cxhz$ = function (contentEntryUid) { return this._dao_0.findGroupsForEntryAsync_s8cxhz$(contentEntryUid); }; LearnerGroupDao_ReplicateWrapper.prototype.findGroupListForEntry_s8cxhz$ = function (contentEntryUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_114($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_114.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_114.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_114.prototype.constructor = Coroutine$insertAsync_114; Coroutine$insertAsync_114.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.learnerGroupUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(301, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.learnerGroupUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.learnerGroupLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.learnerGroupUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_114(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupDao_ReplicateWrapper', interfaces: [LearnerGroupDao]}; function LearnerGroupDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { LearnerGroupDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_109($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_109.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_109.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_109.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_109; Coroutine$replicateOnNewNode_s8cxhz$_109.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_109(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_109($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_109.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_109.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_109.prototype.constructor = Coroutine$replicateOnChange_109; Coroutine$replicateOnChange_109.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_109(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupDao_Repo.prototype.findGroupsForEntryAsync_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.findGroupsForEntryAsync_s8cxhz$(contentEntryUid); return _result; }; LearnerGroupDao_Repo.prototype.findGroupListForEntry_s8cxhz$ = function (contentEntryUid) { var _result = this._dao.findGroupListForEntry_s8cxhz$(contentEntryUid); return _result; }; LearnerGroupDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_115($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_115.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_115.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_115.prototype.constructor = Coroutine$insertAsync_115; Coroutine$insertAsync_115.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_115(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; LearnerGroupDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; LearnerGroupDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; LearnerGroupDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupDao_Repo', interfaces: [LearnerGroupDao]}; function LearnerGroupMemberDao() { } LearnerGroupMemberDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupMemberDao', interfaces: [BaseDao]}; function LearnerGroupMemberDao_JdbcKt(_db) { LearnerGroupMemberDao.call(this); this._db = _db; this._insertAdapterLearnerGroupMember_ = new LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral(this._db); } LearnerGroupMemberDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterLearnerGroupMember_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_116($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_116.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_116.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_116.prototype.constructor = Coroutine$insertAsync_116; Coroutine$insertAsync_116.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLearnerGroupMember_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_116(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupMemberDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterLearnerGroupMember_.insertList_4ezy5m$(entityList); }; function LearnerGroupMemberDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.learnerGroupMemberPersonUid); _stmt.setLong_6svq3l$(2, _entity.learnerGroupMemberLgUid); _stmt.setInt_vux9f0$(3, _entity.learnerGroupMemberRole); _stmt.setBoolean_fzusl$(4, _entity.learnerGroupMemberActive); _stmt.setLong_6svq3l$(5, _entity.learnerGroupMemberMCSN); _stmt.setLong_6svq3l$(6, _entity.learnerGroupMemberCSN); _stmt.setInt_vux9f0$(7, _entity.learnerGroupMemberLCB); _stmt.setLong_6svq3l$(8, _entity.learnerGroupMemberLct); _stmt.setLong_6svq3l$(9, _entity.learnerGroupMemberUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } LearnerGroupMemberDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE LearnerGroupMember SET learnerGroupMemberPersonUid = ?, learnerGroupMemberLgUid = ?, learnerGroupMemberRole = ?, learnerGroupMemberActive = ?, learnerGroupMemberMCSN = ?, learnerGroupMemberCSN = ?, learnerGroupMemberLCB = ?, learnerGroupMemberLct = ? WHERE learnerGroupMemberUid = ?'; prepareAndUseStatement(this._db, _sql, LearnerGroupMemberDao_JdbcKt$updateList$lambda(entityList)); }; function LearnerGroupMemberDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.learnerGroupMemberPersonUid); _stmt.setLong_6svq3l$(2, closure$entity.learnerGroupMemberLgUid); _stmt.setInt_vux9f0$(3, closure$entity.learnerGroupMemberRole); _stmt.setBoolean_fzusl$(4, closure$entity.learnerGroupMemberActive); _stmt.setLong_6svq3l$(5, closure$entity.learnerGroupMemberMCSN); _stmt.setLong_6svq3l$(6, closure$entity.learnerGroupMemberCSN); _stmt.setInt_vux9f0$(7, closure$entity.learnerGroupMemberLCB); _stmt.setLong_6svq3l$(8, closure$entity.learnerGroupMemberLct); _stmt.setLong_6svq3l$(9, closure$entity.learnerGroupMemberUid); return _stmt.executeUpdate(); }; } LearnerGroupMemberDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE LearnerGroupMember SET learnerGroupMemberPersonUid = ?, learnerGroupMemberLgUid = ?, learnerGroupMemberRole = ?, learnerGroupMemberActive = ?, learnerGroupMemberMCSN = ?, learnerGroupMemberCSN = ?, learnerGroupMemberLCB = ?, learnerGroupMemberLct = ? WHERE learnerGroupMemberUid = ?'; prepareAndUseStatement(this._db, _sql, LearnerGroupMemberDao_JdbcKt$update$lambda(entity)); }; function Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_110($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_110.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_110.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_110.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_110; Coroutine$replicateOnNewNode_s8cxhz$_110.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LearnerGroupMemberReplicate(lgmPk, lgmDestination)\n | SELECT DISTINCT LearnerGroupMember.learnerGroupMemberUid AS lgmPk,\n | ? AS lgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND LearnerGroupMember.learnerGroupMemberLct != COALESCE(\n | (SELECT lgmVersionId\n | FROM LearnerGroupMemberReplicate\n | WHERE lgmPk = LearnerGroupMember.learnerGroupMemberUid\n | AND lgmDestination = ?), 0) \n | /*psql ON CONFLICT(lgmPk, lgmDestination) DO UPDATE\n | SET lgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LearnerGroupMemberReplicate(lgmPk, lgmDestination)\n | SELECT DISTINCT LearnerGroupMember.learnerGroupMemberUid AS lgmPk,\n | ? AS lgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN LearnerGroupMember\n | ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND LearnerGroupMember.learnerGroupMemberLct != COALESCE(\n | (SELECT lgmVersionId\n | FROM LearnerGroupMemberReplicate\n | WHERE lgmPk = LearnerGroupMember.learnerGroupMemberUid\n | AND lgmDestination = ?), 0) \n | ON CONFLICT(lgmPk, lgmDestination) DO UPDATE\n | SET lgmPending = true\n | \n | \n |')), LearnerGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_110(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_110($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_110.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_110.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_110.prototype.constructor = Coroutine$replicateOnChange_110; Coroutine$replicateOnChange_110.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LearnerGroupMemberReplicate(lgmPk, lgmDestination)\n | SELECT DISTINCT LearnerGroupMember.learnerGroupMemberUid AS lgmUid,\n | UserSession.usClientNodeId AS lgmDestination\n | FROM ChangeLog\n | JOIN LearnerGroupMember\n | ON ChangeLog.chTableId = 300\n | AND ChangeLog.chEntityPk = LearnerGroupMember.learnerGroupMemberUid\n | JOIN Person\n | ON Person.personUid = LearnerGroupMember.learnerGroupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1)\n | AND LearnerGroupMember.learnerGroupMemberLct != COALESCE(\n | (SELECT lgmVersionId\n | FROM LearnerGroupMemberReplicate\n | WHERE lgmPk = LearnerGroupMember.learnerGroupMemberUid\n | AND lgmDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(lgmPk, lgmDestination) DO UPDATE\n | SET lgmPending = true\n | */\n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LearnerGroupMemberReplicate(lgmPk, lgmDestination)\n | SELECT DISTINCT LearnerGroupMember.learnerGroupMemberUid AS lgmUid,\n | UserSession.usClientNodeId AS lgmDestination\n | FROM ChangeLog\n | JOIN LearnerGroupMember\n | ON ChangeLog.chTableId = 300\n | AND ChangeLog.chEntityPk = LearnerGroupMember.learnerGroupMemberUid\n | JOIN Person\n | ON Person.personUid = LearnerGroupMember.learnerGroupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1)\n | AND LearnerGroupMember.learnerGroupMemberLct != COALESCE(\n | (SELECT lgmVersionId\n | FROM LearnerGroupMemberReplicate\n | WHERE lgmPk = LearnerGroupMember.learnerGroupMemberUid\n | AND lgmDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(lgmPk, lgmDestination) DO UPDATE\n | SET lgmPending = true\n | \n | \n |')), LearnerGroupMemberDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_110(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral(this$LearnerGroupMemberDao_JdbcKt, closure$learnerGroupUid, closure$contentEntryUid) { this.this$LearnerGroupMemberDao_JdbcKt = this$LearnerGroupMemberDao_JdbcKt; this.closure$learnerGroupUid = closure$learnerGroupUid; this.closure$contentEntryUid = closure$contentEntryUid; DataSourceFactory.call(this); } function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_learnerGroupMemberUid = closure$_result.getLong_61zpoe$('learnerGroupMemberUid'); var _tmp_learnerGroupMemberPersonUid = closure$_result.getLong_61zpoe$('learnerGroupMemberPersonUid'); var _tmp_learnerGroupMemberLgUid = closure$_result.getLong_61zpoe$('learnerGroupMemberLgUid'); var _tmp_learnerGroupMemberRole = closure$_result.getInt_61zpoe$('learnerGroupMemberRole'); var _tmp_learnerGroupMemberActive = closure$_result.getBoolean_61zpoe$('learnerGroupMemberActive'); var _tmp_learnerGroupMemberMCSN = closure$_result.getLong_61zpoe$('learnerGroupMemberMCSN'); var _tmp_learnerGroupMemberCSN = closure$_result.getLong_61zpoe$('learnerGroupMemberCSN'); var _tmp_learnerGroupMemberLCB = closure$_result.getInt_61zpoe$('learnerGroupMemberLCB'); var _tmp_learnerGroupMemberLct = closure$_result.getLong_61zpoe$('learnerGroupMemberLct'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new LearnerGroupMemberWithPerson(); $receiver.learnerGroupMemberUid = _tmp_learnerGroupMemberUid; $receiver.learnerGroupMemberPersonUid = _tmp_learnerGroupMemberPersonUid; $receiver.learnerGroupMemberLgUid = _tmp_learnerGroupMemberLgUid; $receiver.learnerGroupMemberRole = _tmp_learnerGroupMemberRole; $receiver.learnerGroupMemberActive = _tmp_learnerGroupMemberActive; $receiver.learnerGroupMemberMCSN = _tmp_learnerGroupMemberMCSN; $receiver.learnerGroupMemberCSN = _tmp_learnerGroupMemberCSN; $receiver.learnerGroupMemberLCB = _tmp_learnerGroupMemberLCB; $receiver.learnerGroupMemberLct = _tmp_learnerGroupMemberLct; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.person = $receiver_0; } return $receiver; }; } function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$learnerGroupUid = closure$learnerGroupUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$learnerGroupUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda(this$LearnerGroupMemberDao_JdbcKt_0, closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LearnerGroupMemberDao_JdbcKt = this$LearnerGroupMemberDao_JdbcKt_0; this.local$closure$learnerGroupUid = closure$learnerGroupUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LearnerGroupMemberDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT LearnerGroupMember.*, Person.* FROM LearnerGroupMember \n | LEFT JOIN Person ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid \n | WHERE GroupLearningSession.groupLearningSessionLearnerGroupUid = ? \n | AND GroupLearningSession.groupLearningSessionContentUid = ? \n | ORDER BY learnerGroupMemberRole ASC\n | ) LIMIT ? OFFSET ?\n ')), LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda$lambda(this.local$closure$learnerGroupUid, this.local$closure$contentEntryUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda(this$LearnerGroupMemberDao_JdbcKt_0, closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda(this$LearnerGroupMemberDao_JdbcKt_0, closure$learnerGroupUid_0, closure$contentEntryUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$LearnerGroupMemberDao_JdbcKt._db, listOf(['LearnerGroupMember', 'Person', 'GroupLearningSession']), LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getData$lambda(this.this$LearnerGroupMemberDao_JdbcKt, this.closure$learnerGroupUid, this.closure$contentEntryUid, _limit, _offset)); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$learnerGroupUid = closure$learnerGroupUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$learnerGroupUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda(this$LearnerGroupMemberDao_JdbcKt_0, closure$learnerGroupUid_0, closure$contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LearnerGroupMemberDao_JdbcKt = this$LearnerGroupMemberDao_JdbcKt_0; this.local$closure$learnerGroupUid = closure$learnerGroupUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; } Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LearnerGroupMemberDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT LearnerGroupMember.*, Person.* FROM LearnerGroupMember \n | LEFT JOIN Person ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid \n | WHERE GroupLearningSession.groupLearningSessionLearnerGroupUid = ? \n | AND GroupLearningSession.groupLearningSessionContentUid = ? \n | ORDER BY learnerGroupMemberRole ASC\n | ) \n ')), LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda$lambda(this.local$closure$learnerGroupUid, this.local$closure$contentEntryUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda(this$LearnerGroupMemberDao_JdbcKt_0, closure$learnerGroupUid_0, closure$contentEntryUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda(this$LearnerGroupMemberDao_JdbcKt_0, closure$learnerGroupUid_0, closure$contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$LearnerGroupMemberDao_JdbcKt._db, listOf(['LearnerGroupMember', 'Person', 'GroupLearningSession']), LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral$getLength$lambda(this.this$LearnerGroupMemberDao_JdbcKt, this.closure$learnerGroupUid, this.closure$contentEntryUid)); }; LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; LearnerGroupMemberDao_JdbcKt.prototype.findLearnerGroupMembersByGroupIdAndEntry_3pjtqy$ = function (learnerGroupUid, contentEntryUid) { return new LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntry$ObjectLiteral(this, learnerGroupUid, contentEntryUid); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_learnerGroupMemberUid = closure$_result.getLong_61zpoe$('learnerGroupMemberUid'); var _tmp_learnerGroupMemberPersonUid = closure$_result.getLong_61zpoe$('learnerGroupMemberPersonUid'); var _tmp_learnerGroupMemberLgUid = closure$_result.getLong_61zpoe$('learnerGroupMemberLgUid'); var _tmp_learnerGroupMemberRole = closure$_result.getInt_61zpoe$('learnerGroupMemberRole'); var _tmp_learnerGroupMemberActive = closure$_result.getBoolean_61zpoe$('learnerGroupMemberActive'); var _tmp_learnerGroupMemberMCSN = closure$_result.getLong_61zpoe$('learnerGroupMemberMCSN'); var _tmp_learnerGroupMemberCSN = closure$_result.getLong_61zpoe$('learnerGroupMemberCSN'); var _tmp_learnerGroupMemberLCB = closure$_result.getInt_61zpoe$('learnerGroupMemberLCB'); var _tmp_learnerGroupMemberLct = closure$_result.getLong_61zpoe$('learnerGroupMemberLct'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new LearnerGroupMemberWithPerson(); $receiver.learnerGroupMemberUid = _tmp_learnerGroupMemberUid; $receiver.learnerGroupMemberPersonUid = _tmp_learnerGroupMemberPersonUid; $receiver.learnerGroupMemberLgUid = _tmp_learnerGroupMemberLgUid; $receiver.learnerGroupMemberRole = _tmp_learnerGroupMemberRole; $receiver.learnerGroupMemberActive = _tmp_learnerGroupMemberActive; $receiver.learnerGroupMemberMCSN = _tmp_learnerGroupMemberMCSN; $receiver.learnerGroupMemberCSN = _tmp_learnerGroupMemberCSN; $receiver.learnerGroupMemberLCB = _tmp_learnerGroupMemberLCB; $receiver.learnerGroupMemberLct = _tmp_learnerGroupMemberLct; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.person = $receiver_0; } return $receiver; }; } function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda$lambda(_result) { return mapRows(_result, LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda$lambda$lambda(_result)); } function Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$learnerGroupUid = closure$learnerGroupUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda.prototype.constructor = Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda; Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$learnerGroupUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda(closure$learnerGroupUid_0, closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LearnerGroupMemberDao_JdbcKt.prototype.findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$ = function (learnerGroupUid, contentEntryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT LearnerGroupMember.*, Person.* FROM LearnerGroupMember \n | LEFT JOIN Person ON LearnerGroupMember.learnerGroupMemberPersonUid = Person.personUid \n | LEFT JOIN GroupLearningSession ON \n | GroupLearningSession.groupLearningSessionLearnerGroupUid = LearnerGroupMember.learnerGroupMemberLgUid \n | WHERE GroupLearningSession.groupLearningSessionLearnerGroupUid = ? \n | AND GroupLearningSession.groupLearningSessionContentUid = ? \n | ORDER BY learnerGroupMemberRole ASC\n | \n ')), LearnerGroupMemberDao_JdbcKt$findLearnerGroupMembersByGroupIdAndEntryList$lambda(learnerGroupUid, contentEntryUid), continuation); }; function LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO LearnerGroupMember (learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.learnerGroupMemberUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.learnerGroupMemberUid); } stmt.setLong_6svq3l$(2, entity.learnerGroupMemberPersonUid); stmt.setLong_6svq3l$(3, entity.learnerGroupMemberLgUid); stmt.setInt_vux9f0$(4, entity.learnerGroupMemberRole); stmt.setBoolean_fzusl$(5, entity.learnerGroupMemberActive); stmt.setLong_6svq3l$(6, entity.learnerGroupMemberMCSN); stmt.setLong_6svq3l$(7, entity.learnerGroupMemberCSN); stmt.setInt_vux9f0$(8, entity.learnerGroupMemberLCB); stmt.setLong_6svq3l$(9, entity.learnerGroupMemberLct); }; LearnerGroupMemberDao_JdbcKt$_insertAdapterLearnerGroupMember_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; LearnerGroupMemberDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupMemberDao_JdbcKt', interfaces: [LearnerGroupMemberDao]}; function LearnerGroupMemberDao_ReplicateWrapper(_db, _dao) { LearnerGroupMemberDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_111($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_111.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_111.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_111.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_111; Coroutine$replicateOnNewNode_s8cxhz$_111.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_111(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_111($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_111.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_111.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_111.prototype.constructor = Coroutine$replicateOnChange_111; Coroutine$replicateOnChange_111.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_111(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.findLearnerGroupMembersByGroupIdAndEntry_3pjtqy$ = function (learnerGroupUid, contentEntryUid) { return this._dao_0.findLearnerGroupMembersByGroupIdAndEntry_3pjtqy$(learnerGroupUid, contentEntryUid); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$ = function (learnerGroupUid, contentEntryUid, continuation) { return this._dao_0.findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$(learnerGroupUid, contentEntryUid, continuation); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_117($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_117.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_117.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_117.prototype.constructor = Coroutine$insertAsync_117; Coroutine$insertAsync_117.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.learnerGroupMemberUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(300, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.learnerGroupMemberUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.learnerGroupMemberLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.learnerGroupMemberUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_117(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupMemberDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LearnerGroupMemberDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupMemberDao_ReplicateWrapper', interfaces: [LearnerGroupMemberDao]}; function LearnerGroupMemberDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { LearnerGroupMemberDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_112($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_112.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_112.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_112.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_112; Coroutine$replicateOnNewNode_s8cxhz$_112.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_112(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_112($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_112.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_112.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_112.prototype.constructor = Coroutine$replicateOnChange_112; Coroutine$replicateOnChange_112.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_112(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupMemberDao_Repo.prototype.findLearnerGroupMembersByGroupIdAndEntry_3pjtqy$ = function (learnerGroupUid, contentEntryUid) { var _result = this._dao.findLearnerGroupMembersByGroupIdAndEntry_3pjtqy$(learnerGroupUid, contentEntryUid); return _result; }; function Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$($this, learnerGroupUid_0, contentEntryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$learnerGroupUid = learnerGroupUid_0; this.local$contentEntryUid = contentEntryUid_0; } Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$.prototype.constructor = Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$; Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$(this.local$learnerGroupUid, this.local$contentEntryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_Repo.prototype.findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$ = function (learnerGroupUid_0, contentEntryUid_0, continuation_0, suspended) { var instance = new Coroutine$findLearnerGroupMembersByGroupIdAndEntryList_3pjtqy$(this, learnerGroupUid_0, contentEntryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupMemberDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_118($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_118.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_118.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_118.prototype.constructor = Coroutine$insertAsync_118; Coroutine$insertAsync_118.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LearnerGroupMemberDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_118(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LearnerGroupMemberDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; LearnerGroupMemberDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; LearnerGroupMemberDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; LearnerGroupMemberDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupMemberDao_Repo', interfaces: [LearnerGroupMemberDao]}; function LeavingReasonDao() { } LeavingReasonDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'LeavingReasonDao', interfaces: [BaseDao]}; function LeavingReasonDao_JdbcKt(_db) { LeavingReasonDao.call(this); this._db = _db; this._insertAdapterLeavingReason_upsert = new LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral(this._db); this._insertAdapterLeavingReason_ = new LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral(this._db); } function Coroutine$replaceList_1t3q73$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$replaceList_1t3q73$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceList_1t3q73$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceList_1t3q73$.prototype.constructor = Coroutine$replaceList_1t3q73$; Coroutine$replaceList_1t3q73$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLeavingReason_upsert.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_JdbcKt.prototype.replaceList_1t3q73$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$replaceList_1t3q73$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterLeavingReason_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_119($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_119.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_119.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_119.prototype.constructor = Coroutine$insertAsync_119; Coroutine$insertAsync_119.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLeavingReason_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_119(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterLeavingReason_.insertList_4ezy5m$(entityList); }; function Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda; Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.leavingReasonTitle); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entity.leavingReasonMCSN); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.leavingReasonCSN); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$entity.leavingReasonLCB); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$entity.leavingReasonLct); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$entity.leavingReasonUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_e9c2s2$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_e9c2s2$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_e9c2s2$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_e9c2s2$.prototype.constructor = Coroutine$updateAsync_e9c2s2$; Coroutine$updateAsync_e9c2s2$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE LeavingReason SET leavingReasonTitle = ?, leavingReasonMCSN = ?, leavingReasonCSN = ?, leavingReasonLCB = ?, leavingReasonLct = ? WHERE leavingReasonUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, LeavingReasonDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_JdbcKt.prototype.updateAsync_e9c2s2$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_e9c2s2$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LeavingReasonDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.leavingReasonTitle); _stmt.setLong_6svq3l$(2, _entity.leavingReasonMCSN); _stmt.setLong_6svq3l$(3, _entity.leavingReasonCSN); _stmt.setInt_vux9f0$(4, _entity.leavingReasonLCB); _stmt.setLong_6svq3l$(5, _entity.leavingReasonLct); _stmt.setLong_6svq3l$(6, _entity.leavingReasonUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } LeavingReasonDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE LeavingReason SET leavingReasonTitle = ?, leavingReasonMCSN = ?, leavingReasonCSN = ?, leavingReasonLCB = ?, leavingReasonLct = ? WHERE leavingReasonUid = ?'; prepareAndUseStatement(this._db, _sql, LeavingReasonDao_JdbcKt$updateList$lambda(entityList)); }; function LeavingReasonDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.leavingReasonTitle); _stmt.setLong_6svq3l$(2, closure$entity.leavingReasonMCSN); _stmt.setLong_6svq3l$(3, closure$entity.leavingReasonCSN); _stmt.setInt_vux9f0$(4, closure$entity.leavingReasonLCB); _stmt.setLong_6svq3l$(5, closure$entity.leavingReasonLct); _stmt.setLong_6svq3l$(6, closure$entity.leavingReasonUid); return _stmt.executeUpdate(); }; } LeavingReasonDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE LeavingReason SET leavingReasonTitle = ?, leavingReasonMCSN = ?, leavingReasonCSN = ?, leavingReasonLCB = ?, leavingReasonLct = ? WHERE leavingReasonUid = ?'; prepareAndUseStatement(this._db, _sql, LeavingReasonDao_JdbcKt$update$lambda(entity)); }; function Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_113($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_113.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_113.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_113.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_113; Coroutine$replicateOnNewNode_s8cxhz$_113.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LeavingReasonReplicate(lrPk, lrDestination)\n | SELECT DISTINCT LeavingReason.leavingReasonUid AS lrPk,\n | ? AS lrDestination\n | FROM LeavingReason\n | WHERE LeavingReason.leavingReasonLct != COALESCE(\n | (SELECT lrVersionId\n | FROM LeavingReasonReplicate\n | WHERE lrPk = LeavingReason.leavingReasonUid\n | AND lrDestination = ?), 0) \n | /*psql ON CONFLICT(lrPk, lrDestination) DO UPDATE\n | SET lrPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LeavingReasonReplicate(lrPk, lrDestination)\n | SELECT DISTINCT LeavingReason.leavingReasonUid AS lrPk,\n | ? AS lrDestination\n | FROM LeavingReason\n | WHERE LeavingReason.leavingReasonLct != COALESCE(\n | (SELECT lrVersionId\n | FROM LeavingReasonReplicate\n | WHERE lrPk = LeavingReason.leavingReasonUid\n | AND lrDestination = ?), 0) \n | ON CONFLICT(lrPk, lrDestination) DO UPDATE\n | SET lrPending = true\n | \n | \n |')), LeavingReasonDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_113(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda; Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_113($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_113.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_113.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_113.prototype.constructor = Coroutine$replicateOnChange_113; Coroutine$replicateOnChange_113.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO LeavingReasonReplicate(lrPk, lrDestination)\n | SELECT DISTINCT LeavingReason.leavingReasonUid AS lrUid,\n | UserSession.usClientNodeId AS lrDestination\n | FROM ChangeLog\n | JOIN LeavingReason\n | ON ChangeLog.chTableId = 410\n | AND ChangeLog.chEntityPk = LeavingReason.leavingReasonUid\n | JOIN UserSession \n | ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND LeavingReason.leavingReasonLct != COALESCE(\n | (SELECT lrVersionId\n | FROM LeavingReasonReplicate\n | WHERE lrPk = LeavingReason.leavingReasonUid\n | AND lrDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(lrPk, lrDestination) DO UPDATE\n | SET lrPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO LeavingReasonReplicate(lrPk, lrDestination)\n | SELECT DISTINCT LeavingReason.leavingReasonUid AS lrUid,\n | UserSession.usClientNodeId AS lrDestination\n | FROM ChangeLog\n | JOIN LeavingReason\n | ON ChangeLog.chTableId = 410\n | AND ChangeLog.chEntityPk = LeavingReason.leavingReasonUid\n | JOIN UserSession \n | ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND LeavingReason.leavingReasonLct != COALESCE(\n | (SELECT lrVersionId\n | FROM LeavingReasonReplicate\n | WHERE lrPk = LeavingReason.leavingReasonUid\n | AND lrDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(lrPk, lrDestination) DO UPDATE\n | SET lrPending = true\n | \n | \n |')), LeavingReasonDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_113(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral(this$LeavingReasonDao_JdbcKt) { this.this$LeavingReasonDao_JdbcKt = this$LeavingReasonDao_JdbcKt; DataSourceFactory.call(this); } function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_leavingReasonUid = closure$_result.getLong_61zpoe$('leavingReasonUid'); var _tmp_leavingReasonTitle = closure$_result.getString_61zpoe$('leavingReasonTitle'); var _tmp_leavingReasonMCSN = closure$_result.getLong_61zpoe$('leavingReasonMCSN'); var _tmp_leavingReasonCSN = closure$_result.getLong_61zpoe$('leavingReasonCSN'); var _tmp_leavingReasonLCB = closure$_result.getInt_61zpoe$('leavingReasonLCB'); var _tmp_leavingReasonLct = closure$_result.getLong_61zpoe$('leavingReasonLct'); var $receiver = new LeavingReason(); $receiver.leavingReasonUid = _tmp_leavingReasonUid; $receiver.leavingReasonTitle = _tmp_leavingReasonTitle; $receiver.leavingReasonMCSN = _tmp_leavingReasonMCSN; $receiver.leavingReasonCSN = _tmp_leavingReasonCSN; $receiver.leavingReasonLCB = _tmp_leavingReasonLCB; $receiver.leavingReasonLct = _tmp_leavingReasonLct; return $receiver; }; } function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda(this$LeavingReasonDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LeavingReasonDao_JdbcKt = this$LeavingReasonDao_JdbcKt_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LeavingReasonDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM (SELECT * FROM LeavingReason) LIMIT ? OFFSET ?'), LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda$lambda(this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda(this$LeavingReasonDao_JdbcKt_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda(this$LeavingReasonDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$LeavingReasonDao_JdbcKt._db, listOf_0('LeavingReason'), LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getData$lambda(this.this$LeavingReasonDao_JdbcKt, _limit, _offset)); }; function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda(this$LeavingReasonDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LeavingReasonDao_JdbcKt = this$LeavingReasonDao_JdbcKt_0; } Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda; Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LeavingReasonDao_JdbcKt._db, new PreparedStatementConfig('SELECT COUNT(*) FROM (SELECT * FROM LeavingReason) '), LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda(this$LeavingReasonDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda(this$LeavingReasonDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$LeavingReasonDao_JdbcKt._db, listOf_0('LeavingReason'), LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral$getLength$lambda(this.this$LeavingReasonDao_JdbcKt)); }; LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; LeavingReasonDao_JdbcKt.prototype.findAllReasons = function () { return new LeavingReasonDao_JdbcKt$findAllReasons$ObjectLiteral(this); }; function LeavingReasonDao_JdbcKt$findAllReasonsLive$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_leavingReasonUid = closure$_result.getLong_61zpoe$('leavingReasonUid'); var _tmp_leavingReasonTitle = closure$_result.getString_61zpoe$('leavingReasonTitle'); var _tmp_leavingReasonMCSN = closure$_result.getLong_61zpoe$('leavingReasonMCSN'); var _tmp_leavingReasonCSN = closure$_result.getLong_61zpoe$('leavingReasonCSN'); var _tmp_leavingReasonLCB = closure$_result.getInt_61zpoe$('leavingReasonLCB'); var _tmp_leavingReasonLct = closure$_result.getLong_61zpoe$('leavingReasonLct'); var $receiver = new LeavingReason(); $receiver.leavingReasonUid = _tmp_leavingReasonUid; $receiver.leavingReasonTitle = _tmp_leavingReasonTitle; $receiver.leavingReasonMCSN = _tmp_leavingReasonMCSN; $receiver.leavingReasonCSN = _tmp_leavingReasonCSN; $receiver.leavingReasonLCB = _tmp_leavingReasonLCB; $receiver.leavingReasonLct = _tmp_leavingReasonLct; return $receiver; }; } function LeavingReasonDao_JdbcKt$findAllReasonsLive$lambda$lambda(_result) { return mapRows(_result, LeavingReasonDao_JdbcKt$findAllReasonsLive$lambda$lambda$lambda(_result)); } function LeavingReasonDao_JdbcKt$findAllReasonsLive$lambda(_stmt) { return useResults(_stmt.executeQuery(), LeavingReasonDao_JdbcKt$findAllReasonsLive$lambda$lambda); } LeavingReasonDao_JdbcKt.prototype.findAllReasonsLive = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM LeavingReason'), LeavingReasonDao_JdbcKt$findAllReasonsLive$lambda); }; function LeavingReasonDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_leavingReasonUid = closure$_result.getLong_61zpoe$('leavingReasonUid'); var _tmp_leavingReasonTitle = closure$_result.getString_61zpoe$('leavingReasonTitle'); var _tmp_leavingReasonMCSN = closure$_result.getLong_61zpoe$('leavingReasonMCSN'); var _tmp_leavingReasonCSN = closure$_result.getLong_61zpoe$('leavingReasonCSN'); var _tmp_leavingReasonLCB = closure$_result.getInt_61zpoe$('leavingReasonLCB'); var _tmp_leavingReasonLct = closure$_result.getLong_61zpoe$('leavingReasonLct'); var $receiver = new LeavingReason(); $receiver.leavingReasonUid = _tmp_leavingReasonUid; $receiver.leavingReasonTitle = _tmp_leavingReasonTitle; $receiver.leavingReasonMCSN = _tmp_leavingReasonMCSN; $receiver.leavingReasonCSN = _tmp_leavingReasonCSN; $receiver.leavingReasonLCB = _tmp_leavingReasonLCB; $receiver.leavingReasonLct = _tmp_leavingReasonLct; return $receiver; }; } function LeavingReasonDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, LeavingReasonDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda; Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LeavingReasonDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LeavingReasonDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM LeavingReason WHERE leavingReasonUid = ?'), LeavingReasonDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function LeavingReasonDao_JdbcKt$findByUidList$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function LeavingReasonDao_JdbcKt$findByUidList$lambda$lambda(_result) { return mapRows(_result, LeavingReasonDao_JdbcKt$findByUidList$lambda$lambda$lambda(_result)); } function Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda(closure$uidList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uidList = closure$uidList_0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda; Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LeavingReasonDao_JdbcKt$findByUidList$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findByUidList$lambda(closure$uidList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findByUidList$lambda(closure$uidList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LeavingReasonDao_JdbcKt.prototype.findByUidList_gox9k8$ = function (uidList, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT leavingReasonUid FROM LeavingReason WHERE leavingReasonUid IN (?)', true), LeavingReasonDao_JdbcKt$findByUidList$lambda(uidList), continuation); }; function LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_leavingReasonUid = closure$_result.getLong_61zpoe$('leavingReasonUid'); var _tmp_leavingReasonTitle = closure$_result.getString_61zpoe$('leavingReasonTitle'); var _tmp_leavingReasonMCSN = closure$_result.getLong_61zpoe$('leavingReasonMCSN'); var _tmp_leavingReasonCSN = closure$_result.getLong_61zpoe$('leavingReasonCSN'); var _tmp_leavingReasonLCB = closure$_result.getInt_61zpoe$('leavingReasonLCB'); var _tmp_leavingReasonLct = closure$_result.getLong_61zpoe$('leavingReasonLct'); var $receiver = new LeavingReason(); $receiver.leavingReasonUid = _tmp_leavingReasonUid; $receiver.leavingReasonTitle = _tmp_leavingReasonTitle; $receiver.leavingReasonMCSN = _tmp_leavingReasonMCSN; $receiver.leavingReasonCSN = _tmp_leavingReasonCSN; $receiver.leavingReasonLCB = _tmp_leavingReasonLCB; $receiver.leavingReasonLct = _tmp_leavingReasonLct; return $receiver; }; } function LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda(this$LeavingReasonDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$LeavingReasonDao_JdbcKt = this$LeavingReasonDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; } Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda; Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$LeavingReasonDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM LeavingReason WHERE leavingReasonUid = ?'), LeavingReasonDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$findByUidLive$lambda(this$LeavingReasonDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$findByUidLive$lambda(this$LeavingReasonDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LeavingReasonDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { return new LiveDataImpl(this._db, listOf_0('LeavingReason'), LeavingReasonDao_JdbcKt$findByUidLive$lambda(this, uid)); }; function LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_uid = closure$_result.getLong_61zpoe$('uid'); var _tmp_labelName = closure$_result.getString_61zpoe$('labelName'); var $receiver = new UidAndLabel(); $receiver.uid = _tmp_uid; $receiver.labelName = _tmp_labelName; return $receiver; }; } function LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda$lambda(_result) { return mapRows(_result, LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda$lambda$lambda(_result)); } function Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda(closure$uidList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uidList = closure$uidList_0; this.local$_stmt = _stmt_0; } Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda.prototype.constructor = Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda; Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda(closure$uidList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda(closure$uidList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } LeavingReasonDao_JdbcKt.prototype.getReasonsFromUids_gox9k8$ = function (uidList, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT LeavingReason.leavingReasonUid AS uid, \n | LeavingReason.leavingReasonTitle As labelName \n | FROM LeavingReason WHERE leavingReasonUid IN (?)\n '), true), LeavingReasonDao_JdbcKt$getReasonsFromUids$lambda(uidList), continuation); }; function LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO LeavingReason (leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES(?, ?, ?, ?, ?, ?)'; }; LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.leavingReasonUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.leavingReasonUid); } stmt.setString_vqvrqt$(2, entity.leavingReasonTitle); stmt.setLong_6svq3l$(3, entity.leavingReasonMCSN); stmt.setLong_6svq3l$(4, entity.leavingReasonCSN); stmt.setInt_vux9f0$(5, entity.leavingReasonLCB); stmt.setLong_6svq3l$(6, entity.leavingReasonLct); }; LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO LeavingReason (leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES(?, ?, ?, ?, ?, ?)'; }; LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.leavingReasonUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.leavingReasonUid); } stmt.setString_vqvrqt$(2, entity.leavingReasonTitle); stmt.setLong_6svq3l$(3, entity.leavingReasonMCSN); stmt.setLong_6svq3l$(4, entity.leavingReasonCSN); stmt.setInt_vux9f0$(5, entity.leavingReasonLCB); stmt.setLong_6svq3l$(6, entity.leavingReasonLct); }; LeavingReasonDao_JdbcKt$_insertAdapterLeavingReason_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; LeavingReasonDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'LeavingReasonDao_JdbcKt', interfaces: [LeavingReasonDao]}; function LeavingReasonDao_ReplicateWrapper(_db, _dao) { LeavingReasonDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_114($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_114.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_114.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_114.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_114; Coroutine$replicateOnNewNode_s8cxhz$_114.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_114(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_114($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_114.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_114.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_114.prototype.constructor = Coroutine$replicateOnChange_114; Coroutine$replicateOnChange_114.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_114(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_ReplicateWrapper.prototype.findAllReasons = function () { return this._dao_0.findAllReasons(); }; LeavingReasonDao_ReplicateWrapper.prototype.findAllReasonsLive = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LeavingReasonDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; LeavingReasonDao_ReplicateWrapper.prototype.findByUidList_gox9k8$ = function (uidList, continuation) { return this._dao_0.findByUidList_gox9k8$(uidList, continuation); }; LeavingReasonDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; LeavingReasonDao_ReplicateWrapper.prototype.getReasonsFromUids_gox9k8$ = function (uidList, continuation) { return this._dao_0.getReasonsFromUids_gox9k8$(uidList, continuation); }; function Coroutine$replaceList_1t3q73$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$replaceList_1t3q73$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceList_1t3q73$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceList_1t3q73$_0.prototype.constructor = Coroutine$replaceList_1t3q73$_0; Coroutine$replaceList_1t3q73$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.leavingReasonUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(410, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.leavingReasonUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.leavingReasonLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.replaceList_1t3q73$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_ReplicateWrapper.prototype.replaceList_1t3q73$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$replaceList_1t3q73$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_ReplicateWrapper.prototype.updateAsync_e9c2s2$ = function (entity, continuation) { entity.leavingReasonLct = systemTimeInMillis(); return this._dao_0.updateAsync_e9c2s2$(entity, continuation); }; LeavingReasonDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_120($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_120.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_120.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_120.prototype.constructor = Coroutine$insertAsync_120; Coroutine$insertAsync_120.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.leavingReasonUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(410, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.leavingReasonUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.leavingReasonLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.leavingReasonUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_120(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LeavingReasonDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LeavingReasonDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; LeavingReasonDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'LeavingReasonDao_ReplicateWrapper', interfaces: [LeavingReasonDao]}; function LeavingReasonDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { LeavingReasonDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_115($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_115.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_115.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_115.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_115; Coroutine$replicateOnNewNode_s8cxhz$_115.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_115(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_115($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_115.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_115.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_115.prototype.constructor = Coroutine$replicateOnChange_115; Coroutine$replicateOnChange_115.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_115(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_Repo.prototype.findAllReasons = function () { var _result = this._dao.findAllReasons(); return _result; }; LeavingReasonDao_Repo.prototype.findAllReasonsLive = function () { var _result = this._dao.findAllReasonsLive(); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_11($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_11.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_11; Coroutine$findByUidAsync_s8cxhz$_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_11(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidList_gox9k8$($this, uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uidList = uidList_0; } Coroutine$findByUidList_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidList_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidList_gox9k8$.prototype.constructor = Coroutine$findByUidList_gox9k8$; Coroutine$findByUidList_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidList_gox9k8$(this.local$uidList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.findByUidList_gox9k8$ = function (uidList_0, continuation_0, suspended) { var instance = new Coroutine$findByUidList_gox9k8$(this, uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$getReasonsFromUids_gox9k8$($this, uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uidList = uidList_0; } Coroutine$getReasonsFromUids_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getReasonsFromUids_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getReasonsFromUids_gox9k8$.prototype.constructor = Coroutine$getReasonsFromUids_gox9k8$; Coroutine$getReasonsFromUids_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getReasonsFromUids_gox9k8$(this.local$uidList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.getReasonsFromUids_gox9k8$ = function (uidList_0, continuation_0, suspended) { var instance = new Coroutine$getReasonsFromUids_gox9k8$(this, uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceList_1t3q73$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$replaceList_1t3q73$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceList_1t3q73$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceList_1t3q73$_1.prototype.constructor = Coroutine$replaceList_1t3q73$_1; Coroutine$replaceList_1t3q73$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replaceList_1t3q73$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.replaceList_1t3q73$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$replaceList_1t3q73$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_e9c2s2$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_e9c2s2$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_e9c2s2$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_e9c2s2$_0.prototype.constructor = Coroutine$updateAsync_e9c2s2$_0; Coroutine$updateAsync_e9c2s2$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_e9c2s2$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.updateAsync_e9c2s2$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_e9c2s2$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_121($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_121.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_121.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_121.prototype.constructor = Coroutine$insertAsync_121; Coroutine$insertAsync_121.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LeavingReasonDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_121(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; LeavingReasonDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; LeavingReasonDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; LeavingReasonDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; LeavingReasonDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'LeavingReasonDao_Repo', interfaces: [LeavingReasonDao]}; function LocallyAvailableContainerDao() { } LocallyAvailableContainerDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'LocallyAvailableContainerDao', interfaces: []}; function LocallyAvailableContainerDao_JdbcKt(_db) { LocallyAvailableContainerDao.call(this); this._db = _db; this._insertAdapterLocallyAvailableContainer_upsert = new LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral(this._db); } function Coroutine$insertList_s1s25j$($this, locallyAvailableContainers_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$locallyAvailableContainers = locallyAvailableContainers_0; } Coroutine$insertList_s1s25j$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertList_s1s25j$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertList_s1s25j$.prototype.constructor = Coroutine$insertList_s1s25j$; Coroutine$insertList_s1s25j$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterLocallyAvailableContainer_upsert.insertListAsync_4ezy5m$(this.local$locallyAvailableContainers, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LocallyAvailableContainerDao_JdbcKt.prototype.insertList_s1s25j$ = function (locallyAvailableContainers_0, continuation_0, suspended) { var instance = new Coroutine$insertList_s1s25j$(this, locallyAvailableContainers_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda(closure$locallyAvailableContainers_0, closure$_numChanges_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$locallyAvailableContainers = closure$locallyAvailableContainers_0; this.local$closure$_numChanges = closure$_numChanges_0; this.local$tmp$ = void 0; this.local$tmp$_0 = void 0; this.local$_stmt = _stmt_0; } Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda.prototype.constructor = Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda; Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$locallyAvailableContainers.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setLong_6svq3l$(1, _entity.laContainerUid); this.local$tmp$_0 = this.local$closure$_numChanges.v; this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.local$closure$_numChanges.v = this.local$tmp$_0 + this.result_0 | 0; this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function LocallyAvailableContainerDao_JdbcKt$deleteList$lambda(closure$locallyAvailableContainers_0, closure$_numChanges_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$LocallyAvailableContainerDao_JdbcKt$deleteList$lambda(closure$locallyAvailableContainers_0, closure$_numChanges_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$deleteList_s1s25j$($this, locallyAvailableContainers_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$locallyAvailableContainers = locallyAvailableContainers_0; } Coroutine$deleteList_s1s25j$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deleteList_s1s25j$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deleteList_s1s25j$.prototype.constructor = Coroutine$deleteList_s1s25j$; Coroutine$deleteList_s1s25j$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _numChanges = {v: 0}; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, 'DELETE FROM LocallyAvailableContainer WHERE laContainerUid = ?', LocallyAvailableContainerDao_JdbcKt$deleteList$lambda(this.local$locallyAvailableContainers, _numChanges), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; LocallyAvailableContainerDao_JdbcKt.prototype.deleteList_s1s25j$ = function (locallyAvailableContainers_0, continuation_0, suspended) { var instance = new Coroutine$deleteList_s1s25j$(this, locallyAvailableContainers_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function LocallyAvailableContainerDao_JdbcKt$deleteAll$lambda(_stmt) { return _stmt.executeUpdate(); } LocallyAvailableContainerDao_JdbcKt.prototype.deleteAll = function () { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('DELETE FROM LocallyAvailableContainer'), LocallyAvailableContainerDao_JdbcKt$deleteAll$lambda); }; function LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO LocallyAvailableContainer (laContainerUid) VALUES(?)'; }; LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setLong_6svq3l$(1, entity.laContainerUid); }; LocallyAvailableContainerDao_JdbcKt$_insertAdapterLocallyAvailableContainer_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; LocallyAvailableContainerDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'LocallyAvailableContainerDao_JdbcKt', interfaces: [LocallyAvailableContainerDao]}; function MessageDao() { } MessageDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageDao', interfaces: [BaseDao]}; function MessageDao_JdbcKt(_db) { MessageDao.call(this); this._db = _db; this._insertAdapterMessage_ = new MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral(this._db); } MessageDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterMessage_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_122($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_122.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_122.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_122.prototype.constructor = Coroutine$insertAsync_122; Coroutine$insertAsync_122.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterMessage_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_122(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterMessage_.insertList_4ezy5m$(entityList); }; function MessageDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.messageSenderPersonUid); _stmt.setInt_vux9f0$(2, _entity.messageTableId); _stmt.setLong_6svq3l$(3, _entity.messageEntityUid); _stmt.setString_vqvrqt$(4, _entity.messageText); _stmt.setLong_6svq3l$(5, _entity.messageTimestamp); _stmt.setLong_6svq3l$(6, _entity.messageClazzUid); _stmt.setLong_6svq3l$(7, _entity.messageLct); _stmt.setLong_6svq3l$(8, _entity.messageUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } MessageDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Message SET messageSenderPersonUid = ?, messageTableId = ?, messageEntityUid = ?, messageText = ?, messageTimestamp = ?, messageClazzUid = ?, messageLct = ? WHERE messageUid = ?'; prepareAndUseStatement(this._db, _sql, MessageDao_JdbcKt$updateList$lambda(entityList)); }; function MessageDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.messageSenderPersonUid); _stmt.setInt_vux9f0$(2, closure$entity.messageTableId); _stmt.setLong_6svq3l$(3, closure$entity.messageEntityUid); _stmt.setString_vqvrqt$(4, closure$entity.messageText); _stmt.setLong_6svq3l$(5, closure$entity.messageTimestamp); _stmt.setLong_6svq3l$(6, closure$entity.messageClazzUid); _stmt.setLong_6svq3l$(7, closure$entity.messageLct); _stmt.setLong_6svq3l$(8, closure$entity.messageUid); return _stmt.executeUpdate(); }; } MessageDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Message SET messageSenderPersonUid = ?, messageTableId = ?, messageEntityUid = ?, messageText = ?, messageTimestamp = ?, messageClazzUid = ?, messageLct = ? WHERE messageUid = ?'; prepareAndUseStatement(this._db, _sql, MessageDao_JdbcKt$update$lambda(entity)); }; function Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda; Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$replicateOnNewNodeChats$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$replicateOnNewNodeChats$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeChats_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeChats_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeChats_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeChats_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNodeChats_s8cxhz$; Coroutine$replicateOnNewNodeChats_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messagePk,\n | ? AS messageDestination\n | FROM UserSession\n | JOIN Message ON\n | (( Message.messageTableId = 127\n | AND Message.messageEntityUid IN\n | (SELECT ChatMember.chatMemberChatUid \n | FROM ChatMember\n | WHERE ChatMember.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = ?), 0) \n | /*psql ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messagePk,\n | ? AS messageDestination\n | FROM UserSession\n | JOIN Message ON\n | (( Message.messageTableId = 127\n | AND Message.messageEntityUid IN\n | (SELECT ChatMember.chatMemberChatUid \n | FROM ChatMember\n | WHERE ChatMember.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = ?), 0) \n | ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | \n | \n |')), MessageDao_JdbcKt$replicateOnNewNodeChats$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_JdbcKt.prototype.replicateOnNewNodeChats_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeChats_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda; Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$replicateOnNewNodePosts$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$replicateOnNewNodePosts$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodePosts_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePosts_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePosts_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePosts_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNodePosts_s8cxhz$; Coroutine$replicateOnNewNodePosts_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messagePk,\n | ? AS messageDestination\n | FROM UserSession\n | \n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN Message \n | ON Message.messageTableId = 132\n | AND Message.messageClazzUid = Clazz.clazzUid\n | \n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = ?), 0) \n | /*psql ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messagePk,\n | ? AS messageDestination\n | FROM UserSession\n | \n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | \n | JOIN Message \n | ON Message.messageTableId = 132\n | AND Message.messageClazzUid = Clazz.clazzUid\n | \n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = ?), 0) \n | ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | \n | \n |')), MessageDao_JdbcKt$replicateOnNewNodePosts$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_JdbcKt.prototype.replicateOnNewNodePosts_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePosts_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda; Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$replicateOnChangeChat$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$replicateOnChangeChat$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeChat($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeChat.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeChat.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeChat.prototype.constructor = Coroutine$replicateOnChangeChat; Coroutine$replicateOnChangeChat.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messageUid,\n | UserSession.usClientNodeId AS messageDestination\n | FROM ChangeLog\n | JOIN Message\n | ON ChangeLog.chTableId = 126\n | AND ChangeLog.chEntityPk = Message.messageUid\n | AND Message.messageTableId = 127\n | JOIN UserSession ON\n | ((UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid\n | FROM ChatMember\n | WHERE ChatMember.chatMemberChatUid = Message.messageEntityUid))\n | OR UserSession.usSessionType = 2) \n | WHERE UserSession.usStatus = 1\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messageUid,\n | UserSession.usClientNodeId AS messageDestination\n | FROM ChangeLog\n | JOIN Message\n | ON ChangeLog.chTableId = 126\n | AND ChangeLog.chEntityPk = Message.messageUid\n | AND Message.messageTableId = 127\n | JOIN UserSession ON\n | ((UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid\n | FROM ChatMember\n | WHERE ChatMember.chatMemberChatUid = Message.messageEntityUid))\n | OR UserSession.usSessionType = 2) \n | WHERE UserSession.usStatus = 1\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | \n | \n |')), MessageDao_JdbcKt$replicateOnChangeChat$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_JdbcKt.prototype.replicateOnChangeChat = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeChat(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda; Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$replicateOnChangePosts$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$replicateOnChangePosts$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangePosts($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePosts.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePosts.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePosts.prototype.constructor = Coroutine$replicateOnChangePosts; Coroutine$replicateOnChangePosts.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messageUid,\n | UserSession.usClientNodeId AS messageDestination\n | FROM ChangeLog\n | \n | JOIN Message\n | ON ChangeLog.chTableId = 126\n | AND ChangeLog.chEntityPk = Message.messageUid\n | AND Message.messageTableId = 132\n | \n | JOIN Clazz\n | ON Clazz.clazzUid = Message.messageClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usStatus = 1\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO MessageReplicate(messagePk, messageDestination)\n | SELECT DISTINCT Message.messageUid AS messageUid,\n | UserSession.usClientNodeId AS messageDestination\n | FROM ChangeLog\n | \n | JOIN Message\n | ON ChangeLog.chTableId = 126\n | AND ChangeLog.chEntityPk = Message.messageUid\n | AND Message.messageTableId = 132\n | \n | JOIN Clazz\n | ON Clazz.clazzUid = Message.messageClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usStatus = 1\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Message.messageLct != COALESCE(\n | (SELECT messageVersionId\n | FROM MessageReplicate\n | WHERE messagePk = Message.messageUid\n | AND messageDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(messagePk, messageDestination) DO UPDATE\n | SET messagePending = true\n | \n | \n |')), MessageDao_JdbcKt$replicateOnChangePosts$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_JdbcKt.prototype.replicateOnChangePosts = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePosts(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral(this$MessageDao_JdbcKt, closure$loggedInPersonUid, closure$tableId, closure$entityUid) { this.this$MessageDao_JdbcKt = this$MessageDao_JdbcKt; this.closure$loggedInPersonUid = closure$loggedInPersonUid; this.closure$tableId = closure$tableId; this.closure$entityUid = closure$entityUid; DataSourceFactory.call(this); } function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_messageUid = closure$_result.getLong_61zpoe$('messageUid'); var _tmp_messageSenderPersonUid = closure$_result.getLong_61zpoe$('messageSenderPersonUid'); var _tmp_messageTableId = closure$_result.getInt_61zpoe$('messageTableId'); var _tmp_messageEntityUid = closure$_result.getLong_61zpoe$('messageEntityUid'); var _tmp_messageText = closure$_result.getString_61zpoe$('messageText'); var _tmp_messageTimestamp = closure$_result.getLong_61zpoe$('messageTimestamp'); var _tmp_messageClazzUid = closure$_result.getLong_61zpoe$('messageClazzUid'); var _tmp_messageLct = closure$_result.getLong_61zpoe$('messageLct'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var _tmp_MessageRead_nullCount = 0; var _tmp_messageReadUid = closure$_result.getLong_61zpoe$('messageReadUid'); if (closure$_result.wasNull()) { _tmp_MessageRead_nullCount = _tmp_MessageRead_nullCount + 1 | 0; } var _tmp_messageReadPersonUid = closure$_result.getLong_61zpoe$('messageReadPersonUid'); if (closure$_result.wasNull()) { _tmp_MessageRead_nullCount = _tmp_MessageRead_nullCount + 1 | 0; } var _tmp_messageReadMessageUid = closure$_result.getLong_61zpoe$('messageReadMessageUid'); if (closure$_result.wasNull()) { _tmp_MessageRead_nullCount = _tmp_MessageRead_nullCount + 1 | 0; } var _tmp_messageReadEntityUid = closure$_result.getLong_61zpoe$('messageReadEntityUid'); if (closure$_result.wasNull()) { _tmp_MessageRead_nullCount = _tmp_MessageRead_nullCount + 1 | 0; } var _tmp_messageReadLct = closure$_result.getLong_61zpoe$('messageReadLct'); if (closure$_result.wasNull()) { _tmp_MessageRead_nullCount = _tmp_MessageRead_nullCount + 1 | 0; } var _tmp_MessageRead_isAllNull = _tmp_MessageRead_nullCount === 5; var $receiver = new MessageWithPerson(); $receiver.messageUid = _tmp_messageUid; $receiver.messageSenderPersonUid = _tmp_messageSenderPersonUid; $receiver.messageTableId = _tmp_messageTableId; $receiver.messageEntityUid = _tmp_messageEntityUid; $receiver.messageText = _tmp_messageText; $receiver.messageTimestamp = _tmp_messageTimestamp; $receiver.messageClazzUid = _tmp_messageClazzUid; $receiver.messageLct = _tmp_messageLct; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.messagePerson = $receiver_0; } if (!_tmp_MessageRead_isAllNull) { var $receiver_1 = new MessageRead(); $receiver_1.messageReadUid = _tmp_messageReadUid; $receiver_1.messageReadPersonUid = _tmp_messageReadPersonUid; $receiver_1.messageReadMessageUid = _tmp_messageReadMessageUid; $receiver_1.messageReadEntityUid = _tmp_messageReadEntityUid; $receiver_1.messageReadLct = _tmp_messageReadLct; $receiver.messageRead = $receiver_1; } return $receiver; }; } function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda(closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$loggedInPersonUid = closure$loggedInPersonUid_0; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$loggedInPersonUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$tableId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entityUid); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda(closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda(closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda(this$MessageDao_JdbcKt_0, closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$MessageDao_JdbcKt = this$MessageDao_JdbcKt_0; this.local$closure$loggedInPersonUid = closure$loggedInPersonUid_0; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$MessageDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT\n | Message.*,\n | Person.*,\n | MessageRead.*\n | FROM Message\n | LEFT JOIN Person\n | ON Message.messageSenderPersonUid = Person.personUid\n | LEFT JOIN MessageRead\n | ON MessageRead.messageReadMessageUid = Message.messageUid\n | AND MessageRead.messageReadPersonUid = ?\n | WHERE Message.messageTableId = ?\n | AND Message.messageEntityUid = ?\n | ORDER BY Message.messageTimestamp DESC\n | ) LIMIT ? OFFSET ?\n ')), MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda$lambda(this.local$closure$loggedInPersonUid, this.local$closure$tableId, this.local$closure$entityUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda(this$MessageDao_JdbcKt_0, closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda(this$MessageDao_JdbcKt_0, closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$MessageDao_JdbcKt._db, listOf(['Message', 'Person', 'MessageRead']), MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getData$lambda(this.this$MessageDao_JdbcKt, this.closure$loggedInPersonUid, this.closure$tableId, this.closure$entityUid, _limit, _offset)); }; function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda(closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$loggedInPersonUid = closure$loggedInPersonUid_0; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$_stmt = _stmt_0; } Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$loggedInPersonUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$tableId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entityUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda(closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda(closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda(this$MessageDao_JdbcKt_0, closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$MessageDao_JdbcKt = this$MessageDao_JdbcKt_0; this.local$closure$loggedInPersonUid = closure$loggedInPersonUid_0; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; } Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda; Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$MessageDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT\n | Message.*,\n | Person.*,\n | MessageRead.*\n | FROM Message\n | LEFT JOIN Person\n | ON Message.messageSenderPersonUid = Person.personUid\n | LEFT JOIN MessageRead\n | ON MessageRead.messageReadMessageUid = Message.messageUid\n | AND MessageRead.messageReadPersonUid = ?\n | WHERE Message.messageTableId = ?\n | AND Message.messageEntityUid = ?\n | ORDER BY Message.messageTimestamp DESC\n | ) \n ')), MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda$lambda(this.local$closure$loggedInPersonUid, this.local$closure$tableId, this.local$closure$entityUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda(this$MessageDao_JdbcKt_0, closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda(this$MessageDao_JdbcKt_0, closure$loggedInPersonUid_0, closure$tableId_0, closure$entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$MessageDao_JdbcKt._db, listOf(['Message', 'Person', 'MessageRead']), MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral$getLength$lambda(this.this$MessageDao_JdbcKt, this.closure$loggedInPersonUid, this.closure$tableId, this.closure$entityUid)); }; MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; MessageDao_JdbcKt.prototype.findAllMessagesByChatUid_ro19vi$ = function (entityUid, tableId, loggedInPersonUid) { return new MessageDao_JdbcKt$findAllMessagesByChatUid$ObjectLiteral(this, loggedInPersonUid, tableId, entityUid); }; function MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO Message (messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.messageUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.messageUid); } stmt.setLong_6svq3l$(2, entity.messageSenderPersonUid); stmt.setInt_vux9f0$(3, entity.messageTableId); stmt.setLong_6svq3l$(4, entity.messageEntityUid); stmt.setString_vqvrqt$(5, entity.messageText); stmt.setLong_6svq3l$(6, entity.messageTimestamp); stmt.setLong_6svq3l$(7, entity.messageClazzUid); stmt.setLong_6svq3l$(8, entity.messageLct); }; MessageDao_JdbcKt$_insertAdapterMessage_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; MessageDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageDao_JdbcKt', interfaces: [MessageDao]}; function MessageDao_ReplicateWrapper(_db, _dao) { MessageDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNodeChats_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeChats_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeChats_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeChats_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNodeChats_s8cxhz$_0; Coroutine$replicateOnNewNodeChats_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeChats_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_ReplicateWrapper.prototype.replicateOnNewNodeChats_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeChats_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodePosts_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePosts_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePosts_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePosts_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNodePosts_s8cxhz$_0; Coroutine$replicateOnNewNodePosts_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodePosts_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_ReplicateWrapper.prototype.replicateOnNewNodePosts_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePosts_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeChat_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeChat_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeChat_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeChat_0.prototype.constructor = Coroutine$replicateOnChangeChat_0; Coroutine$replicateOnChangeChat_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeChat(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_ReplicateWrapper.prototype.replicateOnChangeChat = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeChat_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangePosts_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePosts_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePosts_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePosts_0.prototype.constructor = Coroutine$replicateOnChangePosts_0; Coroutine$replicateOnChangePosts_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangePosts(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_ReplicateWrapper.prototype.replicateOnChangePosts = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePosts_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageDao_ReplicateWrapper.prototype.findAllMessagesByChatUid_ro19vi$ = function (entityUid, tableId, loggedInPersonUid) { return this._dao_0.findAllMessagesByChatUid_ro19vi$(entityUid, tableId, loggedInPersonUid); }; MessageDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_123($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_123.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_123.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_123.prototype.constructor = Coroutine$insertAsync_123; Coroutine$insertAsync_123.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.messageUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(126, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.messageUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.messageLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.messageUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_123(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; MessageDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; MessageDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; MessageDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageDao_ReplicateWrapper', interfaces: [MessageDao]}; function MessageDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { MessageDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNodeChats_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeChats_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeChats_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeChats_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNodeChats_s8cxhz$_1; Coroutine$replicateOnNewNodeChats_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeChats_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_Repo.prototype.replicateOnNewNodeChats_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeChats_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodePosts_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePosts_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePosts_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePosts_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNodePosts_s8cxhz$_1; Coroutine$replicateOnNewNodePosts_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodePosts_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_Repo.prototype.replicateOnNewNodePosts_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePosts_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeChat_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeChat_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeChat_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeChat_1.prototype.constructor = Coroutine$replicateOnChangeChat_1; Coroutine$replicateOnChangeChat_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeChat(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_Repo.prototype.replicateOnChangeChat = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeChat_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangePosts_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePosts_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePosts_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePosts_1.prototype.constructor = Coroutine$replicateOnChangePosts_1; Coroutine$replicateOnChangePosts_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangePosts(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_Repo.prototype.replicateOnChangePosts = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePosts_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageDao_Repo.prototype.findAllMessagesByChatUid_ro19vi$ = function (entityUid, tableId, loggedInPersonUid) { var _result = this._dao.findAllMessagesByChatUid_ro19vi$(entityUid, tableId, loggedInPersonUid); return _result; }; MessageDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_124($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_124.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_124.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_124.prototype.constructor = Coroutine$insertAsync_124; Coroutine$insertAsync_124.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_124(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; MessageDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; MessageDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; MessageDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageDao_Repo', interfaces: [MessageDao]}; function MessageReadDao() { } MessageReadDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageReadDao', interfaces: [BaseDao]}; function MessageReadDao_JdbcKt(_db) { MessageReadDao.call(this); this._db = _db; this._insertAdapterMessageRead_ = new MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral(this._db); } MessageReadDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterMessageRead_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_125($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_125.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_125.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_125.prototype.constructor = Coroutine$insertAsync_125; Coroutine$insertAsync_125.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterMessageRead_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_125(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageReadDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterMessageRead_.insertList_4ezy5m$(entityList); }; function MessageReadDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.messageReadPersonUid); _stmt.setLong_6svq3l$(2, _entity.messageReadMessageUid); _stmt.setLong_6svq3l$(3, _entity.messageReadEntityUid); _stmt.setLong_6svq3l$(4, _entity.messageReadLct); _stmt.setLong_6svq3l$(5, _entity.messageReadUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } MessageReadDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE MessageRead SET messageReadPersonUid = ?, messageReadMessageUid = ?, messageReadEntityUid = ?, messageReadLct = ? WHERE messageReadUid = ?'; prepareAndUseStatement(this._db, _sql, MessageReadDao_JdbcKt$updateList$lambda(entityList)); }; function MessageReadDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.messageReadPersonUid); _stmt.setLong_6svq3l$(2, closure$entity.messageReadMessageUid); _stmt.setLong_6svq3l$(3, closure$entity.messageReadEntityUid); _stmt.setLong_6svq3l$(4, closure$entity.messageReadLct); _stmt.setLong_6svq3l$(5, closure$entity.messageReadUid); return _stmt.executeUpdate(); }; } MessageReadDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE MessageRead SET messageReadPersonUid = ?, messageReadMessageUid = ?, messageReadEntityUid = ?, messageReadLct = ? WHERE messageReadUid = ?'; prepareAndUseStatement(this._db, _sql, MessageReadDao_JdbcKt$update$lambda(entity)); }; function Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda.prototype.constructor = Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda; Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeChats_s8cxhz$_2($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeChats_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeChats_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeChats_s8cxhz$_2.prototype.constructor = Coroutine$replicateOnNewNodeChats_s8cxhz$_2; Coroutine$replicateOnNewNodeChats_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO MessageReadReplicate(messageReadPk, messageReadDestination)\n | SELECT DISTINCT MessageRead.messageReadUid AS messageReadPk,\n | ? AS messageReadDestination\n | FROM UserSession \n | JOIN Message ON\n | (( Message.messageTableId = 127\n | AND Message.messageEntityUid IN\n | (SELECT ChatMember.chatMemberChatUid \n | FROM ChatMember\n | WHERE ChatMember.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | \n | JOIN MessageRead \n | ON MessageRead.messageReadMessageUid = Message.messageUid\n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND MessageRead.messageReadLct != COALESCE(\n | (SELECT messageReadVersionId\n | FROM MessageReadReplicate\n | WHERE messageReadPk = MessageRead.messageReadUid\n | AND messageReadDestination = ?), 0) \n | /*psql ON CONFLICT(messageReadPk, messageReadDestination) DO UPDATE\n | SET messageReadPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO MessageReadReplicate(messageReadPk, messageReadDestination)\n | SELECT DISTINCT MessageRead.messageReadUid AS messageReadPk,\n | ? AS messageReadDestination\n | FROM UserSession \n | JOIN Message ON\n | (( Message.messageTableId = 127\n | AND Message.messageEntityUid IN\n | (SELECT ChatMember.chatMemberChatUid \n | FROM ChatMember\n | WHERE ChatMember.chatMemberPersonUid = UserSession.usPersonUid))\n | OR UserSession.usSessionType = 2)\n | \n | JOIN MessageRead \n | ON MessageRead.messageReadMessageUid = Message.messageUid\n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND MessageRead.messageReadLct != COALESCE(\n | (SELECT messageReadVersionId\n | FROM MessageReadReplicate\n | WHERE messageReadPk = MessageRead.messageReadUid\n | AND messageReadDestination = ?), 0) \n | ON CONFLICT(messageReadPk, messageReadDestination) DO UPDATE\n | SET messageReadPending = true\n | \n | \n |')), MessageReadDao_JdbcKt$replicateOnNewNodeChats$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_JdbcKt.prototype.replicateOnNewNodeChats_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeChats_s8cxhz$_2(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda; Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function MessageReadDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$MessageReadDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_116($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_116.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_116.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_116.prototype.constructor = Coroutine$replicateOnChange_116; Coroutine$replicateOnChange_116.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO MessageReadReplicate(messageReadPk, messageReadDestination)\n | SELECT DISTINCT MessageRead.messageReadUid AS messageReadUid,\n | UserSession.usClientNodeId AS messageReadDestination\n | FROM ChangeLog\n | \n | JOIN MessageRead \n | ON MessageRead.messageReadUid = ChangeLog.chEntityPk\n | AND ChangeLog.chTableId = 129\n | \n |\n | JOIN UserSession ON\n | ((UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid\n | FROM ChatMember\n | WHERE ChatMember.chatMemberChatUid = MessageRead.messageReadEntityUid))\n | OR UserSession.usSessionType = 2)\n | \n | WHERE UserSession.usStatus = 1\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND MessageRead.messageReadLct != COALESCE(\n | (SELECT messageReadVersionId\n | FROM MessageReadReplicate\n | WHERE messageReadPk = MessageRead.messageReadUid\n | AND messageReadDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(messageReadPk, messageReadDestination) DO UPDATE\n | SET messageReadPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO MessageReadReplicate(messageReadPk, messageReadDestination)\n | SELECT DISTINCT MessageRead.messageReadUid AS messageReadUid,\n | UserSession.usClientNodeId AS messageReadDestination\n | FROM ChangeLog\n | \n | JOIN MessageRead \n | ON MessageRead.messageReadUid = ChangeLog.chEntityPk\n | AND ChangeLog.chTableId = 129\n | \n |\n | JOIN UserSession ON\n | ((UserSession.usPersonUid IN \n | (SELECT ChatMember.chatMemberPersonUid\n | FROM ChatMember\n | WHERE ChatMember.chatMemberChatUid = MessageRead.messageReadEntityUid))\n | OR UserSession.usSessionType = 2)\n | \n | WHERE UserSession.usStatus = 1\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND MessageRead.messageReadLct != COALESCE(\n | (SELECT messageReadVersionId\n | FROM MessageReadReplicate\n | WHERE messageReadPk = MessageRead.messageReadUid\n | AND messageReadDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(messageReadPk, messageReadDestination) DO UPDATE\n | SET messageReadPending = true\n | \n | \n |')), MessageReadDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_116(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO MessageRead (messageReadUid, messageReadPersonUid, messageReadMessageUid, messageReadEntityUid, messageReadLct) VALUES(?, ?, ?, ?, ?)'; }; MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.messageReadUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.messageReadUid); } stmt.setLong_6svq3l$(2, entity.messageReadPersonUid); stmt.setLong_6svq3l$(3, entity.messageReadMessageUid); stmt.setLong_6svq3l$(4, entity.messageReadEntityUid); stmt.setLong_6svq3l$(5, entity.messageReadLct); }; MessageReadDao_JdbcKt$_insertAdapterMessageRead_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; MessageReadDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageReadDao_JdbcKt', interfaces: [MessageReadDao]}; function MessageReadDao_ReplicateWrapper(_db, _dao) { MessageReadDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNodeChats_s8cxhz$_3($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeChats_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeChats_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeChats_s8cxhz$_3.prototype.constructor = Coroutine$replicateOnNewNodeChats_s8cxhz$_3; Coroutine$replicateOnNewNodeChats_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeChats_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_ReplicateWrapper.prototype.replicateOnNewNodeChats_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeChats_s8cxhz$_3(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_117($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_117.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_117.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_117.prototype.constructor = Coroutine$replicateOnChange_117; Coroutine$replicateOnChange_117.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_117(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageReadDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_126($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_126.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_126.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_126.prototype.constructor = Coroutine$insertAsync_126; Coroutine$insertAsync_126.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.messageReadUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(129, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.messageReadUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.messageReadLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.messageReadUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_126(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageReadDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; MessageReadDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; MessageReadDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; MessageReadDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageReadDao_ReplicateWrapper', interfaces: [MessageReadDao]}; function MessageReadDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { MessageReadDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNodeChats_s8cxhz$_4($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeChats_s8cxhz$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeChats_s8cxhz$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeChats_s8cxhz$_4.prototype.constructor = Coroutine$replicateOnNewNodeChats_s8cxhz$_4; Coroutine$replicateOnNewNodeChats_s8cxhz$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeChats_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_Repo.prototype.replicateOnNewNodeChats_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeChats_s8cxhz$_4(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_118($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_118.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_118.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_118.prototype.constructor = Coroutine$replicateOnChange_118; Coroutine$replicateOnChange_118.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_118(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageReadDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_127($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_127.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_127.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_127.prototype.constructor = Coroutine$insertAsync_127; Coroutine$insertAsync_127.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; MessageReadDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_127(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; MessageReadDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; MessageReadDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; MessageReadDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; MessageReadDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageReadDao_Repo', interfaces: [MessageReadDao]}; function NetworkNodeDao() { } NetworkNodeDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'NetworkNodeDao', interfaces: []}; function NetworkNodeDao_JdbcKt(_db) { NetworkNodeDao.call(this); this._db = _db; this._insertAdapterNetworkNode_upsert = new NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral(this._db); } NetworkNodeDao_JdbcKt.prototype.replace_r74hje$ = function (node) { var _retVal = this._insertAdapterNetworkNode_upsert.insertAndReturnId_11rb$(node); return _retVal; }; function Coroutine$insertAsync_r74hje$($this, node_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$node = node_0; } Coroutine$insertAsync_r74hje$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_r74hje$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_r74hje$.prototype.constructor = Coroutine$insertAsync_r74hje$; Coroutine$insertAsync_r74hje$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterNetworkNode_upsert.insertAndReturnIdAsync_11rb$(this.local$node, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; NetworkNodeDao_JdbcKt.prototype.insertAsync_r74hje$ = function (node_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_r74hje$(this, node_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; NetworkNodeDao_JdbcKt.prototype.insertList_f2f1wn$ = function (nodeList) { var _retVal = this._insertAdapterNetworkNode_upsert.insertListAndReturnIds_4ezy5m$(nodeList); return copyToArray(_retVal); }; function NetworkNodeDao_JdbcKt$update$lambda(closure$node) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$node.bluetoothMacAddress); _stmt.setString_vqvrqt$(2, closure$node.ipAddress); _stmt.setString_vqvrqt$(3, closure$node.wifiDirectMacAddress); _stmt.setString_vqvrqt$(4, closure$node.deviceWifiDirectName); _stmt.setString_vqvrqt$(5, closure$node.endpointUrl); _stmt.setLong_6svq3l$(6, closure$node.lastUpdateTimeStamp); _stmt.setLong_6svq3l$(7, closure$node.networkServiceLastUpdated); _stmt.setString_vqvrqt$(8, closure$node.nsdServiceName); _stmt.setInt_vux9f0$(9, closure$node.port); _stmt.setInt_vux9f0$(10, closure$node.numFailureCount); _stmt.setInt_vux9f0$(11, closure$node.wifiDirectDeviceStatus); _stmt.setString_vqvrqt$(12, closure$node.groupSsid); _stmt.setLong_6svq3l$(13, closure$node.nodeId); return _stmt.executeUpdate(); }; } NetworkNodeDao_JdbcKt.prototype.update_r74hje$ = function (node) { var _sql = 'UPDATE NetworkNode SET bluetoothMacAddress = ?, ipAddress = ?, wifiDirectMacAddress = ?, deviceWifiDirectName = ?, endpointUrl = ?, lastUpdateTimeStamp = ?, networkServiceLastUpdated = ?, nsdServiceName = ?, port = ?, numFailureCount = ?, wifiDirectDeviceStatus = ?, groupSsid = ? WHERE nodeId = ?'; prepareAndUseStatement(this._db, _sql, NetworkNodeDao_JdbcKt$update$lambda(node)); }; function NetworkNodeDao_JdbcKt$all$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_nodeId = closure$_result.getLong_61zpoe$('nodeId'); var _tmp_bluetoothMacAddress = closure$_result.getString_61zpoe$('bluetoothMacAddress'); var _tmp_ipAddress = closure$_result.getString_61zpoe$('ipAddress'); var _tmp_wifiDirectMacAddress = closure$_result.getString_61zpoe$('wifiDirectMacAddress'); var _tmp_deviceWifiDirectName = closure$_result.getString_61zpoe$('deviceWifiDirectName'); var _tmp_endpointUrl = closure$_result.getString_61zpoe$('endpointUrl'); var _tmp_lastUpdateTimeStamp = closure$_result.getLong_61zpoe$('lastUpdateTimeStamp'); var _tmp_networkServiceLastUpdated = closure$_result.getLong_61zpoe$('networkServiceLastUpdated'); var _tmp_nsdServiceName = closure$_result.getString_61zpoe$('nsdServiceName'); var _tmp_port = closure$_result.getInt_61zpoe$('port'); var _tmp_numFailureCount = closure$_result.getInt_61zpoe$('numFailureCount'); var _tmp_wifiDirectDeviceStatus = closure$_result.getInt_61zpoe$('wifiDirectDeviceStatus'); var _tmp_groupSsid = closure$_result.getString_61zpoe$('groupSsid'); var $receiver = new NetworkNode(); $receiver.nodeId = _tmp_nodeId; $receiver.bluetoothMacAddress = _tmp_bluetoothMacAddress; $receiver.ipAddress = _tmp_ipAddress; $receiver.wifiDirectMacAddress = _tmp_wifiDirectMacAddress; $receiver.deviceWifiDirectName = _tmp_deviceWifiDirectName; $receiver.endpointUrl = _tmp_endpointUrl; $receiver.lastUpdateTimeStamp = _tmp_lastUpdateTimeStamp; $receiver.networkServiceLastUpdated = _tmp_networkServiceLastUpdated; $receiver.nsdServiceName = _tmp_nsdServiceName; $receiver.port = _tmp_port; $receiver.numFailureCount = _tmp_numFailureCount; $receiver.wifiDirectDeviceStatus = _tmp_wifiDirectDeviceStatus; $receiver.groupSsid = _tmp_groupSsid; return $receiver; }; } function NetworkNodeDao_JdbcKt$all$lambda$lambda(_result) { return mapRows(_result, NetworkNodeDao_JdbcKt$all$lambda$lambda$lambda(_result)); } function NetworkNodeDao_JdbcKt$all$lambda(_stmt) { return useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$all$lambda$lambda); } NetworkNodeDao_JdbcKt.prototype.all = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM NetworkNode'), NetworkNodeDao_JdbcKt$all$lambda); }; function NetworkNodeDao_JdbcKt$findNodeByIpAddress$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_nodeId = closure$_result.getLong_61zpoe$('nodeId'); var _tmp_bluetoothMacAddress = closure$_result.getString_61zpoe$('bluetoothMacAddress'); var _tmp_ipAddress = closure$_result.getString_61zpoe$('ipAddress'); var _tmp_wifiDirectMacAddress = closure$_result.getString_61zpoe$('wifiDirectMacAddress'); var _tmp_deviceWifiDirectName = closure$_result.getString_61zpoe$('deviceWifiDirectName'); var _tmp_endpointUrl = closure$_result.getString_61zpoe$('endpointUrl'); var _tmp_lastUpdateTimeStamp = closure$_result.getLong_61zpoe$('lastUpdateTimeStamp'); var _tmp_networkServiceLastUpdated = closure$_result.getLong_61zpoe$('networkServiceLastUpdated'); var _tmp_nsdServiceName = closure$_result.getString_61zpoe$('nsdServiceName'); var _tmp_port = closure$_result.getInt_61zpoe$('port'); var _tmp_numFailureCount = closure$_result.getInt_61zpoe$('numFailureCount'); var _tmp_wifiDirectDeviceStatus = closure$_result.getInt_61zpoe$('wifiDirectDeviceStatus'); var _tmp_groupSsid = closure$_result.getString_61zpoe$('groupSsid'); var $receiver = new NetworkNode(); $receiver.nodeId = _tmp_nodeId; $receiver.bluetoothMacAddress = _tmp_bluetoothMacAddress; $receiver.ipAddress = _tmp_ipAddress; $receiver.wifiDirectMacAddress = _tmp_wifiDirectMacAddress; $receiver.deviceWifiDirectName = _tmp_deviceWifiDirectName; $receiver.endpointUrl = _tmp_endpointUrl; $receiver.lastUpdateTimeStamp = _tmp_lastUpdateTimeStamp; $receiver.networkServiceLastUpdated = _tmp_networkServiceLastUpdated; $receiver.nsdServiceName = _tmp_nsdServiceName; $receiver.port = _tmp_port; $receiver.numFailureCount = _tmp_numFailureCount; $receiver.wifiDirectDeviceStatus = _tmp_wifiDirectDeviceStatus; $receiver.groupSsid = _tmp_groupSsid; return $receiver; }; } function NetworkNodeDao_JdbcKt$findNodeByIpAddress$lambda$lambda(_result) { return mapNextRow(_result, null, NetworkNodeDao_JdbcKt$findNodeByIpAddress$lambda$lambda$lambda(_result)); } function NetworkNodeDao_JdbcKt$findNodeByIpAddress$lambda(closure$ipAddress) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$ipAddress); return useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$findNodeByIpAddress$lambda$lambda); }; } NetworkNodeDao_JdbcKt.prototype.findNodeByIpAddress_61zpoe$ = function (ipAddress) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * From NetworkNode WHERE ipAddress = ?'), NetworkNodeDao_JdbcKt$findNodeByIpAddress$lambda(ipAddress)); }; function NetworkNodeDao_JdbcKt$findNodeById$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_nodeId = closure$_result.getLong_61zpoe$('nodeId'); var _tmp_bluetoothMacAddress = closure$_result.getString_61zpoe$('bluetoothMacAddress'); var _tmp_ipAddress = closure$_result.getString_61zpoe$('ipAddress'); var _tmp_wifiDirectMacAddress = closure$_result.getString_61zpoe$('wifiDirectMacAddress'); var _tmp_deviceWifiDirectName = closure$_result.getString_61zpoe$('deviceWifiDirectName'); var _tmp_endpointUrl = closure$_result.getString_61zpoe$('endpointUrl'); var _tmp_lastUpdateTimeStamp = closure$_result.getLong_61zpoe$('lastUpdateTimeStamp'); var _tmp_networkServiceLastUpdated = closure$_result.getLong_61zpoe$('networkServiceLastUpdated'); var _tmp_nsdServiceName = closure$_result.getString_61zpoe$('nsdServiceName'); var _tmp_port = closure$_result.getInt_61zpoe$('port'); var _tmp_numFailureCount = closure$_result.getInt_61zpoe$('numFailureCount'); var _tmp_wifiDirectDeviceStatus = closure$_result.getInt_61zpoe$('wifiDirectDeviceStatus'); var _tmp_groupSsid = closure$_result.getString_61zpoe$('groupSsid'); var $receiver = new NetworkNode(); $receiver.nodeId = _tmp_nodeId; $receiver.bluetoothMacAddress = _tmp_bluetoothMacAddress; $receiver.ipAddress = _tmp_ipAddress; $receiver.wifiDirectMacAddress = _tmp_wifiDirectMacAddress; $receiver.deviceWifiDirectName = _tmp_deviceWifiDirectName; $receiver.endpointUrl = _tmp_endpointUrl; $receiver.lastUpdateTimeStamp = _tmp_lastUpdateTimeStamp; $receiver.networkServiceLastUpdated = _tmp_networkServiceLastUpdated; $receiver.nsdServiceName = _tmp_nsdServiceName; $receiver.port = _tmp_port; $receiver.numFailureCount = _tmp_numFailureCount; $receiver.wifiDirectDeviceStatus = _tmp_wifiDirectDeviceStatus; $receiver.groupSsid = _tmp_groupSsid; return $receiver; }; } function NetworkNodeDao_JdbcKt$findNodeById$lambda$lambda(_result) { return mapNextRow(_result, null, NetworkNodeDao_JdbcKt$findNodeById$lambda$lambda$lambda(_result)); } function NetworkNodeDao_JdbcKt$findNodeById$lambda(closure$nodeId) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$nodeId); return useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$findNodeById$lambda$lambda); }; } NetworkNodeDao_JdbcKt.prototype.findNodeById_s8cxhz$ = function (nodeId) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * From NetworkNode WHERE nodeId = ?'), NetworkNodeDao_JdbcKt$findNodeById$lambda(nodeId)); }; function NetworkNodeDao_JdbcKt$findNodeByIpOrWifiDirectMacAddress$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_nodeId = closure$_result.getLong_61zpoe$('nodeId'); var _tmp_bluetoothMacAddress = closure$_result.getString_61zpoe$('bluetoothMacAddress'); var _tmp_ipAddress = closure$_result.getString_61zpoe$('ipAddress'); var _tmp_wifiDirectMacAddress = closure$_result.getString_61zpoe$('wifiDirectMacAddress'); var _tmp_deviceWifiDirectName = closure$_result.getString_61zpoe$('deviceWifiDirectName'); var _tmp_endpointUrl = closure$_result.getString_61zpoe$('endpointUrl'); var _tmp_lastUpdateTimeStamp = closure$_result.getLong_61zpoe$('lastUpdateTimeStamp'); var _tmp_networkServiceLastUpdated = closure$_result.getLong_61zpoe$('networkServiceLastUpdated'); var _tmp_nsdServiceName = closure$_result.getString_61zpoe$('nsdServiceName'); var _tmp_port = closure$_result.getInt_61zpoe$('port'); var _tmp_numFailureCount = closure$_result.getInt_61zpoe$('numFailureCount'); var _tmp_wifiDirectDeviceStatus = closure$_result.getInt_61zpoe$('wifiDirectDeviceStatus'); var _tmp_groupSsid = closure$_result.getString_61zpoe$('groupSsid'); var $receiver = new NetworkNode(); $receiver.nodeId = _tmp_nodeId; $receiver.bluetoothMacAddress = _tmp_bluetoothMacAddress; $receiver.ipAddress = _tmp_ipAddress; $receiver.wifiDirectMacAddress = _tmp_wifiDirectMacAddress; $receiver.deviceWifiDirectName = _tmp_deviceWifiDirectName; $receiver.endpointUrl = _tmp_endpointUrl; $receiver.lastUpdateTimeStamp = _tmp_lastUpdateTimeStamp; $receiver.networkServiceLastUpdated = _tmp_networkServiceLastUpdated; $receiver.nsdServiceName = _tmp_nsdServiceName; $receiver.port = _tmp_port; $receiver.numFailureCount = _tmp_numFailureCount; $receiver.wifiDirectDeviceStatus = _tmp_wifiDirectDeviceStatus; $receiver.groupSsid = _tmp_groupSsid; return $receiver; }; } function NetworkNodeDao_JdbcKt$findNodeByIpOrWifiDirectMacAddress$lambda$lambda(_result) { return mapNextRow(_result, null, NetworkNodeDao_JdbcKt$findNodeByIpOrWifiDirectMacAddress$lambda$lambda$lambda(_result)); } function NetworkNodeDao_JdbcKt$findNodeByIpOrWifiDirectMacAddress$lambda(closure$ipAddress, closure$wifiDirectMacAddress) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$ipAddress); _stmt.setString_vqvrqt$(2, closure$wifiDirectMacAddress); return useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$findNodeByIpOrWifiDirectMacAddress$lambda$lambda); }; } NetworkNodeDao_JdbcKt.prototype.findNodeByIpOrWifiDirectMacAddress_puj7f4$ = function (ipAddress, wifiDirectMacAddress) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('Select * From NetworkNode Where ((ipAddress = ? AND ipAddress IS NOT NULL) OR (wifiDirectMacAddress = ? AND wifiDirectMacAddress IS NOT NULL))'), NetworkNodeDao_JdbcKt$findNodeByIpOrWifiDirectMacAddress$lambda(ipAddress, wifiDirectMacAddress)); }; function NetworkNodeDao_JdbcKt$findNodeByBluetoothAddress$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_nodeId = closure$_result.getLong_61zpoe$('nodeId'); var _tmp_bluetoothMacAddress = closure$_result.getString_61zpoe$('bluetoothMacAddress'); var _tmp_ipAddress = closure$_result.getString_61zpoe$('ipAddress'); var _tmp_wifiDirectMacAddress = closure$_result.getString_61zpoe$('wifiDirectMacAddress'); var _tmp_deviceWifiDirectName = closure$_result.getString_61zpoe$('deviceWifiDirectName'); var _tmp_endpointUrl = closure$_result.getString_61zpoe$('endpointUrl'); var _tmp_lastUpdateTimeStamp = closure$_result.getLong_61zpoe$('lastUpdateTimeStamp'); var _tmp_networkServiceLastUpdated = closure$_result.getLong_61zpoe$('networkServiceLastUpdated'); var _tmp_nsdServiceName = closure$_result.getString_61zpoe$('nsdServiceName'); var _tmp_port = closure$_result.getInt_61zpoe$('port'); var _tmp_numFailureCount = closure$_result.getInt_61zpoe$('numFailureCount'); var _tmp_wifiDirectDeviceStatus = closure$_result.getInt_61zpoe$('wifiDirectDeviceStatus'); var _tmp_groupSsid = closure$_result.getString_61zpoe$('groupSsid'); var $receiver = new NetworkNode(); $receiver.nodeId = _tmp_nodeId; $receiver.bluetoothMacAddress = _tmp_bluetoothMacAddress; $receiver.ipAddress = _tmp_ipAddress; $receiver.wifiDirectMacAddress = _tmp_wifiDirectMacAddress; $receiver.deviceWifiDirectName = _tmp_deviceWifiDirectName; $receiver.endpointUrl = _tmp_endpointUrl; $receiver.lastUpdateTimeStamp = _tmp_lastUpdateTimeStamp; $receiver.networkServiceLastUpdated = _tmp_networkServiceLastUpdated; $receiver.nsdServiceName = _tmp_nsdServiceName; $receiver.port = _tmp_port; $receiver.numFailureCount = _tmp_numFailureCount; $receiver.wifiDirectDeviceStatus = _tmp_wifiDirectDeviceStatus; $receiver.groupSsid = _tmp_groupSsid; return $receiver; }; } function NetworkNodeDao_JdbcKt$findNodeByBluetoothAddress$lambda$lambda(_result) { return mapNextRow(_result, null, NetworkNodeDao_JdbcKt$findNodeByBluetoothAddress$lambda$lambda$lambda(_result)); } function NetworkNodeDao_JdbcKt$findNodeByBluetoothAddress$lambda(closure$bluetoothAddress) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$bluetoothAddress); return useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$findNodeByBluetoothAddress$lambda$lambda); }; } NetworkNodeDao_JdbcKt.prototype.findNodeByBluetoothAddress_61zpoe$ = function (bluetoothAddress) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * from NetworkNode WHERE bluetoothMacAddress = ?'), NetworkNodeDao_JdbcKt$findNodeByBluetoothAddress$lambda(bluetoothAddress)); }; function NetworkNodeDao_JdbcKt$deleteByBluetoothAddress$lambda(closure$bluetoothAddress) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$bluetoothAddress); return _stmt.executeUpdate(); }; } NetworkNodeDao_JdbcKt.prototype.deleteByBluetoothAddress_61zpoe$ = function (bluetoothAddress) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('DELETE FROM NetworkNode WHERE bluetoothMacAddress = ?'), NetworkNodeDao_JdbcKt$deleteByBluetoothAddress$lambda(bluetoothAddress)); }; function Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda.prototype.constructor = Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda; Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function NetworkNodeDao_JdbcKt$deleteAllAsync$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$NetworkNodeDao_JdbcKt$deleteAllAsync$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$deleteAllAsync($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$deleteAllAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deleteAllAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deleteAllAsync.prototype.constructor = Coroutine$deleteAllAsync; Coroutine$deleteAllAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig('DELETE FROM NetworkNode'), NetworkNodeDao_JdbcKt$deleteAllAsync$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; NetworkNodeDao_JdbcKt.prototype.deleteAllAsync = function (continuation_0, suspended) { var instance = new Coroutine$deleteAllAsync(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda(closure$nodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$nodeId = closure$nodeId_0; this.local$_stmt = _stmt_0; } Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda.prototype.constructor = Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda; Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$nodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda(closure$nodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda(closure$nodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateRetryCountAsync_s8cxhz$($this, nodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$nodeId = nodeId_0; } Coroutine$updateRetryCountAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateRetryCountAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateRetryCountAsync_s8cxhz$.prototype.constructor = Coroutine$updateRetryCountAsync_s8cxhz$; Coroutine$updateRetryCountAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig('UPDATE NetworkNode SET numFailureCount = numFailureCount + 1 WHERE nodeId = ?'), NetworkNodeDao_JdbcKt$updateRetryCountAsync$lambda(this.local$nodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; NetworkNodeDao_JdbcKt.prototype.updateRetryCountAsync_s8cxhz$ = function (nodeId_0, continuation_0, suspended) { var instance = new Coroutine$updateRetryCountAsync_s8cxhz$(this, nodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function NetworkNodeDao_JdbcKt$findAllActiveNodes$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_nodeId = closure$_result.getLong_61zpoe$('nodeId'); var _tmp_bluetoothMacAddress = closure$_result.getString_61zpoe$('bluetoothMacAddress'); var _tmp_ipAddress = closure$_result.getString_61zpoe$('ipAddress'); var _tmp_wifiDirectMacAddress = closure$_result.getString_61zpoe$('wifiDirectMacAddress'); var _tmp_deviceWifiDirectName = closure$_result.getString_61zpoe$('deviceWifiDirectName'); var _tmp_endpointUrl = closure$_result.getString_61zpoe$('endpointUrl'); var _tmp_lastUpdateTimeStamp = closure$_result.getLong_61zpoe$('lastUpdateTimeStamp'); var _tmp_networkServiceLastUpdated = closure$_result.getLong_61zpoe$('networkServiceLastUpdated'); var _tmp_nsdServiceName = closure$_result.getString_61zpoe$('nsdServiceName'); var _tmp_port = closure$_result.getInt_61zpoe$('port'); var _tmp_numFailureCount = closure$_result.getInt_61zpoe$('numFailureCount'); var _tmp_wifiDirectDeviceStatus = closure$_result.getInt_61zpoe$('wifiDirectDeviceStatus'); var _tmp_groupSsid = closure$_result.getString_61zpoe$('groupSsid'); var $receiver = new NetworkNode(); $receiver.nodeId = _tmp_nodeId; $receiver.bluetoothMacAddress = _tmp_bluetoothMacAddress; $receiver.ipAddress = _tmp_ipAddress; $receiver.wifiDirectMacAddress = _tmp_wifiDirectMacAddress; $receiver.deviceWifiDirectName = _tmp_deviceWifiDirectName; $receiver.endpointUrl = _tmp_endpointUrl; $receiver.lastUpdateTimeStamp = _tmp_lastUpdateTimeStamp; $receiver.networkServiceLastUpdated = _tmp_networkServiceLastUpdated; $receiver.nsdServiceName = _tmp_nsdServiceName; $receiver.port = _tmp_port; $receiver.numFailureCount = _tmp_numFailureCount; $receiver.wifiDirectDeviceStatus = _tmp_wifiDirectDeviceStatus; $receiver.groupSsid = _tmp_groupSsid; return $receiver; }; } function NetworkNodeDao_JdbcKt$findAllActiveNodes$lambda$lambda(_result) { return mapRows(_result, NetworkNodeDao_JdbcKt$findAllActiveNodes$lambda$lambda$lambda(_result)); } function NetworkNodeDao_JdbcKt$findAllActiveNodes$lambda(closure$lastUpdatedTime, closure$maxNumFailure) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$lastUpdatedTime); _stmt.setInt_vux9f0$(2, closure$maxNumFailure); return useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$findAllActiveNodes$lambda$lambda); }; } NetworkNodeDao_JdbcKt.prototype.findAllActiveNodes_yhmem3$ = function (lastUpdatedTime, maxNumFailure) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('Select * From NetworkNode WHERE lastUpdateTimeStamp >= ? AND numFailureCount <= ?'), NetworkNodeDao_JdbcKt$findAllActiveNodes$lambda(lastUpdatedTime, maxNumFailure)); }; function Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda(closure$lastUpdateTimeStamp_0, closure$bluetoothAddress_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$lastUpdateTimeStamp = closure$lastUpdateTimeStamp_0; this.local$closure$bluetoothAddress = closure$bluetoothAddress_0; this.local$_stmt = _stmt_0; } Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda.prototype.constructor = Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda; Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$lastUpdateTimeStamp); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$bluetoothAddress); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda(closure$lastUpdateTimeStamp_0, closure$bluetoothAddress_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda(closure$lastUpdateTimeStamp_0, closure$bluetoothAddress_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } NetworkNodeDao_JdbcKt.prototype.updateLastSeenAsync_4wgjuj$ = function (bluetoothAddress, lastUpdateTimeStamp, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('UPDATE NetworkNode set lastUpdateTimeStamp = ?, numFailureCount = 0 WHERE bluetoothMacAddress = ?'), NetworkNodeDao_JdbcKt$updateLastSeenAsync$lambda(lastUpdateTimeStamp, bluetoothAddress), continuation); }; function NetworkNodeDao_JdbcKt$deleteOldAndBadNode$lambda(closure$minLastSeenTimestamp, closure$maxFailuresInPeriod) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$minLastSeenTimestamp); _stmt.setInt_vux9f0$(2, closure$maxFailuresInPeriod); return _stmt.executeUpdate(); }; } NetworkNodeDao_JdbcKt.prototype.deleteOldAndBadNode_yhmem3$ = function (minLastSeenTimestamp, maxFailuresInPeriod) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('DELETE FROM NetworkNode WHERE NetworkNode.lastUpdateTimeStamp < ? OR NetworkNode.numFailureCount >= ?'), NetworkNodeDao_JdbcKt$deleteOldAndBadNode$lambda(minLastSeenTimestamp, maxFailuresInPeriod)); }; function NetworkNodeDao_JdbcKt$updateNetworkNodeGroupSsid$lambda(closure$groupSsid, closure$endpointUrl, closure$nodeId) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$groupSsid); _stmt.setString_vqvrqt$(2, closure$endpointUrl); _stmt.setLong_6svq3l$(3, closure$nodeId); return _stmt.executeUpdate(); }; } NetworkNodeDao_JdbcKt.prototype.updateNetworkNodeGroupSsid_r69jt9$ = function (nodeId, groupSsid, endpointUrl) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('UPDATE NetworkNode SET groupSsid = ?, endpointUrl = ? WHERE nodeId = ?'), NetworkNodeDao_JdbcKt$updateNetworkNodeGroupSsid$lambda(groupSsid, endpointUrl, nodeId)); }; function NetworkNodeDao_JdbcKt$getEndpointUrlByGroupSsid$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getString_za3lpa$(1); }; } function NetworkNodeDao_JdbcKt$getEndpointUrlByGroupSsid$lambda$lambda(_result) { return mapNextRow(_result, null, NetworkNodeDao_JdbcKt$getEndpointUrlByGroupSsid$lambda$lambda$lambda(_result)); } function NetworkNodeDao_JdbcKt$getEndpointUrlByGroupSsid$lambda(closure$ssid) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$ssid); return useResults(_stmt.executeQuery(), NetworkNodeDao_JdbcKt$getEndpointUrlByGroupSsid$lambda$lambda); }; } NetworkNodeDao_JdbcKt.prototype.getEndpointUrlByGroupSsid_61zpoe$ = function (ssid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT endpointUrl FROM NetworkNode WHERE groupSsid = ?'), NetworkNodeDao_JdbcKt$getEndpointUrlByGroupSsid$lambda(ssid)); }; function NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO NetworkNode (nodeId, bluetoothMacAddress, ipAddress, wifiDirectMacAddress, deviceWifiDirectName, endpointUrl, lastUpdateTimeStamp, networkServiceLastUpdated, nsdServiceName, port, numFailureCount, wifiDirectDeviceStatus, groupSsid) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.nodeId, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.nodeId); } stmt.setString_vqvrqt$(2, entity.bluetoothMacAddress); stmt.setString_vqvrqt$(3, entity.ipAddress); stmt.setString_vqvrqt$(4, entity.wifiDirectMacAddress); stmt.setString_vqvrqt$(5, entity.deviceWifiDirectName); stmt.setString_vqvrqt$(6, entity.endpointUrl); stmt.setLong_6svq3l$(7, entity.lastUpdateTimeStamp); stmt.setLong_6svq3l$(8, entity.networkServiceLastUpdated); stmt.setString_vqvrqt$(9, entity.nsdServiceName); stmt.setInt_vux9f0$(10, entity.port); stmt.setInt_vux9f0$(11, entity.numFailureCount); stmt.setInt_vux9f0$(12, entity.wifiDirectDeviceStatus); stmt.setString_vqvrqt$(13, entity.groupSsid); }; NetworkNodeDao_JdbcKt$_insertAdapterNetworkNode_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; NetworkNodeDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'NetworkNodeDao_JdbcKt', interfaces: [NetworkNodeDao]}; function PersonAuth2Dao() { } PersonAuth2Dao.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonAuth2Dao', interfaces: []}; function PersonAuth2Dao_JdbcKt(_db) { PersonAuth2Dao.call(this); this._db = _db; this._insertAdapterPersonAuth2_ = new PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral(this._db); this._insertAdapterPersonAuth2_upsert = new PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral(this._db); } function Coroutine$insertListAsync_3mhn8e$($this, auths_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$auths = auths_0; } Coroutine$insertListAsync_3mhn8e$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_3mhn8e$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_3mhn8e$.prototype.constructor = Coroutine$insertListAsync_3mhn8e$; Coroutine$insertListAsync_3mhn8e$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonAuth2_.insertListAsync_4ezy5m$(this.local$auths, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_JdbcKt.prototype.insertListAsync_3mhn8e$ = function (auths_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_3mhn8e$(this, auths_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_j8byhd$($this, auth_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$auth = auth_0; } Coroutine$insertAsync_j8byhd$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_j8byhd$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_j8byhd$.prototype.constructor = Coroutine$insertAsync_j8byhd$; Coroutine$insertAsync_j8byhd$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonAuth2_upsert.insertAndReturnIdAsync_11rb$(this.local$auth, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_JdbcKt.prototype.insertAsync_j8byhd$ = function (auth_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_j8byhd$(this, auth_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda; Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_116($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_116.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_116.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_116.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_116; Coroutine$replicateOnNewNode_s8cxhz$_116.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonAuth2Replicate(paPk, paDestination)\n | SELECT DISTINCT PersonAuth2.pauthUid AS paUid,\n | ? AS paDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 562949953421312\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonAuth2\n | ON PersonAuth2.pauthUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ? \n | AND PersonAuth2.pauthLct != COALESCE(\n | (SELECT paVersionId\n | FROM PersonAuth2Replicate\n | WHERE paPk = PersonAuth2.pauthUid\n | AND paDestination = ?), 0) \n | /*psql ON CONFLICT(paPk, paDestination) DO UPDATE\n | SET paPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonAuth2Replicate(paPk, paDestination)\n | SELECT DISTINCT PersonAuth2.pauthUid AS paUid,\n | ? AS paDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 562949953421312\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonAuth2\n | ON PersonAuth2.pauthUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ? \n | AND PersonAuth2.pauthLct != COALESCE(\n | (SELECT paVersionId\n | FROM PersonAuth2Replicate\n | WHERE paPk = PersonAuth2.pauthUid\n | AND paDestination = ?), 0) \n | ON CONFLICT(paPk, paDestination) DO UPDATE\n | SET paPending = true\n | \n | \n |')), PersonAuth2Dao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_116(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda; Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuth2Dao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuth2Dao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_119($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_119.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_119.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_119.prototype.constructor = Coroutine$replicateOnChange_119; Coroutine$replicateOnChange_119.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonAuth2Replicate(paPk, paDestination)\n | SELECT DISTINCT PersonAuth2.pauthUid AS paUid,\n | UserSession.usClientNodeId AS paDestination\n | FROM ChangeLog\n | JOIN PersonAuth2\n | ON ChangeLog.chTableId = 678\n | AND ChangeLog.chEntityPk = PersonAuth2.pauthUid\n | JOIN Person\n | ON Person.personUid = PersonAuth2.pauthUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 562949953421312\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonAuth2.pauthLct != COALESCE(\n | (SELECT paVersionId\n | FROM PersonAuth2Replicate\n | WHERE paPk = PersonAuth2.pauthUid\n | AND paDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(paPk, paDestination) DO UPDATE\n | SET paPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonAuth2Replicate(paPk, paDestination)\n | SELECT DISTINCT PersonAuth2.pauthUid AS paUid,\n | UserSession.usClientNodeId AS paDestination\n | FROM ChangeLog\n | JOIN PersonAuth2\n | ON ChangeLog.chTableId = 678\n | AND ChangeLog.chEntityPk = PersonAuth2.pauthUid\n | JOIN Person\n | ON Person.personUid = PersonAuth2.pauthUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 562949953421312\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonAuth2.pauthLct != COALESCE(\n | (SELECT paVersionId\n | FROM PersonAuth2Replicate\n | WHERE paPk = PersonAuth2.pauthUid\n | AND paDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(paPk, paDestination) DO UPDATE\n | SET paPending = true\n | \n | \n |')), PersonAuth2Dao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_119(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonAuth2Dao_JdbcKt$findByPersonUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_pauthUid = closure$_result.getLong_61zpoe$('pauthUid'); var _tmp_pauthMechanism = closure$_result.getString_61zpoe$('pauthMechanism'); var _tmp_pauthAuth = closure$_result.getString_61zpoe$('pauthAuth'); var _tmp_pauthLcsn = closure$_result.getLong_61zpoe$('pauthLcsn'); var _tmp_pauthPcsn = closure$_result.getLong_61zpoe$('pauthPcsn'); var _tmp_pauthLcb = closure$_result.getLong_61zpoe$('pauthLcb'); var _tmp_pauthLct = closure$_result.getLong_61zpoe$('pauthLct'); var $receiver = new PersonAuth2(); $receiver.pauthUid = _tmp_pauthUid; $receiver.pauthMechanism = _tmp_pauthMechanism; $receiver.pauthAuth = _tmp_pauthAuth; $receiver.pauthLcsn = _tmp_pauthLcsn; $receiver.pauthPcsn = _tmp_pauthPcsn; $receiver.pauthLcb = _tmp_pauthLcb; $receiver.pauthLct = _tmp_pauthLct; return $receiver; }; } function PersonAuth2Dao_JdbcKt$findByPersonUid$lambda$lambda(_result) { return mapNextRow(_result, null, PersonAuth2Dao_JdbcKt$findByPersonUid$lambda$lambda$lambda(_result)); } function Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda(closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda.prototype.constructor = Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda; Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonAuth2Dao_JdbcKt$findByPersonUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuth2Dao_JdbcKt$findByPersonUid$lambda(closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuth2Dao_JdbcKt$findByPersonUid$lambda(closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonAuth2Dao_JdbcKt.prototype.findByPersonUid_s8cxhz$ = function (personUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonAuth2.*\n | FROM PersonAuth2\n | WHERE PersonAuth2.pauthUid = ? \n | \n ')), PersonAuth2Dao_JdbcKt$findByPersonUid$lambda(personUid), continuation); }; function PersonAuth2Dao_JdbcKt$findByUsername$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_pauthUid = closure$_result.getLong_61zpoe$('pauthUid'); var _tmp_pauthMechanism = closure$_result.getString_61zpoe$('pauthMechanism'); var _tmp_pauthAuth = closure$_result.getString_61zpoe$('pauthAuth'); var _tmp_pauthLcsn = closure$_result.getLong_61zpoe$('pauthLcsn'); var _tmp_pauthPcsn = closure$_result.getLong_61zpoe$('pauthPcsn'); var _tmp_pauthLcb = closure$_result.getLong_61zpoe$('pauthLcb'); var _tmp_pauthLct = closure$_result.getLong_61zpoe$('pauthLct'); var $receiver = new PersonAuth2(); $receiver.pauthUid = _tmp_pauthUid; $receiver.pauthMechanism = _tmp_pauthMechanism; $receiver.pauthAuth = _tmp_pauthAuth; $receiver.pauthLcsn = _tmp_pauthLcsn; $receiver.pauthPcsn = _tmp_pauthPcsn; $receiver.pauthLcb = _tmp_pauthLcb; $receiver.pauthLct = _tmp_pauthLct; return $receiver; }; } function PersonAuth2Dao_JdbcKt$findByUsername$lambda$lambda(_result) { return mapNextRow(_result, null, PersonAuth2Dao_JdbcKt$findByUsername$lambda$lambda$lambda(_result)); } function Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda(closure$username_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$username = closure$username_0; this.local$_stmt = _stmt_0; } Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda.prototype.constructor = Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda; Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$username); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonAuth2Dao_JdbcKt$findByUsername$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuth2Dao_JdbcKt$findByUsername$lambda(closure$username_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuth2Dao_JdbcKt$findByUsername$lambda(closure$username_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonAuth2Dao_JdbcKt.prototype.findByUsername_61zpoe$ = function (username, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonAuth2.*\n | FROM PersonAuth2\n | JOIN Person ON PersonAuth2.pauthUid = Person.personUid\n | WHERE Person.username = ?\n | \n ')), PersonAuth2Dao_JdbcKt$findByUsername$lambda(username), continuation); }; function PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO PersonAuth2 (pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; }; PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setLong_6svq3l$(1, entity.pauthUid); stmt.setString_vqvrqt$(2, entity.pauthMechanism); stmt.setString_vqvrqt$(3, entity.pauthAuth); stmt.setLong_6svq3l$(4, entity.pauthLcsn); stmt.setLong_6svq3l$(5, entity.pauthPcsn); stmt.setLong_6svq3l$(6, entity.pauthLcb); stmt.setLong_6svq3l$(7, entity.pauthLct); }; PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO PersonAuth2 (pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; }; PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setLong_6svq3l$(1, entity.pauthUid); stmt.setString_vqvrqt$(2, entity.pauthMechanism); stmt.setString_vqvrqt$(3, entity.pauthAuth); stmt.setLong_6svq3l$(4, entity.pauthLcsn); stmt.setLong_6svq3l$(5, entity.pauthPcsn); stmt.setLong_6svq3l$(6, entity.pauthLcb); stmt.setLong_6svq3l$(7, entity.pauthLct); }; PersonAuth2Dao_JdbcKt$_insertAdapterPersonAuth2_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonAuth2Dao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonAuth2Dao_JdbcKt', interfaces: [PersonAuth2Dao]}; function PersonAuth2Dao_ReplicateWrapper(_db, _dao) { PersonAuth2Dao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_117($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_117.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_117.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_117.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_117; Coroutine$replicateOnNewNode_s8cxhz$_117.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_117(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_120($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_120.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_120.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_120.prototype.constructor = Coroutine$replicateOnChange_120; Coroutine$replicateOnChange_120.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_120(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_3mhn8e$_0($this, auths_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$auths = auths_0; } Coroutine$insertListAsync_3mhn8e$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_3mhn8e$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_3mhn8e$_0.prototype.constructor = Coroutine$insertListAsync_3mhn8e$_0; Coroutine$insertListAsync_3mhn8e$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$auths.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.pauthLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.insertListAsync_3mhn8e$(this.local$auths, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_ReplicateWrapper.prototype.insertListAsync_3mhn8e$ = function (auths_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_3mhn8e$_0(this, auths_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonAuth2Dao_ReplicateWrapper.prototype.insertAsync_j8byhd$ = function (auth, continuation) { auth.pauthLct = systemTimeInMillis(); return this._dao_0.insertAsync_j8byhd$(auth, continuation); }; PersonAuth2Dao_ReplicateWrapper.prototype.findByPersonUid_s8cxhz$ = function (personUid, continuation) { return this._dao_0.findByPersonUid_s8cxhz$(personUid, continuation); }; PersonAuth2Dao_ReplicateWrapper.prototype.findByUsername_61zpoe$ = function (username, continuation) { return this._dao_0.findByUsername_61zpoe$(username, continuation); }; PersonAuth2Dao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonAuth2Dao_ReplicateWrapper', interfaces: [PersonAuth2Dao]}; function PersonAuth2Dao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { PersonAuth2Dao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_118($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_118.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_118.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_118.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_118; Coroutine$replicateOnNewNode_s8cxhz$_118.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_118(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_121($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_121.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_121.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_121.prototype.constructor = Coroutine$replicateOnChange_121; Coroutine$replicateOnChange_121.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_121(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_3mhn8e$_1($this, auths_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$auths = auths_0; } Coroutine$insertListAsync_3mhn8e$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_3mhn8e$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_3mhn8e$_1.prototype.constructor = Coroutine$insertListAsync_3mhn8e$_1; Coroutine$insertListAsync_3mhn8e$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_3mhn8e$(this.local$auths, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_Repo.prototype.insertListAsync_3mhn8e$ = function (auths_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_3mhn8e$_1(this, auths_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_j8byhd$_0($this, auth_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$auth = auth_0; } Coroutine$insertAsync_j8byhd$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_j8byhd$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_j8byhd$_0.prototype.constructor = Coroutine$insertAsync_j8byhd$_0; Coroutine$insertAsync_j8byhd$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync_j8byhd$(this.local$auth, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_Repo.prototype.insertAsync_j8byhd$ = function (auth_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_j8byhd$_0(this, auth_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByPersonUid_s8cxhz$($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; } Coroutine$findByPersonUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUid_s8cxhz$.prototype.constructor = Coroutine$findByPersonUid_s8cxhz$; Coroutine$findByPersonUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByPersonUid_s8cxhz$(this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_Repo.prototype.findByPersonUid_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUid_s8cxhz$(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUsername_61zpoe$($this, username_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$username = username_0; } Coroutine$findByUsername_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUsername_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUsername_61zpoe$.prototype.constructor = Coroutine$findByUsername_61zpoe$; Coroutine$findByUsername_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUsername_61zpoe$(this.local$username, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuth2Dao_Repo.prototype.findByUsername_61zpoe$ = function (username_0, continuation_0, suspended) { var instance = new Coroutine$findByUsername_61zpoe$(this, username_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonAuth2Dao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonAuth2Dao_Repo', interfaces: [PersonAuth2Dao]}; function PersonAuthDao() { } PersonAuthDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonAuthDao', interfaces: [BaseDao]}; function PersonAuthDao_JdbcKt(_db) { PersonAuthDao.call(this); this._db = _db; this._insertAdapterAccessToken_ = new PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral(this._db); this._insertAdapterPersonAuth_ = new PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral(this._db); } PersonAuthDao_JdbcKt.prototype.insertAccessToken_sz9w29$ = function (token) { this._insertAdapterAccessToken_.insert_11rb$(token); }; PersonAuthDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterPersonAuth_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_128($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_128.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_128.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_128.prototype.constructor = Coroutine$insertAsync_128; Coroutine$insertAsync_128.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonAuth_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuthDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_128(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonAuthDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterPersonAuth_.insertList_4ezy5m$(entityList); }; function Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda; Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.passwordHash); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$entity.personAuthStatus); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.personAuthUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuthDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuthDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_k01yar$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_k01yar$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_k01yar$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_k01yar$.prototype.constructor = Coroutine$updateAsync_k01yar$; Coroutine$updateAsync_k01yar$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE PersonAuth SET passwordHash = ?, personAuthStatus = ? WHERE personAuthUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, PersonAuthDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonAuthDao_JdbcKt.prototype.updateAsync_k01yar$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_k01yar$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonAuthDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.passwordHash); _stmt.setInt_vux9f0$(2, _entity.personAuthStatus); _stmt.setLong_6svq3l$(3, _entity.personAuthUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } PersonAuthDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE PersonAuth SET passwordHash = ?, personAuthStatus = ? WHERE personAuthUid = ?'; prepareAndUseStatement(this._db, _sql, PersonAuthDao_JdbcKt$updateList$lambda(entityList)); }; function PersonAuthDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.passwordHash); _stmt.setInt_vux9f0$(2, closure$entity.personAuthStatus); _stmt.setLong_6svq3l$(3, closure$entity.personAuthUid); return _stmt.executeUpdate(); }; } PersonAuthDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE PersonAuth SET passwordHash = ?, personAuthStatus = ? WHERE personAuthUid = ?'; prepareAndUseStatement(this._db, _sql, PersonAuthDao_JdbcKt$update$lambda(entity)); }; function PersonAuthDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personAuthUid = closure$_result.getLong_61zpoe$('personAuthUid'); var _tmp_passwordHash = closure$_result.getString_61zpoe$('passwordHash'); var _tmp_personAuthStatus = closure$_result.getInt_61zpoe$('personAuthStatus'); var $receiver = new PersonAuth(); $receiver.personAuthUid = _tmp_personAuthUid; $receiver.passwordHash = _tmp_passwordHash; $receiver.personAuthStatus = _tmp_personAuthStatus; return $receiver; }; } function PersonAuthDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, PersonAuthDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda; Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonAuthDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuthDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuthDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonAuthDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM PersonAuth WHERE personAuthUid = ?'), PersonAuthDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function PersonAuthDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personAuthUid = closure$_result.getLong_61zpoe$('personAuthUid'); var _tmp_passwordHash = closure$_result.getString_61zpoe$('passwordHash'); var _tmp_personAuthStatus = closure$_result.getInt_61zpoe$('personAuthStatus'); var $receiver = new PersonAuth(); $receiver.personAuthUid = _tmp_personAuthUid; $receiver.passwordHash = _tmp_passwordHash; $receiver.personAuthStatus = _tmp_personAuthStatus; return $receiver; }; } function PersonAuthDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, PersonAuthDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function PersonAuthDao_JdbcKt$findByUid$lambda(closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); return useResults(_stmt.executeQuery(), PersonAuthDao_JdbcKt$findByUid$lambda$lambda); }; } PersonAuthDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM PersonAuth WHERE personAuthUid = ?'), PersonAuthDao_JdbcKt$findByUid$lambda(uid)); }; function PersonAuthDao_JdbcKt$findPersonByUsername$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var $receiver = new Person(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; return $receiver; }; } function PersonAuthDao_JdbcKt$findPersonByUsername$lambda$lambda(_result) { return mapNextRow(_result, null, PersonAuthDao_JdbcKt$findPersonByUsername$lambda$lambda$lambda(_result)); } function PersonAuthDao_JdbcKt$findPersonByUsername$lambda(closure$username) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$username); return useResults(_stmt.executeQuery(), PersonAuthDao_JdbcKt$findPersonByUsername$lambda$lambda); }; } PersonAuthDao_JdbcKt.prototype.findPersonByUsername_61zpoe$ = function (username) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Person WHERE username = ?'), PersonAuthDao_JdbcKt$findPersonByUsername$lambda(username)); }; function PersonAuthDao_JdbcKt$isPersonAdmin$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function PersonAuthDao_JdbcKt$isPersonAdmin$lambda$lambda(_result) { return mapNextRow(_result, false, PersonAuthDao_JdbcKt$isPersonAdmin$lambda$lambda$lambda(_result)); } function PersonAuthDao_JdbcKt$isPersonAdmin$lambda(closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); return useResults(_stmt.executeQuery(), PersonAuthDao_JdbcKt$isPersonAdmin$lambda$lambda); }; } PersonAuthDao_JdbcKt.prototype.isPersonAdmin_s8cxhz$ = function (uid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT admin from Person WHERE personUid = ?'), PersonAuthDao_JdbcKt$isPersonAdmin$lambda(uid)); }; function Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda(closure$passwordHash_0, closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$passwordHash = closure$passwordHash_0; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda.prototype.constructor = Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda; Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$passwordHash); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda(closure$passwordHash_0, closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda(closure$passwordHash_0, closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonAuthDao_JdbcKt.prototype.updatePasswordForPersonUid_a4hdmt$ = function (personUid, passwordHash, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('UPDATE PersonAuth set passwordHash = ? WHERE personAuthUid = ?'), PersonAuthDao_JdbcKt$updatePasswordForPersonUid$lambda(passwordHash, personUid), continuation); }; function PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO AccessToken (token, accessTokenPersonUid, expires) VALUES(?, ?, ?)'; }; PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setString_vqvrqt$(1, entity.token); stmt.setLong_6svq3l$(2, entity.accessTokenPersonUid); stmt.setLong_6svq3l$(3, entity.expires); }; PersonAuthDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO PersonAuth (personAuthUid, passwordHash, personAuthStatus) VALUES(?, ?, ?)'; }; PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.personAuthUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.personAuthUid); } stmt.setString_vqvrqt$(2, entity.passwordHash); stmt.setInt_vux9f0$(3, entity.personAuthStatus); }; PersonAuthDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonAuthDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonAuthDao_JdbcKt', interfaces: [PersonAuthDao]}; function PersonDao() { } PersonDao.prototype.findPersonsWithPermission_gs5uuz$ = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText, callback$default) { if (searchText === void 0) searchText = '%'; return callback$default ? callback$default(timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) : this.findPersonsWithPermission_gs5uuz$$default(timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText); }; PersonDao.prototype.findPersonsWithPermissionAsList_gs5uuz$ = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText, callback$default) { if (searchText === void 0) searchText = '%'; return callback$default ? callback$default(timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) : this.findPersonsWithPermissionAsList_gs5uuz$$default(timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText); }; PersonDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonDao', interfaces: [BaseDao]}; function PersonDao_JdbcKt(_db) { PersonDao.call(this); this._db = _db; this._insertAdapterPerson_ = new PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral(this._db); this._insertAdapterPerson_upsert = new PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral(this._db); this._insertAdapterAccessToken_ = new PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral(this._db); this._insertAdapterPersonAuth_ = new PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral(this._db); this._insertAdapterPersonGroup_ = new PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral(this._db); this._insertAdapterPersonGroupMember_ = new PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral(this._db); this._insertAdapterAuditLog_ = new PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral(this._db); } function Coroutine$insertListAsync_e0gxv4$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_e0gxv4$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_e0gxv4$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_e0gxv4$.prototype.constructor = Coroutine$insertListAsync_e0gxv4$; Coroutine$insertListAsync_e0gxv4$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPerson_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.insertListAsync_e0gxv4$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_e0gxv4$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertOrReplace_6c9i1n$($this, person_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$person = person_0; } Coroutine$insertOrReplace_6c9i1n$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertOrReplace_6c9i1n$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertOrReplace_6c9i1n$.prototype.constructor = Coroutine$insertOrReplace_6c9i1n$; Coroutine$insertOrReplace_6c9i1n$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPerson_upsert.insertAsync_11rb$(this.local$person, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.insertOrReplace_6c9i1n$ = function (person_0, continuation_0, suspended) { var instance = new Coroutine$insertOrReplace_6c9i1n$(this, person_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_JdbcKt.prototype.insertAccessToken_sz9w29$ = function (token) { this._insertAdapterAccessToken_.insert_11rb$(token); }; PersonDao_JdbcKt.prototype.insertPersonAuth_k01yar$ = function (personAuth) { this._insertAdapterPersonAuth_.insert_11rb$(personAuth); }; function Coroutine$insertPersonGroup_j5378c$($this, personGroup_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroup = personGroup_0; } Coroutine$insertPersonGroup_j5378c$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertPersonGroup_j5378c$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertPersonGroup_j5378c$.prototype.constructor = Coroutine$insertPersonGroup_j5378c$; Coroutine$insertPersonGroup_j5378c$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonGroup_.insertAndReturnIdAsync_11rb$(this.local$personGroup, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.insertPersonGroup_j5378c$ = function (personGroup_0, continuation_0, suspended) { var instance = new Coroutine$insertPersonGroup_j5378c$(this, personGroup_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertPersonGroupMember_gftcgu$($this, personGroupMember_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroupMember = personGroupMember_0; } Coroutine$insertPersonGroupMember_gftcgu$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertPersonGroupMember_gftcgu$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertPersonGroupMember_gftcgu$.prototype.constructor = Coroutine$insertPersonGroupMember_gftcgu$; Coroutine$insertPersonGroupMember_gftcgu$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonGroupMember_.insertAndReturnIdAsync_11rb$(this.local$personGroupMember, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.insertPersonGroupMember_gftcgu$ = function (personGroupMember_0, continuation_0, suspended) { var instance = new Coroutine$insertPersonGroupMember_gftcgu$(this, personGroupMember_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_JdbcKt.prototype.insertAuditLog_6gshjl$ = function (entity) { var _retVal = this._insertAdapterAuditLog_.insertAndReturnId_11rb$(entity); return _retVal; }; PersonDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterPerson_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_129($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_129.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_129.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_129.prototype.constructor = Coroutine$insertAsync_129; Coroutine$insertAsync_129.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPerson_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_129(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterPerson_.insertList_4ezy5m$(entityList); }; function Coroutine$PersonDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$updateAsync$lambda; Coroutine$PersonDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.username); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.firstNames); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$entity.lastName); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$entity.emailAddr); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$entity.phoneNum); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$entity.gender); this.local$_stmt.setBoolean_fzusl$(7, this.local$closure$entity.active); this.local$_stmt.setBoolean_fzusl$(8, this.local$closure$entity.admin); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$entity.personNotes); this.local$_stmt.setString_vqvrqt$(10, this.local$closure$entity.fatherName); this.local$_stmt.setString_vqvrqt$(11, this.local$closure$entity.fatherNumber); this.local$_stmt.setString_vqvrqt$(12, this.local$closure$entity.motherName); this.local$_stmt.setString_vqvrqt$(13, this.local$closure$entity.motherNum); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$entity.dateOfBirth); this.local$_stmt.setString_vqvrqt$(15, this.local$closure$entity.personAddress); this.local$_stmt.setString_vqvrqt$(16, this.local$closure$entity.personOrgId); this.local$_stmt.setLong_6svq3l$(17, this.local$closure$entity.personGroupUid); this.local$_stmt.setLong_6svq3l$(18, this.local$closure$entity.personMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(19, this.local$closure$entity.personLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(20, this.local$closure$entity.personLastChangedBy); this.local$_stmt.setLong_6svq3l$(21, this.local$closure$entity.personLct); this.local$_stmt.setString_vqvrqt$(22, this.local$closure$entity.personCountry); this.local$_stmt.setInt_vux9f0$(23, this.local$closure$entity.personType); this.local$_stmt.setLong_6svq3l$(24, this.local$closure$entity.personUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_6c9i1n$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_6c9i1n$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_6c9i1n$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_6c9i1n$.prototype.constructor = Coroutine$updateAsync_6c9i1n$; Coroutine$updateAsync_6c9i1n$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE Person SET username = ?, firstNames = ?, lastName = ?, emailAddr = ?, phoneNum = ?, gender = ?, active = ?, admin = ?, personNotes = ?, fatherName = ?, fatherNumber = ?, motherName = ?, motherNum = ?, dateOfBirth = ?, personAddress = ?, personOrgId = ?, personGroupUid = ?, personMasterChangeSeqNum = ?, personLocalChangeSeqNum = ?, personLastChangedBy = ?, personLct = ?, personCountry = ?, personType = ? WHERE personUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, PersonDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.updateAsync_6c9i1n$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_6c9i1n$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.username); _stmt.setString_vqvrqt$(2, _entity.firstNames); _stmt.setString_vqvrqt$(3, _entity.lastName); _stmt.setString_vqvrqt$(4, _entity.emailAddr); _stmt.setString_vqvrqt$(5, _entity.phoneNum); _stmt.setInt_vux9f0$(6, _entity.gender); _stmt.setBoolean_fzusl$(7, _entity.active); _stmt.setBoolean_fzusl$(8, _entity.admin); _stmt.setString_vqvrqt$(9, _entity.personNotes); _stmt.setString_vqvrqt$(10, _entity.fatherName); _stmt.setString_vqvrqt$(11, _entity.fatherNumber); _stmt.setString_vqvrqt$(12, _entity.motherName); _stmt.setString_vqvrqt$(13, _entity.motherNum); _stmt.setLong_6svq3l$(14, _entity.dateOfBirth); _stmt.setString_vqvrqt$(15, _entity.personAddress); _stmt.setString_vqvrqt$(16, _entity.personOrgId); _stmt.setLong_6svq3l$(17, _entity.personGroupUid); _stmt.setLong_6svq3l$(18, _entity.personMasterChangeSeqNum); _stmt.setLong_6svq3l$(19, _entity.personLocalChangeSeqNum); _stmt.setInt_vux9f0$(20, _entity.personLastChangedBy); _stmt.setLong_6svq3l$(21, _entity.personLct); _stmt.setString_vqvrqt$(22, _entity.personCountry); _stmt.setInt_vux9f0$(23, _entity.personType); _stmt.setLong_6svq3l$(24, _entity.personUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } PersonDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Person SET username = ?, firstNames = ?, lastName = ?, emailAddr = ?, phoneNum = ?, gender = ?, active = ?, admin = ?, personNotes = ?, fatherName = ?, fatherNumber = ?, motherName = ?, motherNum = ?, dateOfBirth = ?, personAddress = ?, personOrgId = ?, personGroupUid = ?, personMasterChangeSeqNum = ?, personLocalChangeSeqNum = ?, personLastChangedBy = ?, personLct = ?, personCountry = ?, personType = ? WHERE personUid = ?'; prepareAndUseStatement(this._db, _sql, PersonDao_JdbcKt$updateList$lambda(entityList)); }; function PersonDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.username); _stmt.setString_vqvrqt$(2, closure$entity.firstNames); _stmt.setString_vqvrqt$(3, closure$entity.lastName); _stmt.setString_vqvrqt$(4, closure$entity.emailAddr); _stmt.setString_vqvrqt$(5, closure$entity.phoneNum); _stmt.setInt_vux9f0$(6, closure$entity.gender); _stmt.setBoolean_fzusl$(7, closure$entity.active); _stmt.setBoolean_fzusl$(8, closure$entity.admin); _stmt.setString_vqvrqt$(9, closure$entity.personNotes); _stmt.setString_vqvrqt$(10, closure$entity.fatherName); _stmt.setString_vqvrqt$(11, closure$entity.fatherNumber); _stmt.setString_vqvrqt$(12, closure$entity.motherName); _stmt.setString_vqvrqt$(13, closure$entity.motherNum); _stmt.setLong_6svq3l$(14, closure$entity.dateOfBirth); _stmt.setString_vqvrqt$(15, closure$entity.personAddress); _stmt.setString_vqvrqt$(16, closure$entity.personOrgId); _stmt.setLong_6svq3l$(17, closure$entity.personGroupUid); _stmt.setLong_6svq3l$(18, closure$entity.personMasterChangeSeqNum); _stmt.setLong_6svq3l$(19, closure$entity.personLocalChangeSeqNum); _stmt.setInt_vux9f0$(20, closure$entity.personLastChangedBy); _stmt.setLong_6svq3l$(21, closure$entity.personLct); _stmt.setString_vqvrqt$(22, closure$entity.personCountry); _stmt.setInt_vux9f0$(23, closure$entity.personType); _stmt.setLong_6svq3l$(24, closure$entity.personUid); return _stmt.executeUpdate(); }; } PersonDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Person SET username = ?, firstNames = ?, lastName = ?, emailAddr = ?, phoneNum = ?, gender = ?, active = ?, admin = ?, personNotes = ?, fatherName = ?, fatherNumber = ?, motherName = ?, motherNum = ?, dateOfBirth = ?, personAddress = ?, personOrgId = ?, personGroupUid = ?, personMasterChangeSeqNum = ?, personLocalChangeSeqNum = ?, personLastChangedBy = ?, personLct = ?, personCountry = ?, personType = ? WHERE personUid = ?'; prepareAndUseStatement(this._db, _sql, PersonDao_JdbcKt$update$lambda(entity)); }; function Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_119($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_119.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_119.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_119.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_119; Coroutine$replicateOnNewNode_s8cxhz$_119.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonReplicate(personPk, personDestination)\n | SELECT DISTINCT Person.personUid AS personUid,\n | ? AS personDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | WHERE Person.personType = 0\n | AND UserSession.usClientNodeId = ?\n | AND Person.personLct != COALESCE(\n | (SELECT personVersionId\n | FROM PersonReplicate\n | WHERE personPk = Person.personUid\n | AND personDestination = ?), 0) \n | /*psql ON CONFLICT(personPk, personDestination) DO UPDATE\n | SET personPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonReplicate(personPk, personDestination)\n | SELECT DISTINCT Person.personUid AS personUid,\n | ? AS personDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | WHERE Person.personType = 0\n | AND UserSession.usClientNodeId = ?\n | AND Person.personLct != COALESCE(\n | (SELECT personVersionId\n | FROM PersonReplicate\n | WHERE personPk = Person.personUid\n | AND personDestination = ?), 0) \n | ON CONFLICT(personPk, personDestination) DO UPDATE\n | SET personPending = true\n | \n | \n |')), PersonDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_119(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda; Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_122($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_122.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_122.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_122.prototype.constructor = Coroutine$replicateOnChange_122; Coroutine$replicateOnChange_122.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonReplicate(personPk, personDestination)\n | SELECT DISTINCT Person.personUid AS personUid,\n | UserSession.usClientNodeId AS personDestination\n | FROM ChangeLog\n | JOIN Person\n | ON ChangeLog.chTableId = 9\n | AND ChangeLog.chEntityPk = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE Person.personType = 0\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Person.personLct != COALESCE(\n | (SELECT personVersionId\n | FROM PersonReplicate\n | WHERE personPk = Person.personUid\n | AND personDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(personPk, personDestination) DO UPDATE\n | SET personPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonReplicate(personPk, personDestination)\n | SELECT DISTINCT Person.personUid AS personUid,\n | UserSession.usClientNodeId AS personDestination\n | FROM ChangeLog\n | JOIN Person\n | ON ChangeLog.chTableId = 9\n | AND ChangeLog.chEntityPk = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE Person.personType = 0\n | AND UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Person.personLct != COALESCE(\n | (SELECT personVersionId\n | FROM PersonReplicate\n | WHERE personPk = Person.personUid\n | AND personDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(personPk, personDestination) DO UPDATE\n | SET personPending = true\n | \n | \n |')), PersonDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_122(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonDao_JdbcKt$findByUsernameCount$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function PersonDao_JdbcKt$findByUsernameCount$lambda$lambda(_result) { return mapNextRow(_result, 0, PersonDao_JdbcKt$findByUsernameCount$lambda$lambda$lambda(_result)); } function Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda(closure$username_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$username = closure$username_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda; Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$username); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findByUsernameCount$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUsernameCount$lambda(closure$username_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUsernameCount$lambda(closure$username_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt.prototype.findByUsernameCount_61zpoe$ = function (username, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT COUNT(*) FROM Person where Person.username = ?'), PersonDao_JdbcKt$findByUsernameCount$lambda(username), continuation); }; function PersonDao_JdbcKt$isValidToken$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function PersonDao_JdbcKt$isValidToken$lambda$lambda(_result) { return mapNextRow(_result, false, PersonDao_JdbcKt$isValidToken$lambda$lambda$lambda(_result)); } function PersonDao_JdbcKt$isValidToken$lambda(closure$token, closure$personUid) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$token); _stmt.setLong_6svq3l$(2, closure$personUid); return useResults(_stmt.executeQuery(), PersonDao_JdbcKt$isValidToken$lambda$lambda); }; } PersonDao_JdbcKt.prototype.isValidToken_4wgjuj$ = function (token, personUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT EXISTS(SELECT token FROM AccessToken WHERE token = ? and accessTokenPersonUid = ?)'), PersonDao_JdbcKt$isValidToken$lambda(token, personUid)); }; function PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_passwordHash = closure$_result.getString_61zpoe$('passwordHash'); var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var $receiver = new PersonUidAndPasswordHash(); $receiver.passwordHash = _tmp_passwordHash; $receiver.personUid = _tmp_personUid; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.admin = _tmp_admin; return $receiver; }; } function PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda$lambda(_result) { return mapNextRow(_result, null, PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda$lambda$lambda(_result)); } function Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda(closure$username_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$username = closure$username_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda; Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$username); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda(closure$username_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda(closure$username_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt.prototype.findUidAndPasswordHashAsync_61zpoe$ = function (username, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Person.personUid, Person.admin, Person.firstNames, Person.lastName, \n | PersonAuth.passwordHash\n | FROM Person\n | JOIN PersonAuth\n | ON Person.personUid = PersonAuth.personAuthUid\n | WHERE Person.username = ?\n | \n ')), PersonDao_JdbcKt$findUidAndPasswordHashAsync$lambda(username), continuation); }; function PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var $receiver = new Person(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; return $receiver; }; } function PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda$lambda(_result) { return mapNextRow(_result, null, PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda$lambda$lambda(_result)); } function Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda(closure$username_0, closure$passwordHash_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$username = closure$username_0; this.local$closure$passwordHash = closure$passwordHash_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda; Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$username); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$passwordHash); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda(closure$username_0, closure$passwordHash_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda(closure$username_0, closure$passwordHash_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt.prototype.findByUsernameAndPasswordHash2_puj7f4$ = function (username, passwordHash, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Person.*\n | FROM Person\n | JOIN PersonAuth2\n | ON Person.personUid = PersonAuth2.pauthUid\n | WHERE Person.username = ? \n | AND PersonAuth2.pauthAuth = ?\n | \n ')), PersonDao_JdbcKt$findByUsernameAndPasswordHash2$lambda(username, passwordHash), continuation); }; function PersonDao_JdbcKt$personHasPermissionAsync$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function PersonDao_JdbcKt$personHasPermissionAsync$lambda$lambda(_result) { return mapNextRow(_result, false, PersonDao_JdbcKt$personHasPermissionAsync$lambda$lambda$lambda(_result)); } function Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda(closure$personUid_0, closure$permission_0, closure$accountPersonUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$permission = closure$permission_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda; Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$accountPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$personHasPermissionAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$personHasPermissionAsync$lambda(closure$personUid_0, closure$permission_0, closure$accountPersonUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$personHasPermissionAsync$lambda(closure$personUid_0, closure$permission_0, closure$accountPersonUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt.prototype.personHasPermissionAsync_b9bd0d$ = function (accountPersonUid, personUid, permission, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT EXISTS(\n | SELECT 1\n | FROM Person\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | WHERE Person.personUid = ?\n | AND (ScopedGrant.sgPermissions & ?) > 0\n | AND PersonGroupMember.groupMemberPersonUid = ?\n | LIMIT 1)\n | \n ')), PersonDao_JdbcKt$personHasPermissionAsync$lambda(personUid, permission, accountPersonUid), continuation); }; function PersonDao_JdbcKt$personIsAdmin$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function PersonDao_JdbcKt$personIsAdmin$lambda$lambda(_result) { return mapNextRow(_result, false, PersonDao_JdbcKt$personIsAdmin$lambda$lambda$lambda(_result)); } function Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda(closure$accountPersonUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda; Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$personIsAdmin$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$personIsAdmin$lambda(closure$accountPersonUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$personIsAdmin$lambda(closure$accountPersonUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt.prototype.personIsAdmin_s8cxhz$ = function (accountPersonUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT COALESCE((SELECT admin FROM Person WHERE personUid = ?), 0)', void 0, void 0, void 0, 'SELECT COALESCE((SELECT admin FROM Person WHERE personUid = ?), FALSE)'), PersonDao_JdbcKt$personIsAdmin$lambda(accountPersonUid), continuation); }; function PersonDao_JdbcKt$findByUsername$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var $receiver = new Person(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; return $receiver; }; } function PersonDao_JdbcKt$findByUsername$lambda$lambda(_result) { return mapNextRow(_result, null, PersonDao_JdbcKt$findByUsername$lambda$lambda$lambda(_result)); } function PersonDao_JdbcKt$findByUsername$lambda(closure$username) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$username); return useResults(_stmt.executeQuery(), PersonDao_JdbcKt$findByUsername$lambda$lambda); }; } PersonDao_JdbcKt.prototype.findByUsername_pdl1vj$ = function (username) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT Person.* FROM PERSON Where Person.username = ?'), PersonDao_JdbcKt$findByUsername$lambda(username)); }; function PersonDao_JdbcKt$findSystemAccount$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var $receiver = new Person(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; return $receiver; }; } function PersonDao_JdbcKt$findSystemAccount$lambda$lambda(_result) { return mapNextRow(_result, null, PersonDao_JdbcKt$findSystemAccount$lambda$lambda$lambda(_result)); } function Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda(closure$nodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$nodeId = closure$nodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda; Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$nodeId); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findSystemAccount$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findSystemAccount$lambda(closure$nodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findSystemAccount$lambda(closure$nodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt.prototype.findSystemAccount_s8cxhz$ = function (nodeId, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Person.*\n | FROM Person\n | WHERE Person.dateOfBirth = ?\n | AND Person.personType = 1\n | \n ')), PersonDao_JdbcKt$findSystemAccount$lambda(nodeId), continuation); }; function PersonDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var $receiver = new Person(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; return $receiver; }; } function PersonDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, PersonDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function PersonDao_JdbcKt$findByUid$lambda(closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); return useResults(_stmt.executeQuery(), PersonDao_JdbcKt$findByUid$lambda$lambda); }; } PersonDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM PERSON WHERE Person.personUid = ?'), PersonDao_JdbcKt$findByUid$lambda(uid)); }; function PersonDao_JdbcKt$findPersonAccountByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_currentPassword = closure$_result.getString_61zpoe$('currentPassword'); var _tmp_newPassword = closure$_result.getString_61zpoe$('newPassword'); var _tmp_confirmedPassword = closure$_result.getString_61zpoe$('confirmedPassword'); var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var $receiver = new PersonWithAccount(); $receiver.currentPassword = _tmp_currentPassword; $receiver.newPassword = _tmp_newPassword; $receiver.confirmedPassword = _tmp_confirmedPassword; $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; return $receiver; }; } function PersonDao_JdbcKt$findPersonAccountByUid$lambda$lambda(_result) { return mapNextRow(_result, null, PersonDao_JdbcKt$findPersonAccountByUid$lambda$lambda$lambda(_result)); } function Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda; Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findPersonAccountByUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findPersonAccountByUid$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findPersonAccountByUid$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt.prototype.findPersonAccountByUid_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT Person.*, null as newPassword, null as currentPassword,null as confirmedPassword FROM PERSON WHERE Person.personUid = ?'), PersonDao_JdbcKt$findPersonAccountByUid$lambda(uid), continuation); }; function PersonDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var $receiver = new Person(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; return $receiver; }; } function PersonDao_JdbcKt$findByUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, PersonDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findByUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$PersonDao_JdbcKt$findByUidLive$lambda(this$PersonDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$PersonDao_JdbcKt = this$PersonDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; } Coroutine$PersonDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUidLive$lambda; Coroutine$PersonDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$PersonDao_JdbcKt._db, new PreparedStatementConfig('SELECT * From Person WHERE personUid = ?'), PersonDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUidLive$lambda(this$PersonDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUidLive$lambda(this$PersonDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { return new LiveDataImpl(this._db, listOf_0('Person'), PersonDao_JdbcKt$findByUidLive$lambda(this, uid)); }; function PersonDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var $receiver = new Person(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; return $receiver; }; } function PersonDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, PersonDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda; Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM Person WHERE personUid = ?'), PersonDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral(this$PersonDao_JdbcKt, closure$accountPersonUid, closure$excludeClazz, closure$timestamp, closure$excludeSchool, closure$excludeSelected, closure$searchText, closure$sortOrder) { this.this$PersonDao_JdbcKt = this$PersonDao_JdbcKt; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$excludeClazz = closure$excludeClazz; this.closure$timestamp = closure$timestamp; this.closure$excludeSchool = closure$excludeSchool; this.closure$excludeSelected = closure$excludeSelected; this.closure$searchText = closure$searchText; this.closure$sortOrder = closure$sortOrder; DataSourceFactory.call(this); } function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var $receiver = new PersonWithDisplayDetails(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; return $receiver; }; } function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$excludeClazz = closure$excludeClazz_0; this.local$closure$timestamp = closure$timestamp_0; this.local$closure$excludeSchool = closure$excludeSchool_0; this.local$closure$excludeSelected = closure$excludeSelected_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$excludeClazz); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$excludeClazz); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$timestamp); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$excludeSchool); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$excludeSchool); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$timestamp); this.local$_stmt.setArray_wqp8hw$(8, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$excludeSelected))); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$searchText); this.local$_stmt.setString_vqvrqt$(10, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(13, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(14, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda(this$PersonDao_JdbcKt_0, closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$PersonDao_JdbcKt = this$PersonDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$excludeClazz = closure$excludeClazz_0; this.local$closure$timestamp = closure$timestamp_0; this.local$closure$excludeSchool = closure$excludeSchool_0; this.local$closure$excludeSelected = closure$excludeSelected_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$PersonDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT Person.* \n | FROM PersonGroupMember \n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND (? = 0 OR ? NOT IN\n | (SELECT clazzEnrolmentClazzUid \n | FROM ClazzEnrolment \n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentActive))\n | AND (? = 0 OR ? NOT IN\n | (SELECT schoolMemberSchoolUid\n | FROM SchoolMember \n | WHERE schoolMemberPersonUid = Person.personUid \n | AND ? BETWEEN SchoolMember.schoolMemberJoinDate\n | AND SchoolMember.schoolMemberLeftDate ))\n | AND Person.personType = 0 \n | AND (Person.personUid NOT IN (?))\n | AND (? = '%' \n | OR Person.firstNames || ' ' || Person.lastName LIKE ?)\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ?\n "), true), PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$excludeClazz, this.local$closure$timestamp, this.local$closure$excludeSchool, this.local$closure$excludeSelected, this.local$closure$searchText, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda(this$PersonDao_JdbcKt_0, closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda(this$PersonDao_JdbcKt_0, closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$PersonDao_JdbcKt._db, listOf(['PersonGroupMember', 'ScopedGrant', 'Person', 'ClazzEnrolment', 'SchoolMember']), PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getData$lambda(this.this$PersonDao_JdbcKt, this.closure$accountPersonUid, this.closure$excludeClazz, this.closure$timestamp, this.closure$excludeSchool, this.closure$excludeSelected, this.closure$searchText, this.closure$sortOrder, _limit, _offset)); }; function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$excludeClazz = closure$excludeClazz_0; this.local$closure$timestamp = closure$timestamp_0; this.local$closure$excludeSchool = closure$excludeSchool_0; this.local$closure$excludeSelected = closure$excludeSelected_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$excludeClazz); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$excludeClazz); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$timestamp); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$excludeSchool); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$excludeSchool); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$timestamp); this.local$_stmt.setArray_wqp8hw$(8, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$excludeSelected))); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$searchText); this.local$_stmt.setString_vqvrqt$(10, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(12, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda(this$PersonDao_JdbcKt_0, closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$PersonDao_JdbcKt = this$PersonDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$excludeClazz = closure$excludeClazz_0; this.local$closure$timestamp = closure$timestamp_0; this.local$closure$excludeSchool = closure$excludeSchool_0; this.local$closure$excludeSelected = closure$excludeSelected_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; } Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda; Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$PersonDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT Person.* \n | FROM PersonGroupMember \n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND (? = 0 OR ? NOT IN\n | (SELECT clazzEnrolmentClazzUid \n | FROM ClazzEnrolment \n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentActive))\n | AND (? = 0 OR ? NOT IN\n | (SELECT schoolMemberSchoolUid\n | FROM SchoolMember \n | WHERE schoolMemberPersonUid = Person.personUid \n | AND ? BETWEEN SchoolMember.schoolMemberJoinDate\n | AND SchoolMember.schoolMemberLeftDate ))\n | AND Person.personType = 0 \n | AND (Person.personUid NOT IN (?))\n | AND (? = '%' \n | OR Person.firstNames || ' ' || Person.lastName LIKE ?)\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | ) \n "), true), PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$excludeClazz, this.local$closure$timestamp, this.local$closure$excludeSchool, this.local$closure$excludeSelected, this.local$closure$searchText, this.local$closure$sortOrder), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda(this$PersonDao_JdbcKt_0, closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda(this$PersonDao_JdbcKt_0, closure$accountPersonUid_0, closure$excludeClazz_0, closure$timestamp_0, closure$excludeSchool_0, closure$excludeSelected_0, closure$searchText_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$PersonDao_JdbcKt._db, listOf(['PersonGroupMember', 'ScopedGrant', 'Person', 'ClazzEnrolment', 'SchoolMember']), PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral$getLength$lambda(this.this$PersonDao_JdbcKt, this.closure$accountPersonUid, this.closure$excludeClazz, this.closure$timestamp, this.closure$excludeSchool, this.closure$excludeSelected, this.closure$searchText, this.closure$sortOrder)); }; PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; PersonDao_JdbcKt.prototype.findPersonsWithPermission_gs5uuz$$default = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) { return new PersonDao_JdbcKt$findPersonsWithPermission$ObjectLiteral(this, accountPersonUid, excludeClazz, timestamp, excludeSchool, excludeSelected, searchText, sortOrder); }; function PersonDao_JdbcKt$findPersonsWithPermissionAsList$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var $receiver = new Person(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; return $receiver; }; } function PersonDao_JdbcKt$findPersonsWithPermissionAsList$lambda$lambda(_result) { return mapRows(_result, PersonDao_JdbcKt$findPersonsWithPermissionAsList$lambda$lambda$lambda(_result)); } function PersonDao_JdbcKt$findPersonsWithPermissionAsList$lambda(closure$accountPersonUid, closure$excludeClazz, closure$timestamp, closure$excludeSchool, closure$excludeSelected, closure$searchText, closure$sortOrder) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$accountPersonUid); _stmt.setLong_6svq3l$(2, closure$excludeClazz); _stmt.setLong_6svq3l$(3, closure$excludeClazz); _stmt.setLong_6svq3l$(4, closure$timestamp); _stmt.setLong_6svq3l$(5, closure$excludeSchool); _stmt.setLong_6svq3l$(6, closure$excludeSchool); _stmt.setLong_6svq3l$(7, closure$timestamp); _stmt.setArray_wqp8hw$(8, createArrayOrProxyArrayOf(_stmt.getConnection(), 'BIGINT', copyToArray(closure$excludeSelected))); _stmt.setString_vqvrqt$(9, closure$searchText); _stmt.setString_vqvrqt$(10, closure$searchText); _stmt.setInt_vux9f0$(11, closure$sortOrder); _stmt.setInt_vux9f0$(12, closure$sortOrder); return useResults(_stmt.executeQuery(), PersonDao_JdbcKt$findPersonsWithPermissionAsList$lambda$lambda); }; } PersonDao_JdbcKt.prototype.findPersonsWithPermissionAsList_gs5uuz$$default = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin("\n |\n | SELECT Person.* \n | FROM PersonGroupMember \n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND (? = 0 OR ? NOT IN\n | (SELECT clazzEnrolmentClazzUid \n | FROM ClazzEnrolment \n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ? BETWEEN ClazzEnrolment.clazzEnrolmentDateJoined \n | AND ClazzEnrolment.clazzEnrolmentDateLeft\n | AND ClazzEnrolment.clazzEnrolmentActive))\n | AND (? = 0 OR ? NOT IN\n | (SELECT schoolMemberSchoolUid\n | FROM SchoolMember \n | WHERE schoolMemberPersonUid = Person.personUid \n | AND ? BETWEEN SchoolMember.schoolMemberJoinDate\n | AND SchoolMember.schoolMemberLeftDate ))\n | AND Person.personType = 0 \n | AND (Person.personUid NOT IN (?))\n | AND (? = '%' \n | OR Person.firstNames || ' ' || Person.lastName LIKE ?)\n | GROUP BY Person.personUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | \n "), true), PersonDao_JdbcKt$findPersonsWithPermissionAsList$lambda(accountPersonUid, excludeClazz, timestamp, excludeSchool, excludeSelected, searchText, sortOrder)); }; function PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var _tmp_PersonParentJoin_nullCount = 0; var _tmp_ppjUid = closure$_result.getLong_61zpoe$('ppjUid'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_ppjPcsn = closure$_result.getLong_61zpoe$('ppjPcsn'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_ppjLcsn = closure$_result.getLong_61zpoe$('ppjLcsn'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_ppjLcb = closure$_result.getInt_61zpoe$('ppjLcb'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_ppjLct = closure$_result.getLong_61zpoe$('ppjLct'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_ppjParentPersonUid = closure$_result.getLong_61zpoe$('ppjParentPersonUid'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_ppjMinorPersonUid = closure$_result.getLong_61zpoe$('ppjMinorPersonUid'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_ppjRelationship = closure$_result.getInt_61zpoe$('ppjRelationship'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_ppjEmail = closure$_result.getString_61zpoe$('ppjEmail'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_ppjPhone = closure$_result.getString_61zpoe$('ppjPhone'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_ppjInactive = closure$_result.getBoolean_61zpoe$('ppjInactive'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_ppjStatus = closure$_result.getInt_61zpoe$('ppjStatus'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_ppjApprovalTiemstamp = closure$_result.getLong_61zpoe$('ppjApprovalTiemstamp'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_ppjApprovalIpAddr = closure$_result.getString_61zpoe$('ppjApprovalIpAddr'); if (closure$_result.wasNull()) { _tmp_PersonParentJoin_nullCount = _tmp_PersonParentJoin_nullCount + 1 | 0; } var _tmp_PersonParentJoin_isAllNull = _tmp_PersonParentJoin_nullCount === 14; var $receiver = new PersonWithPersonParentJoin(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; if (!_tmp_PersonParentJoin_isAllNull) { var $receiver_0 = new PersonParentJoin(); $receiver_0.ppjUid = _tmp_ppjUid; $receiver_0.ppjPcsn = _tmp_ppjPcsn; $receiver_0.ppjLcsn = _tmp_ppjLcsn; $receiver_0.ppjLcb = _tmp_ppjLcb; $receiver_0.ppjLct = _tmp_ppjLct; $receiver_0.ppjParentPersonUid = _tmp_ppjParentPersonUid; $receiver_0.ppjMinorPersonUid = _tmp_ppjMinorPersonUid; $receiver_0.ppjRelationship = _tmp_ppjRelationship; $receiver_0.ppjEmail = _tmp_ppjEmail; $receiver_0.ppjPhone = _tmp_ppjPhone; $receiver_0.ppjInactive = _tmp_ppjInactive; $receiver_0.ppjStatus = _tmp_ppjStatus; $receiver_0.ppjApprovalTiemstamp = _tmp_ppjApprovalTiemstamp; $receiver_0.ppjApprovalIpAddr = _tmp_ppjApprovalIpAddr; $receiver.parentJoin = $receiver_0; } return $receiver; }; } function PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda(closure$personUid_0, closure$activeUserPersonUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$activeUserPersonUid = closure$activeUserPersonUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda; Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$activeUserPersonUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda(closure$personUid_0, closure$activeUserPersonUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda(closure$personUid_0, closure$activeUserPersonUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda(this$PersonDao_JdbcKt_0, closure$personUid_0, closure$activeUserPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$PersonDao_JdbcKt = this$PersonDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$activeUserPersonUid = closure$activeUserPersonUid_0; } Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda.prototype.constructor = Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda; Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$PersonDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT Person.*, PersonParentJoin.* \n | FROM Person\n | LEFT JOIN PersonParentJoin on ppjUid = (\n | SELECT ppjUid \n | FROM PersonParentJoin\n | WHERE ppjMinorPersonUid = ? \n | AND ppjParentPersonUid = ? \n | LIMIT 1) \n | WHERE Person.personUid = ?\n | \n ')), PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda$lambda(this.local$closure$personUid, this.local$closure$activeUserPersonUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda(this$PersonDao_JdbcKt_0, closure$personUid_0, closure$activeUserPersonUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda(this$PersonDao_JdbcKt_0, closure$personUid_0, closure$activeUserPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonDao_JdbcKt.prototype.findByUidWithDisplayDetailsLive_3pjtqy$ = function (personUid, activeUserPersonUid) { return new LiveDataImpl(this._db, listOf(['Person', 'PersonParentJoin']), PersonDao_JdbcKt$findByUidWithDisplayDetailsLive$lambda(this, personUid, activeUserPersonUid)); }; function PersonDao_JdbcKt$getAllPerson$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var $receiver = new Person(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; return $receiver; }; } function PersonDao_JdbcKt$getAllPerson$lambda$lambda(_result) { return mapRows(_result, PersonDao_JdbcKt$getAllPerson$lambda$lambda$lambda(_result)); } function PersonDao_JdbcKt$getAllPerson$lambda(_stmt) { return useResults(_stmt.executeQuery(), PersonDao_JdbcKt$getAllPerson$lambda$lambda); } PersonDao_JdbcKt.prototype.getAllPerson = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Person'), PersonDao_JdbcKt$getAllPerson$lambda); }; function PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO Person (personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.personUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.personUid); } stmt.setString_vqvrqt$(2, entity.username); stmt.setString_vqvrqt$(3, entity.firstNames); stmt.setString_vqvrqt$(4, entity.lastName); stmt.setString_vqvrqt$(5, entity.emailAddr); stmt.setString_vqvrqt$(6, entity.phoneNum); stmt.setInt_vux9f0$(7, entity.gender); stmt.setBoolean_fzusl$(8, entity.active); stmt.setBoolean_fzusl$(9, entity.admin); stmt.setString_vqvrqt$(10, entity.personNotes); stmt.setString_vqvrqt$(11, entity.fatherName); stmt.setString_vqvrqt$(12, entity.fatherNumber); stmt.setString_vqvrqt$(13, entity.motherName); stmt.setString_vqvrqt$(14, entity.motherNum); stmt.setLong_6svq3l$(15, entity.dateOfBirth); stmt.setString_vqvrqt$(16, entity.personAddress); stmt.setString_vqvrqt$(17, entity.personOrgId); stmt.setLong_6svq3l$(18, entity.personGroupUid); stmt.setLong_6svq3l$(19, entity.personMasterChangeSeqNum); stmt.setLong_6svq3l$(20, entity.personLocalChangeSeqNum); stmt.setInt_vux9f0$(21, entity.personLastChangedBy); stmt.setLong_6svq3l$(22, entity.personLct); stmt.setString_vqvrqt$(23, entity.personCountry); stmt.setInt_vux9f0$(24, entity.personType); }; PersonDao_JdbcKt$_insertAdapterPerson_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO Person (personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.personUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.personUid); } stmt.setString_vqvrqt$(2, entity.username); stmt.setString_vqvrqt$(3, entity.firstNames); stmt.setString_vqvrqt$(4, entity.lastName); stmt.setString_vqvrqt$(5, entity.emailAddr); stmt.setString_vqvrqt$(6, entity.phoneNum); stmt.setInt_vux9f0$(7, entity.gender); stmt.setBoolean_fzusl$(8, entity.active); stmt.setBoolean_fzusl$(9, entity.admin); stmt.setString_vqvrqt$(10, entity.personNotes); stmt.setString_vqvrqt$(11, entity.fatherName); stmt.setString_vqvrqt$(12, entity.fatherNumber); stmt.setString_vqvrqt$(13, entity.motherName); stmt.setString_vqvrqt$(14, entity.motherNum); stmt.setLong_6svq3l$(15, entity.dateOfBirth); stmt.setString_vqvrqt$(16, entity.personAddress); stmt.setString_vqvrqt$(17, entity.personOrgId); stmt.setLong_6svq3l$(18, entity.personGroupUid); stmt.setLong_6svq3l$(19, entity.personMasterChangeSeqNum); stmt.setLong_6svq3l$(20, entity.personLocalChangeSeqNum); stmt.setInt_vux9f0$(21, entity.personLastChangedBy); stmt.setLong_6svq3l$(22, entity.personLct); stmt.setString_vqvrqt$(23, entity.personCountry); stmt.setInt_vux9f0$(24, entity.personType); }; PersonDao_JdbcKt$_insertAdapterPerson_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO AccessToken (token, accessTokenPersonUid, expires) VALUES(?, ?, ?)'; }; PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setString_vqvrqt$(1, entity.token); stmt.setLong_6svq3l$(2, entity.accessTokenPersonUid); stmt.setLong_6svq3l$(3, entity.expires); }; PersonDao_JdbcKt$_insertAdapterAccessToken_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO PersonAuth (personAuthUid, passwordHash, personAuthStatus) VALUES(?, ?, ?)'; }; PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.personAuthUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.personAuthUid); } stmt.setString_vqvrqt$(2, entity.passwordHash); stmt.setInt_vux9f0$(3, entity.personAuthStatus); }; PersonDao_JdbcKt$_insertAdapterPersonAuth_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO PersonGroup (groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.groupUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.groupUid); } stmt.setLong_6svq3l$(2, entity.groupMasterCsn); stmt.setLong_6svq3l$(3, entity.groupLocalCsn); stmt.setInt_vux9f0$(4, entity.groupLastChangedBy); stmt.setLong_6svq3l$(5, entity.groupLct); stmt.setString_vqvrqt$(6, entity.groupName); stmt.setBoolean_fzusl$(7, entity.groupActive); stmt.setInt_vux9f0$(8, entity.personGroupFlag); }; PersonDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO PersonGroupMember (groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.groupMemberUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.groupMemberUid); } stmt.setBoolean_fzusl$(2, entity.groupMemberActive); stmt.setLong_6svq3l$(3, entity.groupMemberPersonUid); stmt.setLong_6svq3l$(4, entity.groupMemberGroupUid); stmt.setLong_6svq3l$(5, entity.groupMemberMasterCsn); stmt.setLong_6svq3l$(6, entity.groupMemberLocalCsn); stmt.setInt_vux9f0$(7, entity.groupMemberLastChangedBy); stmt.setLong_6svq3l$(8, entity.groupMemberLct); }; PersonDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO AuditLog (auditLogUid, auditLogMasterChangeSeqNum, auditLogLocalChangeSeqNum, auditLogLastChangedBy, auditLogLct, auditLogActorPersonUid, auditLogTableUid, auditLogEntityUid, auditLogDate, notes) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.auditLogUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.auditLogUid); } stmt.setLong_6svq3l$(2, entity.auditLogMasterChangeSeqNum); stmt.setLong_6svq3l$(3, entity.auditLogLocalChangeSeqNum); stmt.setInt_vux9f0$(4, entity.auditLogLastChangedBy); stmt.setLong_6svq3l$(5, entity.auditLogLct); stmt.setLong_6svq3l$(6, entity.auditLogActorPersonUid); stmt.setInt_vux9f0$(7, entity.auditLogTableUid); stmt.setLong_6svq3l$(8, entity.auditLogEntityUid); stmt.setLong_6svq3l$(9, entity.auditLogDate); stmt.setString_vqvrqt$(10, entity.notes); }; PersonDao_JdbcKt$_insertAdapterAuditLog_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonDao_JdbcKt', interfaces: [PersonDao]}; function PersonDao_ReplicateWrapper(_db, _dao) { PersonDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_120($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_120.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_120.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_120.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_120; Coroutine$replicateOnNewNode_s8cxhz$_120.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_120(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_123($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_123.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_123.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_123.prototype.constructor = Coroutine$replicateOnChange_123; Coroutine$replicateOnChange_123.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_123(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_e0gxv4$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_e0gxv4$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_e0gxv4$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_e0gxv4$_0.prototype.constructor = Coroutine$insertListAsync_e0gxv4$_0; Coroutine$insertListAsync_e0gxv4$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.personUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(9, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.personUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.personLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_e0gxv4$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.insertListAsync_e0gxv4$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_e0gxv4$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertOrReplace_6c9i1n$_0($this, person_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$person = person_0; } Coroutine$insertOrReplace_6c9i1n$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertOrReplace_6c9i1n$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertOrReplace_6c9i1n$_0.prototype.constructor = Coroutine$insertOrReplace_6c9i1n$_0; Coroutine$insertOrReplace_6c9i1n$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$person.personUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(9, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$person.personUid = _newPk; this.state_0 = 3; continue; case 3: this.local$person.personLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertOrReplace_6c9i1n$(this.local$person, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.insertOrReplace_6c9i1n$ = function (person_0, continuation_0, suspended) { var instance = new Coroutine$insertOrReplace_6c9i1n$_0(this, person_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_ReplicateWrapper.prototype.findByUsernameCount_61zpoe$ = function (username, continuation) { return this._dao_0.findByUsernameCount_61zpoe$(username, continuation); }; PersonDao_ReplicateWrapper.prototype.isValidToken_4wgjuj$ = function (token, personUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.insertAccessToken_sz9w29$ = function (token) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.findUidAndPasswordHashAsync_61zpoe$ = function (username, continuation) { return this._dao_0.findUidAndPasswordHashAsync_61zpoe$(username, continuation); }; PersonDao_ReplicateWrapper.prototype.findByUsernameAndPasswordHash2_puj7f4$ = function (username, passwordHash, continuation) { return this._dao_0.findByUsernameAndPasswordHash2_puj7f4$(username, passwordHash, continuation); }; PersonDao_ReplicateWrapper.prototype.insertPersonAuth_k01yar$ = function (personAuth) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.personHasPermissionAsync_b9bd0d$ = function (accountPersonUid, personUid, permission, continuation) { return this._dao_0.personHasPermissionAsync_b9bd0d$(accountPersonUid, personUid, permission, continuation); }; PersonDao_ReplicateWrapper.prototype.personIsAdmin_s8cxhz$ = function (accountPersonUid, continuation) { return this._dao_0.personIsAdmin_s8cxhz$(accountPersonUid, continuation); }; PersonDao_ReplicateWrapper.prototype.findByUsername_pdl1vj$ = function (username) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.findSystemAccount_s8cxhz$ = function (nodeId, continuation) { return this._dao_0.findSystemAccount_s8cxhz$(nodeId, continuation); }; PersonDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.findPersonAccountByUid_s8cxhz$ = function (uid, continuation) { return this._dao_0.findPersonAccountByUid_s8cxhz$(uid, continuation); }; PersonDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; PersonDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; PersonDao_ReplicateWrapper.prototype.updateAsync_6c9i1n$ = function (entity, continuation) { entity.personLct = systemTimeInMillis(); return this._dao_0.updateAsync_6c9i1n$(entity, continuation); }; function Coroutine$insertPersonGroup_j5378c$_0($this, personGroup_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroup = personGroup_0; } Coroutine$insertPersonGroup_j5378c$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertPersonGroup_j5378c$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertPersonGroup_j5378c$_0.prototype.constructor = Coroutine$insertPersonGroup_j5378c$_0; Coroutine$insertPersonGroup_j5378c$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$personGroup.groupUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(43, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$personGroup.groupUid = _newPk; this.state_0 = 3; continue; case 3: this.local$personGroup.groupLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertPersonGroup_j5378c$(this.local$personGroup, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$personGroup.groupUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.insertPersonGroup_j5378c$ = function (personGroup_0, continuation_0, suspended) { var instance = new Coroutine$insertPersonGroup_j5378c$_0(this, personGroup_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertPersonGroupMember_gftcgu$_0($this, personGroupMember_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroupMember = personGroupMember_0; } Coroutine$insertPersonGroupMember_gftcgu$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertPersonGroupMember_gftcgu$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertPersonGroupMember_gftcgu$_0.prototype.constructor = Coroutine$insertPersonGroupMember_gftcgu$_0; Coroutine$insertPersonGroupMember_gftcgu$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$personGroupMember.groupMemberUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(44, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$personGroupMember.groupMemberUid = _newPk; this.state_0 = 3; continue; case 3: this.local$personGroupMember.groupMemberLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertPersonGroupMember_gftcgu$(this.local$personGroupMember, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$personGroupMember.groupMemberUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.insertPersonGroupMember_gftcgu$ = function (personGroupMember_0, continuation_0, suspended) { var instance = new Coroutine$insertPersonGroupMember_gftcgu$_0(this, personGroupMember_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_ReplicateWrapper.prototype.findPersonsWithPermission_gs5uuz$$default = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) { return this._dao_0.findPersonsWithPermission_gs5uuz$(timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText); }; PersonDao_ReplicateWrapper.prototype.findPersonsWithPermissionAsList_gs5uuz$$default = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.findByUidWithDisplayDetailsLive_3pjtqy$ = function (personUid, activeUserPersonUid) { return this._dao_0.findByUidWithDisplayDetailsLive_3pjtqy$(personUid, activeUserPersonUid); }; PersonDao_ReplicateWrapper.prototype.insertAuditLog_6gshjl$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.getAllPerson = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_130($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_130.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_130.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_130.prototype.constructor = Coroutine$insertAsync_130; Coroutine$insertAsync_130.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.personUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(9, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.personUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.personLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.personUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_130(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonDao_ReplicateWrapper', interfaces: [PersonDao]}; function PersonDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { PersonDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_121($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_121.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_121.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_121.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_121; Coroutine$replicateOnNewNode_s8cxhz$_121.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_121(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_124($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_124.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_124.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_124.prototype.constructor = Coroutine$replicateOnChange_124; Coroutine$replicateOnChange_124.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_124(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_e0gxv4$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_e0gxv4$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_e0gxv4$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_e0gxv4$_1.prototype.constructor = Coroutine$insertListAsync_e0gxv4$_1; Coroutine$insertListAsync_e0gxv4$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_e0gxv4$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.insertListAsync_e0gxv4$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_e0gxv4$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertOrReplace_6c9i1n$_1($this, person_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$person = person_0; } Coroutine$insertOrReplace_6c9i1n$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertOrReplace_6c9i1n$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertOrReplace_6c9i1n$_1.prototype.constructor = Coroutine$insertOrReplace_6c9i1n$_1; Coroutine$insertOrReplace_6c9i1n$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertOrReplace_6c9i1n$(this.local$person, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.insertOrReplace_6c9i1n$ = function (person_0, continuation_0, suspended) { var instance = new Coroutine$insertOrReplace_6c9i1n$_1(this, person_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUsernameCount_61zpoe$($this, username_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$username = username_0; } Coroutine$findByUsernameCount_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUsernameCount_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUsernameCount_61zpoe$.prototype.constructor = Coroutine$findByUsernameCount_61zpoe$; Coroutine$findByUsernameCount_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUsernameCount_61zpoe$(this.local$username, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.findByUsernameCount_61zpoe$ = function (username_0, continuation_0, suspended) { var instance = new Coroutine$findByUsernameCount_61zpoe$(this, username_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.isValidToken_4wgjuj$ = function (token, personUid) { var _result = this._dao.isValidToken_4wgjuj$(token, personUid); return _result; }; PersonDao_Repo.prototype.insertAccessToken_sz9w29$ = function (token) { this._dao.insertAccessToken_sz9w29$(token); }; function Coroutine$findUidAndPasswordHashAsync_61zpoe$($this, username_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$username = username_0; } Coroutine$findUidAndPasswordHashAsync_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findUidAndPasswordHashAsync_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findUidAndPasswordHashAsync_61zpoe$.prototype.constructor = Coroutine$findUidAndPasswordHashAsync_61zpoe$; Coroutine$findUidAndPasswordHashAsync_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findUidAndPasswordHashAsync_61zpoe$(this.local$username, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.findUidAndPasswordHashAsync_61zpoe$ = function (username_0, continuation_0, suspended) { var instance = new Coroutine$findUidAndPasswordHashAsync_61zpoe$(this, username_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUsernameAndPasswordHash2_puj7f4$($this, username_0, passwordHash_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$username = username_0; this.local$passwordHash = passwordHash_0; } Coroutine$findByUsernameAndPasswordHash2_puj7f4$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUsernameAndPasswordHash2_puj7f4$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUsernameAndPasswordHash2_puj7f4$.prototype.constructor = Coroutine$findByUsernameAndPasswordHash2_puj7f4$; Coroutine$findByUsernameAndPasswordHash2_puj7f4$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUsernameAndPasswordHash2_puj7f4$(this.local$username, this.local$passwordHash, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.findByUsernameAndPasswordHash2_puj7f4$ = function (username_0, passwordHash_0, continuation_0, suspended) { var instance = new Coroutine$findByUsernameAndPasswordHash2_puj7f4$(this, username_0, passwordHash_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.insertPersonAuth_k01yar$ = function (personAuth) { this._dao.insertPersonAuth_k01yar$(personAuth); }; function Coroutine$personHasPermissionAsync_b9bd0d$($this, accountPersonUid_0, personUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$personUid = personUid_0; this.local$permission = permission_0; } Coroutine$personHasPermissionAsync_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personHasPermissionAsync_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personHasPermissionAsync_b9bd0d$.prototype.constructor = Coroutine$personHasPermissionAsync_b9bd0d$; Coroutine$personHasPermissionAsync_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.personHasPermissionAsync_b9bd0d$(this.local$accountPersonUid, this.local$personUid, this.local$permission, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.personHasPermissionAsync_b9bd0d$ = function (accountPersonUid_0, personUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$personHasPermissionAsync_b9bd0d$(this, accountPersonUid_0, personUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$personIsAdmin_s8cxhz$($this, accountPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; } Coroutine$personIsAdmin_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personIsAdmin_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personIsAdmin_s8cxhz$.prototype.constructor = Coroutine$personIsAdmin_s8cxhz$; Coroutine$personIsAdmin_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.personIsAdmin_s8cxhz$(this.local$accountPersonUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.personIsAdmin_s8cxhz$ = function (accountPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$personIsAdmin_s8cxhz$(this, accountPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.findByUsername_pdl1vj$ = function (username) { var _result = this._dao.findByUsername_pdl1vj$(username); return _result; }; function Coroutine$findSystemAccount_s8cxhz$($this, nodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$nodeId = nodeId_0; } Coroutine$findSystemAccount_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSystemAccount_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSystemAccount_s8cxhz$.prototype.constructor = Coroutine$findSystemAccount_s8cxhz$; Coroutine$findSystemAccount_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findSystemAccount_s8cxhz$(this.local$nodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.findSystemAccount_s8cxhz$ = function (nodeId_0, continuation_0, suspended) { var instance = new Coroutine$findSystemAccount_s8cxhz$(this, nodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.findByUid_s8cxhz$ = function (uid) { var _result = this._dao.findByUid_s8cxhz$(uid); return _result; }; function Coroutine$findPersonAccountByUid_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findPersonAccountByUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findPersonAccountByUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findPersonAccountByUid_s8cxhz$.prototype.constructor = Coroutine$findPersonAccountByUid_s8cxhz$; Coroutine$findPersonAccountByUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findPersonAccountByUid_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.findPersonAccountByUid_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findPersonAccountByUid_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_12($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_12.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_12; Coroutine$findByUidAsync_s8cxhz$_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_12(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_6c9i1n$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_6c9i1n$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_6c9i1n$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_6c9i1n$_0.prototype.constructor = Coroutine$updateAsync_6c9i1n$_0; Coroutine$updateAsync_6c9i1n$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_6c9i1n$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.updateAsync_6c9i1n$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_6c9i1n$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertPersonGroup_j5378c$_1($this, personGroup_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroup = personGroup_0; } Coroutine$insertPersonGroup_j5378c$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertPersonGroup_j5378c$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertPersonGroup_j5378c$_1.prototype.constructor = Coroutine$insertPersonGroup_j5378c$_1; Coroutine$insertPersonGroup_j5378c$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertPersonGroup_j5378c$(this.local$personGroup, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.insertPersonGroup_j5378c$ = function (personGroup_0, continuation_0, suspended) { var instance = new Coroutine$insertPersonGroup_j5378c$_1(this, personGroup_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertPersonGroupMember_gftcgu$_1($this, personGroupMember_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personGroupMember = personGroupMember_0; } Coroutine$insertPersonGroupMember_gftcgu$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertPersonGroupMember_gftcgu$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertPersonGroupMember_gftcgu$_1.prototype.constructor = Coroutine$insertPersonGroupMember_gftcgu$_1; Coroutine$insertPersonGroupMember_gftcgu$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertPersonGroupMember_gftcgu$(this.local$personGroupMember, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.insertPersonGroupMember_gftcgu$ = function (personGroupMember_0, continuation_0, suspended) { var instance = new Coroutine$insertPersonGroupMember_gftcgu$_1(this, personGroupMember_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.findPersonsWithPermission_gs5uuz$$default = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) { var _result = this._dao.findPersonsWithPermission_gs5uuz$(timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText); return _result; }; PersonDao_Repo.prototype.findPersonsWithPermissionAsList_gs5uuz$$default = function (timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText) { var _result = this._dao.findPersonsWithPermissionAsList_gs5uuz$(timestamp, excludeClazz, excludeSchool, excludeSelected, accountPersonUid, sortOrder, searchText); return _result; }; PersonDao_Repo.prototype.findByUidWithDisplayDetailsLive_3pjtqy$ = function (personUid, activeUserPersonUid) { var _result = this._dao.findByUidWithDisplayDetailsLive_3pjtqy$(personUid, activeUserPersonUid); return _result; }; PersonDao_Repo.prototype.insertAuditLog_6gshjl$ = function (entity) { var _result = this._dao.insertAuditLog_6gshjl$(entity); return _result; }; PersonDao_Repo.prototype.getAllPerson = function () { var _result = this._dao.getAllPerson(); return _result; }; PersonDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_131($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_131.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_131.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_131.prototype.constructor = Coroutine$insertAsync_131; Coroutine$insertAsync_131.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_131(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; PersonDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; PersonDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; PersonDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonDao_Repo', interfaces: [PersonDao]}; function PersonGroupDao() { } PersonGroupDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupDao', interfaces: [BaseDao]}; function PersonGroupDao_JdbcKt(_db) { PersonGroupDao.call(this); this._db = _db; this._insertAdapterPersonGroup_ = new PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral(this._db); } PersonGroupDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterPersonGroup_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_132($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_132.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_132.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_132.prototype.constructor = Coroutine$insertAsync_132; Coroutine$insertAsync_132.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonGroup_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_132(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterPersonGroup_.insertList_4ezy5m$(entityList); }; function Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda; Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entity.groupMasterCsn); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entity.groupLocalCsn); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$entity.groupLastChangedBy); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.groupLct); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$entity.groupName); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$entity.groupActive); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$entity.personGroupFlag); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.groupUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_j5378c$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_j5378c$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_j5378c$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_j5378c$.prototype.constructor = Coroutine$updateAsync_j5378c$; Coroutine$updateAsync_j5378c$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE PersonGroup SET groupMasterCsn = ?, groupLocalCsn = ?, groupLastChangedBy = ?, groupLct = ?, groupName = ?, groupActive = ?, personGroupFlag = ? WHERE groupUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, PersonGroupDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.updateAsync_j5378c$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_j5378c$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonGroupDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.groupMasterCsn); _stmt.setLong_6svq3l$(2, _entity.groupLocalCsn); _stmt.setInt_vux9f0$(3, _entity.groupLastChangedBy); _stmt.setLong_6svq3l$(4, _entity.groupLct); _stmt.setString_vqvrqt$(5, _entity.groupName); _stmt.setBoolean_fzusl$(6, _entity.groupActive); _stmt.setInt_vux9f0$(7, _entity.personGroupFlag); _stmt.setLong_6svq3l$(8, _entity.groupUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } PersonGroupDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE PersonGroup SET groupMasterCsn = ?, groupLocalCsn = ?, groupLastChangedBy = ?, groupLct = ?, groupName = ?, groupActive = ?, personGroupFlag = ? WHERE groupUid = ?'; prepareAndUseStatement(this._db, _sql, PersonGroupDao_JdbcKt$updateList$lambda(entityList)); }; function PersonGroupDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.groupMasterCsn); _stmt.setLong_6svq3l$(2, closure$entity.groupLocalCsn); _stmt.setInt_vux9f0$(3, closure$entity.groupLastChangedBy); _stmt.setLong_6svq3l$(4, closure$entity.groupLct); _stmt.setString_vqvrqt$(5, closure$entity.groupName); _stmt.setBoolean_fzusl$(6, closure$entity.groupActive); _stmt.setInt_vux9f0$(7, closure$entity.personGroupFlag); _stmt.setLong_6svq3l$(8, closure$entity.groupUid); return _stmt.executeUpdate(); }; } PersonGroupDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE PersonGroup SET groupMasterCsn = ?, groupLocalCsn = ?, groupLastChangedBy = ?, groupLct = ?, groupName = ?, groupActive = ?, personGroupFlag = ? WHERE groupUid = ?'; prepareAndUseStatement(this._db, _sql, PersonGroupDao_JdbcKt$update$lambda(entity)); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_122($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_122.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_122.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_122.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_122; Coroutine$replicateOnNewNode_s8cxhz$_122.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | ? AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonGroupMember PersonsWithPerm_GroupMember\n | ON PersonsWithPerm_GroupMember.groupMemberPersonUid = Person.personUid\n | JOIN PersonGroup\n | ON PersonGroup.groupUid = PersonsWithPerm_GroupMember.groupMemberGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND \n | PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | \n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | ? AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonGroupMember PersonsWithPerm_GroupMember\n | ON PersonsWithPerm_GroupMember.groupMemberPersonUid = Person.personUid\n | JOIN PersonGroup\n | ON PersonGroup.groupUid = PersonsWithPerm_GroupMember.groupMemberGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND \n | PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | \n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')), PersonGroupDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_122(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_125($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_125.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_125.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_125.prototype.constructor = Coroutine$replicateOnChange_125; Coroutine$replicateOnChange_125.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid\n | JOIN PersonGroupMember\n | ON PersonGroupMember.groupMemberGroupUid = PersonGroup.groupUid\n | JOIN Person\n | ON PersonGroupMember.groupMemberPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE \n | UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | \n | AND \n | PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | \n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid\n | JOIN PersonGroupMember\n | ON PersonGroupMember.groupMemberGroupUid = PersonGroup.groupUid\n | JOIN Person\n | ON PersonGroupMember.groupMemberPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE \n | UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | \n | AND \n | PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | \n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')), PersonGroupDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_125(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeClazzBased($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased.prototype.constructor = Coroutine$replicateOnChangeClazzBased; Coroutine$replicateOnChangeClazzBased.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT PersonGroup.groupUid AS pgUid,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid \n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroup.groupUid = ScopedGrantEntity.sgGroupUid\n | JOIN Clazz \n | ON ScopedGrantEntity.sgTableId = 6\n | AND ScopedGrantEntity.sgEntityUid = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT PersonGroup.groupUid AS pgUid,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid \n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroup.groupUid = ScopedGrantEntity.sgGroupUid\n | JOIN Clazz \n | ON ScopedGrantEntity.sgTableId = 6\n | AND ScopedGrantEntity.sgEntityUid = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')), PersonGroupDao_JdbcKt$replicateOnChangeClazzBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Clazz.clazzUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 6\n | JOIN PersonGroup\n | ON ScopedGrantEntity.sgGroupUid = PersonGroup.groupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Clazz.clazzUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 6\n | JOIN PersonGroup\n | ON ScopedGrantEntity.sgGroupUid = PersonGroup.groupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')), PersonGroupDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangePersonBased($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePersonBased.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePersonBased.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePersonBased.prototype.constructor = Coroutine$replicateOnChangePersonBased; Coroutine$replicateOnChangePersonBased.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT PersonGroup.groupUid AS pgUid,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid \n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroup.groupUid = ScopedGrantEntity.sgGroupUid\n | JOIN Person \n | ON ScopedGrantEntity.sgTableId = 9\n | AND ScopedGrantEntity.sgEntityUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT PersonGroup.groupUid AS pgUid,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid \n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroup.groupUid = ScopedGrantEntity.sgGroupUid\n | JOIN Person \n | ON ScopedGrantEntity.sgTableId = 9\n | AND ScopedGrantEntity.sgEntityUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')), PersonGroupDao_JdbcKt$replicateOnChangePersonBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnChangePersonBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePersonBased(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodePersonBased_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePersonBased_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePersonBased_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePersonBased_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNodePersonBased_s8cxhz$; Coroutine$replicateOnNewNodePersonBased_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Person.personUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 9\n | JOIN PersonGroup\n | ON ScopedGrantEntity.sgGroupUid = PersonGroup.groupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Person.personUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 9\n | JOIN PersonGroup\n | ON ScopedGrantEntity.sgGroupUid = PersonGroup.groupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')), PersonGroupDao_JdbcKt$replicateOnNewNodePersonBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnNewNodePersonBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePersonBased_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeSchoolBased($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased.prototype.constructor = Coroutine$replicateOnChangeSchoolBased; Coroutine$replicateOnChangeSchoolBased.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT PersonGroup.groupUid AS pgUid,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid \n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroup.groupUid = ScopedGrantEntity.sgGroupUid\n | JOIN School \n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT PersonGroup.groupUid AS pgUid,\n | UserSession.usClientNodeId AS pgDestination\n | FROM ChangeLog\n | JOIN PersonGroup\n | ON ChangeLog.chTableId = 43\n | AND ChangeLog.chEntityPk = PersonGroup.groupUid \n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroup.groupUid = ScopedGrantEntity.sgGroupUid\n | JOIN School \n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')), PersonGroupDao_JdbcKt$replicateOnChangeSchoolBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda; Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON School.schoolUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 9\n | JOIN PersonGroup\n | ON ScopedGrantEntity.sgGroupUid = PersonGroup.groupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupReplicate(pgPk, pgDestination)\n | SELECT DISTINCT \n | PersonGroup.groupUid AS pgUid\n | ,\n | UserSession.usClientNodeId AS pgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON School.schoolUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 9\n | JOIN PersonGroup\n | ON ScopedGrantEntity.sgGroupUid = PersonGroup.groupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroup.groupLct != COALESCE(\n | (SELECT pgVersionId\n | FROM PersonGroupReplicate\n | WHERE pgPk = PersonGroup.groupUid\n | AND pgDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(pgPk, pgDestination) DO UPDATE\n | SET pgPending = true\n | \n | \n |')), PersonGroupDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_JdbcKt.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonGroupDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_groupUid = closure$_result.getLong_61zpoe$('groupUid'); var _tmp_groupMasterCsn = closure$_result.getLong_61zpoe$('groupMasterCsn'); var _tmp_groupLocalCsn = closure$_result.getLong_61zpoe$('groupLocalCsn'); var _tmp_groupLastChangedBy = closure$_result.getInt_61zpoe$('groupLastChangedBy'); var _tmp_groupLct = closure$_result.getLong_61zpoe$('groupLct'); var _tmp_groupName = closure$_result.getString_61zpoe$('groupName'); var _tmp_groupActive = closure$_result.getBoolean_61zpoe$('groupActive'); var _tmp_personGroupFlag = closure$_result.getInt_61zpoe$('personGroupFlag'); var $receiver = new PersonGroup(); $receiver.groupUid = _tmp_groupUid; $receiver.groupMasterCsn = _tmp_groupMasterCsn; $receiver.groupLocalCsn = _tmp_groupLocalCsn; $receiver.groupLastChangedBy = _tmp_groupLastChangedBy; $receiver.groupLct = _tmp_groupLct; $receiver.groupName = _tmp_groupName; $receiver.groupActive = _tmp_groupActive; $receiver.personGroupFlag = _tmp_personGroupFlag; return $receiver; }; } function PersonGroupDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, PersonGroupDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function PersonGroupDao_JdbcKt$findByUid$lambda(closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); return useResults(_stmt.executeQuery(), PersonGroupDao_JdbcKt$findByUid$lambda$lambda); }; } PersonGroupDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM PersonGroup WHERE groupUid = ?'), PersonGroupDao_JdbcKt$findByUid$lambda(uid)); }; function PersonGroupDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_groupUid = closure$_result.getLong_61zpoe$('groupUid'); var _tmp_groupMasterCsn = closure$_result.getLong_61zpoe$('groupMasterCsn'); var _tmp_groupLocalCsn = closure$_result.getLong_61zpoe$('groupLocalCsn'); var _tmp_groupLastChangedBy = closure$_result.getInt_61zpoe$('groupLastChangedBy'); var _tmp_groupLct = closure$_result.getLong_61zpoe$('groupLct'); var _tmp_groupName = closure$_result.getString_61zpoe$('groupName'); var _tmp_groupActive = closure$_result.getBoolean_61zpoe$('groupActive'); var _tmp_personGroupFlag = closure$_result.getInt_61zpoe$('personGroupFlag'); var $receiver = new PersonGroup(); $receiver.groupUid = _tmp_groupUid; $receiver.groupMasterCsn = _tmp_groupMasterCsn; $receiver.groupLocalCsn = _tmp_groupLocalCsn; $receiver.groupLastChangedBy = _tmp_groupLastChangedBy; $receiver.groupLct = _tmp_groupLct; $receiver.groupName = _tmp_groupName; $receiver.groupActive = _tmp_groupActive; $receiver.personGroupFlag = _tmp_personGroupFlag; return $receiver; }; } function PersonGroupDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, PersonGroupDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda; Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonGroupDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonGroupDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM PersonGroup WHERE groupUid = ?'), PersonGroupDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_groupUid = closure$_result.getLong_61zpoe$('groupUid'); var _tmp_groupMasterCsn = closure$_result.getLong_61zpoe$('groupMasterCsn'); var _tmp_groupLocalCsn = closure$_result.getLong_61zpoe$('groupLocalCsn'); var _tmp_groupLastChangedBy = closure$_result.getInt_61zpoe$('groupLastChangedBy'); var _tmp_groupLct = closure$_result.getLong_61zpoe$('groupLct'); var _tmp_groupName = closure$_result.getString_61zpoe$('groupName'); var _tmp_groupActive = closure$_result.getBoolean_61zpoe$('groupActive'); var _tmp_personGroupFlag = closure$_result.getInt_61zpoe$('personGroupFlag'); var $receiver = new PersonGroup(); $receiver.groupUid = _tmp_groupUid; $receiver.groupMasterCsn = _tmp_groupMasterCsn; $receiver.groupLocalCsn = _tmp_groupLocalCsn; $receiver.groupLastChangedBy = _tmp_groupLastChangedBy; $receiver.groupLct = _tmp_groupLct; $receiver.groupName = _tmp_groupName; $receiver.groupActive = _tmp_groupActive; $receiver.personGroupFlag = _tmp_personGroupFlag; return $receiver; }; } function PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda(this$PersonGroupDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$PersonGroupDao_JdbcKt = this$PersonGroupDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; } Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda; Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$PersonGroupDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM PersonGroup WHERE groupUid = ?'), PersonGroupDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$findByUidLive$lambda(this$PersonGroupDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$findByUidLive$lambda(this$PersonGroupDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonGroupDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { return new LiveDataImpl(this._db, listOf_0('PersonGroup'), PersonGroupDao_JdbcKt$findByUidLive$lambda(this, uid)); }; function PersonGroupDao_JdbcKt$findNameByGroupUid$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getString_za3lpa$(1); }; } function PersonGroupDao_JdbcKt$findNameByGroupUid$lambda$lambda(_result) { return mapNextRow(_result, null, PersonGroupDao_JdbcKt$findNameByGroupUid$lambda$lambda$lambda(_result)); } function Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda(closure$groupUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$groupUid = closure$groupUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda.prototype.constructor = Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda; Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$groupUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonGroupDao_JdbcKt$findNameByGroupUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupDao_JdbcKt$findNameByGroupUid$lambda(closure$groupUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupDao_JdbcKt$findNameByGroupUid$lambda(closure$groupUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonGroupDao_JdbcKt.prototype.findNameByGroupUid_s8cxhz$ = function (groupUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | Select CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM PersonGroup\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE PersonGroup.groupUid = ?\n | LIMIT 1\n | \n ')), PersonGroupDao_JdbcKt$findNameByGroupUid$lambda(groupUid), continuation); }; function PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO PersonGroup (groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.groupUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.groupUid); } stmt.setLong_6svq3l$(2, entity.groupMasterCsn); stmt.setLong_6svq3l$(3, entity.groupLocalCsn); stmt.setInt_vux9f0$(4, entity.groupLastChangedBy); stmt.setLong_6svq3l$(5, entity.groupLct); stmt.setString_vqvrqt$(6, entity.groupName); stmt.setBoolean_fzusl$(7, entity.groupActive); stmt.setInt_vux9f0$(8, entity.personGroupFlag); }; PersonGroupDao_JdbcKt$_insertAdapterPersonGroup_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonGroupDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupDao_JdbcKt', interfaces: [PersonGroupDao]}; function PersonGroupDao_ReplicateWrapper(_db, _dao) { PersonGroupDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_123($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_123.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_123.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_123.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_123; Coroutine$replicateOnNewNode_s8cxhz$_123.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_123(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_126($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_126.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_126.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_126.prototype.constructor = Coroutine$replicateOnChange_126; Coroutine$replicateOnChange_126.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_126(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeClazzBased_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_0.prototype.constructor = Coroutine$replicateOnChangeClazzBased_0; Coroutine$replicateOnChangeClazzBased_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeClazzBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangePersonBased_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePersonBased_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePersonBased_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePersonBased_0.prototype.constructor = Coroutine$replicateOnChangePersonBased_0; Coroutine$replicateOnChangePersonBased_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangePersonBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnChangePersonBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePersonBased_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodePersonBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnNewNodePersonBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePersonBased_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeSchoolBased_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_0.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_0; Coroutine$replicateOnChangeSchoolBased_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; PersonGroupDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; PersonGroupDao_ReplicateWrapper.prototype.updateAsync_j5378c$ = function (entity, continuation) { entity.groupLct = systemTimeInMillis(); return this._dao_0.updateAsync_j5378c$(entity, continuation); }; PersonGroupDao_ReplicateWrapper.prototype.findNameByGroupUid_s8cxhz$ = function (groupUid, continuation) { return this._dao_0.findNameByGroupUid_s8cxhz$(groupUid, continuation); }; PersonGroupDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_133($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_133.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_133.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_133.prototype.constructor = Coroutine$insertAsync_133; Coroutine$insertAsync_133.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.groupUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(43, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.groupUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.groupLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.groupUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_133(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupDao_ReplicateWrapper', interfaces: [PersonGroupDao]}; function PersonGroupDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { PersonGroupDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_124($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_124.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_124.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_124.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_124; Coroutine$replicateOnNewNode_s8cxhz$_124.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_124(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_127($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_127.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_127.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_127.prototype.constructor = Coroutine$replicateOnChange_127; Coroutine$replicateOnChange_127.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_127(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeClazzBased_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_1.prototype.constructor = Coroutine$replicateOnChangeClazzBased_1; Coroutine$replicateOnChangeClazzBased_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeClazzBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangePersonBased_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePersonBased_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePersonBased_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePersonBased_1.prototype.constructor = Coroutine$replicateOnChangePersonBased_1; Coroutine$replicateOnChangePersonBased_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangePersonBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnChangePersonBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePersonBased_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodePersonBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnNewNodePersonBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePersonBased_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeSchoolBased_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_1.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_1; Coroutine$replicateOnChangeSchoolBased_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_Repo.prototype.findByUid_s8cxhz$ = function (uid) { var _result = this._dao.findByUid_s8cxhz$(uid); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_13($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_13.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_13; Coroutine$findByUidAsync_s8cxhz$_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_13(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; function Coroutine$updateAsync_j5378c$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_j5378c$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_j5378c$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_j5378c$_0.prototype.constructor = Coroutine$updateAsync_j5378c$_0; Coroutine$updateAsync_j5378c$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_j5378c$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.updateAsync_j5378c$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_j5378c$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findNameByGroupUid_s8cxhz$($this, groupUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$groupUid = groupUid_0; } Coroutine$findNameByGroupUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findNameByGroupUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findNameByGroupUid_s8cxhz$.prototype.constructor = Coroutine$findNameByGroupUid_s8cxhz$; Coroutine$findNameByGroupUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findNameByGroupUid_s8cxhz$(this.local$groupUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.findNameByGroupUid_s8cxhz$ = function (groupUid_0, continuation_0, suspended) { var instance = new Coroutine$findNameByGroupUid_s8cxhz$(this, groupUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_134($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_134.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_134.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_134.prototype.constructor = Coroutine$insertAsync_134; Coroutine$insertAsync_134.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_134(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; PersonGroupDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; PersonGroupDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; PersonGroupDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupDao_Repo', interfaces: [PersonGroupDao]}; function PersonGroupMemberDao() { } PersonGroupMemberDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupMemberDao', interfaces: [BaseDao]}; function PersonGroupMemberDao_JdbcKt(_db) { PersonGroupMemberDao.call(this); this._db = _db; this._insertAdapterPersonGroupMember_ = new PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral(this._db); } PersonGroupMemberDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterPersonGroupMember_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_135($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_135.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_135.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_135.prototype.constructor = Coroutine$insertAsync_135; Coroutine$insertAsync_135.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonGroupMember_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_135(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupMemberDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterPersonGroupMember_.insertList_4ezy5m$(entityList); }; function PersonGroupMemberDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setBoolean_fzusl$(1, _entity.groupMemberActive); _stmt.setLong_6svq3l$(2, _entity.groupMemberPersonUid); _stmt.setLong_6svq3l$(3, _entity.groupMemberGroupUid); _stmt.setLong_6svq3l$(4, _entity.groupMemberMasterCsn); _stmt.setLong_6svq3l$(5, _entity.groupMemberLocalCsn); _stmt.setInt_vux9f0$(6, _entity.groupMemberLastChangedBy); _stmt.setLong_6svq3l$(7, _entity.groupMemberLct); _stmt.setLong_6svq3l$(8, _entity.groupMemberUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } PersonGroupMemberDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE PersonGroupMember SET groupMemberActive = ?, groupMemberPersonUid = ?, groupMemberGroupUid = ?, groupMemberMasterCsn = ?, groupMemberLocalCsn = ?, groupMemberLastChangedBy = ?, groupMemberLct = ? WHERE groupMemberUid = ?'; prepareAndUseStatement(this._db, _sql, PersonGroupMemberDao_JdbcKt$updateList$lambda(entityList)); }; function PersonGroupMemberDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$entity.groupMemberActive); _stmt.setLong_6svq3l$(2, closure$entity.groupMemberPersonUid); _stmt.setLong_6svq3l$(3, closure$entity.groupMemberGroupUid); _stmt.setLong_6svq3l$(4, closure$entity.groupMemberMasterCsn); _stmt.setLong_6svq3l$(5, closure$entity.groupMemberLocalCsn); _stmt.setInt_vux9f0$(6, closure$entity.groupMemberLastChangedBy); _stmt.setLong_6svq3l$(7, closure$entity.groupMemberLct); _stmt.setLong_6svq3l$(8, closure$entity.groupMemberUid); return _stmt.executeUpdate(); }; } PersonGroupMemberDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE PersonGroupMember SET groupMemberActive = ?, groupMemberPersonUid = ?, groupMemberGroupUid = ?, groupMemberMasterCsn = ?, groupMemberLocalCsn = ?, groupMemberLastChangedBy = ?, groupMemberLct = ? WHERE groupMemberUid = ?'; prepareAndUseStatement(this._db, _sql, PersonGroupMemberDao_JdbcKt$update$lambda(entity)); }; function Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_125($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_125.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_125.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_125.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_125; Coroutine$replicateOnNewNode_s8cxhz$_125.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | ? AS pgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonGroupMember PersonsWithPerm_GroupMember\n | ON PersonsWithPerm_GroupMember.groupMemberPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = ?), 0) \n | /*psql ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | ? AS pgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonGroupMember PersonsWithPerm_GroupMember\n | ON PersonsWithPerm_GroupMember.groupMemberPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = ?), 0) \n | ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | \n | \n |')), PersonGroupMemberDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_125(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_128($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_128.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_128.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_128.prototype.constructor = Coroutine$replicateOnChange_128; Coroutine$replicateOnChange_128.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | UserSession.usClientNodeId AS pgmDestination\n | FROM ChangeLog\n | JOIN PersonGroupMember\n | ON ChangeLog.chTableId = 44\n | AND ChangeLog.chEntityPk = PersonGroupMember.groupMemberUid\n | JOIN Person\n | ON PersonGroupMember.groupMemberPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | UserSession.usClientNodeId AS pgmDestination\n | FROM ChangeLog\n | JOIN PersonGroupMember\n | ON ChangeLog.chTableId = 44\n | AND ChangeLog.chEntityPk = PersonGroupMember.groupMemberUid\n | JOIN Person\n | ON PersonGroupMember.groupMemberPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | \n | \n |')), PersonGroupMemberDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_128(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeClazzBased_2($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_2.prototype.constructor = Coroutine$replicateOnChangeClazzBased_2; Coroutine$replicateOnChangeClazzBased_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | UserSession.usClientNodeId AS pgmDestination\n | FROM ChangeLog\n | JOIN PersonGroupMember\n | ON ChangeLog.chTableId = 44\n | AND ChangeLog.chEntityPk = PersonGroupMember.groupMemberUid\n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroupMember.groupMemberUid = ScopedGrantEntity.sgGroupUid\n | JOIN Clazz \n | ON ScopedGrantEntity.sgTableId = 6\n | AND ScopedGrantEntity.sgEntityUid = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | UserSession.usClientNodeId AS pgmDestination\n | FROM ChangeLog\n | JOIN PersonGroupMember\n | ON ChangeLog.chTableId = 44\n | AND ChangeLog.chEntityPk = PersonGroupMember.groupMemberUid\n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroupMember.groupMemberUid = ScopedGrantEntity.sgGroupUid\n | JOIN Clazz \n | ON ScopedGrantEntity.sgTableId = 6\n | AND ScopedGrantEntity.sgEntityUid = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | \n | \n |')), PersonGroupMemberDao_JdbcKt$replicateOnChangeClazzBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_2(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | ? AS pgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Clazz.clazzUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 6\n | JOIN PersonGroupMember PersonGroupMemberEntity\n | ON PersonGroupMemberEntity.groupMemberGroupUid = ScopedGrantEntity.sgGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = ?), 0) \n | /*psql ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | ? AS pgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Clazz.clazzUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 6\n | JOIN PersonGroupMember PersonGroupMemberEntity\n | ON PersonGroupMemberEntity.groupMemberGroupUid = ScopedGrantEntity.sgGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = ?), 0) \n | ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | \n | \n |')), PersonGroupMemberDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_2(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeSchoolBased_2($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_2.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_2; Coroutine$replicateOnChangeSchoolBased_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | UserSession.usClientNodeId AS pgmDestination\n | FROM ChangeLog\n | JOIN PersonGroupMember\n | ON ChangeLog.chTableId = 44\n | AND ChangeLog.chEntityPk = PersonGroupMember.groupMemberUid\n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroupMember.groupMemberUid = ScopedGrantEntity.sgGroupUid\n | JOIN School \n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | UserSession.usClientNodeId AS pgmDestination\n | FROM ChangeLog\n | JOIN PersonGroupMember\n | ON ChangeLog.chTableId = 44\n | AND ChangeLog.chEntityPk = PersonGroupMember.groupMemberUid\n | JOIN ScopedGrant ScopedGrantEntity\n | ON PersonGroupMember.groupMemberUid = ScopedGrantEntity.sgGroupUid\n | JOIN School \n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | \n | \n |')), PersonGroupMemberDao_JdbcKt$replicateOnChangeSchoolBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_2(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | ? AS pgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON School.schoolUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 164\n | JOIN PersonGroupMember PersonGroupMemberEntity\n | ON PersonGroupMemberEntity.groupMemberGroupUid = ScopedGrantEntity.sgGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = ?), 0) \n | /*psql ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonGroupMemberReplicate(pgmPk, pgmDestination)\n | SELECT DISTINCT PersonGroupMember.groupMemberUid AS pgmUid,\n | ? AS pgmDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON School.schoolUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 164\n | JOIN PersonGroupMember PersonGroupMemberEntity\n | ON PersonGroupMemberEntity.groupMemberGroupUid = ScopedGrantEntity.sgGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND PersonGroupMember.groupMemberLct != COALESCE(\n | (SELECT pgmVersionId\n | FROM PersonGroupMemberReplicate\n | WHERE pgmPk = PersonGroupMember.groupMemberUid\n | AND pgmDestination = ?), 0) \n | ON CONFLICT(pgmPk, pgmDestination) DO UPDATE\n | SET pgmPending = true\n | \n | \n |')), PersonGroupMemberDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_2(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_groupMemberUid = closure$_result.getLong_61zpoe$('groupMemberUid'); var _tmp_groupMemberActive = closure$_result.getBoolean_61zpoe$('groupMemberActive'); var _tmp_groupMemberPersonUid = closure$_result.getLong_61zpoe$('groupMemberPersonUid'); var _tmp_groupMemberGroupUid = closure$_result.getLong_61zpoe$('groupMemberGroupUid'); var _tmp_groupMemberMasterCsn = closure$_result.getLong_61zpoe$('groupMemberMasterCsn'); var _tmp_groupMemberLocalCsn = closure$_result.getLong_61zpoe$('groupMemberLocalCsn'); var _tmp_groupMemberLastChangedBy = closure$_result.getInt_61zpoe$('groupMemberLastChangedBy'); var _tmp_groupMemberLct = closure$_result.getLong_61zpoe$('groupMemberLct'); var $receiver = new PersonGroupMember(); $receiver.groupMemberUid = _tmp_groupMemberUid; $receiver.groupMemberActive = _tmp_groupMemberActive; $receiver.groupMemberPersonUid = _tmp_groupMemberPersonUid; $receiver.groupMemberGroupUid = _tmp_groupMemberGroupUid; $receiver.groupMemberMasterCsn = _tmp_groupMemberMasterCsn; $receiver.groupMemberLocalCsn = _tmp_groupMemberLocalCsn; $receiver.groupMemberLastChangedBy = _tmp_groupMemberLastChangedBy; $receiver.groupMemberLct = _tmp_groupMemberLct; return $receiver; }; } function PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda$lambda(_result) { return mapRows(_result, PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda$lambda$lambda(_result)); } function Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda(closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda(closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda(closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonGroupMemberDao_JdbcKt.prototype.findAllGroupWherePersonIsIn_s8cxhz$ = function (personUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM PersonGroupMember WHERE groupMemberPersonUid = ? AND PersonGroupMember.groupMemberActive'), PersonGroupMemberDao_JdbcKt$findAllGroupWherePersonIsIn$lambda(personUid), continuation); }; function PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_groupMemberUid = closure$_result.getLong_61zpoe$('groupMemberUid'); var _tmp_groupMemberActive = closure$_result.getBoolean_61zpoe$('groupMemberActive'); var _tmp_groupMemberPersonUid = closure$_result.getLong_61zpoe$('groupMemberPersonUid'); var _tmp_groupMemberGroupUid = closure$_result.getLong_61zpoe$('groupMemberGroupUid'); var _tmp_groupMemberMasterCsn = closure$_result.getLong_61zpoe$('groupMemberMasterCsn'); var _tmp_groupMemberLocalCsn = closure$_result.getLong_61zpoe$('groupMemberLocalCsn'); var _tmp_groupMemberLastChangedBy = closure$_result.getInt_61zpoe$('groupMemberLastChangedBy'); var _tmp_groupMemberLct = closure$_result.getLong_61zpoe$('groupMemberLct'); var $receiver = new PersonGroupMember(); $receiver.groupMemberUid = _tmp_groupMemberUid; $receiver.groupMemberActive = _tmp_groupMemberActive; $receiver.groupMemberPersonUid = _tmp_groupMemberPersonUid; $receiver.groupMemberGroupUid = _tmp_groupMemberGroupUid; $receiver.groupMemberMasterCsn = _tmp_groupMemberMasterCsn; $receiver.groupMemberLocalCsn = _tmp_groupMemberLocalCsn; $receiver.groupMemberLastChangedBy = _tmp_groupMemberLastChangedBy; $receiver.groupMemberLct = _tmp_groupMemberLct; return $receiver; }; } function PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda$lambda(_result) { return mapRows(_result, PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda$lambda$lambda(_result)); } function Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda(closure$groupUid_0, closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$groupUid = closure$groupUid_0; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$groupUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda(closure$groupUid_0, closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda(closure$groupUid_0, closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonGroupMemberDao_JdbcKt.prototype.checkPersonBelongsToGroup_3pjtqy$ = function (groupUid, personUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM PersonGroupMember WHERE groupMemberGroupUid = ? \n | AND groupMemberPersonUid = ? AND PersonGroupMember.groupMemberActive\n ')), PersonGroupMemberDao_JdbcKt$checkPersonBelongsToGroup$lambda(groupUid, personUid), continuation); }; function Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda(closure$newGroup_0, closure$changeTime_0, closure$personUid_0, closure$oldGroup_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newGroup = closure$newGroup_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$oldGroup = closure$oldGroup_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newGroup); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$oldGroup); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda(closure$newGroup_0, closure$changeTime_0, closure$personUid_0, closure$oldGroup_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda(closure$newGroup_0, closure$changeTime_0, closure$personUid_0, closure$oldGroup_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonGroupMemberDao_JdbcKt.prototype.moveGroupAsync_9xn71c$ = function (personUid, newGroup, oldGroup, changeTime, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE PersonGroupMember \n | SET groupMemberGroupUid = ?,\n | groupMemberLct = ?\n | WHERE groupMemberPersonUid = ? \n | AND groupMemberGroupUid = ? \n | AND PersonGroupMember.groupMemberActive\n ')), PersonGroupMemberDao_JdbcKt$moveGroupAsync$lambda(newGroup, changeTime, personUid, oldGroup), continuation); }; function Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda(closure$activeStatus_0, closure$updateTime_0, closure$personUid_0, closure$groupUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$activeStatus = closure$activeStatus_0; this.local$closure$updateTime = closure$updateTime_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$groupUid = closure$groupUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$activeStatus); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$updateTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$groupUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda(closure$activeStatus_0, closure$updateTime_0, closure$personUid_0, closure$groupUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda(closure$activeStatus_0, closure$updateTime_0, closure$personUid_0, closure$groupUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateGroupMemberActive_u4hhv2$($this, activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$activeStatus = activeStatus_0; this.local$personUid = personUid_0; this.local$groupUid = groupUid_0; this.local$updateTime = updateTime_0; } Coroutine$updateGroupMemberActive_u4hhv2$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateGroupMemberActive_u4hhv2$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateGroupMemberActive_u4hhv2$.prototype.constructor = Coroutine$updateGroupMemberActive_u4hhv2$; Coroutine$updateGroupMemberActive_u4hhv2$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE PersonGroupMember \n | SET groupMemberActive = ?,\n | groupMemberLct = ?\n | WHERE groupMemberPersonUid = ? \n | AND groupMemberGroupUid = ? \n | AND PersonGroupMember.groupMemberActive\n ')), PersonGroupMemberDao_JdbcKt$updateGroupMemberActive$lambda(this.local$activeStatus, this.local$updateTime, this.local$personUid, this.local$groupUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_JdbcKt.prototype.updateGroupMemberActive_u4hhv2$ = function (activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateGroupMemberActive_u4hhv2$(this, activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_groupMemberUid = closure$_result.getLong_61zpoe$('groupMemberUid'); var _tmp_groupMemberActive = closure$_result.getBoolean_61zpoe$('groupMemberActive'); var _tmp_groupMemberPersonUid = closure$_result.getLong_61zpoe$('groupMemberPersonUid'); var _tmp_groupMemberGroupUid = closure$_result.getLong_61zpoe$('groupMemberGroupUid'); var _tmp_groupMemberMasterCsn = closure$_result.getLong_61zpoe$('groupMemberMasterCsn'); var _tmp_groupMemberLocalCsn = closure$_result.getLong_61zpoe$('groupMemberLocalCsn'); var _tmp_groupMemberLastChangedBy = closure$_result.getInt_61zpoe$('groupMemberLastChangedBy'); var _tmp_groupMemberLct = closure$_result.getLong_61zpoe$('groupMemberLct'); var $receiver = new PersonGroupMember(); $receiver.groupMemberUid = _tmp_groupMemberUid; $receiver.groupMemberActive = _tmp_groupMemberActive; $receiver.groupMemberPersonUid = _tmp_groupMemberPersonUid; $receiver.groupMemberGroupUid = _tmp_groupMemberGroupUid; $receiver.groupMemberMasterCsn = _tmp_groupMemberMasterCsn; $receiver.groupMemberLocalCsn = _tmp_groupMemberLocalCsn; $receiver.groupMemberLastChangedBy = _tmp_groupMemberLastChangedBy; $receiver.groupMemberLct = _tmp_groupMemberLct; return $receiver; }; } function PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda$lambda(_result) { return mapNextRow(_result, null, PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda$lambda$lambda(_result)); } function Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda(closure$personUid_0, closure$groupUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$groupUid = closure$groupUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda.prototype.constructor = Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda; Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$groupUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda(closure$personUid_0, closure$groupUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda(closure$personUid_0, closure$groupUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonGroupMemberDao_JdbcKt.prototype.findByPersonUidAndGroupUid_3pjtqy$ = function (personUid, groupUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonGroupMember.*\n | FROM PersonGroupMember\n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberGroupUid = ?\n | \n ')), PersonGroupMemberDao_JdbcKt$findByPersonUidAndGroupUid$lambda(personUid, groupUid), continuation); }; function PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO PersonGroupMember (groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?)'; }; PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.groupMemberUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.groupMemberUid); } stmt.setBoolean_fzusl$(2, entity.groupMemberActive); stmt.setLong_6svq3l$(3, entity.groupMemberPersonUid); stmt.setLong_6svq3l$(4, entity.groupMemberGroupUid); stmt.setLong_6svq3l$(5, entity.groupMemberMasterCsn); stmt.setLong_6svq3l$(6, entity.groupMemberLocalCsn); stmt.setInt_vux9f0$(7, entity.groupMemberLastChangedBy); stmt.setLong_6svq3l$(8, entity.groupMemberLct); }; PersonGroupMemberDao_JdbcKt$_insertAdapterPersonGroupMember_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonGroupMemberDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupMemberDao_JdbcKt', interfaces: [PersonGroupMemberDao]}; function PersonGroupMemberDao_ReplicateWrapper(_db, _dao) { PersonGroupMemberDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_126($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_126.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_126.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_126.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_126; Coroutine$replicateOnNewNode_s8cxhz$_126.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_126(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_129($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_129.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_129.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_129.prototype.constructor = Coroutine$replicateOnChange_129; Coroutine$replicateOnChange_129.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_129(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeClazzBased_3($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_3.prototype.constructor = Coroutine$replicateOnChangeClazzBased_3; Coroutine$replicateOnChangeClazzBased_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_3(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeClazzBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_3(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeSchoolBased_3($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_3.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_3; Coroutine$replicateOnChangeSchoolBased_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_3(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_3(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupMemberDao_ReplicateWrapper.prototype.findAllGroupWherePersonIsIn_s8cxhz$ = function (personUid, continuation) { return this._dao_0.findAllGroupWherePersonIsIn_s8cxhz$(personUid, continuation); }; PersonGroupMemberDao_ReplicateWrapper.prototype.checkPersonBelongsToGroup_3pjtqy$ = function (groupUid, personUid, continuation) { return this._dao_0.checkPersonBelongsToGroup_3pjtqy$(groupUid, personUid, continuation); }; PersonGroupMemberDao_ReplicateWrapper.prototype.moveGroupAsync_9xn71c$ = function (personUid, newGroup, oldGroup, changeTime, continuation) { return this._dao_0.moveGroupAsync_9xn71c$(personUid, newGroup, oldGroup, changeTime, continuation); }; function Coroutine$updateGroupMemberActive_u4hhv2$_0($this, activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$activeStatus = activeStatus_0; this.local$personUid = personUid_0; this.local$groupUid = groupUid_0; this.local$updateTime = updateTime_0; } Coroutine$updateGroupMemberActive_u4hhv2$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateGroupMemberActive_u4hhv2$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateGroupMemberActive_u4hhv2$_0.prototype.constructor = Coroutine$updateGroupMemberActive_u4hhv2$_0; Coroutine$updateGroupMemberActive_u4hhv2$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateGroupMemberActive_u4hhv2$(this.local$activeStatus, this.local$personUid, this.local$groupUid, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.updateGroupMemberActive_u4hhv2$ = function (activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateGroupMemberActive_u4hhv2$_0(this, activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupMemberDao_ReplicateWrapper.prototype.findByPersonUidAndGroupUid_3pjtqy$ = function (personUid, groupUid, continuation) { return this._dao_0.findByPersonUidAndGroupUid_3pjtqy$(personUid, groupUid, continuation); }; PersonGroupMemberDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_136($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_136.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_136.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_136.prototype.constructor = Coroutine$insertAsync_136; Coroutine$insertAsync_136.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.groupMemberUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(44, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.groupMemberUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.groupMemberLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.groupMemberUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_136(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupMemberDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupMemberDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupMemberDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonGroupMemberDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupMemberDao_ReplicateWrapper', interfaces: [PersonGroupMemberDao]}; function PersonGroupMemberDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { PersonGroupMemberDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_127($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_127.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_127.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_127.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_127; Coroutine$replicateOnNewNode_s8cxhz$_127.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_127(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_130($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_130.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_130.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_130.prototype.constructor = Coroutine$replicateOnChange_130; Coroutine$replicateOnChange_130.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_130(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeClazzBased_4($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_4.prototype.constructor = Coroutine$replicateOnChangeClazzBased_4; Coroutine$replicateOnChangeClazzBased_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_4(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeClazzBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_4(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeSchoolBased_4($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_4.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_4; Coroutine$replicateOnChangeSchoolBased_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_4(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_4(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllGroupWherePersonIsIn_s8cxhz$($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; } Coroutine$findAllGroupWherePersonIsIn_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllGroupWherePersonIsIn_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllGroupWherePersonIsIn_s8cxhz$.prototype.constructor = Coroutine$findAllGroupWherePersonIsIn_s8cxhz$; Coroutine$findAllGroupWherePersonIsIn_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllGroupWherePersonIsIn_s8cxhz$(this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.findAllGroupWherePersonIsIn_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllGroupWherePersonIsIn_s8cxhz$(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$checkPersonBelongsToGroup_3pjtqy$($this, groupUid_0, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$groupUid = groupUid_0; this.local$personUid = personUid_0; } Coroutine$checkPersonBelongsToGroup_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$checkPersonBelongsToGroup_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$checkPersonBelongsToGroup_3pjtqy$.prototype.constructor = Coroutine$checkPersonBelongsToGroup_3pjtqy$; Coroutine$checkPersonBelongsToGroup_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.checkPersonBelongsToGroup_3pjtqy$(this.local$groupUid, this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.checkPersonBelongsToGroup_3pjtqy$ = function (groupUid_0, personUid_0, continuation_0, suspended) { var instance = new Coroutine$checkPersonBelongsToGroup_3pjtqy$(this, groupUid_0, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$moveGroupAsync_9xn71c$($this, personUid_0, newGroup_0, oldGroup_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$newGroup = newGroup_0; this.local$oldGroup = oldGroup_0; this.local$changeTime = changeTime_0; } Coroutine$moveGroupAsync_9xn71c$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$moveGroupAsync_9xn71c$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$moveGroupAsync_9xn71c$.prototype.constructor = Coroutine$moveGroupAsync_9xn71c$; Coroutine$moveGroupAsync_9xn71c$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.moveGroupAsync_9xn71c$(this.local$personUid, this.local$newGroup, this.local$oldGroup, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.moveGroupAsync_9xn71c$ = function (personUid_0, newGroup_0, oldGroup_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$moveGroupAsync_9xn71c$(this, personUid_0, newGroup_0, oldGroup_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateGroupMemberActive_u4hhv2$_1($this, activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$activeStatus = activeStatus_0; this.local$personUid = personUid_0; this.local$groupUid = groupUid_0; this.local$updateTime = updateTime_0; } Coroutine$updateGroupMemberActive_u4hhv2$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateGroupMemberActive_u4hhv2$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateGroupMemberActive_u4hhv2$_1.prototype.constructor = Coroutine$updateGroupMemberActive_u4hhv2$_1; Coroutine$updateGroupMemberActive_u4hhv2$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateGroupMemberActive_u4hhv2$(this.local$activeStatus, this.local$personUid, this.local$groupUid, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.updateGroupMemberActive_u4hhv2$ = function (activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$updateGroupMemberActive_u4hhv2$_1(this, activeStatus_0, personUid_0, groupUid_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByPersonUidAndGroupUid_3pjtqy$($this, personUid_0, groupUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$groupUid = groupUid_0; } Coroutine$findByPersonUidAndGroupUid_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUidAndGroupUid_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUidAndGroupUid_3pjtqy$.prototype.constructor = Coroutine$findByPersonUidAndGroupUid_3pjtqy$; Coroutine$findByPersonUidAndGroupUid_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByPersonUidAndGroupUid_3pjtqy$(this.local$personUid, this.local$groupUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.findByPersonUidAndGroupUid_3pjtqy$ = function (personUid_0, groupUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUidAndGroupUid_3pjtqy$(this, personUid_0, groupUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupMemberDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_137($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_137.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_137.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_137.prototype.constructor = Coroutine$insertAsync_137; Coroutine$insertAsync_137.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonGroupMemberDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_137(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonGroupMemberDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; PersonGroupMemberDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; PersonGroupMemberDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; PersonGroupMemberDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupMemberDao_Repo', interfaces: [PersonGroupMemberDao]}; function PersonParentJoinDao() { } PersonParentJoinDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonParentJoinDao', interfaces: []}; function PersonParentJoinDao_JdbcKt(_db) { PersonParentJoinDao.call(this); this._db = _db; this._insertAdapterPersonParentJoin_ = new PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral(this._db); } function Coroutine$insertAsync_ei4fsf$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_ei4fsf$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_ei4fsf$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_ei4fsf$.prototype.constructor = Coroutine$insertAsync_ei4fsf$; Coroutine$insertAsync_ei4fsf$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonParentJoin_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.insertAsync_ei4fsf$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_ei4fsf$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda(closure$personParentJoin_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personParentJoin = closure$personParentJoin_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda; Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personParentJoin.ppjPcsn); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personParentJoin.ppjLcsn); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$personParentJoin.ppjLcb); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personParentJoin.ppjLct); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$personParentJoin.ppjParentPersonUid); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$personParentJoin.ppjMinorPersonUid); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$personParentJoin.ppjRelationship); this.local$_stmt.setString_vqvrqt$(8, this.local$closure$personParentJoin.ppjEmail); this.local$_stmt.setString_vqvrqt$(9, this.local$closure$personParentJoin.ppjPhone); this.local$_stmt.setBoolean_fzusl$(10, this.local$closure$personParentJoin.ppjInactive); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$personParentJoin.ppjStatus); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$personParentJoin.ppjApprovalTiemstamp); this.local$_stmt.setString_vqvrqt$(13, this.local$closure$personParentJoin.ppjApprovalIpAddr); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$personParentJoin.ppjUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$updateAsync$lambda(closure$personParentJoin_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$updateAsync$lambda(closure$personParentJoin_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_ei4fsf$($this, personParentJoin_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personParentJoin = personParentJoin_0; } Coroutine$updateAsync_ei4fsf$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_ei4fsf$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_ei4fsf$.prototype.constructor = Coroutine$updateAsync_ei4fsf$; Coroutine$updateAsync_ei4fsf$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE PersonParentJoin SET ppjPcsn = ?, ppjLcsn = ?, ppjLcb = ?, ppjLct = ?, ppjParentPersonUid = ?, ppjMinorPersonUid = ?, ppjRelationship = ?, ppjEmail = ?, ppjPhone = ?, ppjInactive = ?, ppjStatus = ?, ppjApprovalTiemstamp = ?, ppjApprovalIpAddr = ? WHERE ppjUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, PersonParentJoinDao_JdbcKt$updateAsync$lambda(this.local$personParentJoin), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.updateAsync_ei4fsf$ = function (personParentJoin_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_ei4fsf$(this, personParentJoin_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_128($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_128.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_128.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_128.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_128; Coroutine$replicateOnNewNode_s8cxhz$_128.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonParentJoinReplicate(ppjPk, ppjDestination)\n | SELECT DISTINCT PersonParentJoin.ppjUid AS ppjPk,\n | ? AS ppjDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonParentJoin\n | ON PersonParentJoin.ppjParentPersonUid = Person.personUid \n | WHERE UserSession.usStatus = 1\n | AND PersonParentJoin.ppjLct != COALESCE(\n | (SELECT ppjVersionId\n | FROM PersonParentJoinReplicate\n | WHERE ppjPk = PersonParentJoin.ppjUid\n | AND ppjDestination = ?), 0) \n | /*psql ON CONFLICT(ppjPk, ppjDestination) DO UPDATE\n | SET ppjPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonParentJoinReplicate(ppjPk, ppjDestination)\n | SELECT DISTINCT PersonParentJoin.ppjUid AS ppjPk,\n | ? AS ppjDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonParentJoin\n | ON PersonParentJoin.ppjParentPersonUid = Person.personUid \n | WHERE UserSession.usStatus = 1\n | AND PersonParentJoin.ppjLct != COALESCE(\n | (SELECT ppjVersionId\n | FROM PersonParentJoinReplicate\n | WHERE ppjPk = PersonParentJoin.ppjUid\n | AND ppjDestination = ?), 0) \n | ON CONFLICT(ppjPk, ppjDestination) DO UPDATE\n | SET ppjPending = true\n | \n | \n |')), PersonParentJoinDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_128(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda; Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_131($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_131.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_131.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_131.prototype.constructor = Coroutine$replicateOnChange_131; Coroutine$replicateOnChange_131.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonParentJoinReplicate(ppjPk, ppjDestination)\n | SELECT DISTINCT PersonParentJoin.ppjUid AS ppjUid,\n | UserSession.usClientNodeId AS ppjDestination\n | FROM ChangeLog\n | JOIN PersonParentJoin\n | ON ChangeLog.chTableId = 512\n | AND ChangeLog.chEntityPk = PersonParentJoin.ppjUid\n | JOIN Person\n | ON PersonParentJoin.ppjParentPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1)\n | AND PersonParentJoin.ppjLct != COALESCE(\n | (SELECT ppjVersionId\n | FROM PersonParentJoinReplicate\n | WHERE ppjPk = PersonParentJoin.ppjUid\n | AND ppjDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ppjPk, ppjDestination) DO UPDATE\n | SET ppjPending = true\n | */\n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonParentJoinReplicate(ppjPk, ppjDestination)\n | SELECT DISTINCT PersonParentJoin.ppjUid AS ppjUid,\n | UserSession.usClientNodeId AS ppjDestination\n | FROM ChangeLog\n | JOIN PersonParentJoin\n | ON ChangeLog.chTableId = 512\n | AND ChangeLog.chEntityPk = PersonParentJoin.ppjUid\n | JOIN Person\n | ON PersonParentJoin.ppjParentPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1)\n | AND PersonParentJoin.ppjLct != COALESCE(\n | (SELECT ppjVersionId\n | FROM PersonParentJoinReplicate\n | WHERE ppjPk = PersonParentJoin.ppjUid\n | AND ppjDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ppjPk, ppjDestination) DO UPDATE\n | SET ppjPending = true\n | \n | \n |')), PersonParentJoinDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_131(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_ppjUid = closure$_result.getLong_61zpoe$('ppjUid'); var _tmp_ppjPcsn = closure$_result.getLong_61zpoe$('ppjPcsn'); var _tmp_ppjLcsn = closure$_result.getLong_61zpoe$('ppjLcsn'); var _tmp_ppjLcb = closure$_result.getInt_61zpoe$('ppjLcb'); var _tmp_ppjLct = closure$_result.getLong_61zpoe$('ppjLct'); var _tmp_ppjParentPersonUid = closure$_result.getLong_61zpoe$('ppjParentPersonUid'); var _tmp_ppjMinorPersonUid = closure$_result.getLong_61zpoe$('ppjMinorPersonUid'); var _tmp_ppjRelationship = closure$_result.getInt_61zpoe$('ppjRelationship'); var _tmp_ppjEmail = closure$_result.getString_61zpoe$('ppjEmail'); var _tmp_ppjPhone = closure$_result.getString_61zpoe$('ppjPhone'); var _tmp_ppjInactive = closure$_result.getBoolean_61zpoe$('ppjInactive'); var _tmp_ppjStatus = closure$_result.getInt_61zpoe$('ppjStatus'); var _tmp_ppjApprovalTiemstamp = closure$_result.getLong_61zpoe$('ppjApprovalTiemstamp'); var _tmp_ppjApprovalIpAddr = closure$_result.getString_61zpoe$('ppjApprovalIpAddr'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new PersonParentJoinWithMinorPerson(); $receiver.ppjUid = _tmp_ppjUid; $receiver.ppjPcsn = _tmp_ppjPcsn; $receiver.ppjLcsn = _tmp_ppjLcsn; $receiver.ppjLcb = _tmp_ppjLcb; $receiver.ppjLct = _tmp_ppjLct; $receiver.ppjParentPersonUid = _tmp_ppjParentPersonUid; $receiver.ppjMinorPersonUid = _tmp_ppjMinorPersonUid; $receiver.ppjRelationship = _tmp_ppjRelationship; $receiver.ppjEmail = _tmp_ppjEmail; $receiver.ppjPhone = _tmp_ppjPhone; $receiver.ppjInactive = _tmp_ppjInactive; $receiver.ppjStatus = _tmp_ppjStatus; $receiver.ppjApprovalTiemstamp = _tmp_ppjApprovalTiemstamp; $receiver.ppjApprovalIpAddr = _tmp_ppjApprovalIpAddr; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.minorPerson = $receiver_0; } return $receiver; }; } function PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda$lambda(_result) { return mapNextRow(_result, null, PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda$lambda$lambda(_result)); } function Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda; Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonParentJoinDao_JdbcKt.prototype.findByUidWithMinorAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonParentJoin.*, Person.*\n | FROM PersonParentJoin\n | LEFT JOIN Person ON Person.personUid = PersonParentJoin.ppjMinorPersonUid \n | WHERE PersonParentJoin.ppjUid = ?\n | \n ')), PersonParentJoinDao_JdbcKt$findByUidWithMinorAsync$lambda(uid), continuation); }; function PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_ppjUid = closure$_result.getLong_61zpoe$('ppjUid'); var _tmp_ppjPcsn = closure$_result.getLong_61zpoe$('ppjPcsn'); var _tmp_ppjLcsn = closure$_result.getLong_61zpoe$('ppjLcsn'); var _tmp_ppjLcb = closure$_result.getInt_61zpoe$('ppjLcb'); var _tmp_ppjLct = closure$_result.getLong_61zpoe$('ppjLct'); var _tmp_ppjParentPersonUid = closure$_result.getLong_61zpoe$('ppjParentPersonUid'); var _tmp_ppjMinorPersonUid = closure$_result.getLong_61zpoe$('ppjMinorPersonUid'); var _tmp_ppjRelationship = closure$_result.getInt_61zpoe$('ppjRelationship'); var _tmp_ppjEmail = closure$_result.getString_61zpoe$('ppjEmail'); var _tmp_ppjPhone = closure$_result.getString_61zpoe$('ppjPhone'); var _tmp_ppjInactive = closure$_result.getBoolean_61zpoe$('ppjInactive'); var _tmp_ppjStatus = closure$_result.getInt_61zpoe$('ppjStatus'); var _tmp_ppjApprovalTiemstamp = closure$_result.getLong_61zpoe$('ppjApprovalTiemstamp'); var _tmp_ppjApprovalIpAddr = closure$_result.getString_61zpoe$('ppjApprovalIpAddr'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new PersonParentJoinWithMinorPerson(); $receiver.ppjUid = _tmp_ppjUid; $receiver.ppjPcsn = _tmp_ppjPcsn; $receiver.ppjLcsn = _tmp_ppjLcsn; $receiver.ppjLcb = _tmp_ppjLcb; $receiver.ppjLct = _tmp_ppjLct; $receiver.ppjParentPersonUid = _tmp_ppjParentPersonUid; $receiver.ppjMinorPersonUid = _tmp_ppjMinorPersonUid; $receiver.ppjRelationship = _tmp_ppjRelationship; $receiver.ppjEmail = _tmp_ppjEmail; $receiver.ppjPhone = _tmp_ppjPhone; $receiver.ppjInactive = _tmp_ppjInactive; $receiver.ppjStatus = _tmp_ppjStatus; $receiver.ppjApprovalTiemstamp = _tmp_ppjApprovalTiemstamp; $receiver.ppjApprovalIpAddr = _tmp_ppjApprovalIpAddr; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.minorPerson = $receiver_0; } return $receiver; }; } function PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda$lambda(_result) { return mapNextRow(_result, null, PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda$lambda$lambda(_result)); } function Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda; Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonParentJoinDao_JdbcKt.prototype.findByUidWithMinorAsyncFromWeb_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonParentJoin.*, Person.*\n | FROM PersonParentJoin\n | LEFT JOIN Person ON Person.personUid = PersonParentJoin.ppjMinorPersonUid \n | WHERE PersonParentJoin.ppjUid = ?\n | \n ')), PersonParentJoinDao_JdbcKt$findByUidWithMinorAsyncFromWeb$lambda(uid), continuation); }; function PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_ppjUid = closure$_result.getLong_61zpoe$('ppjUid'); var _tmp_ppjPcsn = closure$_result.getLong_61zpoe$('ppjPcsn'); var _tmp_ppjLcsn = closure$_result.getLong_61zpoe$('ppjLcsn'); var _tmp_ppjLcb = closure$_result.getInt_61zpoe$('ppjLcb'); var _tmp_ppjLct = closure$_result.getLong_61zpoe$('ppjLct'); var _tmp_ppjParentPersonUid = closure$_result.getLong_61zpoe$('ppjParentPersonUid'); var _tmp_ppjMinorPersonUid = closure$_result.getLong_61zpoe$('ppjMinorPersonUid'); var _tmp_ppjRelationship = closure$_result.getInt_61zpoe$('ppjRelationship'); var _tmp_ppjEmail = closure$_result.getString_61zpoe$('ppjEmail'); var _tmp_ppjPhone = closure$_result.getString_61zpoe$('ppjPhone'); var _tmp_ppjInactive = closure$_result.getBoolean_61zpoe$('ppjInactive'); var _tmp_ppjStatus = closure$_result.getInt_61zpoe$('ppjStatus'); var _tmp_ppjApprovalTiemstamp = closure$_result.getLong_61zpoe$('ppjApprovalTiemstamp'); var _tmp_ppjApprovalIpAddr = closure$_result.getString_61zpoe$('ppjApprovalIpAddr'); var $receiver = new PersonParentJoin(); $receiver.ppjUid = _tmp_ppjUid; $receiver.ppjPcsn = _tmp_ppjPcsn; $receiver.ppjLcsn = _tmp_ppjLcsn; $receiver.ppjLcb = _tmp_ppjLcb; $receiver.ppjLct = _tmp_ppjLct; $receiver.ppjParentPersonUid = _tmp_ppjParentPersonUid; $receiver.ppjMinorPersonUid = _tmp_ppjMinorPersonUid; $receiver.ppjRelationship = _tmp_ppjRelationship; $receiver.ppjEmail = _tmp_ppjEmail; $receiver.ppjPhone = _tmp_ppjPhone; $receiver.ppjInactive = _tmp_ppjInactive; $receiver.ppjStatus = _tmp_ppjStatus; $receiver.ppjApprovalTiemstamp = _tmp_ppjApprovalTiemstamp; $receiver.ppjApprovalIpAddr = _tmp_ppjApprovalIpAddr; return $receiver; }; } function PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda$lambda(_result) { return mapRows(_result, PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda$lambda$lambda(_result)); } function Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda(closure$minorPersonUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$minorPersonUid = closure$minorPersonUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda; Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$minorPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda(closure$minorPersonUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda(closure$minorPersonUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonParentJoinDao_JdbcKt.prototype.findByMinorPersonUid_s8cxhz$ = function (minorPersonUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonParentJoin.*\n | FROM PersonParentJoin\n | WHERE ppjMinorPersonUid = ? \n | \n ')), PersonParentJoinDao_JdbcKt$findByMinorPersonUid$lambda(minorPersonUid), continuation); }; function PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_parentPersonUid = closure$_result.getLong_61zpoe$('parentPersonUid'); var _tmp_clazzUid = closure$_result.getLong_61zpoe$('clazzUid'); var $receiver = new ParentEnrolmentRequired(); $receiver.parentPersonUid = _tmp_parentPersonUid; $receiver.clazzUid = _tmp_clazzUid; return $receiver; }; } function PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda$lambda(_result) { return mapRows(_result, PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda$lambda$lambda(_result)); } function Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda(closure$minorPersonUid_0, closure$clazzUidFilter_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$minorPersonUid = closure$minorPersonUid_0; this.local$closure$clazzUidFilter = closure$clazzUidFilter_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda; Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$minorPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$clazzUidFilter); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$clazzUidFilter); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$minorPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda(closure$minorPersonUid_0, closure$clazzUidFilter_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda(closure$minorPersonUid_0, closure$clazzUidFilter_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonParentJoinDao_JdbcKt.prototype.findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$ = function (minorPersonUid, clazzUidFilter, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT PersonParentJoin.ppjParentPersonUid AS parentPersonUid,\n | ChildEnrolment.clazzEnrolmentClazzUid AS clazzUid\n | FROM PersonParentJoin\n | JOIN ClazzEnrolment ChildEnrolment \n | ON ChildEnrolment.clazzEnrolmentPersonUid = ?\n | AND (? = 0 OR ChildEnrolment.clazzEnrolmentClazzUid = ?)\n | WHERE PersonParentJoin.ppjMinorPersonUid = ?\n | AND PersonParentJoin.ppjParentPersonUid != 0\n | AND NOT EXISTS(\n | SELECT clazzEnrolmentUid \n | FROM ClazzEnrolment\n | WHERE ClazzEnrolment.clazzEnrolmentPersonUid = PersonParentJoin.ppjParentPersonUid\n | AND ClazzEnrolment.clazzEnrolmentClazzUid = ChildEnrolment.clazzEnrolmentClazzUid\n | AND ClazzEnrolment.clazzEnrolmentRole = 1003\n | AND CAST(ClazzEnrolment.clazzEnrolmentActive AS INTEGER) = 1)\n | \n ')), PersonParentJoinDao_JdbcKt$findByMinorPersonUidWhereParentNotEnrolledInClazz$lambda(minorPersonUid, clazzUidFilter), continuation); }; function PersonParentJoinDao_JdbcKt$isParentOf$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function PersonParentJoinDao_JdbcKt$isParentOf$lambda$lambda(_result) { return mapNextRow(_result, false, PersonParentJoinDao_JdbcKt$isParentOf$lambda$lambda$lambda(_result)); } function Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda(closure$minorPersonUid_0, closure$userPersonUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$minorPersonUid = closure$minorPersonUid_0; this.local$closure$userPersonUid = closure$userPersonUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda; Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$minorPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$userPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonParentJoinDao_JdbcKt$isParentOf$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$isParentOf$lambda(closure$minorPersonUid_0, closure$userPersonUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$isParentOf$lambda(closure$minorPersonUid_0, closure$userPersonUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonParentJoinDao_JdbcKt.prototype.isParentOf_3pjtqy$ = function (userPersonUid, minorPersonUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT EXISTS(\n | SELECT ppjUid\n | FROM PersonParentJoin\n | WHERE ppjMinorPersonUid = ?\n | AND ppjParentPersonUid = ?\n | AND CAST(ppjInactive AS INTEGER) = 0)\n | \n ')), PersonParentJoinDao_JdbcKt$isParentOf$lambda(minorPersonUid, userPersonUid), continuation); }; function PersonParentJoinDao_JdbcKt$isMinorApproved$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function PersonParentJoinDao_JdbcKt$isMinorApproved$lambda$lambda(_result) { return mapNextRow(_result, false, PersonParentJoinDao_JdbcKt$isMinorApproved$lambda$lambda$lambda(_result)); } function Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda(closure$minorPersonUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$minorPersonUid = closure$minorPersonUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda.prototype.constructor = Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda; Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$minorPersonUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonParentJoinDao_JdbcKt$isMinorApproved$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonParentJoinDao_JdbcKt$isMinorApproved$lambda(closure$minorPersonUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonParentJoinDao_JdbcKt$isMinorApproved$lambda(closure$minorPersonUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonParentJoinDao_JdbcKt.prototype.isMinorApproved_s8cxhz$ = function (minorPersonUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT EXISTS(\n | SELECT ppjUid\n | FROM PersonParentJoin\n | WHERE ppjMinorPersonUid = ?\n | AND CAST(ppjInactive AS INTEGER) = 0\n | AND ppjStatus = 1)\n | \n ')), PersonParentJoinDao_JdbcKt$isMinorApproved$lambda(minorPersonUid), continuation); }; function PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO PersonParentJoin (ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.ppjUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.ppjUid); } stmt.setLong_6svq3l$(2, entity.ppjPcsn); stmt.setLong_6svq3l$(3, entity.ppjLcsn); stmt.setInt_vux9f0$(4, entity.ppjLcb); stmt.setLong_6svq3l$(5, entity.ppjLct); stmt.setLong_6svq3l$(6, entity.ppjParentPersonUid); stmt.setLong_6svq3l$(7, entity.ppjMinorPersonUid); stmt.setInt_vux9f0$(8, entity.ppjRelationship); stmt.setString_vqvrqt$(9, entity.ppjEmail); stmt.setString_vqvrqt$(10, entity.ppjPhone); stmt.setBoolean_fzusl$(11, entity.ppjInactive); stmt.setInt_vux9f0$(12, entity.ppjStatus); stmt.setLong_6svq3l$(13, entity.ppjApprovalTiemstamp); stmt.setString_vqvrqt$(14, entity.ppjApprovalIpAddr); }; PersonParentJoinDao_JdbcKt$_insertAdapterPersonParentJoin_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonParentJoinDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonParentJoinDao_JdbcKt', interfaces: [PersonParentJoinDao]}; function PersonParentJoinDao_ReplicateWrapper(_db, _dao) { PersonParentJoinDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_129($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_129.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_129.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_129.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_129; Coroutine$replicateOnNewNode_s8cxhz$_129.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_129(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_132($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_132.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_132.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_132.prototype.constructor = Coroutine$replicateOnChange_132; Coroutine$replicateOnChange_132.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_132(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_ei4fsf$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_ei4fsf$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_ei4fsf$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_ei4fsf$_0.prototype.constructor = Coroutine$insertAsync_ei4fsf$_0; Coroutine$insertAsync_ei4fsf$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.ppjUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(512, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.ppjUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.ppjLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync_ei4fsf$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.ppjUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_ReplicateWrapper.prototype.insertAsync_ei4fsf$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_ei4fsf$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonParentJoinDao_ReplicateWrapper.prototype.findByUidWithMinorAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidWithMinorAsync_s8cxhz$(uid, continuation); }; PersonParentJoinDao_ReplicateWrapper.prototype.findByUidWithMinorAsyncFromWeb_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidWithMinorAsyncFromWeb_s8cxhz$(uid, continuation); }; PersonParentJoinDao_ReplicateWrapper.prototype.findByMinorPersonUid_s8cxhz$ = function (minorPersonUid, continuation) { return this._dao_0.findByMinorPersonUid_s8cxhz$(minorPersonUid, continuation); }; PersonParentJoinDao_ReplicateWrapper.prototype.findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$ = function (minorPersonUid, clazzUidFilter, continuation) { return this._dao_0.findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$(minorPersonUid, clazzUidFilter, continuation); }; PersonParentJoinDao_ReplicateWrapper.prototype.isParentOf_3pjtqy$ = function (userPersonUid, minorPersonUid, continuation) { return this._dao_0.isParentOf_3pjtqy$(userPersonUid, minorPersonUid, continuation); }; function Coroutine$updateAsync_ei4fsf$_0($this, personParentJoin_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personParentJoin = personParentJoin_0; } Coroutine$updateAsync_ei4fsf$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_ei4fsf$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_ei4fsf$_0.prototype.constructor = Coroutine$updateAsync_ei4fsf$_0; Coroutine$updateAsync_ei4fsf$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$personParentJoin.ppjLct = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.$this._dao_0.updateAsync_ei4fsf$(this.local$personParentJoin, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_ReplicateWrapper.prototype.updateAsync_ei4fsf$ = function (personParentJoin_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_ei4fsf$_0(this, personParentJoin_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonParentJoinDao_ReplicateWrapper.prototype.isMinorApproved_s8cxhz$ = function (minorPersonUid, continuation) { return this._dao_0.isMinorApproved_s8cxhz$(minorPersonUid, continuation); }; PersonParentJoinDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonParentJoinDao_ReplicateWrapper', interfaces: [PersonParentJoinDao]}; function PersonParentJoinDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { PersonParentJoinDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_130($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_130.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_130.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_130.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_130; Coroutine$replicateOnNewNode_s8cxhz$_130.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_130(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_133($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_133.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_133.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_133.prototype.constructor = Coroutine$replicateOnChange_133; Coroutine$replicateOnChange_133.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_133(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_ei4fsf$_1($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_ei4fsf$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_ei4fsf$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_ei4fsf$_1.prototype.constructor = Coroutine$insertAsync_ei4fsf$_1; Coroutine$insertAsync_ei4fsf$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync_ei4fsf$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.insertAsync_ei4fsf$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_ei4fsf$_1(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidWithMinorAsync_s8cxhz$($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidWithMinorAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithMinorAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithMinorAsync_s8cxhz$.prototype.constructor = Coroutine$findByUidWithMinorAsync_s8cxhz$; Coroutine$findByUidWithMinorAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidWithMinorAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.findByUidWithMinorAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithMinorAsync_s8cxhz$(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonParentJoinDao_Repo.prototype.findByUidWithMinorAsyncFromWeb_s8cxhz$ = function (uid, continuation) { throw IllegalStateException_init('Synchronous HTTP is not supported on Door/Javascript!'); }; function Coroutine$findByMinorPersonUid_s8cxhz$($this, minorPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$minorPersonUid = minorPersonUid_0; } Coroutine$findByMinorPersonUid_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByMinorPersonUid_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByMinorPersonUid_s8cxhz$.prototype.constructor = Coroutine$findByMinorPersonUid_s8cxhz$; Coroutine$findByMinorPersonUid_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByMinorPersonUid_s8cxhz$(this.local$minorPersonUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.findByMinorPersonUid_s8cxhz$ = function (minorPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$findByMinorPersonUid_s8cxhz$(this, minorPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$($this, minorPersonUid_0, clazzUidFilter_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$minorPersonUid = minorPersonUid_0; this.local$clazzUidFilter = clazzUidFilter_0; } Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$.prototype.constructor = Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$; Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$(this.local$minorPersonUid, this.local$clazzUidFilter, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$ = function (minorPersonUid_0, clazzUidFilter_0, continuation_0, suspended) { var instance = new Coroutine$findByMinorPersonUidWhereParentNotEnrolledInClazz_3pjtqy$(this, minorPersonUid_0, clazzUidFilter_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$isParentOf_3pjtqy$($this, userPersonUid_0, minorPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$userPersonUid = userPersonUid_0; this.local$minorPersonUid = minorPersonUid_0; } Coroutine$isParentOf_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$isParentOf_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$isParentOf_3pjtqy$.prototype.constructor = Coroutine$isParentOf_3pjtqy$; Coroutine$isParentOf_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.isParentOf_3pjtqy$(this.local$userPersonUid, this.local$minorPersonUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.isParentOf_3pjtqy$ = function (userPersonUid_0, minorPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$isParentOf_3pjtqy$(this, userPersonUid_0, minorPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_ei4fsf$_1($this, personParentJoin_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personParentJoin = personParentJoin_0; } Coroutine$updateAsync_ei4fsf$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_ei4fsf$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_ei4fsf$_1.prototype.constructor = Coroutine$updateAsync_ei4fsf$_1; Coroutine$updateAsync_ei4fsf$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_ei4fsf$(this.local$personParentJoin, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.updateAsync_ei4fsf$ = function (personParentJoin_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_ei4fsf$_1(this, personParentJoin_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$isMinorApproved_s8cxhz$($this, minorPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$minorPersonUid = minorPersonUid_0; } Coroutine$isMinorApproved_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$isMinorApproved_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$isMinorApproved_s8cxhz$.prototype.constructor = Coroutine$isMinorApproved_s8cxhz$; Coroutine$isMinorApproved_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.isMinorApproved_s8cxhz$(this.local$minorPersonUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonParentJoinDao_Repo.prototype.isMinorApproved_s8cxhz$ = function (minorPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$isMinorApproved_s8cxhz$(this, minorPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonParentJoinDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonParentJoinDao_Repo', interfaces: [PersonParentJoinDao]}; function PersonPictureDao() { } PersonPictureDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonPictureDao', interfaces: [BaseDao]}; function PersonPictureDao_JdbcKt(_db) { PersonPictureDao.call(this); this._db = _db; this._insertAdapterPersonPicture_ = new PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral(this._db); } PersonPictureDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterPersonPicture_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_138($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_138.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_138.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_138.prototype.constructor = Coroutine$insertAsync_138; Coroutine$insertAsync_138.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterPersonPicture_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_138(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterPersonPicture_.insertList_4ezy5m$(entityList); }; function Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda(closure$personPicture_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personPicture = closure$personPicture_0; this.local$_stmt = _stmt_0; } Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda; Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personPicture.personPicturePersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personPicture.personPictureMasterCsn); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personPicture.personPictureLocalCsn); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$personPicture.personPictureLastChangedBy); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$personPicture.personPictureLct); this.local$_stmt.setString_vqvrqt$(6, this.local$closure$personPicture.personPictureUri); this.local$_stmt.setString_vqvrqt$(7, this.local$closure$personPicture.personPictureMd5); this.local$_stmt.setInt_vux9f0$(8, this.local$closure$personPicture.fileSize); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$personPicture.picTimestamp); this.local$_stmt.setString_vqvrqt$(10, this.local$closure$personPicture.mimeType); this.local$_stmt.setBoolean_fzusl$(11, this.local$closure$personPicture.personPictureActive); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$personPicture.personPictureUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonPictureDao_JdbcKt$updateAsync$lambda(closure$personPicture_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonPictureDao_JdbcKt$updateAsync$lambda(closure$personPicture_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_c8xyxp$($this, personPicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personPicture = personPicture_0; } Coroutine$updateAsync_c8xyxp$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_c8xyxp$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_c8xyxp$.prototype.constructor = Coroutine$updateAsync_c8xyxp$; Coroutine$updateAsync_c8xyxp$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE PersonPicture SET personPicturePersonUid = ?, personPictureMasterCsn = ?, personPictureLocalCsn = ?, personPictureLastChangedBy = ?, personPictureLct = ?, personPictureUri = ?, personPictureMd5 = ?, fileSize = ?, picTimestamp = ?, mimeType = ?, personPictureActive = ? WHERE personPictureUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, PersonPictureDao_JdbcKt$updateAsync$lambda(this.local$personPicture), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_JdbcKt.prototype.updateAsync_c8xyxp$ = function (personPicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_c8xyxp$(this, personPicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonPictureDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.personPicturePersonUid); _stmt.setLong_6svq3l$(2, _entity.personPictureMasterCsn); _stmt.setLong_6svq3l$(3, _entity.personPictureLocalCsn); _stmt.setInt_vux9f0$(4, _entity.personPictureLastChangedBy); _stmt.setLong_6svq3l$(5, _entity.personPictureLct); _stmt.setString_vqvrqt$(6, _entity.personPictureUri); _stmt.setString_vqvrqt$(7, _entity.personPictureMd5); _stmt.setInt_vux9f0$(8, _entity.fileSize); _stmt.setLong_6svq3l$(9, _entity.picTimestamp); _stmt.setString_vqvrqt$(10, _entity.mimeType); _stmt.setBoolean_fzusl$(11, _entity.personPictureActive); _stmt.setLong_6svq3l$(12, _entity.personPictureUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } PersonPictureDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE PersonPicture SET personPicturePersonUid = ?, personPictureMasterCsn = ?, personPictureLocalCsn = ?, personPictureLastChangedBy = ?, personPictureLct = ?, personPictureUri = ?, personPictureMd5 = ?, fileSize = ?, picTimestamp = ?, mimeType = ?, personPictureActive = ? WHERE personPictureUid = ?'; prepareAndUseStatement(this._db, _sql, PersonPictureDao_JdbcKt$updateList$lambda(entityList)); }; function PersonPictureDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.personPicturePersonUid); _stmt.setLong_6svq3l$(2, closure$entity.personPictureMasterCsn); _stmt.setLong_6svq3l$(3, closure$entity.personPictureLocalCsn); _stmt.setInt_vux9f0$(4, closure$entity.personPictureLastChangedBy); _stmt.setLong_6svq3l$(5, closure$entity.personPictureLct); _stmt.setString_vqvrqt$(6, closure$entity.personPictureUri); _stmt.setString_vqvrqt$(7, closure$entity.personPictureMd5); _stmt.setInt_vux9f0$(8, closure$entity.fileSize); _stmt.setLong_6svq3l$(9, closure$entity.picTimestamp); _stmt.setString_vqvrqt$(10, closure$entity.mimeType); _stmt.setBoolean_fzusl$(11, closure$entity.personPictureActive); _stmt.setLong_6svq3l$(12, closure$entity.personPictureUid); return _stmt.executeUpdate(); }; } PersonPictureDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE PersonPicture SET personPicturePersonUid = ?, personPictureMasterCsn = ?, personPictureLocalCsn = ?, personPictureLastChangedBy = ?, personPictureLct = ?, personPictureUri = ?, personPictureMd5 = ?, fileSize = ?, picTimestamp = ?, mimeType = ?, personPictureActive = ? WHERE personPictureUid = ?'; prepareAndUseStatement(this._db, _sql, PersonPictureDao_JdbcKt$update$lambda(entity)); }; function Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonPictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonPictureDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_131($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_131.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_131.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_131.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_131; Coroutine$replicateOnNewNode_s8cxhz$_131.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonPictureReplicate(ppPk, ppDestination)\n | SELECT DISTINCT PersonPicture.personPictureUid AS ppPk,\n | ? AS ppDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 1048576\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonPicture\n | ON PersonPicture.personPicturePersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonPicture.personPictureLct != COALESCE(\n | (SELECT ppVersionId\n | FROM PersonPictureReplicate\n | WHERE ppPk = PersonPicture.personPictureUid\n | AND ppDestination = ?), 0) \n | /*psql ON CONFLICT(ppPk, ppDestination) DO UPDATE\n | SET ppPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonPictureReplicate(ppPk, ppDestination)\n | SELECT DISTINCT PersonPicture.personPictureUid AS ppPk,\n | ? AS ppDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 1048576\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonPicture\n | ON PersonPicture.personPicturePersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND PersonPicture.personPictureLct != COALESCE(\n | (SELECT ppVersionId\n | FROM PersonPictureReplicate\n | WHERE ppPk = PersonPicture.personPictureUid\n | AND ppDestination = ?), 0) \n | ON CONFLICT(ppPk, ppDestination) DO UPDATE\n | SET ppPending = true\n | \n | \n |')), PersonPictureDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_131(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda; Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonPictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonPictureDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_134($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_134.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_134.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_134.prototype.constructor = Coroutine$replicateOnChange_134; Coroutine$replicateOnChange_134.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO PersonPictureReplicate(ppPk, ppDestination)\n | SELECT DISTINCT PersonPicture.personPictureUid AS ppUid,\n | UserSession.usClientNodeId AS ppDestination\n | FROM ChangeLog\n | JOIN PersonPicture\n | ON ChangeLog.chTableId = 50\n | AND ChangeLog.chEntityPk = PersonPicture.personPictureUid\n | JOIN Person\n | ON Person.personUid = PersonPicture.personPicturePersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 1048576\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonPicture.personPictureLct != COALESCE(\n | (SELECT ppVersionId\n | FROM PersonPictureReplicate\n | WHERE ppPk = PersonPicture.personPictureUid\n | AND ppDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(ppPk, ppDestination) DO UPDATE\n | SET ppPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO PersonPictureReplicate(ppPk, ppDestination)\n | SELECT DISTINCT PersonPicture.personPictureUid AS ppUid,\n | UserSession.usClientNodeId AS ppDestination\n | FROM ChangeLog\n | JOIN PersonPicture\n | ON ChangeLog.chTableId = 50\n | AND ChangeLog.chEntityPk = PersonPicture.personPictureUid\n | JOIN Person\n | ON Person.personUid = PersonPicture.personPicturePersonUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 1048576\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND PersonPicture.personPictureLct != COALESCE(\n | (SELECT ppVersionId\n | FROM PersonPictureReplicate\n | WHERE ppPk = PersonPicture.personPictureUid\n | AND ppDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(ppPk, ppDestination) DO UPDATE\n | SET ppPending = true\n | \n | \n |')), PersonPictureDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_134(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personPictureUid = closure$_result.getLong_61zpoe$('personPictureUid'); var _tmp_personPicturePersonUid = closure$_result.getLong_61zpoe$('personPicturePersonUid'); var _tmp_personPictureMasterCsn = closure$_result.getLong_61zpoe$('personPictureMasterCsn'); var _tmp_personPictureLocalCsn = closure$_result.getLong_61zpoe$('personPictureLocalCsn'); var _tmp_personPictureLastChangedBy = closure$_result.getInt_61zpoe$('personPictureLastChangedBy'); var _tmp_personPictureLct = closure$_result.getLong_61zpoe$('personPictureLct'); var _tmp_personPictureUri = closure$_result.getString_61zpoe$('personPictureUri'); var _tmp_personPictureMd5 = closure$_result.getString_61zpoe$('personPictureMd5'); var _tmp_fileSize = closure$_result.getInt_61zpoe$('fileSize'); var _tmp_picTimestamp = closure$_result.getLong_61zpoe$('picTimestamp'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var _tmp_personPictureActive = closure$_result.getBoolean_61zpoe$('personPictureActive'); var $receiver = new PersonPicture(); $receiver.personPictureUid = _tmp_personPictureUid; $receiver.personPicturePersonUid = _tmp_personPicturePersonUid; $receiver.personPictureMasterCsn = _tmp_personPictureMasterCsn; $receiver.personPictureLocalCsn = _tmp_personPictureLocalCsn; $receiver.personPictureLastChangedBy = _tmp_personPictureLastChangedBy; $receiver.personPictureLct = _tmp_personPictureLct; $receiver.personPictureUri = _tmp_personPictureUri; $receiver.personPictureMd5 = _tmp_personPictureMd5; $receiver.fileSize = _tmp_fileSize; $receiver.picTimestamp = _tmp_picTimestamp; $receiver.mimeType = _tmp_mimeType; $receiver.personPictureActive = _tmp_personPictureActive; return $receiver; }; } function PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda(closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda.prototype.constructor = Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda; Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda(closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda(closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonPictureDao_JdbcKt.prototype.findByPersonUidAsync_s8cxhz$ = function (personUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM PersonPicture \n | WHERE personPicturePersonUid = ?\n | AND CAST(personPictureActive AS INTEGER) = 1\n | ORDER BY picTimestamp DESC LIMIT 1\n ')), PersonPictureDao_JdbcKt$findByPersonUidAsync$lambda(personUid), continuation); }; function PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personPictureUid = closure$_result.getLong_61zpoe$('personPictureUid'); var _tmp_personPicturePersonUid = closure$_result.getLong_61zpoe$('personPicturePersonUid'); var _tmp_personPictureMasterCsn = closure$_result.getLong_61zpoe$('personPictureMasterCsn'); var _tmp_personPictureLocalCsn = closure$_result.getLong_61zpoe$('personPictureLocalCsn'); var _tmp_personPictureLastChangedBy = closure$_result.getInt_61zpoe$('personPictureLastChangedBy'); var _tmp_personPictureLct = closure$_result.getLong_61zpoe$('personPictureLct'); var _tmp_personPictureUri = closure$_result.getString_61zpoe$('personPictureUri'); var _tmp_personPictureMd5 = closure$_result.getString_61zpoe$('personPictureMd5'); var _tmp_fileSize = closure$_result.getInt_61zpoe$('fileSize'); var _tmp_picTimestamp = closure$_result.getLong_61zpoe$('picTimestamp'); var _tmp_mimeType = closure$_result.getString_61zpoe$('mimeType'); var _tmp_personPictureActive = closure$_result.getBoolean_61zpoe$('personPictureActive'); var $receiver = new PersonPicture(); $receiver.personPictureUid = _tmp_personPictureUid; $receiver.personPicturePersonUid = _tmp_personPicturePersonUid; $receiver.personPictureMasterCsn = _tmp_personPictureMasterCsn; $receiver.personPictureLocalCsn = _tmp_personPictureLocalCsn; $receiver.personPictureLastChangedBy = _tmp_personPictureLastChangedBy; $receiver.personPictureLct = _tmp_personPictureLct; $receiver.personPictureUri = _tmp_personPictureUri; $receiver.personPictureMd5 = _tmp_personPictureMd5; $receiver.fileSize = _tmp_fileSize; $receiver.picTimestamp = _tmp_picTimestamp; $receiver.mimeType = _tmp_mimeType; $receiver.personPictureActive = _tmp_personPictureActive; return $receiver; }; } function PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda(closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda.prototype.constructor = Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda; Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda(closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda(closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda(this$PersonPictureDao_JdbcKt_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$PersonPictureDao_JdbcKt = this$PersonPictureDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; } Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda.prototype.constructor = Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda; Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$PersonPictureDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM PersonPicture where personPicturePersonUid = ? ORDER BY picTimestamp DESC LIMIT 1'), PersonPictureDao_JdbcKt$findByPersonUidLive$lambda$lambda(this.local$closure$personUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function PersonPictureDao_JdbcKt$findByPersonUidLive$lambda(this$PersonPictureDao_JdbcKt_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$PersonPictureDao_JdbcKt$findByPersonUidLive$lambda(this$PersonPictureDao_JdbcKt_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } PersonPictureDao_JdbcKt.prototype.findByPersonUidLive_s8cxhz$ = function (personUid) { return new LiveDataImpl(this._db, listOf_0('PersonPicture'), PersonPictureDao_JdbcKt$findByPersonUidLive$lambda(this, personUid)); }; function PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO PersonPicture (personPictureUid, personPicturePersonUid, personPictureMasterCsn, personPictureLocalCsn, personPictureLastChangedBy, personPictureLct, personPictureUri, personPictureMd5, fileSize, picTimestamp, mimeType, personPictureActive) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.personPictureUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.personPictureUid); } stmt.setLong_6svq3l$(2, entity.personPicturePersonUid); stmt.setLong_6svq3l$(3, entity.personPictureMasterCsn); stmt.setLong_6svq3l$(4, entity.personPictureLocalCsn); stmt.setInt_vux9f0$(5, entity.personPictureLastChangedBy); stmt.setLong_6svq3l$(6, entity.personPictureLct); stmt.setString_vqvrqt$(7, entity.personPictureUri); stmt.setString_vqvrqt$(8, entity.personPictureMd5); stmt.setInt_vux9f0$(9, entity.fileSize); stmt.setLong_6svq3l$(10, entity.picTimestamp); stmt.setString_vqvrqt$(11, entity.mimeType); stmt.setBoolean_fzusl$(12, entity.personPictureActive); }; PersonPictureDao_JdbcKt$_insertAdapterPersonPicture_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; PersonPictureDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonPictureDao_JdbcKt', interfaces: [PersonPictureDao]}; function PersonPictureDao_ReplicateWrapper(_db, _dao) { PersonPictureDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_132($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_132.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_132.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_132.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_132; Coroutine$replicateOnNewNode_s8cxhz$_132.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_132(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_135($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_135.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_135.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_135.prototype.constructor = Coroutine$replicateOnChange_135; Coroutine$replicateOnChange_135.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_135(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_ReplicateWrapper.prototype.findByPersonUidAsync_s8cxhz$ = function (personUid, continuation) { return this._dao_0.findByPersonUidAsync_s8cxhz$(personUid, continuation); }; PersonPictureDao_ReplicateWrapper.prototype.findByPersonUidLive_s8cxhz$ = function (personUid) { return this._dao_0.findByPersonUidLive_s8cxhz$(personUid); }; function Coroutine$updateAsync_c8xyxp$_0($this, personPicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personPicture = personPicture_0; } Coroutine$updateAsync_c8xyxp$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_c8xyxp$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_c8xyxp$_0.prototype.constructor = Coroutine$updateAsync_c8xyxp$_0; Coroutine$updateAsync_c8xyxp$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new PersonPicture_EwaAdapter(this.local$personPicture), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.local$personPicture.personPictureLct = systemTimeInMillis(); this.state_0 = 3; this.result_0 = this.$this._dao_0.updateAsync_c8xyxp$(this.local$personPicture, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_ReplicateWrapper.prototype.updateAsync_c8xyxp$ = function (personPicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_c8xyxp$_0(this, personPicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_139($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_139.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_139.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_139.prototype.constructor = Coroutine$insertAsync_139; Coroutine$insertAsync_139.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = storeAttachment(this.$this._db_0, new PersonPicture_EwaAdapter(this.local$entity), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.personPictureUid, L0)) { this.state_0 = 3; this.result_0 = _pkManager.nextIdAsync_za3lpa$(50, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$entity.personPictureUid = _newPk; this.state_0 = 4; continue; case 4: this.local$entity.personPictureLct = systemTimeInMillis(); this.state_0 = 5; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 5: return this.local$entity.personPictureUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_139(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonPictureDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonPictureDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; PersonPictureDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonPictureDao_ReplicateWrapper', interfaces: [PersonPictureDao]}; function PersonPictureDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { PersonPictureDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_133($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_133.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_133.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_133.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_133; Coroutine$replicateOnNewNode_s8cxhz$_133.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_133(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_136($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_136.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_136.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_136.prototype.constructor = Coroutine$replicateOnChange_136; Coroutine$replicateOnChange_136.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_136(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByPersonUidAsync_s8cxhz$($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; } Coroutine$findByPersonUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByPersonUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByPersonUidAsync_s8cxhz$.prototype.constructor = Coroutine$findByPersonUidAsync_s8cxhz$; Coroutine$findByPersonUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByPersonUidAsync_s8cxhz$(this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_Repo.prototype.findByPersonUidAsync_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findByPersonUidAsync_s8cxhz$(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_Repo.prototype.findByPersonUidLive_s8cxhz$ = function (personUid) { var _result = this._dao.findByPersonUidLive_s8cxhz$(personUid); return _result; }; function Coroutine$updateAsync_c8xyxp$_1($this, personPicture_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personPicture = personPicture_0; } Coroutine$updateAsync_c8xyxp$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_c8xyxp$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_c8xyxp$_1.prototype.constructor = Coroutine$updateAsync_c8xyxp$_1; Coroutine$updateAsync_c8xyxp$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_c8xyxp$(this.local$personPicture, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_Repo.prototype.updateAsync_c8xyxp$ = function (personPicture_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_c8xyxp$_1(this, personPicture_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_140($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_140.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_140.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_140.prototype.constructor = Coroutine$insertAsync_140; Coroutine$insertAsync_140.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; PersonPictureDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_140(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; PersonPictureDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; PersonPictureDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; PersonPictureDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; PersonPictureDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonPictureDao_Repo', interfaces: [PersonPictureDao]}; function ReportDao() { } ReportDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ReportDao', interfaces: [BaseDao]}; function ReportDao_JdbcKt(_db) { ReportDao.call(this); this._db = _db; this._insertAdapterReport_upsert = new ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral(this._db); this._insertAdapterReport_ = new ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral(this._db); } ReportDao_JdbcKt.prototype.replaceList_rp0mfj$ = function (entityList) { this._insertAdapterReport_upsert.insertList_4ezy5m$(entityList); }; ReportDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterReport_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_141($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_141.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_141.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_141.prototype.constructor = Coroutine$insertAsync_141; Coroutine$insertAsync_141.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterReport_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_141(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterReport_.insertList_4ezy5m$(entityList); }; function Coroutine$ReportDao_JdbcKt$updateAsync$lambda(closure$entity_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$updateAsync$lambda; Coroutine$ReportDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entity.reportOwnerUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$entity.xAxis); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$entity.reportDateRangeSelection); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.fromDate); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$entity.fromRelTo); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$entity.fromRelOffSet); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$entity.fromRelUnit); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.toDate); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$entity.toRelTo); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$entity.toRelOffSet); this.local$_stmt.setInt_vux9f0$(11, this.local$closure$entity.toRelUnit); this.local$_stmt.setString_vqvrqt$(12, this.local$closure$entity.reportTitle); this.local$_stmt.setString_vqvrqt$(13, this.local$closure$entity.reportDescription); this.local$_stmt.setString_vqvrqt$(14, this.local$closure$entity.reportSeries); this.local$_stmt.setBoolean_fzusl$(15, this.local$closure$entity.reportInactive); this.local$_stmt.setBoolean_fzusl$(16, this.local$closure$entity.isTemplate); this.local$_stmt.setInt_vux9f0$(17, this.local$closure$entity.priority); this.local$_stmt.setInt_vux9f0$(18, this.local$closure$entity.reportTitleId); this.local$_stmt.setInt_vux9f0$(19, this.local$closure$entity.reportDescId); this.local$_stmt.setLong_6svq3l$(20, this.local$closure$entity.reportMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(21, this.local$closure$entity.reportLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(22, this.local$closure$entity.reportLastChangedBy); this.local$_stmt.setLong_6svq3l$(23, this.local$closure$entity.reportLct); this.local$_stmt.setLong_6svq3l$(24, this.local$closure$entity.reportUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$updateAsync$lambda(closure$entity_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$updateAsync$lambda(closure$entity_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_7abdyy$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_7abdyy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_7abdyy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_7abdyy$.prototype.constructor = Coroutine$updateAsync_7abdyy$; Coroutine$updateAsync_7abdyy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE Report SET reportOwnerUid = ?, xAxis = ?, reportDateRangeSelection = ?, fromDate = ?, fromRelTo = ?, fromRelOffSet = ?, fromRelUnit = ?, toDate = ?, toRelTo = ?, toRelOffSet = ?, toRelUnit = ?, reportTitle = ?, reportDescription = ?, reportSeries = ?, reportInactive = ?, isTemplate = ?, priority = ?, reportTitleId = ?, reportDescId = ?, reportMasterChangeSeqNum = ?, reportLocalChangeSeqNum = ?, reportLastChangedBy = ?, reportLct = ? WHERE reportUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ReportDao_JdbcKt$updateAsync$lambda(this.local$entity), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_JdbcKt.prototype.updateAsync_7abdyy$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_7abdyy$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ReportDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.reportOwnerUid); _stmt.setInt_vux9f0$(2, _entity.xAxis); _stmt.setInt_vux9f0$(3, _entity.reportDateRangeSelection); _stmt.setLong_6svq3l$(4, _entity.fromDate); _stmt.setInt_vux9f0$(5, _entity.fromRelTo); _stmt.setInt_vux9f0$(6, _entity.fromRelOffSet); _stmt.setInt_vux9f0$(7, _entity.fromRelUnit); _stmt.setLong_6svq3l$(8, _entity.toDate); _stmt.setInt_vux9f0$(9, _entity.toRelTo); _stmt.setInt_vux9f0$(10, _entity.toRelOffSet); _stmt.setInt_vux9f0$(11, _entity.toRelUnit); _stmt.setString_vqvrqt$(12, _entity.reportTitle); _stmt.setString_vqvrqt$(13, _entity.reportDescription); _stmt.setString_vqvrqt$(14, _entity.reportSeries); _stmt.setBoolean_fzusl$(15, _entity.reportInactive); _stmt.setBoolean_fzusl$(16, _entity.isTemplate); _stmt.setInt_vux9f0$(17, _entity.priority); _stmt.setInt_vux9f0$(18, _entity.reportTitleId); _stmt.setInt_vux9f0$(19, _entity.reportDescId); _stmt.setLong_6svq3l$(20, _entity.reportMasterChangeSeqNum); _stmt.setLong_6svq3l$(21, _entity.reportLocalChangeSeqNum); _stmt.setInt_vux9f0$(22, _entity.reportLastChangedBy); _stmt.setLong_6svq3l$(23, _entity.reportLct); _stmt.setLong_6svq3l$(24, _entity.reportUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ReportDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Report SET reportOwnerUid = ?, xAxis = ?, reportDateRangeSelection = ?, fromDate = ?, fromRelTo = ?, fromRelOffSet = ?, fromRelUnit = ?, toDate = ?, toRelTo = ?, toRelOffSet = ?, toRelUnit = ?, reportTitle = ?, reportDescription = ?, reportSeries = ?, reportInactive = ?, isTemplate = ?, priority = ?, reportTitleId = ?, reportDescId = ?, reportMasterChangeSeqNum = ?, reportLocalChangeSeqNum = ?, reportLastChangedBy = ?, reportLct = ? WHERE reportUid = ?'; prepareAndUseStatement(this._db, _sql, ReportDao_JdbcKt$updateList$lambda(entityList)); }; function ReportDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.reportOwnerUid); _stmt.setInt_vux9f0$(2, closure$entity.xAxis); _stmt.setInt_vux9f0$(3, closure$entity.reportDateRangeSelection); _stmt.setLong_6svq3l$(4, closure$entity.fromDate); _stmt.setInt_vux9f0$(5, closure$entity.fromRelTo); _stmt.setInt_vux9f0$(6, closure$entity.fromRelOffSet); _stmt.setInt_vux9f0$(7, closure$entity.fromRelUnit); _stmt.setLong_6svq3l$(8, closure$entity.toDate); _stmt.setInt_vux9f0$(9, closure$entity.toRelTo); _stmt.setInt_vux9f0$(10, closure$entity.toRelOffSet); _stmt.setInt_vux9f0$(11, closure$entity.toRelUnit); _stmt.setString_vqvrqt$(12, closure$entity.reportTitle); _stmt.setString_vqvrqt$(13, closure$entity.reportDescription); _stmt.setString_vqvrqt$(14, closure$entity.reportSeries); _stmt.setBoolean_fzusl$(15, closure$entity.reportInactive); _stmt.setBoolean_fzusl$(16, closure$entity.isTemplate); _stmt.setInt_vux9f0$(17, closure$entity.priority); _stmt.setInt_vux9f0$(18, closure$entity.reportTitleId); _stmt.setInt_vux9f0$(19, closure$entity.reportDescId); _stmt.setLong_6svq3l$(20, closure$entity.reportMasterChangeSeqNum); _stmt.setLong_6svq3l$(21, closure$entity.reportLocalChangeSeqNum); _stmt.setInt_vux9f0$(22, closure$entity.reportLastChangedBy); _stmt.setLong_6svq3l$(23, closure$entity.reportLct); _stmt.setLong_6svq3l$(24, closure$entity.reportUid); return _stmt.executeUpdate(); }; } ReportDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Report SET reportOwnerUid = ?, xAxis = ?, reportDateRangeSelection = ?, fromDate = ?, fromRelTo = ?, fromRelOffSet = ?, fromRelUnit = ?, toDate = ?, toRelTo = ?, toRelOffSet = ?, toRelUnit = ?, reportTitle = ?, reportDescription = ?, reportSeries = ?, reportInactive = ?, isTemplate = ?, priority = ?, reportTitleId = ?, reportDescId = ?, reportMasterChangeSeqNum = ?, reportLocalChangeSeqNum = ?, reportLastChangedBy = ?, reportLct = ? WHERE reportUid = ?'; prepareAndUseStatement(this._db, _sql, ReportDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda; Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeTemplates_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeTemplates_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeTemplates_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeTemplates_s8cxhz$.prototype.constructor = Coroutine$replicateOnNewNodeTemplates_s8cxhz$; Coroutine$replicateOnNewNodeTemplates_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ReportReplicate(reportPk, reportDestination)\n | SELECT DISTINCT Report.reportUid AS reportPk,\n | ? AS reportDestination\n | FROM Report\n | JOIN UserSession\n | ON UserSession.usStatus = 1\n | AND CAST(Report.isTemplate AS INTEGER) = 1\n | WHERE Report.reportLct != COALESCE(\n | (SELECT reportVersionId\n | FROM ReportReplicate\n | WHERE reportPk = Report.reportUid\n | AND reportDestination = ?), 0) \n | /*psql ON CONFLICT(reportPk, reportDestination) DO UPDATE\n | SET reportPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ReportReplicate(reportPk, reportDestination)\n | SELECT DISTINCT Report.reportUid AS reportPk,\n | ? AS reportDestination\n | FROM Report\n | JOIN UserSession\n | ON UserSession.usStatus = 1\n | AND CAST(Report.isTemplate AS INTEGER) = 1\n | WHERE Report.reportLct != COALESCE(\n | (SELECT reportVersionId\n | FROM ReportReplicate\n | WHERE reportPk = Report.reportUid\n | AND reportDestination = ?), 0) \n | ON CONFLICT(reportPk, reportDestination) DO UPDATE\n | SET reportPending = true\n | \n | \n |')), ReportDao_JdbcKt$replicateOnNewNodeTemplates$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_JdbcKt.prototype.replicateOnNewNodeTemplates_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeTemplates_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda; Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$replicateOnChangeTemplates$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$replicateOnChangeTemplates$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeTemplates($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeTemplates.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeTemplates.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeTemplates.prototype.constructor = Coroutine$replicateOnChangeTemplates; Coroutine$replicateOnChangeTemplates.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ReportReplicate(reportPk, reportDestination)\n | SELECT DISTINCT Report.reportUid AS reportUid,\n | UserSession.usClientNodeId AS reportDestination\n | FROM ChangeLog\n | JOIN Report\n | ON ChangeLog.chTableId = 101 \n | AND ChangeLog.chEntityPk = Report.reportUid\n | JOIN UserSession\n | ON UserSession.usStatus = 1\n | AND CAST(Report.isTemplate AS INTEGER) = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Report.reportLct != COALESCE(\n | (SELECT reportVersionId\n | FROM ReportReplicate\n | WHERE reportPk = Report.reportUid\n | AND reportDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(reportPk, reportDestination) DO UPDATE\n | SET reportPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ReportReplicate(reportPk, reportDestination)\n | SELECT DISTINCT Report.reportUid AS reportUid,\n | UserSession.usClientNodeId AS reportDestination\n | FROM ChangeLog\n | JOIN Report\n | ON ChangeLog.chTableId = 101 \n | AND ChangeLog.chEntityPk = Report.reportUid\n | JOIN UserSession\n | ON UserSession.usStatus = 1\n | AND CAST(Report.isTemplate AS INTEGER) = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Report.reportLct != COALESCE(\n | (SELECT reportVersionId\n | FROM ReportReplicate\n | WHERE reportPk = Report.reportUid\n | AND reportDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(reportPk, reportDestination) DO UPDATE\n | SET reportPending = true\n | \n | \n |')), ReportDao_JdbcKt$replicateOnChangeTemplates$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_JdbcKt.prototype.replicateOnChangeTemplates = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeTemplates(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ReportDao_JdbcKt$getResults$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_reportUid = closure$_result.getLong_61zpoe$('reportUid'); var _tmp_reportOwnerUid = closure$_result.getLong_61zpoe$('reportOwnerUid'); var _tmp_xAxis = closure$_result.getInt_61zpoe$('xAxis'); var _tmp_reportDateRangeSelection = closure$_result.getInt_61zpoe$('reportDateRangeSelection'); var _tmp_fromDate = closure$_result.getLong_61zpoe$('fromDate'); var _tmp_fromRelTo = closure$_result.getInt_61zpoe$('fromRelTo'); var _tmp_fromRelOffSet = closure$_result.getInt_61zpoe$('fromRelOffSet'); var _tmp_fromRelUnit = closure$_result.getInt_61zpoe$('fromRelUnit'); var _tmp_toDate = closure$_result.getLong_61zpoe$('toDate'); var _tmp_toRelTo = closure$_result.getInt_61zpoe$('toRelTo'); var _tmp_toRelOffSet = closure$_result.getInt_61zpoe$('toRelOffSet'); var _tmp_toRelUnit = closure$_result.getInt_61zpoe$('toRelUnit'); var _tmp_reportTitle = closure$_result.getString_61zpoe$('reportTitle'); var _tmp_reportDescription = closure$_result.getString_61zpoe$('reportDescription'); var _tmp_reportSeries = closure$_result.getString_61zpoe$('reportSeries'); var _tmp_reportInactive = closure$_result.getBoolean_61zpoe$('reportInactive'); var _tmp_isTemplate = closure$_result.getBoolean_61zpoe$('isTemplate'); var _tmp_priority = closure$_result.getInt_61zpoe$('priority'); var _tmp_reportTitleId = closure$_result.getInt_61zpoe$('reportTitleId'); var _tmp_reportDescId = closure$_result.getInt_61zpoe$('reportDescId'); var _tmp_reportMasterChangeSeqNum = closure$_result.getLong_61zpoe$('reportMasterChangeSeqNum'); var _tmp_reportLocalChangeSeqNum = closure$_result.getLong_61zpoe$('reportLocalChangeSeqNum'); var _tmp_reportLastChangedBy = closure$_result.getInt_61zpoe$('reportLastChangedBy'); var _tmp_reportLct = closure$_result.getLong_61zpoe$('reportLct'); var $receiver = new Report(); $receiver.reportUid = _tmp_reportUid; $receiver.reportOwnerUid = _tmp_reportOwnerUid; $receiver.xAxis = _tmp_xAxis; $receiver.reportDateRangeSelection = _tmp_reportDateRangeSelection; $receiver.fromDate = _tmp_fromDate; $receiver.fromRelTo = _tmp_fromRelTo; $receiver.fromRelOffSet = _tmp_fromRelOffSet; $receiver.fromRelUnit = _tmp_fromRelUnit; $receiver.toDate = _tmp_toDate; $receiver.toRelTo = _tmp_toRelTo; $receiver.toRelOffSet = _tmp_toRelOffSet; $receiver.toRelUnit = _tmp_toRelUnit; $receiver.reportTitle = _tmp_reportTitle; $receiver.reportDescription = _tmp_reportDescription; $receiver.reportSeries = _tmp_reportSeries; $receiver.reportInactive = _tmp_reportInactive; $receiver.isTemplate = _tmp_isTemplate; $receiver.priority = _tmp_priority; $receiver.reportTitleId = _tmp_reportTitleId; $receiver.reportDescId = _tmp_reportDescId; $receiver.reportMasterChangeSeqNum = _tmp_reportMasterChangeSeqNum; $receiver.reportLocalChangeSeqNum = _tmp_reportLocalChangeSeqNum; $receiver.reportLastChangedBy = _tmp_reportLastChangedBy; $receiver.reportLct = _tmp_reportLct; return $receiver; }; } function ReportDao_JdbcKt$getResults$lambda$lambda(_result) { return mapRows(_result, ReportDao_JdbcKt$getResults$lambda$lambda$lambda(_result)); } function ReportDao_JdbcKt$getResults$lambda(closure$query, this$ReportDao_JdbcKt) { return function (_stmt) { closure$query.bindToPreparedStmt_q2o6dm$(_stmt, this$ReportDao_JdbcKt._db); return useResults(_stmt.executeQuery(), ReportDao_JdbcKt$getResults$lambda$lambda); }; } ReportDao_JdbcKt.prototype.getResults_j49vja$ = function (query) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(query.getSql(), hasListOrArrayParams(query)), ReportDao_JdbcKt$getResults$lambda(query, this)); }; function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral(this$ReportDao_JdbcKt, closure$personUid, closure$isTemplate, closure$searchBit, closure$sortOrder) { this.this$ReportDao_JdbcKt = this$ReportDao_JdbcKt; this.closure$personUid = closure$personUid; this.closure$isTemplate = closure$isTemplate; this.closure$searchBit = closure$searchBit; this.closure$sortOrder = closure$sortOrder; DataSourceFactory.call(this); } function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_reportUid = closure$_result.getLong_61zpoe$('reportUid'); var _tmp_reportOwnerUid = closure$_result.getLong_61zpoe$('reportOwnerUid'); var _tmp_xAxis = closure$_result.getInt_61zpoe$('xAxis'); var _tmp_reportDateRangeSelection = closure$_result.getInt_61zpoe$('reportDateRangeSelection'); var _tmp_fromDate = closure$_result.getLong_61zpoe$('fromDate'); var _tmp_fromRelTo = closure$_result.getInt_61zpoe$('fromRelTo'); var _tmp_fromRelOffSet = closure$_result.getInt_61zpoe$('fromRelOffSet'); var _tmp_fromRelUnit = closure$_result.getInt_61zpoe$('fromRelUnit'); var _tmp_toDate = closure$_result.getLong_61zpoe$('toDate'); var _tmp_toRelTo = closure$_result.getInt_61zpoe$('toRelTo'); var _tmp_toRelOffSet = closure$_result.getInt_61zpoe$('toRelOffSet'); var _tmp_toRelUnit = closure$_result.getInt_61zpoe$('toRelUnit'); var _tmp_reportTitle = closure$_result.getString_61zpoe$('reportTitle'); var _tmp_reportDescription = closure$_result.getString_61zpoe$('reportDescription'); var _tmp_reportSeries = closure$_result.getString_61zpoe$('reportSeries'); var _tmp_reportInactive = closure$_result.getBoolean_61zpoe$('reportInactive'); var _tmp_isTemplate = closure$_result.getBoolean_61zpoe$('isTemplate'); var _tmp_priority = closure$_result.getInt_61zpoe$('priority'); var _tmp_reportTitleId = closure$_result.getInt_61zpoe$('reportTitleId'); var _tmp_reportDescId = closure$_result.getInt_61zpoe$('reportDescId'); var _tmp_reportMasterChangeSeqNum = closure$_result.getLong_61zpoe$('reportMasterChangeSeqNum'); var _tmp_reportLocalChangeSeqNum = closure$_result.getLong_61zpoe$('reportLocalChangeSeqNum'); var _tmp_reportLastChangedBy = closure$_result.getInt_61zpoe$('reportLastChangedBy'); var _tmp_reportLct = closure$_result.getLong_61zpoe$('reportLct'); var $receiver = new Report(); $receiver.reportUid = _tmp_reportUid; $receiver.reportOwnerUid = _tmp_reportOwnerUid; $receiver.xAxis = _tmp_xAxis; $receiver.reportDateRangeSelection = _tmp_reportDateRangeSelection; $receiver.fromDate = _tmp_fromDate; $receiver.fromRelTo = _tmp_fromRelTo; $receiver.fromRelOffSet = _tmp_fromRelOffSet; $receiver.fromRelUnit = _tmp_fromRelUnit; $receiver.toDate = _tmp_toDate; $receiver.toRelTo = _tmp_toRelTo; $receiver.toRelOffSet = _tmp_toRelOffSet; $receiver.toRelUnit = _tmp_toRelUnit; $receiver.reportTitle = _tmp_reportTitle; $receiver.reportDescription = _tmp_reportDescription; $receiver.reportSeries = _tmp_reportSeries; $receiver.reportInactive = _tmp_reportInactive; $receiver.isTemplate = _tmp_isTemplate; $receiver.priority = _tmp_priority; $receiver.reportTitleId = _tmp_reportTitleId; $receiver.reportDescId = _tmp_reportDescId; $receiver.reportMasterChangeSeqNum = _tmp_reportMasterChangeSeqNum; $receiver.reportLocalChangeSeqNum = _tmp_reportLocalChangeSeqNum; $receiver.reportLastChangedBy = _tmp_reportLastChangedBy; $receiver.reportLct = _tmp_reportLct; return $receiver; }; } function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$isTemplate = closure$isTemplate_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setBoolean_fzusl$(2, this.local$closure$isTemplate); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchBit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda(closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda(this$ReportDao_JdbcKt_0, closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ReportDao_JdbcKt = this$ReportDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$isTemplate = closure$isTemplate_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ReportDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (SELECT * FROM REPORT WHERE NOT reportInactive \n | AND reportOwnerUid = ?\n | AND isTemplate = ?\n | AND reportTitle LIKE ?\n | ORDER BY priority, CASE(?)\n | WHEN 1 THEN Report.reportTitle\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Report.reportTitle\n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ?\n ")), ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda$lambda(this.local$closure$personUid, this.local$closure$isTemplate, this.local$closure$searchBit, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda(this$ReportDao_JdbcKt_0, closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda(this$ReportDao_JdbcKt_0, closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ReportDao_JdbcKt._db, listOf_0('REPORT'), ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getData$lambda(this.this$ReportDao_JdbcKt, this.closure$personUid, this.closure$isTemplate, this.closure$searchBit, this.closure$sortOrder, _limit, _offset)); }; function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$closure$isTemplate = closure$isTemplate_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.local$_stmt.setBoolean_fzusl$(2, this.local$closure$isTemplate); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchBit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda(closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda(this$ReportDao_JdbcKt_0, closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ReportDao_JdbcKt = this$ReportDao_JdbcKt_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$isTemplate = closure$isTemplate_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; } Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda; Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ReportDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (SELECT * FROM REPORT WHERE NOT reportInactive \n | AND reportOwnerUid = ?\n | AND isTemplate = ?\n | AND reportTitle LIKE ?\n | ORDER BY priority, CASE(?)\n | WHEN 1 THEN Report.reportTitle\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Report.reportTitle\n | ELSE ''\n | END DESC\n | ) \n ")), ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda$lambda(this.local$closure$personUid, this.local$closure$isTemplate, this.local$closure$searchBit, this.local$closure$sortOrder), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda(this$ReportDao_JdbcKt_0, closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda(this$ReportDao_JdbcKt_0, closure$personUid_0, closure$isTemplate_0, closure$searchBit_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ReportDao_JdbcKt._db, listOf_0('REPORT'), ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral$getLength$lambda(this.this$ReportDao_JdbcKt, this.closure$personUid, this.closure$isTemplate, this.closure$searchBit, this.closure$sortOrder)); }; ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ReportDao_JdbcKt.prototype.findAllActiveReport_dw84ek$ = function (searchBit, personUid, sortOrder, isTemplate) { return new ReportDao_JdbcKt$findAllActiveReport$ObjectLiteral(this, personUid, isTemplate, searchBit, sortOrder); }; function ReportDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_reportUid = closure$_result.getLong_61zpoe$('reportUid'); var _tmp_reportOwnerUid = closure$_result.getLong_61zpoe$('reportOwnerUid'); var _tmp_xAxis = closure$_result.getInt_61zpoe$('xAxis'); var _tmp_reportDateRangeSelection = closure$_result.getInt_61zpoe$('reportDateRangeSelection'); var _tmp_fromDate = closure$_result.getLong_61zpoe$('fromDate'); var _tmp_fromRelTo = closure$_result.getInt_61zpoe$('fromRelTo'); var _tmp_fromRelOffSet = closure$_result.getInt_61zpoe$('fromRelOffSet'); var _tmp_fromRelUnit = closure$_result.getInt_61zpoe$('fromRelUnit'); var _tmp_toDate = closure$_result.getLong_61zpoe$('toDate'); var _tmp_toRelTo = closure$_result.getInt_61zpoe$('toRelTo'); var _tmp_toRelOffSet = closure$_result.getInt_61zpoe$('toRelOffSet'); var _tmp_toRelUnit = closure$_result.getInt_61zpoe$('toRelUnit'); var _tmp_reportTitle = closure$_result.getString_61zpoe$('reportTitle'); var _tmp_reportDescription = closure$_result.getString_61zpoe$('reportDescription'); var _tmp_reportSeries = closure$_result.getString_61zpoe$('reportSeries'); var _tmp_reportInactive = closure$_result.getBoolean_61zpoe$('reportInactive'); var _tmp_isTemplate = closure$_result.getBoolean_61zpoe$('isTemplate'); var _tmp_priority = closure$_result.getInt_61zpoe$('priority'); var _tmp_reportTitleId = closure$_result.getInt_61zpoe$('reportTitleId'); var _tmp_reportDescId = closure$_result.getInt_61zpoe$('reportDescId'); var _tmp_reportMasterChangeSeqNum = closure$_result.getLong_61zpoe$('reportMasterChangeSeqNum'); var _tmp_reportLocalChangeSeqNum = closure$_result.getLong_61zpoe$('reportLocalChangeSeqNum'); var _tmp_reportLastChangedBy = closure$_result.getInt_61zpoe$('reportLastChangedBy'); var _tmp_reportLct = closure$_result.getLong_61zpoe$('reportLct'); var $receiver = new Report(); $receiver.reportUid = _tmp_reportUid; $receiver.reportOwnerUid = _tmp_reportOwnerUid; $receiver.xAxis = _tmp_xAxis; $receiver.reportDateRangeSelection = _tmp_reportDateRangeSelection; $receiver.fromDate = _tmp_fromDate; $receiver.fromRelTo = _tmp_fromRelTo; $receiver.fromRelOffSet = _tmp_fromRelOffSet; $receiver.fromRelUnit = _tmp_fromRelUnit; $receiver.toDate = _tmp_toDate; $receiver.toRelTo = _tmp_toRelTo; $receiver.toRelOffSet = _tmp_toRelOffSet; $receiver.toRelUnit = _tmp_toRelUnit; $receiver.reportTitle = _tmp_reportTitle; $receiver.reportDescription = _tmp_reportDescription; $receiver.reportSeries = _tmp_reportSeries; $receiver.reportInactive = _tmp_reportInactive; $receiver.isTemplate = _tmp_isTemplate; $receiver.priority = _tmp_priority; $receiver.reportTitleId = _tmp_reportTitleId; $receiver.reportDescId = _tmp_reportDescId; $receiver.reportMasterChangeSeqNum = _tmp_reportMasterChangeSeqNum; $receiver.reportLocalChangeSeqNum = _tmp_reportLocalChangeSeqNum; $receiver.reportLastChangedBy = _tmp_reportLastChangedBy; $receiver.reportLct = _tmp_reportLct; return $receiver; }; } function ReportDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, ReportDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function Coroutine$ReportDao_JdbcKt$findByUid$lambda(closure$entityUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityUid = closure$entityUid_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$findByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findByUid$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findByUid$lambda; Coroutine$ReportDao_JdbcKt$findByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entityUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ReportDao_JdbcKt$findByUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findByUid$lambda(closure$entityUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findByUid$lambda(closure$entityUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ReportDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (entityUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM Report WHERE reportUid = ?'), ReportDao_JdbcKt$findByUid$lambda(entityUid), continuation); }; function ReportDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_reportUid = closure$_result.getLong_61zpoe$('reportUid'); var _tmp_reportOwnerUid = closure$_result.getLong_61zpoe$('reportOwnerUid'); var _tmp_xAxis = closure$_result.getInt_61zpoe$('xAxis'); var _tmp_reportDateRangeSelection = closure$_result.getInt_61zpoe$('reportDateRangeSelection'); var _tmp_fromDate = closure$_result.getLong_61zpoe$('fromDate'); var _tmp_fromRelTo = closure$_result.getInt_61zpoe$('fromRelTo'); var _tmp_fromRelOffSet = closure$_result.getInt_61zpoe$('fromRelOffSet'); var _tmp_fromRelUnit = closure$_result.getInt_61zpoe$('fromRelUnit'); var _tmp_toDate = closure$_result.getLong_61zpoe$('toDate'); var _tmp_toRelTo = closure$_result.getInt_61zpoe$('toRelTo'); var _tmp_toRelOffSet = closure$_result.getInt_61zpoe$('toRelOffSet'); var _tmp_toRelUnit = closure$_result.getInt_61zpoe$('toRelUnit'); var _tmp_reportTitle = closure$_result.getString_61zpoe$('reportTitle'); var _tmp_reportDescription = closure$_result.getString_61zpoe$('reportDescription'); var _tmp_reportSeries = closure$_result.getString_61zpoe$('reportSeries'); var _tmp_reportInactive = closure$_result.getBoolean_61zpoe$('reportInactive'); var _tmp_isTemplate = closure$_result.getBoolean_61zpoe$('isTemplate'); var _tmp_priority = closure$_result.getInt_61zpoe$('priority'); var _tmp_reportTitleId = closure$_result.getInt_61zpoe$('reportTitleId'); var _tmp_reportDescId = closure$_result.getInt_61zpoe$('reportDescId'); var _tmp_reportMasterChangeSeqNum = closure$_result.getLong_61zpoe$('reportMasterChangeSeqNum'); var _tmp_reportLocalChangeSeqNum = closure$_result.getLong_61zpoe$('reportLocalChangeSeqNum'); var _tmp_reportLastChangedBy = closure$_result.getInt_61zpoe$('reportLastChangedBy'); var _tmp_reportLct = closure$_result.getLong_61zpoe$('reportLct'); var $receiver = new Report(); $receiver.reportUid = _tmp_reportUid; $receiver.reportOwnerUid = _tmp_reportOwnerUid; $receiver.xAxis = _tmp_xAxis; $receiver.reportDateRangeSelection = _tmp_reportDateRangeSelection; $receiver.fromDate = _tmp_fromDate; $receiver.fromRelTo = _tmp_fromRelTo; $receiver.fromRelOffSet = _tmp_fromRelOffSet; $receiver.fromRelUnit = _tmp_fromRelUnit; $receiver.toDate = _tmp_toDate; $receiver.toRelTo = _tmp_toRelTo; $receiver.toRelOffSet = _tmp_toRelOffSet; $receiver.toRelUnit = _tmp_toRelUnit; $receiver.reportTitle = _tmp_reportTitle; $receiver.reportDescription = _tmp_reportDescription; $receiver.reportSeries = _tmp_reportSeries; $receiver.reportInactive = _tmp_reportInactive; $receiver.isTemplate = _tmp_isTemplate; $receiver.priority = _tmp_priority; $receiver.reportTitleId = _tmp_reportTitleId; $receiver.reportDescId = _tmp_reportDescId; $receiver.reportMasterChangeSeqNum = _tmp_reportMasterChangeSeqNum; $receiver.reportLocalChangeSeqNum = _tmp_reportLocalChangeSeqNum; $receiver.reportLastChangedBy = _tmp_reportLastChangedBy; $receiver.reportLct = _tmp_reportLct; return $receiver; }; } function ReportDao_JdbcKt$findByUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ReportDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ReportDao_JdbcKt$findByUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findByUidLive$lambda$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ReportDao_JdbcKt$findByUidLive$lambda(this$ReportDao_JdbcKt_0, closure$uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ReportDao_JdbcKt = this$ReportDao_JdbcKt_0; this.local$closure$uid = closure$uid_0; } Coroutine$ReportDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findByUidLive$lambda; Coroutine$ReportDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ReportDao_JdbcKt._db, new PreparedStatementConfig('SELECT * From Report WHERE reportUid = ?'), ReportDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$uid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findByUidLive$lambda(this$ReportDao_JdbcKt_0, closure$uid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findByUidLive$lambda(this$ReportDao_JdbcKt_0, closure$uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ReportDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (uid) { return new LiveDataImpl(this._db, listOf_0('Report'), ReportDao_JdbcKt$findByUidLive$lambda(this, uid)); }; function ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_reportUid = closure$_result.getLong_61zpoe$('reportUid'); var _tmp_reportOwnerUid = closure$_result.getLong_61zpoe$('reportOwnerUid'); var _tmp_xAxis = closure$_result.getInt_61zpoe$('xAxis'); var _tmp_reportDateRangeSelection = closure$_result.getInt_61zpoe$('reportDateRangeSelection'); var _tmp_fromDate = closure$_result.getLong_61zpoe$('fromDate'); var _tmp_fromRelTo = closure$_result.getInt_61zpoe$('fromRelTo'); var _tmp_fromRelOffSet = closure$_result.getInt_61zpoe$('fromRelOffSet'); var _tmp_fromRelUnit = closure$_result.getInt_61zpoe$('fromRelUnit'); var _tmp_toDate = closure$_result.getLong_61zpoe$('toDate'); var _tmp_toRelTo = closure$_result.getInt_61zpoe$('toRelTo'); var _tmp_toRelOffSet = closure$_result.getInt_61zpoe$('toRelOffSet'); var _tmp_toRelUnit = closure$_result.getInt_61zpoe$('toRelUnit'); var _tmp_reportTitle = closure$_result.getString_61zpoe$('reportTitle'); var _tmp_reportDescription = closure$_result.getString_61zpoe$('reportDescription'); var _tmp_reportSeries = closure$_result.getString_61zpoe$('reportSeries'); var _tmp_reportInactive = closure$_result.getBoolean_61zpoe$('reportInactive'); var _tmp_isTemplate = closure$_result.getBoolean_61zpoe$('isTemplate'); var _tmp_priority = closure$_result.getInt_61zpoe$('priority'); var _tmp_reportTitleId = closure$_result.getInt_61zpoe$('reportTitleId'); var _tmp_reportDescId = closure$_result.getInt_61zpoe$('reportDescId'); var _tmp_reportMasterChangeSeqNum = closure$_result.getLong_61zpoe$('reportMasterChangeSeqNum'); var _tmp_reportLocalChangeSeqNum = closure$_result.getLong_61zpoe$('reportLocalChangeSeqNum'); var _tmp_reportLastChangedBy = closure$_result.getInt_61zpoe$('reportLastChangedBy'); var _tmp_reportLct = closure$_result.getLong_61zpoe$('reportLct'); var $receiver = new Report(); $receiver.reportUid = _tmp_reportUid; $receiver.reportOwnerUid = _tmp_reportOwnerUid; $receiver.xAxis = _tmp_xAxis; $receiver.reportDateRangeSelection = _tmp_reportDateRangeSelection; $receiver.fromDate = _tmp_fromDate; $receiver.fromRelTo = _tmp_fromRelTo; $receiver.fromRelOffSet = _tmp_fromRelOffSet; $receiver.fromRelUnit = _tmp_fromRelUnit; $receiver.toDate = _tmp_toDate; $receiver.toRelTo = _tmp_toRelTo; $receiver.toRelOffSet = _tmp_toRelOffSet; $receiver.toRelUnit = _tmp_toRelUnit; $receiver.reportTitle = _tmp_reportTitle; $receiver.reportDescription = _tmp_reportDescription; $receiver.reportSeries = _tmp_reportSeries; $receiver.reportInactive = _tmp_reportInactive; $receiver.isTemplate = _tmp_isTemplate; $receiver.priority = _tmp_priority; $receiver.reportTitleId = _tmp_reportTitleId; $receiver.reportDescId = _tmp_reportDescId; $receiver.reportMasterChangeSeqNum = _tmp_reportMasterChangeSeqNum; $receiver.reportLocalChangeSeqNum = _tmp_reportLocalChangeSeqNum; $receiver.reportLastChangedBy = _tmp_reportLastChangedBy; $receiver.reportLct = _tmp_reportLct; return $receiver; }; } function ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda$lambda(_result) { return mapRows(_result, ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda(closure$isTemplate_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$isTemplate = closure$isTemplate_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda; Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$isTemplate); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda(closure$isTemplate_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda(closure$isTemplate_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda(this$ReportDao_JdbcKt_0, closure$isTemplate_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ReportDao_JdbcKt = this$ReportDao_JdbcKt_0; this.local$closure$isTemplate = closure$isTemplate_0; } Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda; Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ReportDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM REPORT WHERE NOT reportInactive \n | AND isTemplate = ?\n | ORDER BY priority ASC\n | \n ')), ReportDao_JdbcKt$findAllActiveReportLive$lambda$lambda(this.local$closure$isTemplate), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$findAllActiveReportLive$lambda(this$ReportDao_JdbcKt_0, closure$isTemplate_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$findAllActiveReportLive$lambda(this$ReportDao_JdbcKt_0, closure$isTemplate_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ReportDao_JdbcKt.prototype.findAllActiveReportLive_6taknv$ = function (isTemplate) { return new LiveDataImpl(this._db, listOf_0('REPORT'), ReportDao_JdbcKt$findAllActiveReportLive$lambda(this, isTemplate)); }; function ReportDao_JdbcKt$findAllActiveReportList$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_reportUid = closure$_result.getLong_61zpoe$('reportUid'); var _tmp_reportOwnerUid = closure$_result.getLong_61zpoe$('reportOwnerUid'); var _tmp_xAxis = closure$_result.getInt_61zpoe$('xAxis'); var _tmp_reportDateRangeSelection = closure$_result.getInt_61zpoe$('reportDateRangeSelection'); var _tmp_fromDate = closure$_result.getLong_61zpoe$('fromDate'); var _tmp_fromRelTo = closure$_result.getInt_61zpoe$('fromRelTo'); var _tmp_fromRelOffSet = closure$_result.getInt_61zpoe$('fromRelOffSet'); var _tmp_fromRelUnit = closure$_result.getInt_61zpoe$('fromRelUnit'); var _tmp_toDate = closure$_result.getLong_61zpoe$('toDate'); var _tmp_toRelTo = closure$_result.getInt_61zpoe$('toRelTo'); var _tmp_toRelOffSet = closure$_result.getInt_61zpoe$('toRelOffSet'); var _tmp_toRelUnit = closure$_result.getInt_61zpoe$('toRelUnit'); var _tmp_reportTitle = closure$_result.getString_61zpoe$('reportTitle'); var _tmp_reportDescription = closure$_result.getString_61zpoe$('reportDescription'); var _tmp_reportSeries = closure$_result.getString_61zpoe$('reportSeries'); var _tmp_reportInactive = closure$_result.getBoolean_61zpoe$('reportInactive'); var _tmp_isTemplate = closure$_result.getBoolean_61zpoe$('isTemplate'); var _tmp_priority = closure$_result.getInt_61zpoe$('priority'); var _tmp_reportTitleId = closure$_result.getInt_61zpoe$('reportTitleId'); var _tmp_reportDescId = closure$_result.getInt_61zpoe$('reportDescId'); var _tmp_reportMasterChangeSeqNum = closure$_result.getLong_61zpoe$('reportMasterChangeSeqNum'); var _tmp_reportLocalChangeSeqNum = closure$_result.getLong_61zpoe$('reportLocalChangeSeqNum'); var _tmp_reportLastChangedBy = closure$_result.getInt_61zpoe$('reportLastChangedBy'); var _tmp_reportLct = closure$_result.getLong_61zpoe$('reportLct'); var $receiver = new Report(); $receiver.reportUid = _tmp_reportUid; $receiver.reportOwnerUid = _tmp_reportOwnerUid; $receiver.xAxis = _tmp_xAxis; $receiver.reportDateRangeSelection = _tmp_reportDateRangeSelection; $receiver.fromDate = _tmp_fromDate; $receiver.fromRelTo = _tmp_fromRelTo; $receiver.fromRelOffSet = _tmp_fromRelOffSet; $receiver.fromRelUnit = _tmp_fromRelUnit; $receiver.toDate = _tmp_toDate; $receiver.toRelTo = _tmp_toRelTo; $receiver.toRelOffSet = _tmp_toRelOffSet; $receiver.toRelUnit = _tmp_toRelUnit; $receiver.reportTitle = _tmp_reportTitle; $receiver.reportDescription = _tmp_reportDescription; $receiver.reportSeries = _tmp_reportSeries; $receiver.reportInactive = _tmp_reportInactive; $receiver.isTemplate = _tmp_isTemplate; $receiver.priority = _tmp_priority; $receiver.reportTitleId = _tmp_reportTitleId; $receiver.reportDescId = _tmp_reportDescId; $receiver.reportMasterChangeSeqNum = _tmp_reportMasterChangeSeqNum; $receiver.reportLocalChangeSeqNum = _tmp_reportLocalChangeSeqNum; $receiver.reportLastChangedBy = _tmp_reportLastChangedBy; $receiver.reportLct = _tmp_reportLct; return $receiver; }; } function ReportDao_JdbcKt$findAllActiveReportList$lambda$lambda(_result) { return mapRows(_result, ReportDao_JdbcKt$findAllActiveReportList$lambda$lambda$lambda(_result)); } function ReportDao_JdbcKt$findAllActiveReportList$lambda(closure$isTemplate) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$isTemplate); return useResults(_stmt.executeQuery(), ReportDao_JdbcKt$findAllActiveReportList$lambda$lambda); }; } ReportDao_JdbcKt.prototype.findAllActiveReportList_6taknv$ = function (isTemplate) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM REPORT WHERE NOT reportInactive \n | AND isTemplate = ?\n | ORDER BY priority ASC\n | \n ')), ReportDao_JdbcKt$findAllActiveReportList$lambda(isTemplate)); }; function ReportDao_JdbcKt$findByUidList$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function ReportDao_JdbcKt$findByUidList$lambda$lambda(_result) { return mapRows(_result, ReportDao_JdbcKt$findByUidList$lambda$lambda$lambda(_result)); } function ReportDao_JdbcKt$findByUidList$lambda(closure$uidList) { return function (_stmt) { _stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(_stmt.getConnection(), 'BIGINT', copyToArray(closure$uidList))); return useResults(_stmt.executeQuery(), ReportDao_JdbcKt$findByUidList$lambda$lambda); }; } ReportDao_JdbcKt.prototype.findByUidList_gox9k8$ = function (uidList) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT reportUid FROM Report WHERE reportUid IN (?)', true), ReportDao_JdbcKt$findByUidList$lambda(uidList)); }; function Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda(closure$toggleVisibility_0, closure$updateTime_0, closure$selectedItem_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$toggleVisibility = closure$toggleVisibility_0; this.local$closure$updateTime = closure$updateTime_0; this.local$closure$selectedItem = closure$selectedItem_0; this.local$_stmt = _stmt_0; } Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda.prototype.constructor = Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda; Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$toggleVisibility); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$updateTime); this.local$_stmt.setArray_wqp8hw$(3, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$selectedItem))); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ReportDao_JdbcKt$toggleVisibilityReportItems$lambda(closure$toggleVisibility_0, closure$updateTime_0, closure$selectedItem_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ReportDao_JdbcKt$toggleVisibilityReportItems$lambda(closure$toggleVisibility_0, closure$updateTime_0, closure$selectedItem_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$toggleVisibilityReportItems_cbj1f0$($this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$updateTime = updateTime_0; } Coroutine$toggleVisibilityReportItems_cbj1f0$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityReportItems_cbj1f0$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityReportItems_cbj1f0$.prototype.constructor = Coroutine$toggleVisibilityReportItems_cbj1f0$; Coroutine$toggleVisibilityReportItems_cbj1f0$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Report \n | SET reportInactive = ?,\n | reportLct = ? \n | WHERE reportUid IN (?)\n | \n '), true), ReportDao_JdbcKt$toggleVisibilityReportItems$lambda(this.local$toggleVisibility, this.local$updateTime, this.local$selectedItem), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_JdbcKt.prototype.toggleVisibilityReportItems_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityReportItems_cbj1f0$(this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO Report (reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.reportUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.reportUid); } stmt.setLong_6svq3l$(2, entity.reportOwnerUid); stmt.setInt_vux9f0$(3, entity.xAxis); stmt.setInt_vux9f0$(4, entity.reportDateRangeSelection); stmt.setLong_6svq3l$(5, entity.fromDate); stmt.setInt_vux9f0$(6, entity.fromRelTo); stmt.setInt_vux9f0$(7, entity.fromRelOffSet); stmt.setInt_vux9f0$(8, entity.fromRelUnit); stmt.setLong_6svq3l$(9, entity.toDate); stmt.setInt_vux9f0$(10, entity.toRelTo); stmt.setInt_vux9f0$(11, entity.toRelOffSet); stmt.setInt_vux9f0$(12, entity.toRelUnit); stmt.setString_vqvrqt$(13, entity.reportTitle); stmt.setString_vqvrqt$(14, entity.reportDescription); stmt.setString_vqvrqt$(15, entity.reportSeries); stmt.setBoolean_fzusl$(16, entity.reportInactive); stmt.setBoolean_fzusl$(17, entity.isTemplate); stmt.setInt_vux9f0$(18, entity.priority); stmt.setInt_vux9f0$(19, entity.reportTitleId); stmt.setInt_vux9f0$(20, entity.reportDescId); stmt.setLong_6svq3l$(21, entity.reportMasterChangeSeqNum); stmt.setLong_6svq3l$(22, entity.reportLocalChangeSeqNum); stmt.setInt_vux9f0$(23, entity.reportLastChangedBy); stmt.setLong_6svq3l$(24, entity.reportLct); }; ReportDao_JdbcKt$_insertAdapterReport_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO Report (reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.reportUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.reportUid); } stmt.setLong_6svq3l$(2, entity.reportOwnerUid); stmt.setInt_vux9f0$(3, entity.xAxis); stmt.setInt_vux9f0$(4, entity.reportDateRangeSelection); stmt.setLong_6svq3l$(5, entity.fromDate); stmt.setInt_vux9f0$(6, entity.fromRelTo); stmt.setInt_vux9f0$(7, entity.fromRelOffSet); stmt.setInt_vux9f0$(8, entity.fromRelUnit); stmt.setLong_6svq3l$(9, entity.toDate); stmt.setInt_vux9f0$(10, entity.toRelTo); stmt.setInt_vux9f0$(11, entity.toRelOffSet); stmt.setInt_vux9f0$(12, entity.toRelUnit); stmt.setString_vqvrqt$(13, entity.reportTitle); stmt.setString_vqvrqt$(14, entity.reportDescription); stmt.setString_vqvrqt$(15, entity.reportSeries); stmt.setBoolean_fzusl$(16, entity.reportInactive); stmt.setBoolean_fzusl$(17, entity.isTemplate); stmt.setInt_vux9f0$(18, entity.priority); stmt.setInt_vux9f0$(19, entity.reportTitleId); stmt.setInt_vux9f0$(20, entity.reportDescId); stmt.setLong_6svq3l$(21, entity.reportMasterChangeSeqNum); stmt.setLong_6svq3l$(22, entity.reportLocalChangeSeqNum); stmt.setInt_vux9f0$(23, entity.reportLastChangedBy); stmt.setLong_6svq3l$(24, entity.reportLct); }; ReportDao_JdbcKt$_insertAdapterReport_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ReportDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ReportDao_JdbcKt', interfaces: [ReportDao]}; function ReportDao_ReplicateWrapper(_db, _dao) { ReportDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0.prototype.constructor = Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0; Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeTemplates_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_ReplicateWrapper.prototype.replicateOnNewNodeTemplates_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeTemplates_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeTemplates_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeTemplates_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeTemplates_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeTemplates_0.prototype.constructor = Coroutine$replicateOnChangeTemplates_0; Coroutine$replicateOnChangeTemplates_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeTemplates(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_ReplicateWrapper.prototype.replicateOnChangeTemplates = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeTemplates_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_ReplicateWrapper.prototype.getResults_j49vja$ = function (query) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ReportDao_ReplicateWrapper.prototype.findAllActiveReport_dw84ek$ = function (searchBit, personUid, sortOrder, isTemplate) { return this._dao_0.findAllActiveReport_dw84ek$(searchBit, personUid, sortOrder, isTemplate); }; ReportDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (entityUid, continuation) { return this._dao_0.findByUid_s8cxhz$(entityUid, continuation); }; function Coroutine$updateAsync_7abdyy$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_7abdyy$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_7abdyy$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_7abdyy$_0.prototype.constructor = Coroutine$updateAsync_7abdyy$_0; Coroutine$updateAsync_7abdyy$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$entity.reportLct = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.$this._dao_0.updateAsync_7abdyy$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_ReplicateWrapper.prototype.updateAsync_7abdyy$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_7abdyy$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (uid) { return this._dao_0.findByUidLive_s8cxhz$(uid); }; ReportDao_ReplicateWrapper.prototype.findAllActiveReportLive_6taknv$ = function (isTemplate) { return this._dao_0.findAllActiveReportLive_6taknv$(isTemplate); }; ReportDao_ReplicateWrapper.prototype.findAllActiveReportList_6taknv$ = function (isTemplate) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ReportDao_ReplicateWrapper.prototype.findByUidList_gox9k8$ = function (uidList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$toggleVisibilityReportItems_cbj1f0$_0($this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$updateTime = updateTime_0; } Coroutine$toggleVisibilityReportItems_cbj1f0$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityReportItems_cbj1f0$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityReportItems_cbj1f0$_0.prototype.constructor = Coroutine$toggleVisibilityReportItems_cbj1f0$_0; Coroutine$toggleVisibilityReportItems_cbj1f0$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.toggleVisibilityReportItems_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_ReplicateWrapper.prototype.toggleVisibilityReportItems_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityReportItems_cbj1f0$_0(this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_ReplicateWrapper.prototype.replaceList_rp0mfj$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ReportDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_142($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_142.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_142.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_142.prototype.constructor = Coroutine$insertAsync_142; Coroutine$insertAsync_142.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.reportUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(101, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.reportUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.reportLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.reportUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_142(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ReportDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ReportDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ReportDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ReportDao_ReplicateWrapper', interfaces: [ReportDao]}; function ReportDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ReportDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1.prototype.constructor = Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1; Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeTemplates_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_Repo.prototype.replicateOnNewNodeTemplates_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeTemplates_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeTemplates_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeTemplates_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeTemplates_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeTemplates_1.prototype.constructor = Coroutine$replicateOnChangeTemplates_1; Coroutine$replicateOnChangeTemplates_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeTemplates(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_Repo.prototype.replicateOnChangeTemplates = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeTemplates_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_Repo.prototype.getResults_j49vja$ = function (query) { var _result = this._dao.getResults_j49vja$(query); return _result; }; ReportDao_Repo.prototype.findAllActiveReport_dw84ek$ = function (searchBit, personUid, sortOrder, isTemplate) { var _result = this._dao.findAllActiveReport_dw84ek$(searchBit, personUid, sortOrder, isTemplate); return _result; }; function Coroutine$findByUid_s8cxhz$_2($this, entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityUid = entityUid_0; } Coroutine$findByUid_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$_2.prototype.constructor = Coroutine$findByUid_s8cxhz$_2; Coroutine$findByUid_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid_s8cxhz$(this.local$entityUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_Repo.prototype.findByUid_s8cxhz$ = function (entityUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$_2(this, entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_7abdyy$_1($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_7abdyy$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_7abdyy$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_7abdyy$_1.prototype.constructor = Coroutine$updateAsync_7abdyy$_1; Coroutine$updateAsync_7abdyy$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_7abdyy$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_Repo.prototype.updateAsync_7abdyy$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_7abdyy$_1(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_Repo.prototype.findByUidLive_s8cxhz$ = function (uid) { var _result = this._dao.findByUidLive_s8cxhz$(uid); return _result; }; ReportDao_Repo.prototype.findAllActiveReportLive_6taknv$ = function (isTemplate) { var _result = this._dao.findAllActiveReportLive_6taknv$(isTemplate); return _result; }; ReportDao_Repo.prototype.findAllActiveReportList_6taknv$ = function (isTemplate) { var _result = this._dao.findAllActiveReportList_6taknv$(isTemplate); return _result; }; ReportDao_Repo.prototype.findByUidList_gox9k8$ = function (uidList) { var _result = this._dao.findByUidList_gox9k8$(uidList); return _result; }; function Coroutine$toggleVisibilityReportItems_cbj1f0$_1($this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$toggleVisibility = toggleVisibility_0; this.local$selectedItem = selectedItem_0; this.local$updateTime = updateTime_0; } Coroutine$toggleVisibilityReportItems_cbj1f0$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$toggleVisibilityReportItems_cbj1f0$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$toggleVisibilityReportItems_cbj1f0$_1.prototype.constructor = Coroutine$toggleVisibilityReportItems_cbj1f0$_1; Coroutine$toggleVisibilityReportItems_cbj1f0$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.toggleVisibilityReportItems_cbj1f0$(this.local$toggleVisibility, this.local$selectedItem, this.local$updateTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_Repo.prototype.toggleVisibilityReportItems_cbj1f0$ = function (toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0, suspended) { var instance = new Coroutine$toggleVisibilityReportItems_cbj1f0$_1(this, toggleVisibility_0, selectedItem_0, updateTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_Repo.prototype.replaceList_rp0mfj$ = function (entityList) { this._dao.replaceList_rp0mfj$(entityList); }; ReportDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_143($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_143.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_143.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_143.prototype.constructor = Coroutine$insertAsync_143; Coroutine$insertAsync_143.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ReportDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_143(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ReportDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ReportDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ReportDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; ReportDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ReportDao_Repo', interfaces: [ReportDao]}; function ScheduleDao() { } ScheduleDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScheduleDao', interfaces: [OneToManyJoinDao, BaseDao]}; function ScheduleDao_JdbcKt(_db) { ScheduleDao.call(this); this._db = _db; this._insertAdapterSchedule_ = new ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral(this._db); } ScheduleDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterSchedule_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_144($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_144.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_144.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_144.prototype.constructor = Coroutine$insertAsync_144; Coroutine$insertAsync_144.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSchedule_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_144(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterSchedule_.insertList_4ezy5m$(entityList); }; function Coroutine$insertListAsync_4ezy5m$_17($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_17.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_17.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_17.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_17; Coroutine$insertListAsync_4ezy5m$_17.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSchedule_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_17(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda; Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entity.sceduleStartTime); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entity.scheduleEndTime); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$entity.scheduleDay); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$entity.scheduleMonth); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$entity.scheduleFrequency); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$entity.umCalendarUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.scheduleClazzUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.scheduleMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$entity.scheduleLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$entity.scheduleLastChangedBy); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$entity.scheduleLastChangedTime); this.local$_stmt.setBoolean_fzusl$(12, this.local$closure$entity.scheduleActive); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$entity.scheduleUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_y5fcmb$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_y5fcmb$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_y5fcmb$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_y5fcmb$.prototype.constructor = Coroutine$updateAsync_y5fcmb$; Coroutine$updateAsync_y5fcmb$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE Schedule SET sceduleStartTime = ?, scheduleEndTime = ?, scheduleDay = ?, scheduleMonth = ?, scheduleFrequency = ?, umCalendarUid = ?, scheduleClazzUid = ?, scheduleMasterChangeSeqNum = ?, scheduleLocalChangeSeqNum = ?, scheduleLastChangedBy = ?, scheduleLastChangedTime = ?, scheduleActive = ? WHERE scheduleUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ScheduleDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.updateAsync_y5fcmb$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_y5fcmb$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ScheduleDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.sceduleStartTime); _stmt.setLong_6svq3l$(2, _entity.scheduleEndTime); _stmt.setInt_vux9f0$(3, _entity.scheduleDay); _stmt.setInt_vux9f0$(4, _entity.scheduleMonth); _stmt.setInt_vux9f0$(5, _entity.scheduleFrequency); _stmt.setLong_6svq3l$(6, _entity.umCalendarUid); _stmt.setLong_6svq3l$(7, _entity.scheduleClazzUid); _stmt.setLong_6svq3l$(8, _entity.scheduleMasterChangeSeqNum); _stmt.setLong_6svq3l$(9, _entity.scheduleLocalChangeSeqNum); _stmt.setInt_vux9f0$(10, _entity.scheduleLastChangedBy); _stmt.setLong_6svq3l$(11, _entity.scheduleLastChangedTime); _stmt.setBoolean_fzusl$(12, _entity.scheduleActive); _stmt.setLong_6svq3l$(13, _entity.scheduleUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ScheduleDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE Schedule SET sceduleStartTime = ?, scheduleEndTime = ?, scheduleDay = ?, scheduleMonth = ?, scheduleFrequency = ?, umCalendarUid = ?, scheduleClazzUid = ?, scheduleMasterChangeSeqNum = ?, scheduleLocalChangeSeqNum = ?, scheduleLastChangedBy = ?, scheduleLastChangedTime = ?, scheduleActive = ? WHERE scheduleUid = ?'; prepareAndUseStatement(this._db, _sql, ScheduleDao_JdbcKt$updateList$lambda(entityList)); }; function ScheduleDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.sceduleStartTime); _stmt.setLong_6svq3l$(2, closure$entity.scheduleEndTime); _stmt.setInt_vux9f0$(3, closure$entity.scheduleDay); _stmt.setInt_vux9f0$(4, closure$entity.scheduleMonth); _stmt.setInt_vux9f0$(5, closure$entity.scheduleFrequency); _stmt.setLong_6svq3l$(6, closure$entity.umCalendarUid); _stmt.setLong_6svq3l$(7, closure$entity.scheduleClazzUid); _stmt.setLong_6svq3l$(8, closure$entity.scheduleMasterChangeSeqNum); _stmt.setLong_6svq3l$(9, closure$entity.scheduleLocalChangeSeqNum); _stmt.setInt_vux9f0$(10, closure$entity.scheduleLastChangedBy); _stmt.setLong_6svq3l$(11, closure$entity.scheduleLastChangedTime); _stmt.setBoolean_fzusl$(12, closure$entity.scheduleActive); _stmt.setLong_6svq3l$(13, closure$entity.scheduleUid); return _stmt.executeUpdate(); }; } ScheduleDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE Schedule SET sceduleStartTime = ?, scheduleEndTime = ?, scheduleDay = ?, scheduleMonth = ?, scheduleFrequency = ?, umCalendarUid = ?, scheduleClazzUid = ?, scheduleMasterChangeSeqNum = ?, scheduleLocalChangeSeqNum = ?, scheduleLastChangedBy = ?, scheduleLastChangedTime = ?, scheduleActive = ? WHERE scheduleUid = ?'; prepareAndUseStatement(this._db, _sql, ScheduleDao_JdbcKt$update$lambda(entity)); }; function Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda; Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setLong_6svq3l$(1, _entity.sceduleStartTime); this.local$_stmt.setLong_6svq3l$(2, _entity.scheduleEndTime); this.local$_stmt.setInt_vux9f0$(3, _entity.scheduleDay); this.local$_stmt.setInt_vux9f0$(4, _entity.scheduleMonth); this.local$_stmt.setInt_vux9f0$(5, _entity.scheduleFrequency); this.local$_stmt.setLong_6svq3l$(6, _entity.umCalendarUid); this.local$_stmt.setLong_6svq3l$(7, _entity.scheduleClazzUid); this.local$_stmt.setLong_6svq3l$(8, _entity.scheduleMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(9, _entity.scheduleLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(10, _entity.scheduleLastChangedBy); this.local$_stmt.setLong_6svq3l$(11, _entity.scheduleLastChangedTime); this.local$_stmt.setBoolean_fzusl$(12, _entity.scheduleActive); this.local$_stmt.setLong_6svq3l$(13, _entity.scheduleUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_17($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_17.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_17.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_17.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_17; Coroutine$updateListAsync_4ezy5m$_17.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE Schedule SET sceduleStartTime = ?, scheduleEndTime = ?, scheduleDay = ?, scheduleMonth = ?, scheduleFrequency = ?, umCalendarUid = ?, scheduleClazzUid = ?, scheduleMasterChangeSeqNum = ?, scheduleLocalChangeSeqNum = ?, scheduleLastChangedBy = ?, scheduleLastChangedTime = ?, scheduleActive = ? WHERE scheduleUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ScheduleDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_17(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_134($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_134.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_134.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_134.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_134; Coroutine$replicateOnNewNode_s8cxhz$_134.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScheduleReplicate(schedulePk, scheduleDestination)\n | SELECT DISTINCT Schedule.scheduleUid AS schedulePk,\n | ? AS scheduleDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN Schedule\n | ON Schedule.scheduleClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND Schedule.scheduleLastChangedTime != COALESCE(\n | (SELECT scheduleVersionId\n | FROM ScheduleReplicate\n | WHERE schedulePk = Schedule.scheduleUid\n | AND scheduleDestination = ?), 0) \n | /*psql ON CONFLICT(schedulePk, scheduleDestination) DO UPDATE\n | SET schedulePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScheduleReplicate(schedulePk, scheduleDestination)\n | SELECT DISTINCT Schedule.scheduleUid AS schedulePk,\n | ? AS scheduleDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN Schedule\n | ON Schedule.scheduleClazzUid = Clazz.clazzUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND Schedule.scheduleLastChangedTime != COALESCE(\n | (SELECT scheduleVersionId\n | FROM ScheduleReplicate\n | WHERE schedulePk = Schedule.scheduleUid\n | AND scheduleDestination = ?), 0) \n | ON CONFLICT(schedulePk, scheduleDestination) DO UPDATE\n | SET schedulePending = true\n | \n | \n |')), ScheduleDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_134(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda; Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_137($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_137.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_137.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_137.prototype.constructor = Coroutine$replicateOnChange_137; Coroutine$replicateOnChange_137.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScheduleReplicate(schedulePk, scheduleDestination)\n | SELECT DISTINCT Schedule.scheduleUid AS scheduleUid,\n | UserSession.usClientNodeId AS scheduleDestination\n | FROM ChangeLog\n | JOIN Schedule\n | ON ChangeLog.chTableId = 21\n | AND Schedule.scheduleUid = ChangeLog.chEntityPk\n | JOIN Clazz\n | ON Clazz.clazzUid = Schedule.scheduleClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Schedule.scheduleLastChangedTime != COALESCE(\n | (SELECT scheduleVersionId\n | FROM ScheduleReplicate\n | WHERE schedulePk = Schedule.scheduleUid\n | AND scheduleDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(schedulePk, scheduleDestination) DO UPDATE\n | SET schedulePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScheduleReplicate(schedulePk, scheduleDestination)\n | SELECT DISTINCT Schedule.scheduleUid AS scheduleUid,\n | UserSession.usClientNodeId AS scheduleDestination\n | FROM ChangeLog\n | JOIN Schedule\n | ON ChangeLog.chTableId = 21\n | AND Schedule.scheduleUid = ChangeLog.chEntityPk\n | JOIN Clazz\n | ON Clazz.clazzUid = Schedule.scheduleClazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Schedule.scheduleLastChangedTime != COALESCE(\n | (SELECT scheduleVersionId\n | FROM ScheduleReplicate\n | WHERE schedulePk = Schedule.scheduleUid\n | AND scheduleDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(schedulePk, scheduleDestination) DO UPDATE\n | SET schedulePending = true\n | \n | \n |')), ScheduleDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_137(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda(closure$active_0, closure$changeTime_0, closure$scheduleUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$scheduleUid = closure$scheduleUid_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda; Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$scheduleUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$updateScheduleActivated$lambda(closure$active_0, closure$changeTime_0, closure$scheduleUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$updateScheduleActivated$lambda(closure$active_0, closure$changeTime_0, closure$scheduleUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateScheduleActivated_zaz62j$($this, scheduleUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scheduleUid = scheduleUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateScheduleActivated_zaz62j$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateScheduleActivated_zaz62j$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateScheduleActivated_zaz62j$.prototype.constructor = Coroutine$updateScheduleActivated_zaz62j$; Coroutine$updateScheduleActivated_zaz62j$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE Schedule \n | SET scheduleActive = ?,\n | scheduleLastChangedTime = ?\n | WHERE scheduleUid = ?\n | \n ')), ScheduleDao_JdbcKt$updateScheduleActivated$lambda(this.local$active, this.local$changeTime, this.local$scheduleUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_JdbcKt.prototype.updateScheduleActivated_zaz62j$ = function (scheduleUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateScheduleActivated_zaz62j$(this, scheduleUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ScheduleDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_scheduleUid = closure$_result.getLong_61zpoe$('scheduleUid'); var _tmp_sceduleStartTime = closure$_result.getLong_61zpoe$('sceduleStartTime'); var _tmp_scheduleEndTime = closure$_result.getLong_61zpoe$('scheduleEndTime'); var _tmp_scheduleDay = closure$_result.getInt_61zpoe$('scheduleDay'); var _tmp_scheduleMonth = closure$_result.getInt_61zpoe$('scheduleMonth'); var _tmp_scheduleFrequency = closure$_result.getInt_61zpoe$('scheduleFrequency'); var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); var _tmp_scheduleClazzUid = closure$_result.getLong_61zpoe$('scheduleClazzUid'); var _tmp_scheduleMasterChangeSeqNum = closure$_result.getLong_61zpoe$('scheduleMasterChangeSeqNum'); var _tmp_scheduleLocalChangeSeqNum = closure$_result.getLong_61zpoe$('scheduleLocalChangeSeqNum'); var _tmp_scheduleLastChangedBy = closure$_result.getInt_61zpoe$('scheduleLastChangedBy'); var _tmp_scheduleLastChangedTime = closure$_result.getLong_61zpoe$('scheduleLastChangedTime'); var _tmp_scheduleActive = closure$_result.getBoolean_61zpoe$('scheduleActive'); var $receiver = new Schedule(); $receiver.scheduleUid = _tmp_scheduleUid; $receiver.sceduleStartTime = _tmp_sceduleStartTime; $receiver.scheduleEndTime = _tmp_scheduleEndTime; $receiver.scheduleDay = _tmp_scheduleDay; $receiver.scheduleMonth = _tmp_scheduleMonth; $receiver.scheduleFrequency = _tmp_scheduleFrequency; $receiver.umCalendarUid = _tmp_umCalendarUid; $receiver.scheduleClazzUid = _tmp_scheduleClazzUid; $receiver.scheduleMasterChangeSeqNum = _tmp_scheduleMasterChangeSeqNum; $receiver.scheduleLocalChangeSeqNum = _tmp_scheduleLocalChangeSeqNum; $receiver.scheduleLastChangedBy = _tmp_scheduleLastChangedBy; $receiver.scheduleLastChangedTime = _tmp_scheduleLastChangedTime; $receiver.scheduleActive = _tmp_scheduleActive; return $receiver; }; } function ScheduleDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, ScheduleDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function ScheduleDao_JdbcKt$findByUid$lambda(closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$uid); return useResults(_stmt.executeQuery(), ScheduleDao_JdbcKt$findByUid$lambda$lambda); }; } ScheduleDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (uid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Schedule WHERE scheduleUid = ?'), ScheduleDao_JdbcKt$findByUid$lambda(uid)); }; function ScheduleDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_scheduleUid = closure$_result.getLong_61zpoe$('scheduleUid'); var _tmp_sceduleStartTime = closure$_result.getLong_61zpoe$('sceduleStartTime'); var _tmp_scheduleEndTime = closure$_result.getLong_61zpoe$('scheduleEndTime'); var _tmp_scheduleDay = closure$_result.getInt_61zpoe$('scheduleDay'); var _tmp_scheduleMonth = closure$_result.getInt_61zpoe$('scheduleMonth'); var _tmp_scheduleFrequency = closure$_result.getInt_61zpoe$('scheduleFrequency'); var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); var _tmp_scheduleClazzUid = closure$_result.getLong_61zpoe$('scheduleClazzUid'); var _tmp_scheduleMasterChangeSeqNum = closure$_result.getLong_61zpoe$('scheduleMasterChangeSeqNum'); var _tmp_scheduleLocalChangeSeqNum = closure$_result.getLong_61zpoe$('scheduleLocalChangeSeqNum'); var _tmp_scheduleLastChangedBy = closure$_result.getInt_61zpoe$('scheduleLastChangedBy'); var _tmp_scheduleLastChangedTime = closure$_result.getLong_61zpoe$('scheduleLastChangedTime'); var _tmp_scheduleActive = closure$_result.getBoolean_61zpoe$('scheduleActive'); var $receiver = new Schedule(); $receiver.scheduleUid = _tmp_scheduleUid; $receiver.sceduleStartTime = _tmp_sceduleStartTime; $receiver.scheduleEndTime = _tmp_scheduleEndTime; $receiver.scheduleDay = _tmp_scheduleDay; $receiver.scheduleMonth = _tmp_scheduleMonth; $receiver.scheduleFrequency = _tmp_scheduleFrequency; $receiver.umCalendarUid = _tmp_umCalendarUid; $receiver.scheduleClazzUid = _tmp_scheduleClazzUid; $receiver.scheduleMasterChangeSeqNum = _tmp_scheduleMasterChangeSeqNum; $receiver.scheduleLocalChangeSeqNum = _tmp_scheduleLocalChangeSeqNum; $receiver.scheduleLastChangedBy = _tmp_scheduleLastChangedBy; $receiver.scheduleLastChangedTime = _tmp_scheduleLastChangedTime; $receiver.scheduleActive = _tmp_scheduleActive; return $receiver; }; } function ScheduleDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, ScheduleDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda; Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScheduleDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScheduleDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM Schedule WHERE scheduleUid = ?'), ScheduleDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral(this$ScheduleDao_JdbcKt, closure$clazzUid) { this.this$ScheduleDao_JdbcKt = this$ScheduleDao_JdbcKt; this.closure$clazzUid = closure$clazzUid; DataSourceFactory.call(this); } function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_scheduleUid = closure$_result.getLong_61zpoe$('scheduleUid'); var _tmp_sceduleStartTime = closure$_result.getLong_61zpoe$('sceduleStartTime'); var _tmp_scheduleEndTime = closure$_result.getLong_61zpoe$('scheduleEndTime'); var _tmp_scheduleDay = closure$_result.getInt_61zpoe$('scheduleDay'); var _tmp_scheduleMonth = closure$_result.getInt_61zpoe$('scheduleMonth'); var _tmp_scheduleFrequency = closure$_result.getInt_61zpoe$('scheduleFrequency'); var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); var _tmp_scheduleClazzUid = closure$_result.getLong_61zpoe$('scheduleClazzUid'); var _tmp_scheduleMasterChangeSeqNum = closure$_result.getLong_61zpoe$('scheduleMasterChangeSeqNum'); var _tmp_scheduleLocalChangeSeqNum = closure$_result.getLong_61zpoe$('scheduleLocalChangeSeqNum'); var _tmp_scheduleLastChangedBy = closure$_result.getInt_61zpoe$('scheduleLastChangedBy'); var _tmp_scheduleLastChangedTime = closure$_result.getLong_61zpoe$('scheduleLastChangedTime'); var _tmp_scheduleActive = closure$_result.getBoolean_61zpoe$('scheduleActive'); var $receiver = new Schedule(); $receiver.scheduleUid = _tmp_scheduleUid; $receiver.sceduleStartTime = _tmp_sceduleStartTime; $receiver.scheduleEndTime = _tmp_scheduleEndTime; $receiver.scheduleDay = _tmp_scheduleDay; $receiver.scheduleMonth = _tmp_scheduleMonth; $receiver.scheduleFrequency = _tmp_scheduleFrequency; $receiver.umCalendarUid = _tmp_umCalendarUid; $receiver.scheduleClazzUid = _tmp_scheduleClazzUid; $receiver.scheduleMasterChangeSeqNum = _tmp_scheduleMasterChangeSeqNum; $receiver.scheduleLocalChangeSeqNum = _tmp_scheduleLocalChangeSeqNum; $receiver.scheduleLastChangedBy = _tmp_scheduleLastChangedBy; $receiver.scheduleLastChangedTime = _tmp_scheduleLastChangedTime; $receiver.scheduleActive = _tmp_scheduleActive; return $receiver; }; } function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda(closure$clazzUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScheduleDao_JdbcKt = this$ScheduleDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScheduleDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM (SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1 ) LIMIT ? OFFSET ?'), ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda$lambda(this.local$closure$clazzUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ScheduleDao_JdbcKt._db, listOf_0('Schedule'), ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getData$lambda(this.this$ScheduleDao_JdbcKt, this.closure$clazzUid, _limit, _offset)); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda(closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScheduleDao_JdbcKt = this$ScheduleDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScheduleDao_JdbcKt._db, new PreparedStatementConfig('SELECT COUNT(*) FROM (SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1 ) '), ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda$lambda(this.local$closure$clazzUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ScheduleDao_JdbcKt._db, listOf_0('Schedule'), ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral$getLength$lambda(this.this$ScheduleDao_JdbcKt, this.closure$clazzUid)); }; ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ScheduleDao_JdbcKt.prototype.findAllSchedulesByClazzUid_s8cxhz$ = function (clazzUid) { return new ScheduleDao_JdbcKt$findAllSchedulesByClazzUid$ObjectLiteral(this, clazzUid); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsList$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_scheduleUid = closure$_result.getLong_61zpoe$('scheduleUid'); var _tmp_sceduleStartTime = closure$_result.getLong_61zpoe$('sceduleStartTime'); var _tmp_scheduleEndTime = closure$_result.getLong_61zpoe$('scheduleEndTime'); var _tmp_scheduleDay = closure$_result.getInt_61zpoe$('scheduleDay'); var _tmp_scheduleMonth = closure$_result.getInt_61zpoe$('scheduleMonth'); var _tmp_scheduleFrequency = closure$_result.getInt_61zpoe$('scheduleFrequency'); var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); var _tmp_scheduleClazzUid = closure$_result.getLong_61zpoe$('scheduleClazzUid'); var _tmp_scheduleMasterChangeSeqNum = closure$_result.getLong_61zpoe$('scheduleMasterChangeSeqNum'); var _tmp_scheduleLocalChangeSeqNum = closure$_result.getLong_61zpoe$('scheduleLocalChangeSeqNum'); var _tmp_scheduleLastChangedBy = closure$_result.getInt_61zpoe$('scheduleLastChangedBy'); var _tmp_scheduleLastChangedTime = closure$_result.getLong_61zpoe$('scheduleLastChangedTime'); var _tmp_scheduleActive = closure$_result.getBoolean_61zpoe$('scheduleActive'); var $receiver = new Schedule(); $receiver.scheduleUid = _tmp_scheduleUid; $receiver.sceduleStartTime = _tmp_sceduleStartTime; $receiver.scheduleEndTime = _tmp_scheduleEndTime; $receiver.scheduleDay = _tmp_scheduleDay; $receiver.scheduleMonth = _tmp_scheduleMonth; $receiver.scheduleFrequency = _tmp_scheduleFrequency; $receiver.umCalendarUid = _tmp_umCalendarUid; $receiver.scheduleClazzUid = _tmp_scheduleClazzUid; $receiver.scheduleMasterChangeSeqNum = _tmp_scheduleMasterChangeSeqNum; $receiver.scheduleLocalChangeSeqNum = _tmp_scheduleLocalChangeSeqNum; $receiver.scheduleLastChangedBy = _tmp_scheduleLastChangedBy; $receiver.scheduleLastChangedTime = _tmp_scheduleLastChangedTime; $receiver.scheduleActive = _tmp_scheduleActive; return $receiver; }; } function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsList$lambda$lambda(_result) { return mapRows(_result, ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsList$lambda$lambda$lambda(_result)); } function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsList$lambda(closure$clazzUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$clazzUid); return useResults(_stmt.executeQuery(), ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsList$lambda$lambda); }; } ScheduleDao_JdbcKt.prototype.findAllSchedulesByClazzUidAsList_s8cxhz$ = function (clazzUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1'), ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsList$lambda(clazzUid)); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_scheduleUid = closure$_result.getLong_61zpoe$('scheduleUid'); var _tmp_sceduleStartTime = closure$_result.getLong_61zpoe$('sceduleStartTime'); var _tmp_scheduleEndTime = closure$_result.getLong_61zpoe$('scheduleEndTime'); var _tmp_scheduleDay = closure$_result.getInt_61zpoe$('scheduleDay'); var _tmp_scheduleMonth = closure$_result.getInt_61zpoe$('scheduleMonth'); var _tmp_scheduleFrequency = closure$_result.getInt_61zpoe$('scheduleFrequency'); var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); var _tmp_scheduleClazzUid = closure$_result.getLong_61zpoe$('scheduleClazzUid'); var _tmp_scheduleMasterChangeSeqNum = closure$_result.getLong_61zpoe$('scheduleMasterChangeSeqNum'); var _tmp_scheduleLocalChangeSeqNum = closure$_result.getLong_61zpoe$('scheduleLocalChangeSeqNum'); var _tmp_scheduleLastChangedBy = closure$_result.getInt_61zpoe$('scheduleLastChangedBy'); var _tmp_scheduleLastChangedTime = closure$_result.getLong_61zpoe$('scheduleLastChangedTime'); var _tmp_scheduleActive = closure$_result.getBoolean_61zpoe$('scheduleActive'); var $receiver = new Schedule(); $receiver.scheduleUid = _tmp_scheduleUid; $receiver.sceduleStartTime = _tmp_sceduleStartTime; $receiver.scheduleEndTime = _tmp_scheduleEndTime; $receiver.scheduleDay = _tmp_scheduleDay; $receiver.scheduleMonth = _tmp_scheduleMonth; $receiver.scheduleFrequency = _tmp_scheduleFrequency; $receiver.umCalendarUid = _tmp_umCalendarUid; $receiver.scheduleClazzUid = _tmp_scheduleClazzUid; $receiver.scheduleMasterChangeSeqNum = _tmp_scheduleMasterChangeSeqNum; $receiver.scheduleLocalChangeSeqNum = _tmp_scheduleLocalChangeSeqNum; $receiver.scheduleLastChangedBy = _tmp_scheduleLastChangedBy; $receiver.scheduleLastChangedTime = _tmp_scheduleLastChangedTime; $receiver.scheduleActive = _tmp_scheduleActive; return $receiver; }; } function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda$lambda(_result) { return mapRows(_result, ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda(closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda(closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda(closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScheduleDao_JdbcKt = this$ScheduleDao_JdbcKt_0; this.local$closure$clazzUid = closure$clazzUid_0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScheduleDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1'), ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda$lambda(this.local$closure$clazzUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda(this$ScheduleDao_JdbcKt_0, closure$clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScheduleDao_JdbcKt.prototype.findAllSchedulesByClazzUidAsLiveList_s8cxhz$ = function (clazzUid) { return new LiveDataImpl(this._db, listOf_0('Schedule'), ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsLiveList$lambda(this, clazzUid)); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_scheduleUid = closure$_result.getLong_61zpoe$('scheduleUid'); var _tmp_sceduleStartTime = closure$_result.getLong_61zpoe$('sceduleStartTime'); var _tmp_scheduleEndTime = closure$_result.getLong_61zpoe$('scheduleEndTime'); var _tmp_scheduleDay = closure$_result.getInt_61zpoe$('scheduleDay'); var _tmp_scheduleMonth = closure$_result.getInt_61zpoe$('scheduleMonth'); var _tmp_scheduleFrequency = closure$_result.getInt_61zpoe$('scheduleFrequency'); var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); var _tmp_scheduleClazzUid = closure$_result.getLong_61zpoe$('scheduleClazzUid'); var _tmp_scheduleMasterChangeSeqNum = closure$_result.getLong_61zpoe$('scheduleMasterChangeSeqNum'); var _tmp_scheduleLocalChangeSeqNum = closure$_result.getLong_61zpoe$('scheduleLocalChangeSeqNum'); var _tmp_scheduleLastChangedBy = closure$_result.getInt_61zpoe$('scheduleLastChangedBy'); var _tmp_scheduleLastChangedTime = closure$_result.getLong_61zpoe$('scheduleLastChangedTime'); var _tmp_scheduleActive = closure$_result.getBoolean_61zpoe$('scheduleActive'); var $receiver = new Schedule(); $receiver.scheduleUid = _tmp_scheduleUid; $receiver.sceduleStartTime = _tmp_sceduleStartTime; $receiver.scheduleEndTime = _tmp_scheduleEndTime; $receiver.scheduleDay = _tmp_scheduleDay; $receiver.scheduleMonth = _tmp_scheduleMonth; $receiver.scheduleFrequency = _tmp_scheduleFrequency; $receiver.umCalendarUid = _tmp_umCalendarUid; $receiver.scheduleClazzUid = _tmp_scheduleClazzUid; $receiver.scheduleMasterChangeSeqNum = _tmp_scheduleMasterChangeSeqNum; $receiver.scheduleLocalChangeSeqNum = _tmp_scheduleLocalChangeSeqNum; $receiver.scheduleLastChangedBy = _tmp_scheduleLastChangedBy; $receiver.scheduleLastChangedTime = _tmp_scheduleLastChangedTime; $receiver.scheduleActive = _tmp_scheduleActive; return $receiver; }; } function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda$lambda(_result) { return mapRows(_result, ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda(closure$clazzUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUid = closure$clazzUid_0; this.local$_stmt = _stmt_0; } Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda.prototype.constructor = Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda; Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$clazzUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda(closure$clazzUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda(closure$clazzUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScheduleDao_JdbcKt.prototype.findAllSchedulesByClazzUidAsync_s8cxhz$ = function (clazzUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM Schedule WHERE scheduleClazzUid = ? AND CAST(scheduleActive AS INTEGER) = 1 '), ScheduleDao_JdbcKt$findAllSchedulesByClazzUidAsync$lambda(clazzUid), continuation); }; function ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO Schedule (scheduleUid, sceduleStartTime, scheduleEndTime, scheduleDay, scheduleMonth, scheduleFrequency, umCalendarUid, scheduleClazzUid, scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum, scheduleLastChangedBy, scheduleLastChangedTime, scheduleActive) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.scheduleUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.scheduleUid); } stmt.setLong_6svq3l$(2, entity.sceduleStartTime); stmt.setLong_6svq3l$(3, entity.scheduleEndTime); stmt.setInt_vux9f0$(4, entity.scheduleDay); stmt.setInt_vux9f0$(5, entity.scheduleMonth); stmt.setInt_vux9f0$(6, entity.scheduleFrequency); stmt.setLong_6svq3l$(7, entity.umCalendarUid); stmt.setLong_6svq3l$(8, entity.scheduleClazzUid); stmt.setLong_6svq3l$(9, entity.scheduleMasterChangeSeqNum); stmt.setLong_6svq3l$(10, entity.scheduleLocalChangeSeqNum); stmt.setInt_vux9f0$(11, entity.scheduleLastChangedBy); stmt.setLong_6svq3l$(12, entity.scheduleLastChangedTime); stmt.setBoolean_fzusl$(13, entity.scheduleActive); }; ScheduleDao_JdbcKt$_insertAdapterSchedule_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ScheduleDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScheduleDao_JdbcKt', interfaces: [ScheduleDao]}; function ScheduleDao_ReplicateWrapper(_db, _dao) { ScheduleDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_135($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_135.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_135.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_135.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_135; Coroutine$replicateOnNewNode_s8cxhz$_135.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_135(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_138($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_138.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_138.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_138.prototype.constructor = Coroutine$replicateOnChange_138; Coroutine$replicateOnChange_138.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_138(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ScheduleDao_ReplicateWrapper.prototype.updateAsync_y5fcmb$ = function (entity, continuation) { entity.scheduleLastChangedTime = systemTimeInMillis(); return this._dao_0.updateAsync_y5fcmb$(entity, continuation); }; function Coroutine$updateScheduleActivated_zaz62j$_0($this, scheduleUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scheduleUid = scheduleUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateScheduleActivated_zaz62j$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateScheduleActivated_zaz62j$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateScheduleActivated_zaz62j$_0.prototype.constructor = Coroutine$updateScheduleActivated_zaz62j$_0; Coroutine$updateScheduleActivated_zaz62j$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateScheduleActivated_zaz62j$(this.local$scheduleUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_ReplicateWrapper.prototype.updateScheduleActivated_zaz62j$ = function (scheduleUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateScheduleActivated_zaz62j$_0(this, scheduleUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (uid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ScheduleDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; ScheduleDao_ReplicateWrapper.prototype.findAllSchedulesByClazzUid_s8cxhz$ = function (clazzUid) { return this._dao_0.findAllSchedulesByClazzUid_s8cxhz$(clazzUid); }; ScheduleDao_ReplicateWrapper.prototype.findAllSchedulesByClazzUidAsList_s8cxhz$ = function (clazzUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ScheduleDao_ReplicateWrapper.prototype.findAllSchedulesByClazzUidAsLiveList_s8cxhz$ = function (clazzUid) { return this._dao_0.findAllSchedulesByClazzUidAsLiveList_s8cxhz$(clazzUid); }; ScheduleDao_ReplicateWrapper.prototype.findAllSchedulesByClazzUidAsync_s8cxhz$ = function (clazzUid, continuation) { return this._dao_0.findAllSchedulesByClazzUidAsync_s8cxhz$(clazzUid, continuation); }; function Coroutine$insertAsync_145($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_145.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_145.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_145.prototype.constructor = Coroutine$insertAsync_145; Coroutine$insertAsync_145.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.scheduleUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(21, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.scheduleUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.scheduleLastChangedTime = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.scheduleUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_145(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ScheduleDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ScheduleDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertListAsync_4ezy5m$_18($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_18.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_18.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_18.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_18; Coroutine$insertListAsync_4ezy5m$_18.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.scheduleUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(21, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.scheduleUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.scheduleLastChangedTime = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_18(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_18($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_18.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_18.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_18.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_18; Coroutine$updateListAsync_4ezy5m$_18.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.scheduleLastChangedTime = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_18(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScheduleDao_ReplicateWrapper', interfaces: [ScheduleDao]}; function ScheduleDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ScheduleDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_136($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_136.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_136.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_136.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_136; Coroutine$replicateOnNewNode_s8cxhz$_136.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_136(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_139($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_139.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_139.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_139.prototype.constructor = Coroutine$replicateOnChange_139; Coroutine$replicateOnChange_139.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_139(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$updateAsync_y5fcmb$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_y5fcmb$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_y5fcmb$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_y5fcmb$_0.prototype.constructor = Coroutine$updateAsync_y5fcmb$_0; Coroutine$updateAsync_y5fcmb$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_y5fcmb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.updateAsync_y5fcmb$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_y5fcmb$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateScheduleActivated_zaz62j$_1($this, scheduleUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scheduleUid = scheduleUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateScheduleActivated_zaz62j$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateScheduleActivated_zaz62j$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateScheduleActivated_zaz62j$_1.prototype.constructor = Coroutine$updateScheduleActivated_zaz62j$_1; Coroutine$updateScheduleActivated_zaz62j$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateScheduleActivated_zaz62j$(this.local$scheduleUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.updateScheduleActivated_zaz62j$ = function (scheduleUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateScheduleActivated_zaz62j$_1(this, scheduleUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_Repo.prototype.findByUid_s8cxhz$ = function (uid) { var _result = this._dao.findByUid_s8cxhz$(uid); return _result; }; function Coroutine$findByUidAsync_s8cxhz$_14($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_14.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_14.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_14.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_14; Coroutine$findByUidAsync_s8cxhz$_14.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_14(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_Repo.prototype.findAllSchedulesByClazzUid_s8cxhz$ = function (clazzUid) { var _result = this._dao.findAllSchedulesByClazzUid_s8cxhz$(clazzUid); return _result; }; ScheduleDao_Repo.prototype.findAllSchedulesByClazzUidAsList_s8cxhz$ = function (clazzUid) { var _result = this._dao.findAllSchedulesByClazzUidAsList_s8cxhz$(clazzUid); return _result; }; ScheduleDao_Repo.prototype.findAllSchedulesByClazzUidAsLiveList_s8cxhz$ = function (clazzUid) { var _result = this._dao.findAllSchedulesByClazzUidAsLiveList_s8cxhz$(clazzUid); return _result; }; function Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$($this, clazzUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUid = clazzUid_0; } Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$.prototype.constructor = Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$; Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllSchedulesByClazzUidAsync_s8cxhz$(this.local$clazzUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.findAllSchedulesByClazzUidAsync_s8cxhz$ = function (clazzUid_0, continuation_0, suspended) { var instance = new Coroutine$findAllSchedulesByClazzUidAsync_s8cxhz$(this, clazzUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_146($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_146.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_146.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_146.prototype.constructor = Coroutine$insertAsync_146; Coroutine$insertAsync_146.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_146(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; ScheduleDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; ScheduleDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; function Coroutine$insertListAsync_4ezy5m$_19($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_19.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_19.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_19.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_19; Coroutine$insertListAsync_4ezy5m$_19.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_19(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_19($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_19.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_19.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_19.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_19; Coroutine$updateListAsync_4ezy5m$_19.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScheduleDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_19(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScheduleDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScheduleDao_Repo', interfaces: [ScheduleDao]}; function SchoolDao() { } SchoolDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolDao', interfaces: [BaseDao]}; function SchoolDao_JdbcKt(_db) { SchoolDao.call(this); this._db = _db; this._insertAdapterSchool_ = new SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral(this._db); } SchoolDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterSchool_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_147($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_147.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_147.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_147.prototype.constructor = Coroutine$insertAsync_147; Coroutine$insertAsync_147.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSchool_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_147(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterSchool_.insertList_4ezy5m$(entityList); }; function Coroutine$SchoolDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$updateAsync$lambda; Coroutine$SchoolDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$entity.schoolName); this.local$_stmt.setString_vqvrqt$(2, this.local$closure$entity.schoolDesc); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$entity.schoolAddress); this.local$_stmt.setBoolean_fzusl$(4, this.local$closure$entity.schoolActive); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$entity.schoolPhoneNumber); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$entity.schoolGender); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.schoolHolidayCalendarUid); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.schoolFeatures); this.local$_stmt.setDouble_5wr77w$(9, this.local$closure$entity.schoolLocationLong); this.local$_stmt.setDouble_5wr77w$(10, this.local$closure$entity.schoolLocationLatt); this.local$_stmt.setString_vqvrqt$(11, this.local$closure$entity.schoolEmailAddress); this.local$_stmt.setLong_6svq3l$(12, this.local$closure$entity.schoolTeachersPersonGroupUid); this.local$_stmt.setLong_6svq3l$(13, this.local$closure$entity.schoolStudentsPersonGroupUid); this.local$_stmt.setLong_6svq3l$(14, this.local$closure$entity.schoolPendingStudentsPersonGroupUid); this.local$_stmt.setString_vqvrqt$(15, this.local$closure$entity.schoolCode); this.local$_stmt.setLong_6svq3l$(16, this.local$closure$entity.schoolMasterChangeSeqNum); this.local$_stmt.setLong_6svq3l$(17, this.local$closure$entity.schoolLocalChangeSeqNum); this.local$_stmt.setInt_vux9f0$(18, this.local$closure$entity.schoolLastChangedBy); this.local$_stmt.setLong_6svq3l$(19, this.local$closure$entity.schoolLct); this.local$_stmt.setString_vqvrqt$(20, this.local$closure$entity.schoolTimeZone); this.local$_stmt.setLong_6svq3l$(21, this.local$closure$entity.schoolUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_7q4b7e$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_7q4b7e$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_7q4b7e$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_7q4b7e$.prototype.constructor = Coroutine$updateAsync_7q4b7e$; Coroutine$updateAsync_7q4b7e$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE School SET schoolName = ?, schoolDesc = ?, schoolAddress = ?, schoolActive = ?, schoolPhoneNumber = ?, schoolGender = ?, schoolHolidayCalendarUid = ?, schoolFeatures = ?, schoolLocationLong = ?, schoolLocationLatt = ?, schoolEmailAddress = ?, schoolTeachersPersonGroupUid = ?, schoolStudentsPersonGroupUid = ?, schoolPendingStudentsPersonGroupUid = ?, schoolCode = ?, schoolMasterChangeSeqNum = ?, schoolLocalChangeSeqNum = ?, schoolLastChangedBy = ?, schoolLct = ?, schoolTimeZone = ? WHERE schoolUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, SchoolDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_JdbcKt.prototype.updateAsync_7q4b7e$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_7q4b7e$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.schoolName); _stmt.setString_vqvrqt$(2, _entity.schoolDesc); _stmt.setString_vqvrqt$(3, _entity.schoolAddress); _stmt.setBoolean_fzusl$(4, _entity.schoolActive); _stmt.setString_vqvrqt$(5, _entity.schoolPhoneNumber); _stmt.setInt_vux9f0$(6, _entity.schoolGender); _stmt.setLong_6svq3l$(7, _entity.schoolHolidayCalendarUid); _stmt.setLong_6svq3l$(8, _entity.schoolFeatures); _stmt.setDouble_5wr77w$(9, _entity.schoolLocationLong); _stmt.setDouble_5wr77w$(10, _entity.schoolLocationLatt); _stmt.setString_vqvrqt$(11, _entity.schoolEmailAddress); _stmt.setLong_6svq3l$(12, _entity.schoolTeachersPersonGroupUid); _stmt.setLong_6svq3l$(13, _entity.schoolStudentsPersonGroupUid); _stmt.setLong_6svq3l$(14, _entity.schoolPendingStudentsPersonGroupUid); _stmt.setString_vqvrqt$(15, _entity.schoolCode); _stmt.setLong_6svq3l$(16, _entity.schoolMasterChangeSeqNum); _stmt.setLong_6svq3l$(17, _entity.schoolLocalChangeSeqNum); _stmt.setInt_vux9f0$(18, _entity.schoolLastChangedBy); _stmt.setLong_6svq3l$(19, _entity.schoolLct); _stmt.setString_vqvrqt$(20, _entity.schoolTimeZone); _stmt.setLong_6svq3l$(21, _entity.schoolUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } SchoolDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE School SET schoolName = ?, schoolDesc = ?, schoolAddress = ?, schoolActive = ?, schoolPhoneNumber = ?, schoolGender = ?, schoolHolidayCalendarUid = ?, schoolFeatures = ?, schoolLocationLong = ?, schoolLocationLatt = ?, schoolEmailAddress = ?, schoolTeachersPersonGroupUid = ?, schoolStudentsPersonGroupUid = ?, schoolPendingStudentsPersonGroupUid = ?, schoolCode = ?, schoolMasterChangeSeqNum = ?, schoolLocalChangeSeqNum = ?, schoolLastChangedBy = ?, schoolLct = ?, schoolTimeZone = ? WHERE schoolUid = ?'; prepareAndUseStatement(this._db, _sql, SchoolDao_JdbcKt$updateList$lambda(entityList)); }; function SchoolDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.schoolName); _stmt.setString_vqvrqt$(2, closure$entity.schoolDesc); _stmt.setString_vqvrqt$(3, closure$entity.schoolAddress); _stmt.setBoolean_fzusl$(4, closure$entity.schoolActive); _stmt.setString_vqvrqt$(5, closure$entity.schoolPhoneNumber); _stmt.setInt_vux9f0$(6, closure$entity.schoolGender); _stmt.setLong_6svq3l$(7, closure$entity.schoolHolidayCalendarUid); _stmt.setLong_6svq3l$(8, closure$entity.schoolFeatures); _stmt.setDouble_5wr77w$(9, closure$entity.schoolLocationLong); _stmt.setDouble_5wr77w$(10, closure$entity.schoolLocationLatt); _stmt.setString_vqvrqt$(11, closure$entity.schoolEmailAddress); _stmt.setLong_6svq3l$(12, closure$entity.schoolTeachersPersonGroupUid); _stmt.setLong_6svq3l$(13, closure$entity.schoolStudentsPersonGroupUid); _stmt.setLong_6svq3l$(14, closure$entity.schoolPendingStudentsPersonGroupUid); _stmt.setString_vqvrqt$(15, closure$entity.schoolCode); _stmt.setLong_6svq3l$(16, closure$entity.schoolMasterChangeSeqNum); _stmt.setLong_6svq3l$(17, closure$entity.schoolLocalChangeSeqNum); _stmt.setInt_vux9f0$(18, closure$entity.schoolLastChangedBy); _stmt.setLong_6svq3l$(19, closure$entity.schoolLct); _stmt.setString_vqvrqt$(20, closure$entity.schoolTimeZone); _stmt.setLong_6svq3l$(21, closure$entity.schoolUid); return _stmt.executeUpdate(); }; } SchoolDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE School SET schoolName = ?, schoolDesc = ?, schoolAddress = ?, schoolActive = ?, schoolPhoneNumber = ?, schoolGender = ?, schoolHolidayCalendarUid = ?, schoolFeatures = ?, schoolLocationLong = ?, schoolLocationLatt = ?, schoolEmailAddress = ?, schoolTeachersPersonGroupUid = ?, schoolStudentsPersonGroupUid = ?, schoolPendingStudentsPersonGroupUid = ?, schoolCode = ?, schoolMasterChangeSeqNum = ?, schoolLocalChangeSeqNum = ?, schoolLastChangedBy = ?, schoolLct = ?, schoolTimeZone = ? WHERE schoolUid = ?'; prepareAndUseStatement(this._db, _sql, SchoolDao_JdbcKt$update$lambda(entity)); }; function Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_137($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_137.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_137.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_137.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_137; Coroutine$replicateOnNewNode_s8cxhz$_137.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SchoolReplicate(schoolPk, schoolDestination)\n | SELECT DISTINCT School.schoolUid AS schoolPk,\n | ? AS schoolDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND School.schoolLct != COALESCE(\n | (SELECT schoolVersionId\n | FROM SchoolReplicate\n | WHERE schoolPk = School.schoolUid\n | AND schoolDestination = ?), 0) \n | /*psql ON CONFLICT(schoolPk, schoolDestination) DO UPDATE\n | SET schoolPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SchoolReplicate(schoolPk, schoolDestination)\n | SELECT DISTINCT School.schoolUid AS schoolPk,\n | ? AS schoolDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND School.schoolLct != COALESCE(\n | (SELECT schoolVersionId\n | FROM SchoolReplicate\n | WHERE schoolPk = School.schoolUid\n | AND schoolDestination = ?), 0) \n | ON CONFLICT(schoolPk, schoolDestination) DO UPDATE\n | SET schoolPending = true\n | \n | \n |')), SchoolDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_137(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda; Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_140($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_140.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_140.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_140.prototype.constructor = Coroutine$replicateOnChange_140; Coroutine$replicateOnChange_140.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SchoolReplicate(schoolPk, schoolDestination)\n | SELECT DISTINCT School.schoolUid AS schoolUid,\n | UserSession.usClientNodeId AS schoolDestination\n | FROM ChangeLog\n | JOIN School\n | ON ChangeLog.chTableId = 164\n | AND ChangeLog.chEntityPk = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND School.schoolLct != COALESCE(\n | (SELECT schoolVersionId\n | FROM SchoolReplicate\n | WHERE schoolPk = School.schoolUid\n | AND schoolDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(schoolPk, schoolDestination) DO UPDATE\n | SET schoolPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SchoolReplicate(schoolPk, schoolDestination)\n | SELECT DISTINCT School.schoolUid AS schoolUid,\n | UserSession.usClientNodeId AS schoolDestination\n | FROM ChangeLog\n | JOIN School\n | ON ChangeLog.chTableId = 164\n | AND ChangeLog.chEntityPk = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND School.schoolLct != COALESCE(\n | (SELECT schoolVersionId\n | FROM SchoolReplicate\n | WHERE schoolPk = School.schoolUid\n | AND schoolDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(schoolPk, schoolDestination) DO UPDATE\n | SET schoolPending = true\n | \n | \n |')), SchoolDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_140(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_schoolUid = closure$_result.getLong_61zpoe$('schoolUid'); var _tmp_schoolName = closure$_result.getString_61zpoe$('schoolName'); var _tmp_schoolDesc = closure$_result.getString_61zpoe$('schoolDesc'); var _tmp_schoolAddress = closure$_result.getString_61zpoe$('schoolAddress'); var _tmp_schoolActive = closure$_result.getBoolean_61zpoe$('schoolActive'); var _tmp_schoolPhoneNumber = closure$_result.getString_61zpoe$('schoolPhoneNumber'); var _tmp_schoolGender = closure$_result.getInt_61zpoe$('schoolGender'); var _tmp_schoolHolidayCalendarUid = closure$_result.getLong_61zpoe$('schoolHolidayCalendarUid'); var _tmp_schoolFeatures = closure$_result.getLong_61zpoe$('schoolFeatures'); var _tmp_schoolLocationLong = closure$_result.getDouble_61zpoe$('schoolLocationLong'); var _tmp_schoolLocationLatt = closure$_result.getDouble_61zpoe$('schoolLocationLatt'); var _tmp_schoolEmailAddress = closure$_result.getString_61zpoe$('schoolEmailAddress'); var _tmp_schoolTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('schoolTeachersPersonGroupUid'); var _tmp_schoolStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolStudentsPersonGroupUid'); var _tmp_schoolPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); var _tmp_schoolCode = closure$_result.getString_61zpoe$('schoolCode'); var _tmp_schoolMasterChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMasterChangeSeqNum'); var _tmp_schoolLocalChangeSeqNum = closure$_result.getLong_61zpoe$('schoolLocalChangeSeqNum'); var _tmp_schoolLastChangedBy = closure$_result.getInt_61zpoe$('schoolLastChangedBy'); var _tmp_schoolLct = closure$_result.getLong_61zpoe$('schoolLct'); var _tmp_schoolTimeZone = closure$_result.getString_61zpoe$('schoolTimeZone'); var $receiver = new School(); $receiver.schoolUid = _tmp_schoolUid; $receiver.schoolName = _tmp_schoolName; $receiver.schoolDesc = _tmp_schoolDesc; $receiver.schoolAddress = _tmp_schoolAddress; $receiver.schoolActive = _tmp_schoolActive; $receiver.schoolPhoneNumber = _tmp_schoolPhoneNumber; $receiver.schoolGender = _tmp_schoolGender; $receiver.schoolHolidayCalendarUid = _tmp_schoolHolidayCalendarUid; $receiver.schoolFeatures = _tmp_schoolFeatures; $receiver.schoolLocationLong = _tmp_schoolLocationLong; $receiver.schoolLocationLatt = _tmp_schoolLocationLatt; $receiver.schoolEmailAddress = _tmp_schoolEmailAddress; $receiver.schoolTeachersPersonGroupUid = _tmp_schoolTeachersPersonGroupUid; $receiver.schoolStudentsPersonGroupUid = _tmp_schoolStudentsPersonGroupUid; $receiver.schoolPendingStudentsPersonGroupUid = _tmp_schoolPendingStudentsPersonGroupUid; $receiver.schoolCode = _tmp_schoolCode; $receiver.schoolMasterChangeSeqNum = _tmp_schoolMasterChangeSeqNum; $receiver.schoolLocalChangeSeqNum = _tmp_schoolLocalChangeSeqNum; $receiver.schoolLastChangedBy = _tmp_schoolLastChangedBy; $receiver.schoolLct = _tmp_schoolLct; $receiver.schoolTimeZone = _tmp_schoolTimeZone; return $receiver; }; } function SchoolDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, SchoolDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda(closure$schoolUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$schoolUid = closure$schoolUid_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda; Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$schoolUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findByUidAsync$lambda(closure$schoolUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findByUidAsync$lambda(closure$schoolUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (schoolUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM School WHERE schoolUid = ? AND CAST(schoolActive AS INTEGER) = 1'), SchoolDao_JdbcKt$findByUidAsync$lambda(schoolUid), continuation); }; function SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_schoolUid = closure$_result.getLong_61zpoe$('schoolUid'); var _tmp_schoolName = closure$_result.getString_61zpoe$('schoolName'); var _tmp_schoolDesc = closure$_result.getString_61zpoe$('schoolDesc'); var _tmp_schoolAddress = closure$_result.getString_61zpoe$('schoolAddress'); var _tmp_schoolActive = closure$_result.getBoolean_61zpoe$('schoolActive'); var _tmp_schoolPhoneNumber = closure$_result.getString_61zpoe$('schoolPhoneNumber'); var _tmp_schoolGender = closure$_result.getInt_61zpoe$('schoolGender'); var _tmp_schoolHolidayCalendarUid = closure$_result.getLong_61zpoe$('schoolHolidayCalendarUid'); var _tmp_schoolFeatures = closure$_result.getLong_61zpoe$('schoolFeatures'); var _tmp_schoolLocationLong = closure$_result.getDouble_61zpoe$('schoolLocationLong'); var _tmp_schoolLocationLatt = closure$_result.getDouble_61zpoe$('schoolLocationLatt'); var _tmp_schoolEmailAddress = closure$_result.getString_61zpoe$('schoolEmailAddress'); var _tmp_schoolTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('schoolTeachersPersonGroupUid'); var _tmp_schoolStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolStudentsPersonGroupUid'); var _tmp_schoolPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); var _tmp_schoolCode = closure$_result.getString_61zpoe$('schoolCode'); var _tmp_schoolMasterChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMasterChangeSeqNum'); var _tmp_schoolLocalChangeSeqNum = closure$_result.getLong_61zpoe$('schoolLocalChangeSeqNum'); var _tmp_schoolLastChangedBy = closure$_result.getInt_61zpoe$('schoolLastChangedBy'); var _tmp_schoolLct = closure$_result.getLong_61zpoe$('schoolLct'); var _tmp_schoolTimeZone = closure$_result.getString_61zpoe$('schoolTimeZone'); var _tmp_HolidayCalendar_nullCount = 0; var _tmp_umCalendarUid = closure$_result.getLong_61zpoe$('umCalendarUid'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarName = closure$_result.getString_61zpoe$('umCalendarName'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarCategory = closure$_result.getInt_61zpoe$('umCalendarCategory'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarActive = closure$_result.getBoolean_61zpoe$('umCalendarActive'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarMasterChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarLocalChangeSeqNum = closure$_result.getLong_61zpoe$('umCalendarLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarLastChangedBy = closure$_result.getInt_61zpoe$('umCalendarLastChangedBy'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_umCalendarLct = closure$_result.getLong_61zpoe$('umCalendarLct'); if (closure$_result.wasNull()) { _tmp_HolidayCalendar_nullCount = _tmp_HolidayCalendar_nullCount + 1 | 0; } var _tmp_HolidayCalendar_isAllNull = _tmp_HolidayCalendar_nullCount === 8; var $receiver = new SchoolWithHolidayCalendar(); $receiver.schoolUid = _tmp_schoolUid; $receiver.schoolName = _tmp_schoolName; $receiver.schoolDesc = _tmp_schoolDesc; $receiver.schoolAddress = _tmp_schoolAddress; $receiver.schoolActive = _tmp_schoolActive; $receiver.schoolPhoneNumber = _tmp_schoolPhoneNumber; $receiver.schoolGender = _tmp_schoolGender; $receiver.schoolHolidayCalendarUid = _tmp_schoolHolidayCalendarUid; $receiver.schoolFeatures = _tmp_schoolFeatures; $receiver.schoolLocationLong = _tmp_schoolLocationLong; $receiver.schoolLocationLatt = _tmp_schoolLocationLatt; $receiver.schoolEmailAddress = _tmp_schoolEmailAddress; $receiver.schoolTeachersPersonGroupUid = _tmp_schoolTeachersPersonGroupUid; $receiver.schoolStudentsPersonGroupUid = _tmp_schoolStudentsPersonGroupUid; $receiver.schoolPendingStudentsPersonGroupUid = _tmp_schoolPendingStudentsPersonGroupUid; $receiver.schoolCode = _tmp_schoolCode; $receiver.schoolMasterChangeSeqNum = _tmp_schoolMasterChangeSeqNum; $receiver.schoolLocalChangeSeqNum = _tmp_schoolLocalChangeSeqNum; $receiver.schoolLastChangedBy = _tmp_schoolLastChangedBy; $receiver.schoolLct = _tmp_schoolLct; $receiver.schoolTimeZone = _tmp_schoolTimeZone; if (!_tmp_HolidayCalendar_isAllNull) { var $receiver_0 = new HolidayCalendar(); $receiver_0.umCalendarUid = _tmp_umCalendarUid; $receiver_0.umCalendarName = _tmp_umCalendarName; $receiver_0.umCalendarCategory = _tmp_umCalendarCategory; $receiver_0.umCalendarActive = _tmp_umCalendarActive; $receiver_0.umCalendarMasterChangeSeqNum = _tmp_umCalendarMasterChangeSeqNum; $receiver_0.umCalendarLocalChangeSeqNum = _tmp_umCalendarLocalChangeSeqNum; $receiver_0.umCalendarLastChangedBy = _tmp_umCalendarLastChangedBy; $receiver_0.umCalendarLct = _tmp_umCalendarLct; $receiver.holidayCalendar = $receiver_0; } return $receiver; }; } function SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda$lambda(_result) { return mapNextRow(_result, null, SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda$lambda$lambda(_result)); } function Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda; Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolDao_JdbcKt.prototype.findByUidWithHolidayCalendarAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT School.*, HolidayCalendar.* FROM School \n | LEFT JOIN HolidayCalendar ON School.schoolHolidayCalendarUid = HolidayCalendar.umCalendarUid\n | WHERE School.schoolUid = ?\n ')), SchoolDao_JdbcKt$findByUidWithHolidayCalendarAsync$lambda(uid), continuation); }; function SchoolDao_JdbcKt$findBySchoolCode$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_schoolUid = closure$_result.getLong_61zpoe$('schoolUid'); var _tmp_schoolName = closure$_result.getString_61zpoe$('schoolName'); var _tmp_schoolDesc = closure$_result.getString_61zpoe$('schoolDesc'); var _tmp_schoolAddress = closure$_result.getString_61zpoe$('schoolAddress'); var _tmp_schoolActive = closure$_result.getBoolean_61zpoe$('schoolActive'); var _tmp_schoolPhoneNumber = closure$_result.getString_61zpoe$('schoolPhoneNumber'); var _tmp_schoolGender = closure$_result.getInt_61zpoe$('schoolGender'); var _tmp_schoolHolidayCalendarUid = closure$_result.getLong_61zpoe$('schoolHolidayCalendarUid'); var _tmp_schoolFeatures = closure$_result.getLong_61zpoe$('schoolFeatures'); var _tmp_schoolLocationLong = closure$_result.getDouble_61zpoe$('schoolLocationLong'); var _tmp_schoolLocationLatt = closure$_result.getDouble_61zpoe$('schoolLocationLatt'); var _tmp_schoolEmailAddress = closure$_result.getString_61zpoe$('schoolEmailAddress'); var _tmp_schoolTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('schoolTeachersPersonGroupUid'); var _tmp_schoolStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolStudentsPersonGroupUid'); var _tmp_schoolPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); var _tmp_schoolCode = closure$_result.getString_61zpoe$('schoolCode'); var _tmp_schoolMasterChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMasterChangeSeqNum'); var _tmp_schoolLocalChangeSeqNum = closure$_result.getLong_61zpoe$('schoolLocalChangeSeqNum'); var _tmp_schoolLastChangedBy = closure$_result.getInt_61zpoe$('schoolLastChangedBy'); var _tmp_schoolLct = closure$_result.getLong_61zpoe$('schoolLct'); var _tmp_schoolTimeZone = closure$_result.getString_61zpoe$('schoolTimeZone'); var $receiver = new School(); $receiver.schoolUid = _tmp_schoolUid; $receiver.schoolName = _tmp_schoolName; $receiver.schoolDesc = _tmp_schoolDesc; $receiver.schoolAddress = _tmp_schoolAddress; $receiver.schoolActive = _tmp_schoolActive; $receiver.schoolPhoneNumber = _tmp_schoolPhoneNumber; $receiver.schoolGender = _tmp_schoolGender; $receiver.schoolHolidayCalendarUid = _tmp_schoolHolidayCalendarUid; $receiver.schoolFeatures = _tmp_schoolFeatures; $receiver.schoolLocationLong = _tmp_schoolLocationLong; $receiver.schoolLocationLatt = _tmp_schoolLocationLatt; $receiver.schoolEmailAddress = _tmp_schoolEmailAddress; $receiver.schoolTeachersPersonGroupUid = _tmp_schoolTeachersPersonGroupUid; $receiver.schoolStudentsPersonGroupUid = _tmp_schoolStudentsPersonGroupUid; $receiver.schoolPendingStudentsPersonGroupUid = _tmp_schoolPendingStudentsPersonGroupUid; $receiver.schoolCode = _tmp_schoolCode; $receiver.schoolMasterChangeSeqNum = _tmp_schoolMasterChangeSeqNum; $receiver.schoolLocalChangeSeqNum = _tmp_schoolLocalChangeSeqNum; $receiver.schoolLastChangedBy = _tmp_schoolLastChangedBy; $receiver.schoolLct = _tmp_schoolLct; $receiver.schoolTimeZone = _tmp_schoolTimeZone; return $receiver; }; } function SchoolDao_JdbcKt$findBySchoolCode$lambda$lambda(_result) { return mapNextRow(_result, null, SchoolDao_JdbcKt$findBySchoolCode$lambda$lambda$lambda(_result)); } function Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda(closure$code_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$code = closure$code_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda; Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$code); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$findBySchoolCode$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findBySchoolCode$lambda(closure$code_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findBySchoolCode$lambda(closure$code_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolDao_JdbcKt.prototype.findBySchoolCode_61zpoe$ = function (code, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM School WHERE schoolCode = ?'), SchoolDao_JdbcKt$findBySchoolCode$lambda(code), continuation); }; function SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_schoolUid = closure$_result.getLong_61zpoe$('schoolUid'); var _tmp_schoolName = closure$_result.getString_61zpoe$('schoolName'); var _tmp_schoolDesc = closure$_result.getString_61zpoe$('schoolDesc'); var _tmp_schoolAddress = closure$_result.getString_61zpoe$('schoolAddress'); var _tmp_schoolActive = closure$_result.getBoolean_61zpoe$('schoolActive'); var _tmp_schoolPhoneNumber = closure$_result.getString_61zpoe$('schoolPhoneNumber'); var _tmp_schoolGender = closure$_result.getInt_61zpoe$('schoolGender'); var _tmp_schoolHolidayCalendarUid = closure$_result.getLong_61zpoe$('schoolHolidayCalendarUid'); var _tmp_schoolFeatures = closure$_result.getLong_61zpoe$('schoolFeatures'); var _tmp_schoolLocationLong = closure$_result.getDouble_61zpoe$('schoolLocationLong'); var _tmp_schoolLocationLatt = closure$_result.getDouble_61zpoe$('schoolLocationLatt'); var _tmp_schoolEmailAddress = closure$_result.getString_61zpoe$('schoolEmailAddress'); var _tmp_schoolTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('schoolTeachersPersonGroupUid'); var _tmp_schoolStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolStudentsPersonGroupUid'); var _tmp_schoolPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); var _tmp_schoolCode = closure$_result.getString_61zpoe$('schoolCode'); var _tmp_schoolMasterChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMasterChangeSeqNum'); var _tmp_schoolLocalChangeSeqNum = closure$_result.getLong_61zpoe$('schoolLocalChangeSeqNum'); var _tmp_schoolLastChangedBy = closure$_result.getInt_61zpoe$('schoolLastChangedBy'); var _tmp_schoolLct = closure$_result.getLong_61zpoe$('schoolLct'); var _tmp_schoolTimeZone = closure$_result.getString_61zpoe$('schoolTimeZone'); var $receiver = new School(); $receiver.schoolUid = _tmp_schoolUid; $receiver.schoolName = _tmp_schoolName; $receiver.schoolDesc = _tmp_schoolDesc; $receiver.schoolAddress = _tmp_schoolAddress; $receiver.schoolActive = _tmp_schoolActive; $receiver.schoolPhoneNumber = _tmp_schoolPhoneNumber; $receiver.schoolGender = _tmp_schoolGender; $receiver.schoolHolidayCalendarUid = _tmp_schoolHolidayCalendarUid; $receiver.schoolFeatures = _tmp_schoolFeatures; $receiver.schoolLocationLong = _tmp_schoolLocationLong; $receiver.schoolLocationLatt = _tmp_schoolLocationLatt; $receiver.schoolEmailAddress = _tmp_schoolEmailAddress; $receiver.schoolTeachersPersonGroupUid = _tmp_schoolTeachersPersonGroupUid; $receiver.schoolStudentsPersonGroupUid = _tmp_schoolStudentsPersonGroupUid; $receiver.schoolPendingStudentsPersonGroupUid = _tmp_schoolPendingStudentsPersonGroupUid; $receiver.schoolCode = _tmp_schoolCode; $receiver.schoolMasterChangeSeqNum = _tmp_schoolMasterChangeSeqNum; $receiver.schoolLocalChangeSeqNum = _tmp_schoolLocalChangeSeqNum; $receiver.schoolLastChangedBy = _tmp_schoolLastChangedBy; $receiver.schoolLct = _tmp_schoolLct; $receiver.schoolTimeZone = _tmp_schoolTimeZone; return $receiver; }; } function SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda$lambda(_result) { return mapNextRow(_result, null, SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda$lambda$lambda(_result)); } function Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda(closure$code_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$code = closure$code_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda; Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$code); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda(closure$code_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda(closure$code_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolDao_JdbcKt.prototype.findBySchoolCodeFromWeb_61zpoe$ = function (code, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM School WHERE schoolCode = ?'), SchoolDao_JdbcKt$findBySchoolCodeFromWeb$lambda(code), continuation); }; function SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getBoolean_za3lpa$(1); }; } function SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda$lambda(_result) { return mapNextRow(_result, false, SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda$lambda$lambda(_result)); } function Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda(closure$permission_0, closure$accountPersonUid_0, closure$schoolUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$permission = closure$permission_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$schoolUid = closure$schoolUid_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda; Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$schoolUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda(closure$permission_0, closure$accountPersonUid_0, closure$schoolUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda(closure$permission_0, closure$accountPersonUid_0, closure$schoolUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolDao_JdbcKt.prototype.personHasPermissionWithSchool_b9bd0d$ = function (accountPersonUid, schoolUid, permission, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | Select EXISTS(\n | SELECT School.schoolUid \n | FROM School\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | ?) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | AND PrsGrpMbr.groupMemberPersonUid = ?\n | WHERE School.schoolUid = ?) \n | \n ')), SchoolDao_JdbcKt$personHasPermissionWithSchool$lambda(permission, accountPersonUid, schoolUid), continuation); }; function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral(this$SchoolDao_JdbcKt, closure$permission, closure$personUid, closure$searchBit, closure$sortOrder) { this.this$SchoolDao_JdbcKt = this$SchoolDao_JdbcKt; this.closure$permission = closure$permission; this.closure$personUid = closure$personUid; this.closure$searchBit = closure$searchBit; this.closure$sortOrder = closure$sortOrder; DataSourceFactory.call(this); } function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_numStudents = closure$_result.getInt_61zpoe$('numStudents'); var _tmp_numTeachers = closure$_result.getInt_61zpoe$('numTeachers'); var _tmp_locationName = closure$_result.getString_61zpoe$('locationName'); var _tmp_clazzCount = closure$_result.getInt_61zpoe$('clazzCount'); var _tmp_schoolUid = closure$_result.getLong_61zpoe$('schoolUid'); var _tmp_schoolName = closure$_result.getString_61zpoe$('schoolName'); var _tmp_schoolDesc = closure$_result.getString_61zpoe$('schoolDesc'); var _tmp_schoolAddress = closure$_result.getString_61zpoe$('schoolAddress'); var _tmp_schoolActive = closure$_result.getBoolean_61zpoe$('schoolActive'); var _tmp_schoolPhoneNumber = closure$_result.getString_61zpoe$('schoolPhoneNumber'); var _tmp_schoolGender = closure$_result.getInt_61zpoe$('schoolGender'); var _tmp_schoolHolidayCalendarUid = closure$_result.getLong_61zpoe$('schoolHolidayCalendarUid'); var _tmp_schoolFeatures = closure$_result.getLong_61zpoe$('schoolFeatures'); var _tmp_schoolLocationLong = closure$_result.getDouble_61zpoe$('schoolLocationLong'); var _tmp_schoolLocationLatt = closure$_result.getDouble_61zpoe$('schoolLocationLatt'); var _tmp_schoolEmailAddress = closure$_result.getString_61zpoe$('schoolEmailAddress'); var _tmp_schoolTeachersPersonGroupUid = closure$_result.getLong_61zpoe$('schoolTeachersPersonGroupUid'); var _tmp_schoolStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolStudentsPersonGroupUid'); var _tmp_schoolPendingStudentsPersonGroupUid = closure$_result.getLong_61zpoe$('schoolPendingStudentsPersonGroupUid'); var _tmp_schoolCode = closure$_result.getString_61zpoe$('schoolCode'); var _tmp_schoolMasterChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMasterChangeSeqNum'); var _tmp_schoolLocalChangeSeqNum = closure$_result.getLong_61zpoe$('schoolLocalChangeSeqNum'); var _tmp_schoolLastChangedBy = closure$_result.getInt_61zpoe$('schoolLastChangedBy'); var _tmp_schoolLct = closure$_result.getLong_61zpoe$('schoolLct'); var _tmp_schoolTimeZone = closure$_result.getString_61zpoe$('schoolTimeZone'); var $receiver = new SchoolWithMemberCountAndLocation(); $receiver.numStudents = _tmp_numStudents; $receiver.numTeachers = _tmp_numTeachers; $receiver.locationName = _tmp_locationName; $receiver.clazzCount = _tmp_clazzCount; $receiver.schoolUid = _tmp_schoolUid; $receiver.schoolName = _tmp_schoolName; $receiver.schoolDesc = _tmp_schoolDesc; $receiver.schoolAddress = _tmp_schoolAddress; $receiver.schoolActive = _tmp_schoolActive; $receiver.schoolPhoneNumber = _tmp_schoolPhoneNumber; $receiver.schoolGender = _tmp_schoolGender; $receiver.schoolHolidayCalendarUid = _tmp_schoolHolidayCalendarUid; $receiver.schoolFeatures = _tmp_schoolFeatures; $receiver.schoolLocationLong = _tmp_schoolLocationLong; $receiver.schoolLocationLatt = _tmp_schoolLocationLatt; $receiver.schoolEmailAddress = _tmp_schoolEmailAddress; $receiver.schoolTeachersPersonGroupUid = _tmp_schoolTeachersPersonGroupUid; $receiver.schoolStudentsPersonGroupUid = _tmp_schoolStudentsPersonGroupUid; $receiver.schoolPendingStudentsPersonGroupUid = _tmp_schoolPendingStudentsPersonGroupUid; $receiver.schoolCode = _tmp_schoolCode; $receiver.schoolMasterChangeSeqNum = _tmp_schoolMasterChangeSeqNum; $receiver.schoolLocalChangeSeqNum = _tmp_schoolLocalChangeSeqNum; $receiver.schoolLastChangedBy = _tmp_schoolLastChangedBy; $receiver.schoolLct = _tmp_schoolLct; $receiver.schoolTimeZone = _tmp_schoolTimeZone; return $receiver; }; } function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda(closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$permission = closure$permission_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchBit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda(closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda(closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda(this$SchoolDao_JdbcKt_0, closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$SchoolDao_JdbcKt = this$SchoolDao_JdbcKt_0; this.local$closure$permission = closure$permission_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$SchoolDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT School.*, \n | (SELECT COUNT(*) \n | FROM SchoolMember \n | WHERE SchoolMember.schoolMemberSchoolUid = School.schoolUid \n | AND CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1 \n | AND SchoolMember.schoolMemberRole = 1003) as numStudents,\n | (SELECT COUNT(*) \n | FROM SchoolMember \n | WHERE SchoolMember.schoolMemberSchoolUid = School.schoolUid \n | AND CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1 \n | AND SchoolMember.schoolMemberRole = 1004) as numTeachers, \n | '' as locationName,\n | (SELECT COUNT(*) \n | FROM Clazz \n | WHERE Clazz.clazzSchoolUid = School.schoolUid \n | AND CAST(Clazz.clazzUid AS INTEGER) = 1 ) as clazzCount\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | ?\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND CAST(schoolActive AS INTEGER) = 1\n | AND schoolName LIKE ?\n | GROUP BY School.schoolUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN School.schoolName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN School.schoolName\n | ELSE ''\n | END DESC) LIMIT ? OFFSET ?\n ")), SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda$lambda(this.local$closure$permission, this.local$closure$personUid, this.local$closure$searchBit, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda(this$SchoolDao_JdbcKt_0, closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda(this$SchoolDao_JdbcKt_0, closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$SchoolDao_JdbcKt._db, listOf(['SchoolMember', 'Clazz', 'PersonGroupMember', 'ScopedGrant', 'School']), SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getData$lambda(this.this$SchoolDao_JdbcKt, this.closure$permission, this.closure$personUid, this.closure$searchBit, this.closure$sortOrder, _limit, _offset)); }; function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda(closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$permission = closure$permission_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$permission); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchBit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda(closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda(closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda(this$SchoolDao_JdbcKt_0, closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$SchoolDao_JdbcKt = this$SchoolDao_JdbcKt_0; this.local$closure$permission = closure$permission_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$searchBit = closure$searchBit_0; this.local$closure$sortOrder = closure$sortOrder_0; } Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda; Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$SchoolDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT School.*, \n | (SELECT COUNT(*) \n | FROM SchoolMember \n | WHERE SchoolMember.schoolMemberSchoolUid = School.schoolUid \n | AND CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1 \n | AND SchoolMember.schoolMemberRole = 1003) as numStudents,\n | (SELECT COUNT(*) \n | FROM SchoolMember \n | WHERE SchoolMember.schoolMemberSchoolUid = School.schoolUid \n | AND CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1 \n | AND SchoolMember.schoolMemberRole = 1004) as numTeachers, \n | '' as locationName,\n | (SELECT COUNT(*) \n | FROM Clazz \n | WHERE Clazz.clazzSchoolUid = School.schoolUid \n | AND CAST(Clazz.clazzUid AS INTEGER) = 1 ) as clazzCount\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | ?\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | WHERE PersonGroupMember.groupMemberPersonUid = ?\n | AND PersonGroupMember.groupMemberActive \n | AND CAST(schoolActive AS INTEGER) = 1\n | AND schoolName LIKE ?\n | GROUP BY School.schoolUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN School.schoolName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN School.schoolName\n | ELSE ''\n | END DESC) \n ")), SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda$lambda(this.local$closure$permission, this.local$closure$personUid, this.local$closure$searchBit, this.local$closure$sortOrder), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda(this$SchoolDao_JdbcKt_0, closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda(this$SchoolDao_JdbcKt_0, closure$permission_0, closure$personUid_0, closure$searchBit_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$SchoolDao_JdbcKt._db, listOf(['SchoolMember', 'Clazz', 'PersonGroupMember', 'ScopedGrant', 'School']), SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral$getLength$lambda(this.this$SchoolDao_JdbcKt, this.closure$permission, this.closure$personUid, this.closure$searchBit, this.closure$sortOrder)); }; SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; SchoolDao_JdbcKt.prototype.findAllActiveSchoolWithMemberCountAndLocationName_gx19nu$ = function (searchBit, personUid, permission, sortOrder) { return new SchoolDao_JdbcKt$findAllActiveSchoolWithMemberCountAndLocationName$ObjectLiteral(this, permission, personUid, searchBit, sortOrder); }; function SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO School (schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.schoolUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.schoolUid); } stmt.setString_vqvrqt$(2, entity.schoolName); stmt.setString_vqvrqt$(3, entity.schoolDesc); stmt.setString_vqvrqt$(4, entity.schoolAddress); stmt.setBoolean_fzusl$(5, entity.schoolActive); stmt.setString_vqvrqt$(6, entity.schoolPhoneNumber); stmt.setInt_vux9f0$(7, entity.schoolGender); stmt.setLong_6svq3l$(8, entity.schoolHolidayCalendarUid); stmt.setLong_6svq3l$(9, entity.schoolFeatures); stmt.setDouble_5wr77w$(10, entity.schoolLocationLong); stmt.setDouble_5wr77w$(11, entity.schoolLocationLatt); stmt.setString_vqvrqt$(12, entity.schoolEmailAddress); stmt.setLong_6svq3l$(13, entity.schoolTeachersPersonGroupUid); stmt.setLong_6svq3l$(14, entity.schoolStudentsPersonGroupUid); stmt.setLong_6svq3l$(15, entity.schoolPendingStudentsPersonGroupUid); stmt.setString_vqvrqt$(16, entity.schoolCode); stmt.setLong_6svq3l$(17, entity.schoolMasterChangeSeqNum); stmt.setLong_6svq3l$(18, entity.schoolLocalChangeSeqNum); stmt.setInt_vux9f0$(19, entity.schoolLastChangedBy); stmt.setLong_6svq3l$(20, entity.schoolLct); stmt.setString_vqvrqt$(21, entity.schoolTimeZone); }; SchoolDao_JdbcKt$_insertAdapterSchool_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; SchoolDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolDao_JdbcKt', interfaces: [SchoolDao]}; function SchoolDao_ReplicateWrapper(_db, _dao) { SchoolDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_138($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_138.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_138.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_138.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_138; Coroutine$replicateOnNewNode_s8cxhz$_138.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_138(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_141($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_141.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_141.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_141.prototype.constructor = Coroutine$replicateOnChange_141; Coroutine$replicateOnChange_141.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_141(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (schoolUid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(schoolUid, continuation); }; SchoolDao_ReplicateWrapper.prototype.findByUidWithHolidayCalendarAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidWithHolidayCalendarAsync_s8cxhz$(uid, continuation); }; SchoolDao_ReplicateWrapper.prototype.findBySchoolCode_61zpoe$ = function (code, continuation) { return this._dao_0.findBySchoolCode_61zpoe$(code, continuation); }; SchoolDao_ReplicateWrapper.prototype.findBySchoolCodeFromWeb_61zpoe$ = function (code, continuation) { return this._dao_0.findBySchoolCodeFromWeb_61zpoe$(code, continuation); }; SchoolDao_ReplicateWrapper.prototype.personHasPermissionWithSchool_b9bd0d$ = function (accountPersonUid, schoolUid, permission, continuation) { return this._dao_0.personHasPermissionWithSchool_b9bd0d$(accountPersonUid, schoolUid, permission, continuation); }; SchoolDao_ReplicateWrapper.prototype.findAllActiveSchoolWithMemberCountAndLocationName_gx19nu$ = function (searchBit, personUid, permission, sortOrder) { return this._dao_0.findAllActiveSchoolWithMemberCountAndLocationName_gx19nu$(searchBit, personUid, permission, sortOrder); }; SchoolDao_ReplicateWrapper.prototype.updateAsync_7q4b7e$ = function (entity, continuation) { entity.schoolLct = systemTimeInMillis(); return this._dao_0.updateAsync_7q4b7e$(entity, continuation); }; SchoolDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_148($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_148.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_148.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_148.prototype.constructor = Coroutine$insertAsync_148; Coroutine$insertAsync_148.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.schoolUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(164, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.schoolUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.schoolLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.schoolUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_148(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolDao_ReplicateWrapper', interfaces: [SchoolDao]}; function SchoolDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { SchoolDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_139($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_139.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_139.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_139.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_139; Coroutine$replicateOnNewNode_s8cxhz$_139.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_139(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_142($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_142.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_142.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_142.prototype.constructor = Coroutine$replicateOnChange_142; Coroutine$replicateOnChange_142.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_142(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$_15($this, schoolUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$schoolUid = schoolUid_0; } Coroutine$findByUidAsync_s8cxhz$_15.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_15.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_15.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_15; Coroutine$findByUidAsync_s8cxhz$_15.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$schoolUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (schoolUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_15(this, schoolUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0.prototype.constructor = Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0; Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidWithHolidayCalendarAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.findByUidWithHolidayCalendarAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidWithHolidayCalendarAsync_s8cxhz$_0(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findBySchoolCode_61zpoe$($this, code_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$code = code_0; } Coroutine$findBySchoolCode_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findBySchoolCode_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findBySchoolCode_61zpoe$.prototype.constructor = Coroutine$findBySchoolCode_61zpoe$; Coroutine$findBySchoolCode_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findBySchoolCode_61zpoe$(this.local$code, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.findBySchoolCode_61zpoe$ = function (code_0, continuation_0, suspended) { var instance = new Coroutine$findBySchoolCode_61zpoe$(this, code_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_Repo.prototype.findBySchoolCodeFromWeb_61zpoe$ = function (code, continuation) { throw IllegalStateException_init('Synchronous HTTP is not supported on Door/Javascript!'); }; function Coroutine$personHasPermissionWithSchool_b9bd0d$($this, accountPersonUid_0, schoolUid_0, permission_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$schoolUid = schoolUid_0; this.local$permission = permission_0; } Coroutine$personHasPermissionWithSchool_b9bd0d$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$personHasPermissionWithSchool_b9bd0d$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$personHasPermissionWithSchool_b9bd0d$.prototype.constructor = Coroutine$personHasPermissionWithSchool_b9bd0d$; Coroutine$personHasPermissionWithSchool_b9bd0d$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.personHasPermissionWithSchool_b9bd0d$(this.local$accountPersonUid, this.local$schoolUid, this.local$permission, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.personHasPermissionWithSchool_b9bd0d$ = function (accountPersonUid_0, schoolUid_0, permission_0, continuation_0, suspended) { var instance = new Coroutine$personHasPermissionWithSchool_b9bd0d$(this, accountPersonUid_0, schoolUid_0, permission_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_Repo.prototype.findAllActiveSchoolWithMemberCountAndLocationName_gx19nu$ = function (searchBit, personUid, permission, sortOrder) { var _result = this._dao.findAllActiveSchoolWithMemberCountAndLocationName_gx19nu$(searchBit, personUid, permission, sortOrder); return _result; }; function Coroutine$updateAsync_7q4b7e$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_7q4b7e$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_7q4b7e$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_7q4b7e$_0.prototype.constructor = Coroutine$updateAsync_7q4b7e$_0; Coroutine$updateAsync_7q4b7e$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_7q4b7e$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.updateAsync_7q4b7e$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_7q4b7e$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_149($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_149.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_149.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_149.prototype.constructor = Coroutine$insertAsync_149; Coroutine$insertAsync_149.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_149(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; SchoolDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; SchoolDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; SchoolDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolDao_Repo', interfaces: [SchoolDao]}; function SchoolMemberDao() { } SchoolMemberDao.prototype.findBySchoolAndPersonAndRole_6qtc6d$ = function (schoolUid, personUid, role, timeFilter, continuation, callback$default) { if (timeFilter === void 0) timeFilter = L0; return callback$default ? callback$default(schoolUid, personUid, role, timeFilter, continuation) : this.findBySchoolAndPersonAndRole_6qtc6d$$default(schoolUid, personUid, role, timeFilter, continuation); }; SchoolMemberDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolMemberDao', interfaces: [BaseDao]}; function SchoolMemberDao_JdbcKt(_db) { SchoolMemberDao.call(this); this._db = _db; this._insertAdapterSchoolMember_ = new SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral(this._db); } SchoolMemberDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterSchoolMember_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_150($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_150.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_150.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_150.prototype.constructor = Coroutine$insertAsync_150; Coroutine$insertAsync_150.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSchoolMember_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_150(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterSchoolMember_.insertList_4ezy5m$(entityList); }; function Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entity = closure$entity_0; this.local$closure$_result = closure$_result_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda; Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$entity.schoolMemberPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entity.schoolMemberSchoolUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$entity.schoolMemberJoinDate); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entity.schoolMemberLeftDate); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$entity.schoolMemberRole); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$entity.schoolMemberActive); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$entity.schoolMemberLocalChangeSeqNum); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$entity.schoolMemberMasterChangeSeqNum); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$entity.schoolMemberLastChangedBy); this.local$_stmt.setLong_6svq3l$(10, this.local$closure$entity.schoolMemberLct); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$entity.schoolMemberUid); this.local$tmp$ = this.local$closure$_result.v; this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$closure$_result.v = this.local$tmp$ + this.result_0 | 0, Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$updateAsync$lambda(closure$entity_0, closure$_result_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_nzwwdw$($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_result = void 0; this.local$entity = entity_0; } Coroutine$updateAsync_nzwwdw$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_nzwwdw$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_nzwwdw$.prototype.constructor = Coroutine$updateAsync_nzwwdw$; Coroutine$updateAsync_nzwwdw$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_result = {v: 0}; var _sql = 'UPDATE SchoolMember SET schoolMemberPersonUid = ?, schoolMemberSchoolUid = ?, schoolMemberJoinDate = ?, schoolMemberLeftDate = ?, schoolMemberRole = ?, schoolMemberActive = ?, schoolMemberLocalChangeSeqNum = ?, schoolMemberMasterChangeSeqNum = ?, schoolMemberLastChangedBy = ?, schoolMemberLct = ? WHERE schoolMemberUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, SchoolMemberDao_JdbcKt$updateAsync$lambda(this.local$entity, this.local$_result), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.local$_result.v; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_JdbcKt.prototype.updateAsync_nzwwdw$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_nzwwdw$(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolMemberDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.schoolMemberPersonUid); _stmt.setLong_6svq3l$(2, _entity.schoolMemberSchoolUid); _stmt.setLong_6svq3l$(3, _entity.schoolMemberJoinDate); _stmt.setLong_6svq3l$(4, _entity.schoolMemberLeftDate); _stmt.setInt_vux9f0$(5, _entity.schoolMemberRole); _stmt.setBoolean_fzusl$(6, _entity.schoolMemberActive); _stmt.setLong_6svq3l$(7, _entity.schoolMemberLocalChangeSeqNum); _stmt.setLong_6svq3l$(8, _entity.schoolMemberMasterChangeSeqNum); _stmt.setInt_vux9f0$(9, _entity.schoolMemberLastChangedBy); _stmt.setLong_6svq3l$(10, _entity.schoolMemberLct); _stmt.setLong_6svq3l$(11, _entity.schoolMemberUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } SchoolMemberDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE SchoolMember SET schoolMemberPersonUid = ?, schoolMemberSchoolUid = ?, schoolMemberJoinDate = ?, schoolMemberLeftDate = ?, schoolMemberRole = ?, schoolMemberActive = ?, schoolMemberLocalChangeSeqNum = ?, schoolMemberMasterChangeSeqNum = ?, schoolMemberLastChangedBy = ?, schoolMemberLct = ? WHERE schoolMemberUid = ?'; prepareAndUseStatement(this._db, _sql, SchoolMemberDao_JdbcKt$updateList$lambda(entityList)); }; function SchoolMemberDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.schoolMemberPersonUid); _stmt.setLong_6svq3l$(2, closure$entity.schoolMemberSchoolUid); _stmt.setLong_6svq3l$(3, closure$entity.schoolMemberJoinDate); _stmt.setLong_6svq3l$(4, closure$entity.schoolMemberLeftDate); _stmt.setInt_vux9f0$(5, closure$entity.schoolMemberRole); _stmt.setBoolean_fzusl$(6, closure$entity.schoolMemberActive); _stmt.setLong_6svq3l$(7, closure$entity.schoolMemberLocalChangeSeqNum); _stmt.setLong_6svq3l$(8, closure$entity.schoolMemberMasterChangeSeqNum); _stmt.setInt_vux9f0$(9, closure$entity.schoolMemberLastChangedBy); _stmt.setLong_6svq3l$(10, closure$entity.schoolMemberLct); _stmt.setLong_6svq3l$(11, closure$entity.schoolMemberUid); return _stmt.executeUpdate(); }; } SchoolMemberDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE SchoolMember SET schoolMemberPersonUid = ?, schoolMemberSchoolUid = ?, schoolMemberJoinDate = ?, schoolMemberLeftDate = ?, schoolMemberRole = ?, schoolMemberActive = ?, schoolMemberLocalChangeSeqNum = ?, schoolMemberMasterChangeSeqNum = ?, schoolMemberLastChangedBy = ?, schoolMemberLct = ? WHERE schoolMemberUid = ?'; prepareAndUseStatement(this._db, _sql, SchoolMemberDao_JdbcKt$update$lambda(entity)); }; function Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_140($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_140.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_140.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_140.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_140; Coroutine$replicateOnNewNode_s8cxhz$_140.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SchoolMemberReplicate(smPk, smDestination)\n | SELECT DISTINCT SchoolMember.schoolMemberUid AS smPk,\n | ? AS smDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 64) > 0\n | JOIN SchoolMember\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberPersonUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberSchoolUid))\n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND SchoolMember.schoolMemberLct != COALESCE(\n | (SELECT smVersionId\n | FROM SchoolMemberReplicate\n | WHERE smPk = SchoolMember.schoolMemberUid\n | AND smDestination = ?), 0) \n | /*psql ON CONFLICT(smPk, smDestination) DO UPDATE\n | SET smPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SchoolMemberReplicate(smPk, smDestination)\n | SELECT DISTINCT SchoolMember.schoolMemberUid AS smPk,\n | ? AS smDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 64) > 0\n | JOIN SchoolMember\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberPersonUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberSchoolUid))\n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND SchoolMember.schoolMemberLct != COALESCE(\n | (SELECT smVersionId\n | FROM SchoolMemberReplicate\n | WHERE smPk = SchoolMember.schoolMemberUid\n | AND smDestination = ?), 0) \n | ON CONFLICT(smPk, smDestination) DO UPDATE\n | SET smPending = true\n | \n | \n |')), SchoolMemberDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_140(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda; Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_143($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_143.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_143.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_143.prototype.constructor = Coroutine$replicateOnChange_143; Coroutine$replicateOnChange_143.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SchoolMemberReplicate(smPk, smDestination)\n | SELECT DISTINCT SchoolMember.schoolMemberUid AS smUid,\n | UserSession.usClientNodeId AS smDestination\n | FROM ChangeLog\n | JOIN SchoolMember\n | ON ChangeLog.chTableId = 200\n | AND ChangeLog.chEntityPk = SchoolMember.schoolMemberUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberPersonUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions &\n | \n | 64\n | \n | ) > 0 \n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | AND UserSession.usStatus =1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND SchoolMember.schoolMemberLct != COALESCE(\n | (SELECT smVersionId\n | FROM SchoolMemberReplicate\n | WHERE smPk = SchoolMember.schoolMemberUid\n | AND smDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(smPk, smDestination) DO UPDATE\n | SET smPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SchoolMemberReplicate(smPk, smDestination)\n | SELECT DISTINCT SchoolMember.schoolMemberUid AS smUid,\n | UserSession.usClientNodeId AS smDestination\n | FROM ChangeLog\n | JOIN SchoolMember\n | ON ChangeLog.chTableId = 200\n | AND ChangeLog.chEntityPk = SchoolMember.schoolMemberUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberPersonUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions &\n | \n | 64\n | \n | ) > 0 \n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | AND UserSession.usStatus =1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND SchoolMember.schoolMemberLct != COALESCE(\n | (SELECT smVersionId\n | FROM SchoolMemberReplicate\n | WHERE smPk = SchoolMember.schoolMemberUid\n | AND smDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(smPk, smDestination) DO UPDATE\n | SET smPending = true\n | \n | \n |')), SchoolMemberDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_143(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SchoolMemberDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_schoolMemberUid = closure$_result.getLong_61zpoe$('schoolMemberUid'); var _tmp_schoolMemberPersonUid = closure$_result.getLong_61zpoe$('schoolMemberPersonUid'); var _tmp_schoolMemberSchoolUid = closure$_result.getLong_61zpoe$('schoolMemberSchoolUid'); var _tmp_schoolMemberJoinDate = closure$_result.getLong_61zpoe$('schoolMemberJoinDate'); var _tmp_schoolMemberLeftDate = closure$_result.getLong_61zpoe$('schoolMemberLeftDate'); var _tmp_schoolMemberRole = closure$_result.getInt_61zpoe$('schoolMemberRole'); var _tmp_schoolMemberActive = closure$_result.getBoolean_61zpoe$('schoolMemberActive'); var _tmp_schoolMemberLocalChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMemberLocalChangeSeqNum'); var _tmp_schoolMemberMasterChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMemberMasterChangeSeqNum'); var _tmp_schoolMemberLastChangedBy = closure$_result.getInt_61zpoe$('schoolMemberLastChangedBy'); var _tmp_schoolMemberLct = closure$_result.getLong_61zpoe$('schoolMemberLct'); var $receiver = SchoolMember_init_0(); $receiver.schoolMemberUid = _tmp_schoolMemberUid; $receiver.schoolMemberPersonUid = _tmp_schoolMemberPersonUid; $receiver.schoolMemberSchoolUid = _tmp_schoolMemberSchoolUid; $receiver.schoolMemberJoinDate = _tmp_schoolMemberJoinDate; $receiver.schoolMemberLeftDate = _tmp_schoolMemberLeftDate; $receiver.schoolMemberRole = _tmp_schoolMemberRole; $receiver.schoolMemberActive = _tmp_schoolMemberActive; $receiver.schoolMemberLocalChangeSeqNum = _tmp_schoolMemberLocalChangeSeqNum; $receiver.schoolMemberMasterChangeSeqNum = _tmp_schoolMemberMasterChangeSeqNum; $receiver.schoolMemberLastChangedBy = _tmp_schoolMemberLastChangedBy; $receiver.schoolMemberLct = _tmp_schoolMemberLct; return $receiver; }; } function SchoolMemberDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, SchoolMemberDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function SchoolMemberDao_JdbcKt$findByUidAsync$lambda(closure$schoolMemberUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$schoolMemberUid); return useResults(_stmt.executeQuery(), SchoolMemberDao_JdbcKt$findByUidAsync$lambda$lambda); }; } SchoolMemberDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (schoolMemberUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM SchoolMember WHERE schoolMemberUid = ? AND CAST(schoolMemberActive AS INTEGER) = 1'), SchoolMemberDao_JdbcKt$findByUidAsync$lambda(schoolMemberUid)); }; function SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_schoolMemberUid = closure$_result.getLong_61zpoe$('schoolMemberUid'); var _tmp_schoolMemberPersonUid = closure$_result.getLong_61zpoe$('schoolMemberPersonUid'); var _tmp_schoolMemberSchoolUid = closure$_result.getLong_61zpoe$('schoolMemberSchoolUid'); var _tmp_schoolMemberJoinDate = closure$_result.getLong_61zpoe$('schoolMemberJoinDate'); var _tmp_schoolMemberLeftDate = closure$_result.getLong_61zpoe$('schoolMemberLeftDate'); var _tmp_schoolMemberRole = closure$_result.getInt_61zpoe$('schoolMemberRole'); var _tmp_schoolMemberActive = closure$_result.getBoolean_61zpoe$('schoolMemberActive'); var _tmp_schoolMemberLocalChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMemberLocalChangeSeqNum'); var _tmp_schoolMemberMasterChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMemberMasterChangeSeqNum'); var _tmp_schoolMemberLastChangedBy = closure$_result.getInt_61zpoe$('schoolMemberLastChangedBy'); var _tmp_schoolMemberLct = closure$_result.getLong_61zpoe$('schoolMemberLct'); var $receiver = SchoolMember_init_0(); $receiver.schoolMemberUid = _tmp_schoolMemberUid; $receiver.schoolMemberPersonUid = _tmp_schoolMemberPersonUid; $receiver.schoolMemberSchoolUid = _tmp_schoolMemberSchoolUid; $receiver.schoolMemberJoinDate = _tmp_schoolMemberJoinDate; $receiver.schoolMemberLeftDate = _tmp_schoolMemberLeftDate; $receiver.schoolMemberRole = _tmp_schoolMemberRole; $receiver.schoolMemberActive = _tmp_schoolMemberActive; $receiver.schoolMemberLocalChangeSeqNum = _tmp_schoolMemberLocalChangeSeqNum; $receiver.schoolMemberMasterChangeSeqNum = _tmp_schoolMemberMasterChangeSeqNum; $receiver.schoolMemberLastChangedBy = _tmp_schoolMemberLastChangedBy; $receiver.schoolMemberLct = _tmp_schoolMemberLct; return $receiver; }; } function SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda$lambda(_result) { return mapRows(_result, SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda$lambda$lambda(_result)); } function Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda(closure$schoolUid_0, closure$personUid_0, closure$role_0, closure$timeFilter_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$role = closure$role_0; this.local$closure$timeFilter = closure$timeFilter_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda; Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$schoolUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$role); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$role); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$timeFilter); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$timeFilter); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda(closure$schoolUid_0, closure$personUid_0, closure$role_0, closure$timeFilter_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda(closure$schoolUid_0, closure$personUid_0, closure$role_0, closure$timeFilter_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolMemberDao_JdbcKt.prototype.findBySchoolAndPersonAndRole_6qtc6d$$default = function (schoolUid, personUid, role, timeFilter, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * FROM SchoolMember WHERE schoolMemberSchoolUid = ?\n | AND schoolMemberPersonUid = ?\n | AND (? = 0 OR schoolMemberRole = ?)\n | AND (? = 0 OR ? BETWEEN SchoolMember.schoolMemberJoinDate AND SchoolMember.schoolMemberLeftDate) \n | AND CAST(schoolMemberActive AS INTEGER) = 1\n | \n ')), SchoolMemberDao_JdbcKt$findBySchoolAndPersonAndRole$lambda(schoolUid, personUid, role, timeFilter), continuation); }; function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral(this$SchoolMemberDao_JdbcKt, closure$accountPersonUid, closure$schoolUid, closure$role, closure$searchQuery, closure$sortOrder) { this.this$SchoolMemberDao_JdbcKt = this$SchoolMemberDao_JdbcKt; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$schoolUid = closure$schoolUid; this.closure$role = closure$role; this.closure$searchQuery = closure$searchQuery; this.closure$sortOrder = closure$sortOrder; DataSourceFactory.call(this); } function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_schoolMemberUid = closure$_result.getLong_61zpoe$('schoolMemberUid'); var _tmp_schoolMemberPersonUid = closure$_result.getLong_61zpoe$('schoolMemberPersonUid'); var _tmp_schoolMemberSchoolUid = closure$_result.getLong_61zpoe$('schoolMemberSchoolUid'); var _tmp_schoolMemberJoinDate = closure$_result.getLong_61zpoe$('schoolMemberJoinDate'); var _tmp_schoolMemberLeftDate = closure$_result.getLong_61zpoe$('schoolMemberLeftDate'); var _tmp_schoolMemberRole = closure$_result.getInt_61zpoe$('schoolMemberRole'); var _tmp_schoolMemberActive = closure$_result.getBoolean_61zpoe$('schoolMemberActive'); var _tmp_schoolMemberLocalChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMemberLocalChangeSeqNum'); var _tmp_schoolMemberMasterChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMemberMasterChangeSeqNum'); var _tmp_schoolMemberLastChangedBy = closure$_result.getInt_61zpoe$('schoolMemberLastChangedBy'); var _tmp_schoolMemberLct = closure$_result.getLong_61zpoe$('schoolMemberLct'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new SchoolMemberWithPerson(); $receiver.schoolMemberUid = _tmp_schoolMemberUid; $receiver.schoolMemberPersonUid = _tmp_schoolMemberPersonUid; $receiver.schoolMemberSchoolUid = _tmp_schoolMemberSchoolUid; $receiver.schoolMemberJoinDate = _tmp_schoolMemberJoinDate; $receiver.schoolMemberLeftDate = _tmp_schoolMemberLeftDate; $receiver.schoolMemberRole = _tmp_schoolMemberRole; $receiver.schoolMemberActive = _tmp_schoolMemberActive; $receiver.schoolMemberLocalChangeSeqNum = _tmp_schoolMemberLocalChangeSeqNum; $receiver.schoolMemberMasterChangeSeqNum = _tmp_schoolMemberMasterChangeSeqNum; $receiver.schoolMemberLastChangedBy = _tmp_schoolMemberLastChangedBy; $receiver.schoolMemberLct = _tmp_schoolMemberLct; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.person = $receiver_0; } return $receiver; }; } function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$role = closure$role_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$schoolUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$role); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$searchQuery); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(8, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda(this$SchoolMemberDao_JdbcKt_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$SchoolMemberDao_JdbcKt = this$SchoolMemberDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$role = closure$role_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$SchoolMemberDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT SchoolMember.*, Person.*\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | 64 \n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | LEFT JOIN SchoolMember ON Person.personUid = SchoolMember.schoolMemberPersonUid \n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND PersonGroupMember.groupMemberActive \n | AND SchoolMember.schoolMemberActive\n | AND SchoolMember.schoolMemberSchoolUid = ? \n | AND SchoolMember.schoolMemberRole = ?\n | AND Person.active\n | AND (Person.firstNames || ' ' || Person.lastName) LIKE ?\n | GROUP BY Person.personUid, SchoolMember.schoolMemberUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | ) LIMIT ? OFFSET ?\n ")), SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$schoolUid, this.local$closure$role, this.local$closure$searchQuery, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda(this$SchoolMemberDao_JdbcKt_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda(this$SchoolMemberDao_JdbcKt_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$SchoolMemberDao_JdbcKt._db, listOf(['PersonGroupMember', 'ScopedGrant', 'Person', 'SchoolMember']), SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getData$lambda(this.this$SchoolMemberDao_JdbcKt, this.closure$accountPersonUid, this.closure$schoolUid, this.closure$role, this.closure$searchQuery, this.closure$sortOrder, _limit, _offset)); }; function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$role = closure$role_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$schoolUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$role); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$searchQuery); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda(this$SchoolMemberDao_JdbcKt_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$SchoolMemberDao_JdbcKt = this$SchoolMemberDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$role = closure$role_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$closure$sortOrder = closure$sortOrder_0; } Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda; Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$SchoolMemberDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT SchoolMember.*, Person.*\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | 64 \n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | LEFT JOIN SchoolMember ON Person.personUid = SchoolMember.schoolMemberPersonUid \n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND PersonGroupMember.groupMemberActive \n | AND SchoolMember.schoolMemberActive\n | AND SchoolMember.schoolMemberSchoolUid = ? \n | AND SchoolMember.schoolMemberRole = ?\n | AND Person.active\n | AND (Person.firstNames || ' ' || Person.lastName) LIKE ?\n | GROUP BY Person.personUid, SchoolMember.schoolMemberUid\n | ORDER BY CASE(?)\n | WHEN 1 THEN Person.firstNames\n | WHEN 3 THEN Person.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN Person.firstNames\n | WHEN 4 THEN Person.lastName\n | ELSE ''\n | END DESC\n | ) \n ")), SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$schoolUid, this.local$closure$role, this.local$closure$searchQuery, this.local$closure$sortOrder), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda(this$SchoolMemberDao_JdbcKt_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda(this$SchoolMemberDao_JdbcKt_0, closure$accountPersonUid_0, closure$schoolUid_0, closure$role_0, closure$searchQuery_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$SchoolMemberDao_JdbcKt._db, listOf(['PersonGroupMember', 'ScopedGrant', 'Person', 'SchoolMember']), SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral$getLength$lambda(this.this$SchoolMemberDao_JdbcKt, this.closure$accountPersonUid, this.closure$schoolUid, this.closure$role, this.closure$searchQuery, this.closure$sortOrder)); }; SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; SchoolMemberDao_JdbcKt.prototype.findAllActiveMembersBySchoolAndRoleUid_de0qyg$ = function (schoolUid, role, sortOrder, searchQuery, accountPersonUid) { return new SchoolMemberDao_JdbcKt$findAllActiveMembersBySchoolAndRoleUid$ObjectLiteral(this, accountPersonUid, schoolUid, role, searchQuery, sortOrder); }; function SchoolMemberDao_JdbcKt$findAllTest$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_schoolMemberUid = closure$_result.getLong_61zpoe$('schoolMemberUid'); var _tmp_schoolMemberPersonUid = closure$_result.getLong_61zpoe$('schoolMemberPersonUid'); var _tmp_schoolMemberSchoolUid = closure$_result.getLong_61zpoe$('schoolMemberSchoolUid'); var _tmp_schoolMemberJoinDate = closure$_result.getLong_61zpoe$('schoolMemberJoinDate'); var _tmp_schoolMemberLeftDate = closure$_result.getLong_61zpoe$('schoolMemberLeftDate'); var _tmp_schoolMemberRole = closure$_result.getInt_61zpoe$('schoolMemberRole'); var _tmp_schoolMemberActive = closure$_result.getBoolean_61zpoe$('schoolMemberActive'); var _tmp_schoolMemberLocalChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMemberLocalChangeSeqNum'); var _tmp_schoolMemberMasterChangeSeqNum = closure$_result.getLong_61zpoe$('schoolMemberMasterChangeSeqNum'); var _tmp_schoolMemberLastChangedBy = closure$_result.getInt_61zpoe$('schoolMemberLastChangedBy'); var _tmp_schoolMemberLct = closure$_result.getLong_61zpoe$('schoolMemberLct'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var $receiver = new SchoolMemberWithPerson(); $receiver.schoolMemberUid = _tmp_schoolMemberUid; $receiver.schoolMemberPersonUid = _tmp_schoolMemberPersonUid; $receiver.schoolMemberSchoolUid = _tmp_schoolMemberSchoolUid; $receiver.schoolMemberJoinDate = _tmp_schoolMemberJoinDate; $receiver.schoolMemberLeftDate = _tmp_schoolMemberLeftDate; $receiver.schoolMemberRole = _tmp_schoolMemberRole; $receiver.schoolMemberActive = _tmp_schoolMemberActive; $receiver.schoolMemberLocalChangeSeqNum = _tmp_schoolMemberLocalChangeSeqNum; $receiver.schoolMemberMasterChangeSeqNum = _tmp_schoolMemberMasterChangeSeqNum; $receiver.schoolMemberLastChangedBy = _tmp_schoolMemberLastChangedBy; $receiver.schoolMemberLct = _tmp_schoolMemberLct; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.person = $receiver_0; } return $receiver; }; } function SchoolMemberDao_JdbcKt$findAllTest$lambda$lambda(_result) { return mapRows(_result, SchoolMemberDao_JdbcKt$findAllTest$lambda$lambda$lambda(_result)); } function Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda(closure$schoolUid_0, closure$role_0, closure$searchQuery_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$schoolUid = closure$schoolUid_0; this.local$closure$role = closure$role_0; this.local$closure$searchQuery = closure$searchQuery_0; this.local$_stmt = _stmt_0; } Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda.prototype.constructor = Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda; Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$schoolUid); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$role); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchQuery); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SchoolMemberDao_JdbcKt$findAllTest$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SchoolMemberDao_JdbcKt$findAllTest$lambda(closure$schoolUid_0, closure$role_0, closure$searchQuery_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SchoolMemberDao_JdbcKt$findAllTest$lambda(closure$schoolUid_0, closure$role_0, closure$searchQuery_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SchoolMemberDao_JdbcKt.prototype.findAllTest_jnr38p$ = function (schoolUid, role, searchQuery, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin("\n |SELECT SchoolMember.*, Person.* FROM SchoolMember\n | LEFT JOIN Person ON Person.personUid = SchoolMember.schoolMemberPersonUid\n | WHERE CAST(SchoolMember.schoolMemberActive AS INTEGER) = 1\n | AND SchoolMember.schoolMemberSchoolUid = ? \n | AND SchoolMember.schoolMemberRole = ?\n | AND CAST(Person.active AS INTEGER) = 1\n | AND (Person.firstNames || ' ' || Person.lastName) LIKE ?\n | ORDER BY Person.firstNames DESC\n ")), SchoolMemberDao_JdbcKt$findAllTest$lambda(schoolUid, role, searchQuery), continuation); }; function SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO SchoolMember (schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.schoolMemberUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.schoolMemberUid); } stmt.setLong_6svq3l$(2, entity.schoolMemberPersonUid); stmt.setLong_6svq3l$(3, entity.schoolMemberSchoolUid); stmt.setLong_6svq3l$(4, entity.schoolMemberJoinDate); stmt.setLong_6svq3l$(5, entity.schoolMemberLeftDate); stmt.setInt_vux9f0$(6, entity.schoolMemberRole); stmt.setBoolean_fzusl$(7, entity.schoolMemberActive); stmt.setLong_6svq3l$(8, entity.schoolMemberLocalChangeSeqNum); stmt.setLong_6svq3l$(9, entity.schoolMemberMasterChangeSeqNum); stmt.setInt_vux9f0$(10, entity.schoolMemberLastChangedBy); stmt.setLong_6svq3l$(11, entity.schoolMemberLct); }; SchoolMemberDao_JdbcKt$_insertAdapterSchoolMember_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; SchoolMemberDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolMemberDao_JdbcKt', interfaces: [SchoolMemberDao]}; function SchoolMemberDao_ReplicateWrapper(_db, _dao) { SchoolMemberDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_141($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_141.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_141.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_141.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_141; Coroutine$replicateOnNewNode_s8cxhz$_141.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_141(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_144($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_144.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_144.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_144.prototype.constructor = Coroutine$replicateOnChange_144; Coroutine$replicateOnChange_144.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_144(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (schoolMemberUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolMemberDao_ReplicateWrapper.prototype.updateAsync_nzwwdw$ = function (entity, continuation) { entity.schoolMemberLct = systemTimeInMillis(); return this._dao_0.updateAsync_nzwwdw$(entity, continuation); }; SchoolMemberDao_ReplicateWrapper.prototype.findBySchoolAndPersonAndRole_6qtc6d$$default = function (schoolUid, personUid, role, timeFilter, continuation) { return this._dao_0.findBySchoolAndPersonAndRole_6qtc6d$(schoolUid, personUid, role, timeFilter, continuation); }; SchoolMemberDao_ReplicateWrapper.prototype.findAllActiveMembersBySchoolAndRoleUid_de0qyg$ = function (schoolUid, role, sortOrder, searchQuery, accountPersonUid) { return this._dao_0.findAllActiveMembersBySchoolAndRoleUid_de0qyg$(schoolUid, role, sortOrder, searchQuery, accountPersonUid); }; SchoolMemberDao_ReplicateWrapper.prototype.findAllTest_jnr38p$ = function (schoolUid, role, searchQuery, continuation) { return this._dao_0.findAllTest_jnr38p$(schoolUid, role, searchQuery, continuation); }; SchoolMemberDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_151($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_151.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_151.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_151.prototype.constructor = Coroutine$insertAsync_151; Coroutine$insertAsync_151.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.schoolMemberUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(200, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.schoolMemberUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.schoolMemberLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.schoolMemberUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_151(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolMemberDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolMemberDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SchoolMemberDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolMemberDao_ReplicateWrapper', interfaces: [SchoolMemberDao]}; function SchoolMemberDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { SchoolMemberDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_142($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_142.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_142.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_142.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_142; Coroutine$replicateOnNewNode_s8cxhz$_142.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_142(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_145($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_145.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_145.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_145.prototype.constructor = Coroutine$replicateOnChange_145; Coroutine$replicateOnChange_145.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_145(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (schoolMemberUid) { var _result = this._dao.findByUidAsync_s8cxhz$(schoolMemberUid); return _result; }; function Coroutine$updateAsync_nzwwdw$_0($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$updateAsync_nzwwdw$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_nzwwdw$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_nzwwdw$_0.prototype.constructor = Coroutine$updateAsync_nzwwdw$_0; Coroutine$updateAsync_nzwwdw$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_nzwwdw$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_Repo.prototype.updateAsync_nzwwdw$ = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_nzwwdw$_0(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default($this, schoolUid_0, personUid_0, role_0, timeFilter_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$schoolUid = schoolUid_0; this.local$personUid = personUid_0; this.local$role = role_0; this.local$timeFilter = timeFilter_0; } Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default.prototype.constructor = Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default; Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findBySchoolAndPersonAndRole_6qtc6d$(this.local$schoolUid, this.local$personUid, this.local$role, this.local$timeFilter, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_Repo.prototype.findBySchoolAndPersonAndRole_6qtc6d$$default = function (schoolUid_0, personUid_0, role_0, timeFilter_0, continuation_0, suspended) { var instance = new Coroutine$findBySchoolAndPersonAndRole_6qtc6d$$default(this, schoolUid_0, personUid_0, role_0, timeFilter_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_Repo.prototype.findAllActiveMembersBySchoolAndRoleUid_de0qyg$ = function (schoolUid, role, sortOrder, searchQuery, accountPersonUid) { var _result = this._dao.findAllActiveMembersBySchoolAndRoleUid_de0qyg$(schoolUid, role, sortOrder, searchQuery, accountPersonUid); return _result; }; function Coroutine$findAllTest_jnr38p$($this, schoolUid_0, role_0, searchQuery_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$schoolUid = schoolUid_0; this.local$role = role_0; this.local$searchQuery = searchQuery_0; } Coroutine$findAllTest_jnr38p$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllTest_jnr38p$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllTest_jnr38p$.prototype.constructor = Coroutine$findAllTest_jnr38p$; Coroutine$findAllTest_jnr38p$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllTest_jnr38p$(this.local$schoolUid, this.local$role, this.local$searchQuery, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_Repo.prototype.findAllTest_jnr38p$ = function (schoolUid_0, role_0, searchQuery_0, continuation_0, suspended) { var instance = new Coroutine$findAllTest_jnr38p$(this, schoolUid_0, role_0, searchQuery_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_152($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_152.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_152.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_152.prototype.constructor = Coroutine$insertAsync_152; Coroutine$insertAsync_152.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SchoolMemberDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_152(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SchoolMemberDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; SchoolMemberDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; SchoolMemberDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; SchoolMemberDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolMemberDao_Repo', interfaces: [SchoolMemberDao]}; function ScopedGrantDao() { } ScopedGrantDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScopedGrantDao', interfaces: []}; function ScopedGrantDao_JdbcKt(_db) { ScopedGrantDao.call(this); this._db = _db; this._insertAdapterScopedGrant_ = new ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral(this._db); } function Coroutine$insertAsync_y0tj3a$($this, scopedGrant_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrant = scopedGrant_0; } Coroutine$insertAsync_y0tj3a$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_y0tj3a$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_y0tj3a$.prototype.constructor = Coroutine$insertAsync_y0tj3a$; Coroutine$insertAsync_y0tj3a$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterScopedGrant_.insertAndReturnIdAsync_11rb$(this.local$scopedGrant, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.insertAsync_y0tj3a$ = function (scopedGrant_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_y0tj3a$(this, scopedGrant_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_djn83v$($this, scopedGrantList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrantList = scopedGrantList_0; } Coroutine$insertListAsync_djn83v$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_djn83v$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_djn83v$.prototype.constructor = Coroutine$insertListAsync_djn83v$; Coroutine$insertListAsync_djn83v$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterScopedGrant_.insertListAsync_4ezy5m$(this.local$scopedGrantList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.insertListAsync_djn83v$ = function (scopedGrantList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_djn83v$(this, scopedGrantList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda(closure$scopedGrant_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$scopedGrant = closure$scopedGrant_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda; Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$scopedGrant.sgPcsn); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$scopedGrant.sgLcsn); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$scopedGrant.sgLcb); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$scopedGrant.sgLct); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$scopedGrant.sgTableId); this.local$_stmt.setLong_6svq3l$(6, this.local$closure$scopedGrant.sgEntityUid); this.local$_stmt.setLong_6svq3l$(7, this.local$closure$scopedGrant.sgPermissions); this.local$_stmt.setLong_6svq3l$(8, this.local$closure$scopedGrant.sgGroupUid); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$scopedGrant.sgIndex); this.local$_stmt.setInt_vux9f0$(10, this.local$closure$scopedGrant.sgFlags); this.local$_stmt.setLong_6svq3l$(11, this.local$closure$scopedGrant.sgUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$updateAsync$lambda(closure$scopedGrant_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$updateAsync$lambda(closure$scopedGrant_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_y0tj3a$($this, scopedGrant_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrant = scopedGrant_0; } Coroutine$updateAsync_y0tj3a$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_y0tj3a$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_y0tj3a$.prototype.constructor = Coroutine$updateAsync_y0tj3a$; Coroutine$updateAsync_y0tj3a$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ScopedGrant SET sgPcsn = ?, sgLcsn = ?, sgLcb = ?, sgLct = ?, sgTableId = ?, sgEntityUid = ?, sgPermissions = ?, sgGroupUid = ?, sgIndex = ?, sgFlags = ? WHERE sgUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ScopedGrantDao_JdbcKt$updateAsync$lambda(this.local$scopedGrant), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.updateAsync_y0tj3a$ = function (scopedGrant_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_y0tj3a$(this, scopedGrant_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda(closure$scopedGrantList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$scopedGrantList = closure$scopedGrantList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda; Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$scopedGrantList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setLong_6svq3l$(1, _entity.sgPcsn); this.local$_stmt.setLong_6svq3l$(2, _entity.sgLcsn); this.local$_stmt.setInt_vux9f0$(3, _entity.sgLcb); this.local$_stmt.setLong_6svq3l$(4, _entity.sgLct); this.local$_stmt.setInt_vux9f0$(5, _entity.sgTableId); this.local$_stmt.setLong_6svq3l$(6, _entity.sgEntityUid); this.local$_stmt.setLong_6svq3l$(7, _entity.sgPermissions); this.local$_stmt.setLong_6svq3l$(8, _entity.sgGroupUid); this.local$_stmt.setInt_vux9f0$(9, _entity.sgIndex); this.local$_stmt.setInt_vux9f0$(10, _entity.sgFlags); this.local$_stmt.setLong_6svq3l$(11, _entity.sgUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$updateListAsync$lambda(closure$scopedGrantList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$updateListAsync$lambda(closure$scopedGrantList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_djn83v$($this, scopedGrantList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrantList = scopedGrantList_0; } Coroutine$updateListAsync_djn83v$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_djn83v$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_djn83v$.prototype.constructor = Coroutine$updateListAsync_djn83v$; Coroutine$updateListAsync_djn83v$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE ScopedGrant SET sgPcsn = ?, sgLcsn = ?, sgLcb = ?, sgLct = ?, sgTableId = ?, sgEntityUid = ?, sgPermissions = ?, sgGroupUid = ?, sgIndex = ?, sgFlags = ? WHERE sgUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, ScopedGrantDao_JdbcKt$updateListAsync$lambda(this.local$scopedGrantList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.updateListAsync_djn83v$ = function (scopedGrantList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_djn83v$(this, scopedGrantList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_143($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_143.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_143.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_143.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_143; Coroutine$replicateOnNewNode_s8cxhz$_143.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantWithPerm.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonGroupMember PersonsWithPerm_GroupMember\n | ON PersonsWithPerm_GroupMember.groupMemberPersonUid = Person.personUid\n | JOIN ScopedGrant ScopedGrantWithPerm\n | ON PersonsWithPerm_GroupMember.groupMemberGroupUid = ScopedGrantWithPerm.sgGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ScopedGrantWithPerm.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantWithPerm.sgUid\n | AND sgDestination = ?), 0) \n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantWithPerm.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN PersonGroupMember PersonsWithPerm_GroupMember\n | ON PersonsWithPerm_GroupMember.groupMemberPersonUid = Person.personUid\n | JOIN ScopedGrant ScopedGrantWithPerm\n | ON PersonsWithPerm_GroupMember.groupMemberGroupUid = ScopedGrantWithPerm.sgGroupUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ScopedGrantWithPerm.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantWithPerm.sgUid\n | AND sgDestination = ?), 0) \n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')), ScopedGrantDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_143(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_146($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_146.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_146.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_146.prototype.constructor = Coroutine$replicateOnChange_146; Coroutine$replicateOnChange_146.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN PersonGroupMember\n | ON PersonGroupMember.groupMemberGroupUid = ScopedGrantEntity.sgGroupUid\n | JOIN Person\n | ON PersonGroupMember.groupMemberPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN PersonGroupMember\n | ON PersonGroupMember.groupMemberGroupUid = ScopedGrantEntity.sgGroupUid\n | JOIN Person\n | ON PersonGroupMember.groupMemberPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')), ScopedGrantDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_146(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeClazzBased_5($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_5.prototype.constructor = Coroutine$replicateOnChangeClazzBased_5; Coroutine$replicateOnChangeClazzBased_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN Clazz \n | ON ScopedGrantEntity.sgTableId = 6\n | AND ScopedGrantEntity.sgEntityUid = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN Clazz \n | ON ScopedGrantEntity.sgTableId = 6\n | AND ScopedGrantEntity.sgEntityUid = Clazz.clazzUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 2\n | \n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | \n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')), ScopedGrantDao_JdbcKt$replicateOnChangeClazzBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_5(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Clazz.clazzUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 6\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = ?), 0) \n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */\n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & \n | \n | 2 \n | \n | ) > 0\n | JOIN Clazz \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON Clazz.clazzUid = ScopedGrantEntity.sgEntityUid\n | AND ScopedGrantEntity.sgTableId = 6\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = ?), 0) \n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')), ScopedGrantDao_JdbcKt$replicateOnNewNodeClazzBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_5(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangePersonBased_2($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePersonBased_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePersonBased_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePersonBased_2.prototype.constructor = Coroutine$replicateOnChangePersonBased_2; Coroutine$replicateOnChangePersonBased_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN Person\n | ON ScopedGrantEntity.sgTableId = 9\n | AND ScopedGrantEntity.sgEntityUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN Person\n | ON ScopedGrantEntity.sgTableId = 9\n | AND ScopedGrantEntity.sgEntityUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')), ScopedGrantDao_JdbcKt$replicateOnChangePersonBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnChangePersonBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePersonBased_2(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2.prototype.constructor = Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON ScopedGrantEntity.sgTableId = 9\n | AND ScopedGrantEntity.sgEntityUid = Person.personUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON ScopedGrantEntity.sgTableId = 9\n | AND ScopedGrantEntity.sgEntityUid = Person.personUid \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')), ScopedGrantDao_JdbcKt$replicateOnNewNodePersonBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnNewNodePersonBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePersonBased_s8cxhz$_2(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChangeSchoolBased_5($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_5.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_5; Coroutine$replicateOnChangeSchoolBased_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN School\n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | UserSession.usClientNodeId AS sgDestination\n | FROM ChangeLog\n | JOIN ScopedGrant ScopedGrantEntity\n | ON ChangeLog.chTableId = 48\n | AND ChangeLog.chEntityPk = ScopedGrantEntity.sgUid\n | JOIN School\n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | \n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | AND (SCopedGrant.sgPermissions &\n | \n | 536870912\n | \n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | \n | \n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')), ScopedGrantDao_JdbcKt$replicateOnChangeSchoolBased$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_5(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda; Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO ScopedGrantReplicate(sgPk, sgDestination)\n | SELECT DISTINCT ScopedGrantEntity.sgUid AS sgPk,\n | ? AS sgDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | \n | \n | 536870912\n | \n | ) > 0\n | JOIN School\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = School.schoolUid))\n | \n | \n | JOIN ScopedGrant ScopedGrantEntity\n | ON ScopedGrantEntity.sgTableId = 164\n | AND ScopedGrantEntity.sgEntityUid = School.schoolUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1 \n | AND ScopedGrantEntity.sgLct != COALESCE(\n | (SELECT sgVersionId\n | FROM ScopedGrantReplicate\n | WHERE sgPk = ScopedGrantEntity.sgUid\n | AND sgDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sgPk, sgDestination) DO UPDATE\n | SET sgPending = true\n | \n | \n |')), ScopedGrantDao_JdbcKt$replicateOnNewNodeSchoolBased$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_JdbcKt.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_5(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_ScopedGrant_nullCount = 0; var _tmp_sgUid = closure$_result.getLong_61zpoe$('sgUid'); if (closure$_result.wasNull()) { _tmp_ScopedGrant_nullCount = _tmp_ScopedGrant_nullCount + 1 | 0; } var _tmp_sgPcsn = closure$_result.getLong_61zpoe$('sgPcsn'); if (closure$_result.wasNull()) { _tmp_ScopedGrant_nullCount = _tmp_ScopedGrant_nullCount + 1 | 0; } var _tmp_sgLcsn = closure$_result.getLong_61zpoe$('sgLcsn'); if (closure$_result.wasNull()) { _tmp_ScopedGrant_nullCount = _tmp_ScopedGrant_nullCount + 1 | 0; } var _tmp_sgLcb = closure$_result.getInt_61zpoe$('sgLcb'); if (closure$_result.wasNull()) { _tmp_ScopedGrant_nullCount = _tmp_ScopedGrant_nullCount + 1 | 0; } var _tmp_sgLct = closure$_result.getLong_61zpoe$('sgLct'); if (closure$_result.wasNull()) { _tmp_ScopedGrant_nullCount = _tmp_ScopedGrant_nullCount + 1 | 0; } var _tmp_sgTableId = closure$_result.getInt_61zpoe$('sgTableId'); if (closure$_result.wasNull()) { _tmp_ScopedGrant_nullCount = _tmp_ScopedGrant_nullCount + 1 | 0; } var _tmp_sgEntityUid = closure$_result.getLong_61zpoe$('sgEntityUid'); if (closure$_result.wasNull()) { _tmp_ScopedGrant_nullCount = _tmp_ScopedGrant_nullCount + 1 | 0; } var _tmp_sgPermissions = closure$_result.getLong_61zpoe$('sgPermissions'); if (closure$_result.wasNull()) { _tmp_ScopedGrant_nullCount = _tmp_ScopedGrant_nullCount + 1 | 0; } var _tmp_sgGroupUid = closure$_result.getLong_61zpoe$('sgGroupUid'); if (closure$_result.wasNull()) { _tmp_ScopedGrant_nullCount = _tmp_ScopedGrant_nullCount + 1 | 0; } var _tmp_sgIndex = closure$_result.getInt_61zpoe$('sgIndex'); if (closure$_result.wasNull()) { _tmp_ScopedGrant_nullCount = _tmp_ScopedGrant_nullCount + 1 | 0; } var _tmp_sgFlags = closure$_result.getInt_61zpoe$('sgFlags'); if (closure$_result.wasNull()) { _tmp_ScopedGrant_nullCount = _tmp_ScopedGrant_nullCount + 1 | 0; } var _tmp_ScopedGrant_isAllNull = _tmp_ScopedGrant_nullCount === 11; var $receiver = new ScopedGrantAndName(); $receiver.name = _tmp_name; if (!_tmp_ScopedGrant_isAllNull) { var $receiver_0 = new ScopedGrant(); $receiver_0.sgUid = _tmp_sgUid; $receiver_0.sgPcsn = _tmp_sgPcsn; $receiver_0.sgLcsn = _tmp_sgLcsn; $receiver_0.sgLcb = _tmp_sgLcb; $receiver_0.sgLct = _tmp_sgLct; $receiver_0.sgTableId = _tmp_sgTableId; $receiver_0.sgEntityUid = _tmp_sgEntityUid; $receiver_0.sgPermissions = _tmp_sgPermissions; $receiver_0.sgGroupUid = _tmp_sgGroupUid; $receiver_0.sgIndex = _tmp_sgIndex; $receiver_0.sgFlags = _tmp_sgFlags; $receiver.scopedGrant = $receiver_0; } return $receiver; }; } function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda$lambda(_result) { return mapRows(_result, ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda$lambda$lambda(_result)); } function Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda(closure$tableId_0, closure$entityUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$tableId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda(closure$tableId_0, closure$entityUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda(closure$tableId_0, closure$entityUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScopedGrantDao_JdbcKt.prototype.findByTableIdAndEntityUid_6svq3l$ = function (tableId, entityUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ScopedGrant.*,\n | CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM ScopedGrant\n | JOIN PersonGroup \n | ON ScopedGrant.sgGroupUid = PersonGroup.groupUid\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE ScopedGrant.sgTableId = ?\n | AND ScopedGrant.sgEntityUid = ? \n | \n ')), ScopedGrantDao_JdbcKt$findByTableIdAndEntityUid$lambda(tableId, entityUid), continuation); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral(this$ScopedGrantDao_JdbcKt, closure$tableId, closure$entityUid) { this.this$ScopedGrantDao_JdbcKt = this$ScopedGrantDao_JdbcKt; this.closure$tableId = closure$tableId; this.closure$entityUid = closure$entityUid; DataSourceFactory.call(this); } function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_sgUid = closure$_result.getLong_61zpoe$('sgUid'); var _tmp_sgPcsn = closure$_result.getLong_61zpoe$('sgPcsn'); var _tmp_sgLcsn = closure$_result.getLong_61zpoe$('sgLcsn'); var _tmp_sgLcb = closure$_result.getInt_61zpoe$('sgLcb'); var _tmp_sgLct = closure$_result.getLong_61zpoe$('sgLct'); var _tmp_sgTableId = closure$_result.getInt_61zpoe$('sgTableId'); var _tmp_sgEntityUid = closure$_result.getLong_61zpoe$('sgEntityUid'); var _tmp_sgPermissions = closure$_result.getLong_61zpoe$('sgPermissions'); var _tmp_sgGroupUid = closure$_result.getLong_61zpoe$('sgGroupUid'); var _tmp_sgIndex = closure$_result.getInt_61zpoe$('sgIndex'); var _tmp_sgFlags = closure$_result.getInt_61zpoe$('sgFlags'); var $receiver = new ScopedGrantWithName(); $receiver.name = _tmp_name; $receiver.sgUid = _tmp_sgUid; $receiver.sgPcsn = _tmp_sgPcsn; $receiver.sgLcsn = _tmp_sgLcsn; $receiver.sgLcb = _tmp_sgLcb; $receiver.sgLct = _tmp_sgLct; $receiver.sgTableId = _tmp_sgTableId; $receiver.sgEntityUid = _tmp_sgEntityUid; $receiver.sgPermissions = _tmp_sgPermissions; $receiver.sgGroupUid = _tmp_sgGroupUid; $receiver.sgIndex = _tmp_sgIndex; $receiver.sgFlags = _tmp_sgFlags; return $receiver; }; } function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda(closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$tableId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda(closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda(closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda(this$ScopedGrantDao_JdbcKt_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScopedGrantDao_JdbcKt = this$ScopedGrantDao_JdbcKt_0; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScopedGrantDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT ScopedGrant.*,\n | CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM ScopedGrant\n | JOIN PersonGroup \n | ON ScopedGrant.sgGroupUid = PersonGroup.groupUid\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE ScopedGrant.sgTableId = ?\n | AND ScopedGrant.sgEntityUid = ? \n | ) LIMIT ? OFFSET ?\n ')), ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda$lambda(this.local$closure$tableId, this.local$closure$entityUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda(this$ScopedGrantDao_JdbcKt_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda(this$ScopedGrantDao_JdbcKt_0, closure$tableId_0, closure$entityUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$ScopedGrantDao_JdbcKt._db, listOf(['ScopedGrant', 'PersonGroup', 'Person']), ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getData$lambda(this.this$ScopedGrantDao_JdbcKt, this.closure$tableId, this.closure$entityUid, _limit, _offset)); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda(closure$tableId_0, closure$entityUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$tableId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entityUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda(closure$tableId_0, closure$entityUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda(closure$tableId_0, closure$entityUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda(this$ScopedGrantDao_JdbcKt_0, closure$tableId_0, closure$entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScopedGrantDao_JdbcKt = this$ScopedGrantDao_JdbcKt_0; this.local$closure$tableId = closure$tableId_0; this.local$closure$entityUid = closure$entityUid_0; } Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScopedGrantDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT ScopedGrant.*,\n | CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM ScopedGrant\n | JOIN PersonGroup \n | ON ScopedGrant.sgGroupUid = PersonGroup.groupUid\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE ScopedGrant.sgTableId = ?\n | AND ScopedGrant.sgEntityUid = ? \n | ) \n ')), ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda$lambda(this.local$closure$tableId, this.local$closure$entityUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda(this$ScopedGrantDao_JdbcKt_0, closure$tableId_0, closure$entityUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda(this$ScopedGrantDao_JdbcKt_0, closure$tableId_0, closure$entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$ScopedGrantDao_JdbcKt._db, listOf(['ScopedGrant', 'PersonGroup', 'Person']), ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral$getLength$lambda(this.this$ScopedGrantDao_JdbcKt, this.closure$tableId, this.closure$entityUid)); }; ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; ScopedGrantDao_JdbcKt.prototype.findByTableIdAndEntityUidWithNameAsDataSource_6svq3l$ = function (tableId, entityUid) { return new ScopedGrantDao_JdbcKt$findByTableIdAndEntityUidWithNameAsDataSource$ObjectLiteral(this, tableId, entityUid); }; function ScopedGrantDao_JdbcKt$findByTableIdAndEntityIdSync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_sgUid = closure$_result.getLong_61zpoe$('sgUid'); var _tmp_sgPcsn = closure$_result.getLong_61zpoe$('sgPcsn'); var _tmp_sgLcsn = closure$_result.getLong_61zpoe$('sgLcsn'); var _tmp_sgLcb = closure$_result.getInt_61zpoe$('sgLcb'); var _tmp_sgLct = closure$_result.getLong_61zpoe$('sgLct'); var _tmp_sgTableId = closure$_result.getInt_61zpoe$('sgTableId'); var _tmp_sgEntityUid = closure$_result.getLong_61zpoe$('sgEntityUid'); var _tmp_sgPermissions = closure$_result.getLong_61zpoe$('sgPermissions'); var _tmp_sgGroupUid = closure$_result.getLong_61zpoe$('sgGroupUid'); var _tmp_sgIndex = closure$_result.getInt_61zpoe$('sgIndex'); var _tmp_sgFlags = closure$_result.getInt_61zpoe$('sgFlags'); var $receiver = new ScopedGrant(); $receiver.sgUid = _tmp_sgUid; $receiver.sgPcsn = _tmp_sgPcsn; $receiver.sgLcsn = _tmp_sgLcsn; $receiver.sgLcb = _tmp_sgLcb; $receiver.sgLct = _tmp_sgLct; $receiver.sgTableId = _tmp_sgTableId; $receiver.sgEntityUid = _tmp_sgEntityUid; $receiver.sgPermissions = _tmp_sgPermissions; $receiver.sgGroupUid = _tmp_sgGroupUid; $receiver.sgIndex = _tmp_sgIndex; $receiver.sgFlags = _tmp_sgFlags; return $receiver; }; } function ScopedGrantDao_JdbcKt$findByTableIdAndEntityIdSync$lambda$lambda(_result) { return mapRows(_result, ScopedGrantDao_JdbcKt$findByTableIdAndEntityIdSync$lambda$lambda$lambda(_result)); } function ScopedGrantDao_JdbcKt$findByTableIdAndEntityIdSync$lambda(closure$tableId, closure$entityUid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$tableId); _stmt.setLong_6svq3l$(2, closure$entityUid); return useResults(_stmt.executeQuery(), ScopedGrantDao_JdbcKt$findByTableIdAndEntityIdSync$lambda$lambda); }; } ScopedGrantDao_JdbcKt.prototype.findByTableIdAndEntityIdSync_6svq3l$ = function (tableId, entityUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ScopedGrant.*\n | FROM ScopedGrant\n | WHERE sgTableId = ?\n | AND sgEntityUid = ?\n | \n ')), ScopedGrantDao_JdbcKt$findByTableIdAndEntityIdSync$lambda(tableId, entityUid)); }; function ScopedGrantDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_sgUid = closure$_result.getLong_61zpoe$('sgUid'); var _tmp_sgPcsn = closure$_result.getLong_61zpoe$('sgPcsn'); var _tmp_sgLcsn = closure$_result.getLong_61zpoe$('sgLcsn'); var _tmp_sgLcb = closure$_result.getInt_61zpoe$('sgLcb'); var _tmp_sgLct = closure$_result.getLong_61zpoe$('sgLct'); var _tmp_sgTableId = closure$_result.getInt_61zpoe$('sgTableId'); var _tmp_sgEntityUid = closure$_result.getLong_61zpoe$('sgEntityUid'); var _tmp_sgPermissions = closure$_result.getLong_61zpoe$('sgPermissions'); var _tmp_sgGroupUid = closure$_result.getLong_61zpoe$('sgGroupUid'); var _tmp_sgIndex = closure$_result.getInt_61zpoe$('sgIndex'); var _tmp_sgFlags = closure$_result.getInt_61zpoe$('sgFlags'); var $receiver = new ScopedGrant(); $receiver.sgUid = _tmp_sgUid; $receiver.sgPcsn = _tmp_sgPcsn; $receiver.sgLcsn = _tmp_sgLcsn; $receiver.sgLcb = _tmp_sgLcb; $receiver.sgLct = _tmp_sgLct; $receiver.sgTableId = _tmp_sgTableId; $receiver.sgEntityUid = _tmp_sgEntityUid; $receiver.sgPermissions = _tmp_sgPermissions; $receiver.sgGroupUid = _tmp_sgGroupUid; $receiver.sgIndex = _tmp_sgIndex; $receiver.sgFlags = _tmp_sgFlags; return $receiver; }; } function ScopedGrantDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, ScopedGrantDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda(closure$sgUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$sgUid = closure$sgUid_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$sgUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScopedGrantDao_JdbcKt$findByUid$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByUid$lambda(closure$sgUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByUid$lambda(closure$sgUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScopedGrantDao_JdbcKt.prototype.findByUid_s8cxhz$ = function (sgUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ScopedGrant.*\n | FROM ScopedGrant\n | WHERE sgUid = ? \n | \n ')), ScopedGrantDao_JdbcKt$findByUid$lambda(sgUid), continuation); }; function ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_name = closure$_result.getString_61zpoe$('name'); var _tmp_sgUid = closure$_result.getLong_61zpoe$('sgUid'); var _tmp_sgPcsn = closure$_result.getLong_61zpoe$('sgPcsn'); var _tmp_sgLcsn = closure$_result.getLong_61zpoe$('sgLcsn'); var _tmp_sgLcb = closure$_result.getInt_61zpoe$('sgLcb'); var _tmp_sgLct = closure$_result.getLong_61zpoe$('sgLct'); var _tmp_sgTableId = closure$_result.getInt_61zpoe$('sgTableId'); var _tmp_sgEntityUid = closure$_result.getLong_61zpoe$('sgEntityUid'); var _tmp_sgPermissions = closure$_result.getLong_61zpoe$('sgPermissions'); var _tmp_sgGroupUid = closure$_result.getLong_61zpoe$('sgGroupUid'); var _tmp_sgIndex = closure$_result.getInt_61zpoe$('sgIndex'); var _tmp_sgFlags = closure$_result.getInt_61zpoe$('sgFlags'); var $receiver = new ScopedGrantWithName(); $receiver.name = _tmp_name; $receiver.sgUid = _tmp_sgUid; $receiver.sgPcsn = _tmp_sgPcsn; $receiver.sgLcsn = _tmp_sgLcsn; $receiver.sgLcb = _tmp_sgLcb; $receiver.sgLct = _tmp_sgLct; $receiver.sgTableId = _tmp_sgTableId; $receiver.sgEntityUid = _tmp_sgEntityUid; $receiver.sgPermissions = _tmp_sgPermissions; $receiver.sgGroupUid = _tmp_sgGroupUid; $receiver.sgIndex = _tmp_sgIndex; $receiver.sgFlags = _tmp_sgFlags; return $receiver; }; } function ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda(closure$sgUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$sgUid = closure$sgUid_0; this.local$_stmt = _stmt_0; } Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$sgUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda(closure$sgUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda(closure$sgUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda(this$ScopedGrantDao_JdbcKt_0, closure$sgUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScopedGrantDao_JdbcKt = this$ScopedGrantDao_JdbcKt_0; this.local$closure$sgUid = closure$sgUid_0; } Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda.prototype.constructor = Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda; Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScopedGrantDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT ScopedGrant.*, \n | CASE\n | WHEN Person.firstNames IS NOT NULL THEN Person.firstNames\n | ELSE PersonGroup.groupName \n | END AS name\n | FROM ScopedGrant\n | LEFT JOIN PersonGroup \n | ON ScopedGrant.sgGroupUid = PersonGroup.groupUid\n | LEFT JOIN Person\n | ON Person.personGroupUid = PersonGroup.groupUid\n | WHERE ScopedGrant.sgUid = ? \n | \n ')), ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda$lambda(this.local$closure$sgUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda(this$ScopedGrantDao_JdbcKt_0, closure$sgUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda(this$ScopedGrantDao_JdbcKt_0, closure$sgUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScopedGrantDao_JdbcKt.prototype.findByUidLiveWithName_s8cxhz$ = function (sgUid) { return new LiveDataImpl(this._db, listOf(['ScopedGrant', 'PersonGroup', 'Person']), ScopedGrantDao_JdbcKt$findByUidLiveWithName$lambda(this, sgUid)); }; function ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ScopedGrant (sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.sgUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.sgUid); } stmt.setLong_6svq3l$(2, entity.sgPcsn); stmt.setLong_6svq3l$(3, entity.sgLcsn); stmt.setInt_vux9f0$(4, entity.sgLcb); stmt.setLong_6svq3l$(5, entity.sgLct); stmt.setInt_vux9f0$(6, entity.sgTableId); stmt.setLong_6svq3l$(7, entity.sgEntityUid); stmt.setLong_6svq3l$(8, entity.sgPermissions); stmt.setLong_6svq3l$(9, entity.sgGroupUid); stmt.setInt_vux9f0$(10, entity.sgIndex); stmt.setInt_vux9f0$(11, entity.sgFlags); }; ScopedGrantDao_JdbcKt$_insertAdapterScopedGrant_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ScopedGrantDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScopedGrantDao_JdbcKt', interfaces: [ScopedGrantDao]}; function ScopedGrantDao_ReplicateWrapper(_db, _dao) { ScopedGrantDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_144($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_144.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_144.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_144.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_144; Coroutine$replicateOnNewNode_s8cxhz$_144.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_144(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_147($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_147.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_147.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_147.prototype.constructor = Coroutine$replicateOnChange_147; Coroutine$replicateOnChange_147.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_147(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeClazzBased_6($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_6.prototype.constructor = Coroutine$replicateOnChangeClazzBased_6; Coroutine$replicateOnChangeClazzBased_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_6(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeClazzBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_6(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangePersonBased_3($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePersonBased_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePersonBased_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePersonBased_3.prototype.constructor = Coroutine$replicateOnChangePersonBased_3; Coroutine$replicateOnChangePersonBased_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangePersonBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnChangePersonBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePersonBased_3(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3.prototype.constructor = Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodePersonBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnNewNodePersonBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePersonBased_s8cxhz$_3(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeSchoolBased_6($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_6.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_6; Coroutine$replicateOnChangeSchoolBased_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_6(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_6(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_y0tj3a$_0($this, scopedGrant_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrant = scopedGrant_0; } Coroutine$insertAsync_y0tj3a$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_y0tj3a$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_y0tj3a$_0.prototype.constructor = Coroutine$insertAsync_y0tj3a$_0; Coroutine$insertAsync_y0tj3a$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$scopedGrant.sgUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(48, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$scopedGrant.sgUid = _newPk; this.state_0 = 3; continue; case 3: this.local$scopedGrant.sgLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync_y0tj3a$(this.local$scopedGrant, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$scopedGrant.sgUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.insertAsync_y0tj3a$ = function (scopedGrant_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_y0tj3a$_0(this, scopedGrant_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_djn83v$_0($this, scopedGrantList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$scopedGrantList = scopedGrantList_0; } Coroutine$insertListAsync_djn83v$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_djn83v$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_djn83v$_0.prototype.constructor = Coroutine$insertListAsync_djn83v$_0; Coroutine$insertListAsync_djn83v$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$scopedGrantList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.sgUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(48, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.sgUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.sgLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_djn83v$(this.local$scopedGrantList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.insertListAsync_djn83v$ = function (scopedGrantList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_djn83v$_0(this, scopedGrantList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_y0tj3a$_0($this, scopedGrant_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrant = scopedGrant_0; } Coroutine$updateAsync_y0tj3a$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_y0tj3a$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_y0tj3a$_0.prototype.constructor = Coroutine$updateAsync_y0tj3a$_0; Coroutine$updateAsync_y0tj3a$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$scopedGrant.sgLct = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.$this._dao_0.updateAsync_y0tj3a$(this.local$scopedGrant, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.updateAsync_y0tj3a$ = function (scopedGrant_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_y0tj3a$_0(this, scopedGrant_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_djn83v$_0($this, scopedGrantList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrantList = scopedGrantList_0; } Coroutine$updateListAsync_djn83v$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_djn83v$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_djn83v$_0.prototype.constructor = Coroutine$updateListAsync_djn83v$_0; Coroutine$updateListAsync_djn83v$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$scopedGrantList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.sgLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_djn83v$(this.local$scopedGrantList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_ReplicateWrapper.prototype.updateListAsync_djn83v$ = function (scopedGrantList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_djn83v$_0(this, scopedGrantList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScopedGrantDao_ReplicateWrapper.prototype.findByTableIdAndEntityUid_6svq3l$ = function (tableId, entityUid, continuation) { return this._dao_0.findByTableIdAndEntityUid_6svq3l$(tableId, entityUid, continuation); }; ScopedGrantDao_ReplicateWrapper.prototype.findByTableIdAndEntityUidWithNameAsDataSource_6svq3l$ = function (tableId, entityUid) { return this._dao_0.findByTableIdAndEntityUidWithNameAsDataSource_6svq3l$(tableId, entityUid); }; ScopedGrantDao_ReplicateWrapper.prototype.findByTableIdAndEntityIdSync_6svq3l$ = function (tableId, entityUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; ScopedGrantDao_ReplicateWrapper.prototype.findByUid_s8cxhz$ = function (sgUid, continuation) { return this._dao_0.findByUid_s8cxhz$(sgUid, continuation); }; ScopedGrantDao_ReplicateWrapper.prototype.findByUidLiveWithName_s8cxhz$ = function (sgUid) { return this._dao_0.findByUidLiveWithName_s8cxhz$(sgUid); }; ScopedGrantDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScopedGrantDao_ReplicateWrapper', interfaces: [ScopedGrantDao]}; function ScopedGrantDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { ScopedGrantDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_145($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_145.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_145.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_145.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_145; Coroutine$replicateOnNewNode_s8cxhz$_145.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_145(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_148($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_148.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_148.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_148.prototype.constructor = Coroutine$replicateOnChange_148; Coroutine$replicateOnChange_148.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_148(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeClazzBased_7($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeClazzBased_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeClazzBased_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeClazzBased_7.prototype.constructor = Coroutine$replicateOnChangeClazzBased_7; Coroutine$replicateOnChangeClazzBased_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeClazzBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnChangeClazzBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeClazzBased_7(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7.prototype.constructor = Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7; Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeClazzBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnNewNodeClazzBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeClazzBased_s8cxhz$_7(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangePersonBased_4($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangePersonBased_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangePersonBased_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangePersonBased_4.prototype.constructor = Coroutine$replicateOnChangePersonBased_4; Coroutine$replicateOnChangePersonBased_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangePersonBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnChangePersonBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangePersonBased_4(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4.prototype.constructor = Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4; Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodePersonBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnNewNodePersonBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodePersonBased_s8cxhz$_4(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChangeSchoolBased_7($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChangeSchoolBased_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChangeSchoolBased_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChangeSchoolBased_7.prototype.constructor = Coroutine$replicateOnChangeSchoolBased_7; Coroutine$replicateOnChangeSchoolBased_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChangeSchoolBased(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnChangeSchoolBased = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChangeSchoolBased_7(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7.prototype.constructor = Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7; Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNodeSchoolBased_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.replicateOnNewNodeSchoolBased_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNodeSchoolBased_s8cxhz$_7(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_y0tj3a$_1($this, scopedGrant_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrant = scopedGrant_0; } Coroutine$insertAsync_y0tj3a$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_y0tj3a$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_y0tj3a$_1.prototype.constructor = Coroutine$insertAsync_y0tj3a$_1; Coroutine$insertAsync_y0tj3a$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync_y0tj3a$(this.local$scopedGrant, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.insertAsync_y0tj3a$ = function (scopedGrant_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_y0tj3a$_1(this, scopedGrant_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_djn83v$_1($this, scopedGrantList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrantList = scopedGrantList_0; } Coroutine$insertListAsync_djn83v$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_djn83v$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_djn83v$_1.prototype.constructor = Coroutine$insertListAsync_djn83v$_1; Coroutine$insertListAsync_djn83v$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_djn83v$(this.local$scopedGrantList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.insertListAsync_djn83v$ = function (scopedGrantList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_djn83v$_1(this, scopedGrantList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateAsync_y0tj3a$_1($this, scopedGrant_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrant = scopedGrant_0; } Coroutine$updateAsync_y0tj3a$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_y0tj3a$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_y0tj3a$_1.prototype.constructor = Coroutine$updateAsync_y0tj3a$_1; Coroutine$updateAsync_y0tj3a$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_y0tj3a$(this.local$scopedGrant, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.updateAsync_y0tj3a$ = function (scopedGrant_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_y0tj3a$_1(this, scopedGrant_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_djn83v$_1($this, scopedGrantList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$scopedGrantList = scopedGrantList_0; } Coroutine$updateListAsync_djn83v$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_djn83v$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_djn83v$_1.prototype.constructor = Coroutine$updateListAsync_djn83v$_1; Coroutine$updateListAsync_djn83v$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_djn83v$(this.local$scopedGrantList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.updateListAsync_djn83v$ = function (scopedGrantList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_djn83v$_1(this, scopedGrantList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByTableIdAndEntityUid_6svq3l$($this, tableId_0, entityUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$tableId = tableId_0; this.local$entityUid = entityUid_0; } Coroutine$findByTableIdAndEntityUid_6svq3l$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByTableIdAndEntityUid_6svq3l$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByTableIdAndEntityUid_6svq3l$.prototype.constructor = Coroutine$findByTableIdAndEntityUid_6svq3l$; Coroutine$findByTableIdAndEntityUid_6svq3l$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByTableIdAndEntityUid_6svq3l$(this.local$tableId, this.local$entityUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.findByTableIdAndEntityUid_6svq3l$ = function (tableId_0, entityUid_0, continuation_0, suspended) { var instance = new Coroutine$findByTableIdAndEntityUid_6svq3l$(this, tableId_0, entityUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScopedGrantDao_Repo.prototype.findByTableIdAndEntityUidWithNameAsDataSource_6svq3l$ = function (tableId, entityUid) { var _result = this._dao.findByTableIdAndEntityUidWithNameAsDataSource_6svq3l$(tableId, entityUid); return _result; }; ScopedGrantDao_Repo.prototype.findByTableIdAndEntityIdSync_6svq3l$ = function (tableId, entityUid) { var _result = this._dao.findByTableIdAndEntityIdSync_6svq3l$(tableId, entityUid); return _result; }; function Coroutine$findByUid_s8cxhz$_3($this, sgUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sgUid = sgUid_0; } Coroutine$findByUid_s8cxhz$_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUid_s8cxhz$_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUid_s8cxhz$_3.prototype.constructor = Coroutine$findByUid_s8cxhz$_3; Coroutine$findByUid_s8cxhz$_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUid_s8cxhz$(this.local$sgUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScopedGrantDao_Repo.prototype.findByUid_s8cxhz$ = function (sgUid_0, continuation_0, suspended) { var instance = new Coroutine$findByUid_s8cxhz$_3(this, sgUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScopedGrantDao_Repo.prototype.findByUidLiveWithName_s8cxhz$ = function (sgUid) { var _result = this._dao.findByUidLiveWithName_s8cxhz$(sgUid); return _result; }; ScopedGrantDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScopedGrantDao_Repo', interfaces: [ScopedGrantDao]}; function ScrapeQueueItemDao() { } ScrapeQueueItemDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScrapeQueueItemDao', interfaces: [BaseDao]}; function ScrapeQueueItemDao_JdbcKt(_db) { ScrapeQueueItemDao.call(this); this._db = _db; this._insertAdapterScrapeQueueItem_ = new ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral(this._db); } ScrapeQueueItemDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterScrapeQueueItem_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_153($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_153.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_153.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_153.prototype.constructor = Coroutine$insertAsync_153; Coroutine$insertAsync_153.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterScrapeQueueItem_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; ScrapeQueueItemDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_153(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ScrapeQueueItemDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterScrapeQueueItem_.insertList_4ezy5m$(entityList); }; function ScrapeQueueItemDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.sqiContentEntryParentUid); _stmt.setLong_6svq3l$(2, _entity.sqiContentEntryUid); _stmt.setString_vqvrqt$(3, _entity.destDir); _stmt.setString_vqvrqt$(4, _entity.scrapeUrl); _stmt.setInt_vux9f0$(5, _entity.status); _stmt.setInt_vux9f0$(6, _entity.runId); _stmt.setInt_vux9f0$(7, _entity.itemType); _stmt.setInt_vux9f0$(8, _entity.errorCode); _stmt.setString_vqvrqt$(9, _entity.contentType); _stmt.setLong_6svq3l$(10, _entity.timeAdded); _stmt.setLong_6svq3l$(11, _entity.timeStarted); _stmt.setLong_6svq3l$(12, _entity.timeFinished); _stmt.setInt_vux9f0$(13, _entity.priority); _stmt.setBoolean_fzusl$(14, _entity.overrideEntry); _stmt.setInt_vux9f0$(15, _entity.sqiUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } ScrapeQueueItemDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE ScrapeQueueItem SET sqiContentEntryParentUid = ?, sqiContentEntryUid = ?, destDir = ?, scrapeUrl = ?, status = ?, runId = ?, itemType = ?, errorCode = ?, contentType = ?, timeAdded = ?, timeStarted = ?, timeFinished = ?, priority = ?, overrideEntry = ? WHERE sqiUid = ?'; prepareAndUseStatement(this._db, _sql, ScrapeQueueItemDao_JdbcKt$updateList$lambda(entityList)); }; function ScrapeQueueItemDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.sqiContentEntryParentUid); _stmt.setLong_6svq3l$(2, closure$entity.sqiContentEntryUid); _stmt.setString_vqvrqt$(3, closure$entity.destDir); _stmt.setString_vqvrqt$(4, closure$entity.scrapeUrl); _stmt.setInt_vux9f0$(5, closure$entity.status); _stmt.setInt_vux9f0$(6, closure$entity.runId); _stmt.setInt_vux9f0$(7, closure$entity.itemType); _stmt.setInt_vux9f0$(8, closure$entity.errorCode); _stmt.setString_vqvrqt$(9, closure$entity.contentType); _stmt.setLong_6svq3l$(10, closure$entity.timeAdded); _stmt.setLong_6svq3l$(11, closure$entity.timeStarted); _stmt.setLong_6svq3l$(12, closure$entity.timeFinished); _stmt.setInt_vux9f0$(13, closure$entity.priority); _stmt.setBoolean_fzusl$(14, closure$entity.overrideEntry); _stmt.setInt_vux9f0$(15, closure$entity.sqiUid); return _stmt.executeUpdate(); }; } ScrapeQueueItemDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE ScrapeQueueItem SET sqiContentEntryParentUid = ?, sqiContentEntryUid = ?, destDir = ?, scrapeUrl = ?, status = ?, runId = ?, itemType = ?, errorCode = ?, contentType = ?, timeAdded = ?, timeStarted = ?, timeFinished = ?, priority = ?, overrideEntry = ? WHERE sqiUid = ?'; prepareAndUseStatement(this._db, _sql, ScrapeQueueItemDao_JdbcKt$update$lambda(entity)); }; function ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_sqiUid = closure$_result.getInt_61zpoe$('sqiUid'); var _tmp_sqiContentEntryParentUid = closure$_result.getLong_61zpoe$('sqiContentEntryParentUid'); var _tmp_sqiContentEntryUid = closure$_result.getLong_61zpoe$('sqiContentEntryUid'); var _tmp_destDir = closure$_result.getString_61zpoe$('destDir'); var _tmp_scrapeUrl = closure$_result.getString_61zpoe$('scrapeUrl'); var _tmp_status = closure$_result.getInt_61zpoe$('status'); var _tmp_runId = closure$_result.getInt_61zpoe$('runId'); var _tmp_itemType = closure$_result.getInt_61zpoe$('itemType'); var _tmp_errorCode = closure$_result.getInt_61zpoe$('errorCode'); var _tmp_contentType = closure$_result.getString_61zpoe$('contentType'); var _tmp_timeAdded = closure$_result.getLong_61zpoe$('timeAdded'); var _tmp_timeStarted = closure$_result.getLong_61zpoe$('timeStarted'); var _tmp_timeFinished = closure$_result.getLong_61zpoe$('timeFinished'); var _tmp_priority = closure$_result.getInt_61zpoe$('priority'); var _tmp_overrideEntry = closure$_result.getBoolean_61zpoe$('overrideEntry'); var $receiver = new ScrapeQueueItem(); $receiver.sqiUid = _tmp_sqiUid; $receiver.sqiContentEntryParentUid = _tmp_sqiContentEntryParentUid; $receiver.sqiContentEntryUid = _tmp_sqiContentEntryUid; $receiver.destDir = _tmp_destDir; $receiver.scrapeUrl = _tmp_scrapeUrl; $receiver.status = _tmp_status; $receiver.runId = _tmp_runId; $receiver.itemType = _tmp_itemType; $receiver.errorCode = _tmp_errorCode; $receiver.contentType = _tmp_contentType; $receiver.timeAdded = _tmp_timeAdded; $receiver.timeStarted = _tmp_timeStarted; $receiver.timeFinished = _tmp_timeFinished; $receiver.priority = _tmp_priority; $receiver.overrideEntry = _tmp_overrideEntry; return $receiver; }; } function ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda$lambda(_result) { return mapRows(_result, ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda$lambda$lambda(_result)); } function Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda(closure$itemType_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$itemType = closure$itemType_0; this.local$_stmt = _stmt_0; } Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda.prototype.constructor = Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda; Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$itemType); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda(closure$itemType_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda(closure$itemType_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda(this$ScrapeQueueItemDao_JdbcKt_0, closure$itemType_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$ScrapeQueueItemDao_JdbcKt = this$ScrapeQueueItemDao_JdbcKt_0; this.local$closure$itemType = closure$itemType_0; } Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda.prototype.constructor = Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda; Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$ScrapeQueueItemDao_JdbcKt._db, new PreparedStatementConfig('SELECT * FROM ScrapeQueueItem WHERE status = 1 AND itemType = ? ORDER BY priority ASC LIMIT 10'), ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda$lambda(this.local$closure$itemType), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda(this$ScrapeQueueItemDao_JdbcKt_0, closure$itemType_0) { return function (continuation_0, suspended) { var instance = new Coroutine$ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda(this$ScrapeQueueItemDao_JdbcKt_0, closure$itemType_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } ScrapeQueueItemDao_JdbcKt.prototype.findNextQueueItems_za3lpa$ = function (itemType) { return new LiveDataImpl(this._db, listOf_0('ScrapeQueueItem'), ScrapeQueueItemDao_JdbcKt$findNextQueueItems$lambda(this, itemType)); }; function ScrapeQueueItemDao_JdbcKt$updateSetStatusById$lambda(closure$status, closure$errorCode, closure$uid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$status); _stmt.setInt_vux9f0$(2, closure$errorCode); _stmt.setInt_vux9f0$(3, closure$uid); return _stmt.executeUpdate(); }; } ScrapeQueueItemDao_JdbcKt.prototype.updateSetStatusById_qt1dr2$ = function (uid, status, errorCode) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('UPDATE ScrapeQueueItem SET status = ?, errorCode = ? WHERE sqiUid = ?'), ScrapeQueueItemDao_JdbcKt$updateSetStatusById$lambda(status, errorCode, uid)); }; function ScrapeQueueItemDao_JdbcKt$getExistingQueueItem$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_sqiUid = closure$_result.getInt_61zpoe$('sqiUid'); var _tmp_sqiContentEntryParentUid = closure$_result.getLong_61zpoe$('sqiContentEntryParentUid'); var _tmp_sqiContentEntryUid = closure$_result.getLong_61zpoe$('sqiContentEntryUid'); var _tmp_destDir = closure$_result.getString_61zpoe$('destDir'); var _tmp_scrapeUrl = closure$_result.getString_61zpoe$('scrapeUrl'); var _tmp_status = closure$_result.getInt_61zpoe$('status'); var _tmp_runId = closure$_result.getInt_61zpoe$('runId'); var _tmp_itemType = closure$_result.getInt_61zpoe$('itemType'); var _tmp_errorCode = closure$_result.getInt_61zpoe$('errorCode'); var _tmp_contentType = closure$_result.getString_61zpoe$('contentType'); var _tmp_timeAdded = closure$_result.getLong_61zpoe$('timeAdded'); var _tmp_timeStarted = closure$_result.getLong_61zpoe$('timeStarted'); var _tmp_timeFinished = closure$_result.getLong_61zpoe$('timeFinished'); var _tmp_priority = closure$_result.getInt_61zpoe$('priority'); var _tmp_overrideEntry = closure$_result.getBoolean_61zpoe$('overrideEntry'); var $receiver = new ScrapeQueueItem(); $receiver.sqiUid = _tmp_sqiUid; $receiver.sqiContentEntryParentUid = _tmp_sqiContentEntryParentUid; $receiver.sqiContentEntryUid = _tmp_sqiContentEntryUid; $receiver.destDir = _tmp_destDir; $receiver.scrapeUrl = _tmp_scrapeUrl; $receiver.status = _tmp_status; $receiver.runId = _tmp_runId; $receiver.itemType = _tmp_itemType; $receiver.errorCode = _tmp_errorCode; $receiver.contentType = _tmp_contentType; $receiver.timeAdded = _tmp_timeAdded; $receiver.timeStarted = _tmp_timeStarted; $receiver.timeFinished = _tmp_timeFinished; $receiver.priority = _tmp_priority; $receiver.overrideEntry = _tmp_overrideEntry; return $receiver; }; } function ScrapeQueueItemDao_JdbcKt$getExistingQueueItem$lambda$lambda(_result) { return mapNextRow(_result, null, ScrapeQueueItemDao_JdbcKt$getExistingQueueItem$lambda$lambda$lambda(_result)); } function ScrapeQueueItemDao_JdbcKt$getExistingQueueItem$lambda(closure$runId, closure$indexUrl) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$runId); _stmt.setString_vqvrqt$(2, closure$indexUrl); return useResults(_stmt.executeQuery(), ScrapeQueueItemDao_JdbcKt$getExistingQueueItem$lambda$lambda); }; } ScrapeQueueItemDao_JdbcKt.prototype.getExistingQueueItem_19mbxw$ = function (runId, indexUrl) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * from ScrapeQueueItem WHERE runId = ? AND scrapeUrl = ? LIMIT 1'), ScrapeQueueItemDao_JdbcKt$getExistingQueueItem$lambda(runId, indexUrl)); }; function ScrapeQueueItemDao_JdbcKt$findExistingQueueItem$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_sqiUid = closure$_result.getInt_61zpoe$('sqiUid'); var _tmp_sqiContentEntryParentUid = closure$_result.getLong_61zpoe$('sqiContentEntryParentUid'); var _tmp_sqiContentEntryUid = closure$_result.getLong_61zpoe$('sqiContentEntryUid'); var _tmp_destDir = closure$_result.getString_61zpoe$('destDir'); var _tmp_scrapeUrl = closure$_result.getString_61zpoe$('scrapeUrl'); var _tmp_status = closure$_result.getInt_61zpoe$('status'); var _tmp_runId = closure$_result.getInt_61zpoe$('runId'); var _tmp_itemType = closure$_result.getInt_61zpoe$('itemType'); var _tmp_errorCode = closure$_result.getInt_61zpoe$('errorCode'); var _tmp_contentType = closure$_result.getString_61zpoe$('contentType'); var _tmp_timeAdded = closure$_result.getLong_61zpoe$('timeAdded'); var _tmp_timeStarted = closure$_result.getLong_61zpoe$('timeStarted'); var _tmp_timeFinished = closure$_result.getLong_61zpoe$('timeFinished'); var _tmp_priority = closure$_result.getInt_61zpoe$('priority'); var _tmp_overrideEntry = closure$_result.getBoolean_61zpoe$('overrideEntry'); var $receiver = new ScrapeQueueItem(); $receiver.sqiUid = _tmp_sqiUid; $receiver.sqiContentEntryParentUid = _tmp_sqiContentEntryParentUid; $receiver.sqiContentEntryUid = _tmp_sqiContentEntryUid; $receiver.destDir = _tmp_destDir; $receiver.scrapeUrl = _tmp_scrapeUrl; $receiver.status = _tmp_status; $receiver.runId = _tmp_runId; $receiver.itemType = _tmp_itemType; $receiver.errorCode = _tmp_errorCode; $receiver.contentType = _tmp_contentType; $receiver.timeAdded = _tmp_timeAdded; $receiver.timeStarted = _tmp_timeStarted; $receiver.timeFinished = _tmp_timeFinished; $receiver.priority = _tmp_priority; $receiver.overrideEntry = _tmp_overrideEntry; return $receiver; }; } function ScrapeQueueItemDao_JdbcKt$findExistingQueueItem$lambda$lambda(_result) { return mapNextRow(_result, null, ScrapeQueueItemDao_JdbcKt$findExistingQueueItem$lambda$lambda$lambda(_result)); } function ScrapeQueueItemDao_JdbcKt$findExistingQueueItem$lambda(closure$runId, closure$entryUid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$runId); _stmt.setLong_6svq3l$(2, closure$entryUid); return useResults(_stmt.executeQuery(), ScrapeQueueItemDao_JdbcKt$findExistingQueueItem$lambda$lambda); }; } ScrapeQueueItemDao_JdbcKt.prototype.findExistingQueueItem_6svq3l$ = function (runId, entryUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * from ScrapeQueueItem WHERE runId = ? AND sqiContentEntryUid = ? LIMIT 1'), ScrapeQueueItemDao_JdbcKt$findExistingQueueItem$lambda(runId, entryUid)); }; function ScrapeQueueItemDao_JdbcKt$setTimeStarted$lambda(closure$timeStarted, closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$timeStarted); _stmt.setInt_vux9f0$(2, closure$uid); return _stmt.executeUpdate(); }; } ScrapeQueueItemDao_JdbcKt.prototype.setTimeStarted_6svq3l$ = function (uid, timeStarted) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('UPDATE ScrapeQueueItem SET timeStarted = ? WHERE sqiUid = ?'), ScrapeQueueItemDao_JdbcKt$setTimeStarted$lambda(timeStarted, uid)); }; function ScrapeQueueItemDao_JdbcKt$setTimeFinished$lambda(closure$timeFinished, closure$uid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$timeFinished); _stmt.setInt_vux9f0$(2, closure$uid); return _stmt.executeUpdate(); }; } ScrapeQueueItemDao_JdbcKt.prototype.setTimeFinished_6svq3l$ = function (uid, timeFinished) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig('UPDATE ScrapeQueueItem SET timeFinished = ? WHERE sqiUid = ?'), ScrapeQueueItemDao_JdbcKt$setTimeFinished$lambda(timeFinished, uid)); }; function ScrapeQueueItemDao_JdbcKt$findByUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_sqiUid = closure$_result.getInt_61zpoe$('sqiUid'); var _tmp_sqiContentEntryParentUid = closure$_result.getLong_61zpoe$('sqiContentEntryParentUid'); var _tmp_sqiContentEntryUid = closure$_result.getLong_61zpoe$('sqiContentEntryUid'); var _tmp_destDir = closure$_result.getString_61zpoe$('destDir'); var _tmp_scrapeUrl = closure$_result.getString_61zpoe$('scrapeUrl'); var _tmp_status = closure$_result.getInt_61zpoe$('status'); var _tmp_runId = closure$_result.getInt_61zpoe$('runId'); var _tmp_itemType = closure$_result.getInt_61zpoe$('itemType'); var _tmp_errorCode = closure$_result.getInt_61zpoe$('errorCode'); var _tmp_contentType = closure$_result.getString_61zpoe$('contentType'); var _tmp_timeAdded = closure$_result.getLong_61zpoe$('timeAdded'); var _tmp_timeStarted = closure$_result.getLong_61zpoe$('timeStarted'); var _tmp_timeFinished = closure$_result.getLong_61zpoe$('timeFinished'); var _tmp_priority = closure$_result.getInt_61zpoe$('priority'); var _tmp_overrideEntry = closure$_result.getBoolean_61zpoe$('overrideEntry'); var _tmp_ScrapeRun_nullCount = 0; var _tmp_scrapeRunUid = closure$_result.getInt_61zpoe$('scrapeRunUid'); if (closure$_result.wasNull()) { _tmp_ScrapeRun_nullCount = _tmp_ScrapeRun_nullCount + 1 | 0; } var _tmp_scrapeType = closure$_result.getString_61zpoe$('scrapeType'); if (closure$_result.wasNull()) { _tmp_ScrapeRun_nullCount = _tmp_ScrapeRun_nullCount + 1 | 0; } var _tmp_scrapeRunStatus = closure$_result.getInt_61zpoe$('scrapeRunStatus'); if (closure$_result.wasNull()) { _tmp_ScrapeRun_nullCount = _tmp_ScrapeRun_nullCount + 1 | 0; } var _tmp_conversionParams = closure$_result.getString_61zpoe$('conversionParams'); if (closure$_result.wasNull()) { _tmp_ScrapeRun_nullCount = _tmp_ScrapeRun_nullCount + 1 | 0; } var _tmp_ScrapeRun_isAllNull = _tmp_ScrapeRun_nullCount === 4; var $receiver = new ScrapeQueueItemWithScrapeRun(); $receiver.sqiUid = _tmp_sqiUid; $receiver.sqiContentEntryParentUid = _tmp_sqiContentEntryParentUid; $receiver.sqiContentEntryUid = _tmp_sqiContentEntryUid; $receiver.destDir = _tmp_destDir; $receiver.scrapeUrl = _tmp_scrapeUrl; $receiver.status = _tmp_status; $receiver.runId = _tmp_runId; $receiver.itemType = _tmp_itemType; $receiver.errorCode = _tmp_errorCode; $receiver.contentType = _tmp_contentType; $receiver.timeAdded = _tmp_timeAdded; $receiver.timeStarted = _tmp_timeStarted; $receiver.timeFinished = _tmp_timeFinished; $receiver.priority = _tmp_priority; $receiver.overrideEntry = _tmp_overrideEntry; if (!_tmp_ScrapeRun_isAllNull) { var $receiver_0 = new ScrapeRun(); $receiver_0.scrapeRunUid = _tmp_scrapeRunUid; $receiver_0.scrapeType = _tmp_scrapeType; $receiver_0.scrapeRunStatus = _tmp_scrapeRunStatus; $receiver_0.conversionParams = _tmp_conversionParams; $receiver.scrapeRun = $receiver_0; } return $receiver; }; } function ScrapeQueueItemDao_JdbcKt$findByUid$lambda$lambda(_result) { return mapNextRow(_result, null, ScrapeQueueItemDao_JdbcKt$findByUid$lambda$lambda$lambda(_result)); } function ScrapeQueueItemDao_JdbcKt$findByUid$lambda(closure$sqiUid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$sqiUid); return useResults(_stmt.executeQuery(), ScrapeQueueItemDao_JdbcKt$findByUid$lambda$lambda); }; } ScrapeQueueItemDao_JdbcKt.prototype.findByUid_za3lpa$ = function (sqiUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT ScrapeQueueItem.*, ScrapeRun.* FROM ScrapeQueueItem \n | LEFT JOIN ScrapeRun ON ScrapeQueueItem.runId = ScrapeRun.scrapeRunUid\n | WHERE ScrapeQueueItem.sqiUid = ?\n ')), ScrapeQueueItemDao_JdbcKt$findByUid$lambda(sqiUid)); }; function ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO ScrapeQueueItem (sqiUid, sqiContentEntryParentUid, sqiContentEntryUid, destDir, scrapeUrl, status, runId, itemType, errorCode, contentType, timeAdded, timeStarted, timeFinished, priority, overrideEntry) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (entity.sqiUid === 0) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setInt_vux9f0$(1, entity.sqiUid); } stmt.setLong_6svq3l$(2, entity.sqiContentEntryParentUid); stmt.setLong_6svq3l$(3, entity.sqiContentEntryUid); stmt.setString_vqvrqt$(4, entity.destDir); stmt.setString_vqvrqt$(5, entity.scrapeUrl); stmt.setInt_vux9f0$(6, entity.status); stmt.setInt_vux9f0$(7, entity.runId); stmt.setInt_vux9f0$(8, entity.itemType); stmt.setInt_vux9f0$(9, entity.errorCode); stmt.setString_vqvrqt$(10, entity.contentType); stmt.setLong_6svq3l$(11, entity.timeAdded); stmt.setLong_6svq3l$(12, entity.timeStarted); stmt.setLong_6svq3l$(13, entity.timeFinished); stmt.setInt_vux9f0$(14, entity.priority); stmt.setBoolean_fzusl$(15, entity.overrideEntry); }; ScrapeQueueItemDao_JdbcKt$_insertAdapterScrapeQueueItem_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; ScrapeQueueItemDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScrapeQueueItemDao_JdbcKt', interfaces: [ScrapeQueueItemDao]}; function SiteDao() { } SiteDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteDao', interfaces: []}; function SiteDao_JdbcKt(_db) { SiteDao.call(this); this._db = _db; this._insertAdapterSite_upsert = new SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral(this._db); this._insertAdapterSite_ = new SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral(this._db); } function Coroutine$replaceAsync_5rubkd$($this, site_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$site = site_0; } Coroutine$replaceAsync_5rubkd$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceAsync_5rubkd$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceAsync_5rubkd$.prototype.constructor = Coroutine$replaceAsync_5rubkd$; Coroutine$replaceAsync_5rubkd$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSite_upsert.insertAndReturnIdAsync_11rb$(this.local$site, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_JdbcKt.prototype.replaceAsync_5rubkd$ = function (site_0, continuation_0, suspended) { var instance = new Coroutine$replaceAsync_5rubkd$(this, site_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteDao_JdbcKt.prototype.insert_5rubkd$ = function (site) { var _retVal = this._insertAdapterSite_.insertAndReturnId_11rb$(site); return _retVal; }; function Coroutine$SiteDao_JdbcKt$updateAsync$lambda(closure$workspace_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$workspace = closure$workspace_0; this.local$_stmt = _stmt_0; } Coroutine$SiteDao_JdbcKt$updateAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteDao_JdbcKt$updateAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteDao_JdbcKt$updateAsync$lambda.prototype.constructor = Coroutine$SiteDao_JdbcKt$updateAsync$lambda; Coroutine$SiteDao_JdbcKt$updateAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$workspace.sitePcsn); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$workspace.siteLcsn); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$workspace.siteLcb); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$workspace.siteLct); this.local$_stmt.setString_vqvrqt$(5, this.local$closure$workspace.siteName); this.local$_stmt.setBoolean_fzusl$(6, this.local$closure$workspace.guestLogin); this.local$_stmt.setBoolean_fzusl$(7, this.local$closure$workspace.registrationAllowed); this.local$_stmt.setString_vqvrqt$(8, this.local$closure$workspace.authSalt); this.local$_stmt.setLong_6svq3l$(9, this.local$closure$workspace.siteUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteDao_JdbcKt$updateAsync$lambda(closure$workspace_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteDao_JdbcKt$updateAsync$lambda(closure$workspace_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateAsync_5rubkd$($this, workspace_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$workspace = workspace_0; } Coroutine$updateAsync_5rubkd$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_5rubkd$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_5rubkd$.prototype.constructor = Coroutine$updateAsync_5rubkd$; Coroutine$updateAsync_5rubkd$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE Site SET sitePcsn = ?, siteLcsn = ?, siteLcb = ?, siteLct = ?, siteName = ?, guestLogin = ?, registrationAllowed = ?, authSalt = ? WHERE siteUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, SiteDao_JdbcKt$updateAsync$lambda(this.local$workspace), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_JdbcKt.prototype.updateAsync_5rubkd$ = function (workspace_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_5rubkd$(this, workspace_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SiteDao_JdbcKt$getSite$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_siteUid = closure$_result.getLong_61zpoe$('siteUid'); var _tmp_sitePcsn = closure$_result.getLong_61zpoe$('sitePcsn'); var _tmp_siteLcsn = closure$_result.getLong_61zpoe$('siteLcsn'); var _tmp_siteLcb = closure$_result.getInt_61zpoe$('siteLcb'); var _tmp_siteLct = closure$_result.getLong_61zpoe$('siteLct'); var _tmp_siteName = closure$_result.getString_61zpoe$('siteName'); var _tmp_guestLogin = closure$_result.getBoolean_61zpoe$('guestLogin'); var _tmp_registrationAllowed = closure$_result.getBoolean_61zpoe$('registrationAllowed'); var _tmp_authSalt = closure$_result.getString_61zpoe$('authSalt'); var $receiver = new Site(); $receiver.siteUid = _tmp_siteUid; $receiver.sitePcsn = _tmp_sitePcsn; $receiver.siteLcsn = _tmp_siteLcsn; $receiver.siteLcb = _tmp_siteLcb; $receiver.siteLct = _tmp_siteLct; $receiver.siteName = _tmp_siteName; $receiver.guestLogin = _tmp_guestLogin; $receiver.registrationAllowed = _tmp_registrationAllowed; $receiver.authSalt = _tmp_authSalt; return $receiver; }; } function SiteDao_JdbcKt$getSite$lambda$lambda(_result) { return mapNextRow(_result, null, SiteDao_JdbcKt$getSite$lambda$lambda$lambda(_result)); } function SiteDao_JdbcKt$getSite$lambda(_stmt) { return useResults(_stmt.executeQuery(), SiteDao_JdbcKt$getSite$lambda$lambda); } SiteDao_JdbcKt.prototype.getSite = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM Site LIMIT 1'), SiteDao_JdbcKt$getSite$lambda); }; function SiteDao_JdbcKt$getSiteAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_siteUid = closure$_result.getLong_61zpoe$('siteUid'); var _tmp_sitePcsn = closure$_result.getLong_61zpoe$('sitePcsn'); var _tmp_siteLcsn = closure$_result.getLong_61zpoe$('siteLcsn'); var _tmp_siteLcb = closure$_result.getInt_61zpoe$('siteLcb'); var _tmp_siteLct = closure$_result.getLong_61zpoe$('siteLct'); var _tmp_siteName = closure$_result.getString_61zpoe$('siteName'); var _tmp_guestLogin = closure$_result.getBoolean_61zpoe$('guestLogin'); var _tmp_registrationAllowed = closure$_result.getBoolean_61zpoe$('registrationAllowed'); var _tmp_authSalt = closure$_result.getString_61zpoe$('authSalt'); var $receiver = new Site(); $receiver.siteUid = _tmp_siteUid; $receiver.sitePcsn = _tmp_sitePcsn; $receiver.siteLcsn = _tmp_siteLcsn; $receiver.siteLcb = _tmp_siteLcb; $receiver.siteLct = _tmp_siteLct; $receiver.siteName = _tmp_siteName; $receiver.guestLogin = _tmp_guestLogin; $receiver.registrationAllowed = _tmp_registrationAllowed; $receiver.authSalt = _tmp_authSalt; return $receiver; }; } function SiteDao_JdbcKt$getSiteAsync$lambda$lambda(_result) { return mapNextRow(_result, null, SiteDao_JdbcKt$getSiteAsync$lambda$lambda$lambda(_result)); } function Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda.prototype.constructor = Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda; Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SiteDao_JdbcKt$getSiteAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteDao_JdbcKt$getSiteAsync$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteDao_JdbcKt$getSiteAsync$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } SiteDao_JdbcKt.prototype.getSiteAsync = function (continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM Site LIMIT 1'), SiteDao_JdbcKt$getSiteAsync$lambda, continuation); }; function SiteDao_JdbcKt$getSiteAuthSaltAsync$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getString_za3lpa$(1); }; } function SiteDao_JdbcKt$getSiteAuthSaltAsync$lambda$lambda(_result) { return mapNextRow(_result, null, SiteDao_JdbcKt$getSiteAuthSaltAsync$lambda$lambda$lambda(_result)); } function Coroutine$SiteDao_JdbcKt$getSiteAuthSaltAsync$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$SiteDao_JdbcKt$getSiteAuthSaltAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteDao_JdbcKt$getSiteAuthSaltAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteDao_JdbcKt$getSiteAuthSaltAsync$lambda.prototype.constructor = Coroutine$SiteDao_JdbcKt$getSiteAuthSaltAsync$lambda; Coroutine$SiteDao_JdbcKt$getSiteAuthSaltAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SiteDao_JdbcKt$getSiteAuthSaltAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteDao_JdbcKt$getSiteAuthSaltAsync$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteDao_JdbcKt$getSiteAuthSaltAsync$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } SiteDao_JdbcKt.prototype.getSiteAuthSaltAsync = function (continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT authSalt FROM Site LIMIT 1'), SiteDao_JdbcKt$getSiteAuthSaltAsync$lambda, continuation); }; function Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_146($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_146.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_146.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_146.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_146; Coroutine$replicateOnNewNode_s8cxhz$_146.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SiteReplicate(sitePk, siteDestination)\n | SELECT DISTINCT Site.siteUid AS sitePk,\n | ? AS siteDestination\n | FROM Site\n | WHERE Site.siteLct != COALESCE(\n | (SELECT siteVersionId\n | FROM SiteReplicate\n | WHERE sitePk = Site.siteUid\n | AND siteDestination = ?), 0) \n | /*psql ON CONFLICT(sitePk, siteDestination) DO UPDATE\n | SET sitePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SiteReplicate(sitePk, siteDestination)\n | SELECT DISTINCT Site.siteUid AS sitePk,\n | ? AS siteDestination\n | FROM Site\n | WHERE Site.siteLct != COALESCE(\n | (SELECT siteVersionId\n | FROM SiteReplicate\n | WHERE sitePk = Site.siteUid\n | AND siteDestination = ?), 0) \n | ON CONFLICT(sitePk, siteDestination) DO UPDATE\n | SET sitePending = true\n | \n | \n |')), SiteDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_146(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda; Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_149($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_149.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_149.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_149.prototype.constructor = Coroutine$replicateOnChange_149; Coroutine$replicateOnChange_149.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SiteReplicate(sitePk, siteDestination)\n | SELECT DISTINCT Site.siteUid AS sitePk,\n | UserSession.usClientNodeId AS siteDestination\n | FROM ChangeLog\n | JOIN Site \n | ON ChangeLog.chTableId = 189 \n | AND ChangeLog.chEntityPk = Site.siteUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Site.siteLct != COALESCE(\n | (SELECT siteVersionId\n | FROM SiteReplicate\n | WHERE sitePk = Site.siteUid\n | AND siteDestination = UserSession.usClientNodeId), 0) \n | /*psql ON CONFLICT(sitePk, siteDestination) DO UPDATE\n | SET sitePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SiteReplicate(sitePk, siteDestination)\n | SELECT DISTINCT Site.siteUid AS sitePk,\n | UserSession.usClientNodeId AS siteDestination\n | FROM ChangeLog\n | JOIN Site \n | ON ChangeLog.chTableId = 189 \n | AND ChangeLog.chEntityPk = Site.siteUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND Site.siteLct != COALESCE(\n | (SELECT siteVersionId\n | FROM SiteReplicate\n | WHERE sitePk = Site.siteUid\n | AND siteDestination = UserSession.usClientNodeId), 0) \n | ON CONFLICT(sitePk, siteDestination) DO UPDATE\n | SET sitePending = true\n | \n | \n |')), SiteDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_149(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO Site (siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.siteUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.siteUid); } stmt.setLong_6svq3l$(2, entity.sitePcsn); stmt.setLong_6svq3l$(3, entity.siteLcsn); stmt.setInt_vux9f0$(4, entity.siteLcb); stmt.setLong_6svq3l$(5, entity.siteLct); stmt.setString_vqvrqt$(6, entity.siteName); stmt.setBoolean_fzusl$(7, entity.guestLogin); stmt.setBoolean_fzusl$(8, entity.registrationAllowed); stmt.setString_vqvrqt$(9, entity.authSalt); }; SiteDao_JdbcKt$_insertAdapterSite_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO Site (siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.siteUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.siteUid); } stmt.setLong_6svq3l$(2, entity.sitePcsn); stmt.setLong_6svq3l$(3, entity.siteLcsn); stmt.setInt_vux9f0$(4, entity.siteLcb); stmt.setLong_6svq3l$(5, entity.siteLct); stmt.setString_vqvrqt$(6, entity.siteName); stmt.setBoolean_fzusl$(7, entity.guestLogin); stmt.setBoolean_fzusl$(8, entity.registrationAllowed); stmt.setString_vqvrqt$(9, entity.authSalt); }; SiteDao_JdbcKt$_insertAdapterSite_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; SiteDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteDao_JdbcKt', interfaces: [SiteDao]}; function SiteDao_ReplicateWrapper(_db, _dao) { SiteDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } SiteDao_ReplicateWrapper.prototype.getSite = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; SiteDao_ReplicateWrapper.prototype.getSiteAsync = function (continuation) { return this._dao_0.getSiteAsync(continuation); }; SiteDao_ReplicateWrapper.prototype.getSiteAuthSaltAsync = function (continuation) { return this._dao_0.getSiteAuthSaltAsync(continuation); }; function Coroutine$replaceAsync_5rubkd$_0($this, site_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$site = site_0; } Coroutine$replaceAsync_5rubkd$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceAsync_5rubkd$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceAsync_5rubkd$_0.prototype.constructor = Coroutine$replaceAsync_5rubkd$_0; Coroutine$replaceAsync_5rubkd$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$site.siteUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(189, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$site.siteUid = _newPk; this.state_0 = 3; continue; case 3: this.local$site.siteLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.replaceAsync_5rubkd$(this.local$site, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$site.siteUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_ReplicateWrapper.prototype.replaceAsync_5rubkd$ = function (site_0, continuation_0, suspended) { var instance = new Coroutine$replaceAsync_5rubkd$_0(this, site_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteDao_ReplicateWrapper.prototype.insert_5rubkd$ = function (site) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$updateAsync_5rubkd$_0($this, workspace_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$workspace = workspace_0; } Coroutine$updateAsync_5rubkd$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_5rubkd$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_5rubkd$_0.prototype.constructor = Coroutine$updateAsync_5rubkd$_0; Coroutine$updateAsync_5rubkd$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$workspace.siteLct = systemTimeInMillis(); this.state_0 = 2; this.result_0 = this.$this._dao_0.updateAsync_5rubkd$(this.local$workspace, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_ReplicateWrapper.prototype.updateAsync_5rubkd$ = function (workspace_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_5rubkd$_0(this, workspace_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNode_s8cxhz$_147($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_147.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_147.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_147.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_147; Coroutine$replicateOnNewNode_s8cxhz$_147.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_147(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_150($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_150.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_150.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_150.prototype.constructor = Coroutine$replicateOnChange_150; Coroutine$replicateOnChange_150.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_150(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteDao_ReplicateWrapper', interfaces: [SiteDao]}; function SiteDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { SiteDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } SiteDao_Repo.prototype.getSite = function () { var _result = this._dao.getSite(); return _result; }; function Coroutine$getSiteAsync($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$getSiteAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getSiteAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getSiteAsync.prototype.constructor = Coroutine$getSiteAsync; Coroutine$getSiteAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getSiteAsync(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_Repo.prototype.getSiteAsync = function (continuation_0, suspended) { var instance = new Coroutine$getSiteAsync(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getSiteAuthSaltAsync($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$getSiteAuthSaltAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getSiteAuthSaltAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getSiteAuthSaltAsync.prototype.constructor = Coroutine$getSiteAuthSaltAsync; Coroutine$getSiteAuthSaltAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getSiteAuthSaltAsync(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_Repo.prototype.getSiteAuthSaltAsync = function (continuation_0, suspended) { var instance = new Coroutine$getSiteAuthSaltAsync(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceAsync_5rubkd$_1($this, site_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$site = site_0; } Coroutine$replaceAsync_5rubkd$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceAsync_5rubkd$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceAsync_5rubkd$_1.prototype.constructor = Coroutine$replaceAsync_5rubkd$_1; Coroutine$replaceAsync_5rubkd$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replaceAsync_5rubkd$(this.local$site, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_Repo.prototype.replaceAsync_5rubkd$ = function (site_0, continuation_0, suspended) { var instance = new Coroutine$replaceAsync_5rubkd$_1(this, site_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteDao_Repo.prototype.insert_5rubkd$ = function (site) { var _result = this._dao.insert_5rubkd$(site); return _result; }; function Coroutine$updateAsync_5rubkd$_1($this, workspace_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$workspace = workspace_0; } Coroutine$updateAsync_5rubkd$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateAsync_5rubkd$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateAsync_5rubkd$_1.prototype.constructor = Coroutine$updateAsync_5rubkd$_1; Coroutine$updateAsync_5rubkd$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateAsync_5rubkd$(this.local$workspace, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_Repo.prototype.updateAsync_5rubkd$ = function (workspace_0, continuation_0, suspended) { var instance = new Coroutine$updateAsync_5rubkd$_1(this, workspace_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnNewNode_s8cxhz$_148($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_148.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_148.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_148.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_148; Coroutine$replicateOnNewNode_s8cxhz$_148.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_148(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_151($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_151.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_151.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_151.prototype.constructor = Coroutine$replicateOnChange_151; Coroutine$replicateOnChange_151.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_151(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteDao_Repo', interfaces: [SiteDao]}; function SiteTermsDao() { } SiteTermsDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteTermsDao', interfaces: [OneToManyJoinDao]}; function SiteTermsDao_JdbcKt(_db) { SiteTermsDao.call(this); this._db = _db; this._insertAdapterSiteTerms_ = new SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral(this._db); } function Coroutine$insertAsync_gc516$($this, siteTerms_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$siteTerms = siteTerms_0; } Coroutine$insertAsync_gc516$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_gc516$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_gc516$.prototype.constructor = Coroutine$insertAsync_gc516$; Coroutine$insertAsync_gc516$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSiteTerms_.insertAndReturnIdAsync_11rb$(this.local$siteTerms, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.insertAsync_gc516$ = function (siteTerms_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_gc516$(this, siteTerms_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_4ezy5m$_20($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_20.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_20.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_20.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_20; Coroutine$insertListAsync_4ezy5m$_20.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterSiteTerms_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_20(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$entityList = closure$entityList_0; this.local$tmp$ = void 0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda; Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.getConnection().setAutoCommit_6taknv$(false); this.local$tmp$ = this.local$closure$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var _entity = this.local$tmp$.next(); this.local$_stmt.setString_vqvrqt$(1, _entity.termsHtml); this.local$_stmt.setString_vqvrqt$(2, _entity.sTermsLang); this.local$_stmt.setLong_6svq3l$(3, _entity.sTermsLangUid); this.local$_stmt.setBoolean_fzusl$(4, _entity.sTermsActive); this.local$_stmt.setInt_vux9f0$(5, _entity.sTermsLastChangedBy); this.local$_stmt.setLong_6svq3l$(6, _entity.sTermsPrimaryCsn); this.local$_stmt.setLong_6svq3l$(7, _entity.sTermsLocalCsn); this.local$_stmt.setLong_6svq3l$(8, _entity.sTermsLct); this.local$_stmt.setLong_6svq3l$(9, _entity.sTermsUid); this.state_0 = 3; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return this.local$_stmt.getConnection().commit(), Unit; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$updateListAsync$lambda(closure$entityList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$updateListAsync$lambda(closure$entityList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateListAsync_4ezy5m$_20($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_20.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_20.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_20.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_20; Coroutine$updateListAsync_4ezy5m$_20.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _sql = 'UPDATE SiteTerms SET termsHtml = ?, sTermsLang = ?, sTermsLangUid = ?, sTermsActive = ?, sTermsLastChangedBy = ?, sTermsPrimaryCsn = ?, sTermsLocalCsn = ?, sTermsLct = ? WHERE sTermsUid = ?'; this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync_0(this.$this._db, _sql, SiteTermsDao_JdbcKt$updateListAsync$lambda(this.local$entityList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_20(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_149($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_149.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_149.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_149.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_149; Coroutine$replicateOnNewNode_s8cxhz$_149.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SiteTermsReplicate(stPk, stDestination)\n | SELECT DISTINCT SiteTerms.sTermsUid AS stPk,\n | ? AS stDestination\n | FROM SiteTerms\n | WHERE SiteTerms.sTermsLct != COALESCE(\n | (SELECT stVersionId\n | FROM SiteTermsReplicate\n | WHERE stPk = SiteTerms.sTermsUid\n | AND stDestination = ?), 0) \n | /*psql ON CONFLICT(stPk, stDestination) DO UPDATE\n | SET stPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SiteTermsReplicate(stPk, stDestination)\n | SELECT DISTINCT SiteTerms.sTermsUid AS stPk,\n | ? AS stDestination\n | FROM SiteTerms\n | WHERE SiteTerms.sTermsLct != COALESCE(\n | (SELECT stVersionId\n | FROM SiteTermsReplicate\n | WHERE stPk = SiteTerms.sTermsUid\n | AND stDestination = ?), 0) \n | ON CONFLICT(stPk, stDestination) DO UPDATE\n | SET stPending = true\n | \n | \n |')), SiteTermsDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_149(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda; Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_152($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_152.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_152.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_152.prototype.constructor = Coroutine$replicateOnChange_152; Coroutine$replicateOnChange_152.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO SiteTermsReplicate(stPk, stDestination)\n | SELECT DISTINCT SiteTerms.sTermsUid AS stUid,\n | UserSession.usClientNodeId AS stDestination\n | FROM ChangeLog\n | JOIN SiteTerms\n | ON ChangeLog.chTableId = 272\n | AND ChangeLog.chEntityPk = SiteTerms.sTermsUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND SiteTerms.sTermsLct != COALESCE(\n | (SELECT stVersionId\n | FROM SiteTermsReplicate\n | WHERE stPk = SiteTerms.sTermsUid\n | AND stDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(stPk, stDestination) DO UPDATE\n | SET stPending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO SiteTermsReplicate(stPk, stDestination)\n | SELECT DISTINCT SiteTerms.sTermsUid AS stUid,\n | UserSession.usClientNodeId AS stDestination\n | FROM ChangeLog\n | JOIN SiteTerms\n | ON ChangeLog.chTableId = 272\n | AND ChangeLog.chEntityPk = SiteTerms.sTermsUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND SiteTerms.sTermsLct != COALESCE(\n | (SELECT stVersionId\n | FROM SiteTermsReplicate\n | WHERE stPk = SiteTerms.sTermsUid\n | AND stDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(stPk, stDestination) DO UPDATE\n | SET stPending = true\n | \n | \n |')), SiteTermsDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_152(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SiteTermsDao_JdbcKt$findSiteTerms$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_sTermsUid = closure$_result.getLong_61zpoe$('sTermsUid'); var _tmp_termsHtml = closure$_result.getString_61zpoe$('termsHtml'); var _tmp_sTermsLang = closure$_result.getString_61zpoe$('sTermsLang'); var _tmp_sTermsLangUid = closure$_result.getLong_61zpoe$('sTermsLangUid'); var _tmp_sTermsActive = closure$_result.getBoolean_61zpoe$('sTermsActive'); var _tmp_sTermsLastChangedBy = closure$_result.getInt_61zpoe$('sTermsLastChangedBy'); var _tmp_sTermsPrimaryCsn = closure$_result.getLong_61zpoe$('sTermsPrimaryCsn'); var _tmp_sTermsLocalCsn = closure$_result.getLong_61zpoe$('sTermsLocalCsn'); var _tmp_sTermsLct = closure$_result.getLong_61zpoe$('sTermsLct'); var $receiver = new SiteTerms(); $receiver.sTermsUid = _tmp_sTermsUid; $receiver.termsHtml = _tmp_termsHtml; $receiver.sTermsLang = _tmp_sTermsLang; $receiver.sTermsLangUid = _tmp_sTermsLangUid; $receiver.sTermsActive = _tmp_sTermsActive; $receiver.sTermsLastChangedBy = _tmp_sTermsLastChangedBy; $receiver.sTermsPrimaryCsn = _tmp_sTermsPrimaryCsn; $receiver.sTermsLocalCsn = _tmp_sTermsLocalCsn; $receiver.sTermsLct = _tmp_sTermsLct; return $receiver; }; } function SiteTermsDao_JdbcKt$findSiteTerms$lambda$lambda(_result) { return mapNextRow(_result, null, SiteTermsDao_JdbcKt$findSiteTerms$lambda$lambda$lambda(_result)); } function Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda(closure$langCode_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$langCode = closure$langCode_0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda; Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$langCode); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SiteTermsDao_JdbcKt$findSiteTerms$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findSiteTerms$lambda(closure$langCode_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findSiteTerms$lambda(closure$langCode_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SiteTermsDao_JdbcKt.prototype.findSiteTerms_61zpoe$ = function (langCode, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin("\n |\n | SELECT * FROM SiteTerms WHERE sTermsUid = coalesce(\n | (SELECT sTermsUid FROM SiteTerms st_int WHERE st_int.sTermsLang = ? LIMIT 1),\n | (SELECT sTermsUid FROM SiteTerms st_int WHERE st_int.sTermsLang = 'en' LIMIT 1),\n | 0)\n | \n ")), SiteTermsDao_JdbcKt$findSiteTerms$lambda(langCode), continuation); }; function SiteTermsDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_sTermsUid = closure$_result.getLong_61zpoe$('sTermsUid'); var _tmp_termsHtml = closure$_result.getString_61zpoe$('termsHtml'); var _tmp_sTermsLang = closure$_result.getString_61zpoe$('sTermsLang'); var _tmp_sTermsLangUid = closure$_result.getLong_61zpoe$('sTermsLangUid'); var _tmp_sTermsActive = closure$_result.getBoolean_61zpoe$('sTermsActive'); var _tmp_sTermsLastChangedBy = closure$_result.getInt_61zpoe$('sTermsLastChangedBy'); var _tmp_sTermsPrimaryCsn = closure$_result.getLong_61zpoe$('sTermsPrimaryCsn'); var _tmp_sTermsLocalCsn = closure$_result.getLong_61zpoe$('sTermsLocalCsn'); var _tmp_sTermsLct = closure$_result.getLong_61zpoe$('sTermsLct'); var $receiver = new SiteTerms(); $receiver.sTermsUid = _tmp_sTermsUid; $receiver.termsHtml = _tmp_termsHtml; $receiver.sTermsLang = _tmp_sTermsLang; $receiver.sTermsLangUid = _tmp_sTermsLangUid; $receiver.sTermsActive = _tmp_sTermsActive; $receiver.sTermsLastChangedBy = _tmp_sTermsLastChangedBy; $receiver.sTermsPrimaryCsn = _tmp_sTermsPrimaryCsn; $receiver.sTermsLocalCsn = _tmp_sTermsLocalCsn; $receiver.sTermsLct = _tmp_sTermsLct; return $receiver; }; } function SiteTermsDao_JdbcKt$findByUidAsync$lambda$lambda(_result) { return mapNextRow(_result, null, SiteTermsDao_JdbcKt$findByUidAsync$lambda$lambda$lambda(_result)); } function Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uid = closure$uid_0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda; Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$uid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SiteTermsDao_JdbcKt$findByUidAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findByUidAsync$lambda(closure$uid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findByUidAsync$lambda(closure$uid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SiteTermsDao_JdbcKt.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM SiteTerms WHERE sTermsUid = ?'), SiteTermsDao_JdbcKt$findByUidAsync$lambda(uid), continuation); }; function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral(this$SiteTermsDao_JdbcKt) { this.this$SiteTermsDao_JdbcKt = this$SiteTermsDao_JdbcKt; DataSourceFactory.call(this); } function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_sTermsUid = closure$_result.getLong_61zpoe$('sTermsUid'); var _tmp_termsHtml = closure$_result.getString_61zpoe$('termsHtml'); var _tmp_sTermsLang = closure$_result.getString_61zpoe$('sTermsLang'); var _tmp_sTermsLangUid = closure$_result.getLong_61zpoe$('sTermsLangUid'); var _tmp_sTermsActive = closure$_result.getBoolean_61zpoe$('sTermsActive'); var _tmp_sTermsLastChangedBy = closure$_result.getInt_61zpoe$('sTermsLastChangedBy'); var _tmp_sTermsPrimaryCsn = closure$_result.getLong_61zpoe$('sTermsPrimaryCsn'); var _tmp_sTermsLocalCsn = closure$_result.getLong_61zpoe$('sTermsLocalCsn'); var _tmp_sTermsLct = closure$_result.getLong_61zpoe$('sTermsLct'); var _tmp_Language_nullCount = 0; var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_name = closure$_result.getString_61zpoe$('name'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_isAllNull = _tmp_Language_nullCount === 11; var $receiver = new SiteTermsWithLanguage(); $receiver.sTermsUid = _tmp_sTermsUid; $receiver.termsHtml = _tmp_termsHtml; $receiver.sTermsLang = _tmp_sTermsLang; $receiver.sTermsLangUid = _tmp_sTermsLangUid; $receiver.sTermsActive = _tmp_sTermsActive; $receiver.sTermsLastChangedBy = _tmp_sTermsLastChangedBy; $receiver.sTermsPrimaryCsn = _tmp_sTermsPrimaryCsn; $receiver.sTermsLocalCsn = _tmp_sTermsLocalCsn; $receiver.sTermsLct = _tmp_sTermsLct; if (!_tmp_Language_isAllNull) { var $receiver_0 = new Language(); $receiver_0.langUid = _tmp_langUid; $receiver_0.name = _tmp_name; $receiver_0.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver_0.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver_0.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver_0.Language_Type = _tmp_Language_Type; $receiver_0.languageActive = _tmp_languageActive; $receiver_0.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver_0.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver_0.langLastChangedBy = _tmp_langLastChangedBy; $receiver_0.langLct = _tmp_langLct; $receiver.stLanguage = $receiver_0; } return $receiver; }; } function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda(closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda(this$SiteTermsDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$SiteTermsDao_JdbcKt = this$SiteTermsDao_JdbcKt_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$SiteTermsDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT SiteTerms.*, Language.* \n | FROM SiteTerms \n | LEFT JOIN Language ON SiteTerms.sTermsLangUid = Language.langUid\n | WHERE CAST(sTermsActive AS INTEGER) = 1\n | ) LIMIT ? OFFSET ?\n ')), SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda$lambda(this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda(this$SiteTermsDao_JdbcKt_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda(this$SiteTermsDao_JdbcKt_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$SiteTermsDao_JdbcKt._db, listOf(['SiteTerms', 'Language']), SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getData$lambda(this.this$SiteTermsDao_JdbcKt, _limit, _offset)); }; function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda(this$SiteTermsDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$SiteTermsDao_JdbcKt = this$SiteTermsDao_JdbcKt_0; } Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda; Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$SiteTermsDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT SiteTerms.*, Language.* \n | FROM SiteTerms \n | LEFT JOIN Language ON SiteTerms.sTermsLangUid = Language.langUid\n | WHERE CAST(sTermsActive AS INTEGER) = 1\n | ) \n ')), SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda(this$SiteTermsDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda(this$SiteTermsDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$SiteTermsDao_JdbcKt._db, listOf(['SiteTerms', 'Language']), SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral$getLength$lambda(this.this$SiteTermsDao_JdbcKt)); }; SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; SiteTermsDao_JdbcKt.prototype.findAllTermsAsFactory = function () { return new SiteTermsDao_JdbcKt$findAllTermsAsFactory$ObjectLiteral(this); }; function SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_sTermsUid = closure$_result.getLong_61zpoe$('sTermsUid'); var _tmp_termsHtml = closure$_result.getString_61zpoe$('termsHtml'); var _tmp_sTermsLang = closure$_result.getString_61zpoe$('sTermsLang'); var _tmp_sTermsLangUid = closure$_result.getLong_61zpoe$('sTermsLangUid'); var _tmp_sTermsActive = closure$_result.getBoolean_61zpoe$('sTermsActive'); var _tmp_sTermsLastChangedBy = closure$_result.getInt_61zpoe$('sTermsLastChangedBy'); var _tmp_sTermsPrimaryCsn = closure$_result.getLong_61zpoe$('sTermsPrimaryCsn'); var _tmp_sTermsLocalCsn = closure$_result.getLong_61zpoe$('sTermsLocalCsn'); var _tmp_sTermsLct = closure$_result.getLong_61zpoe$('sTermsLct'); var _tmp_Language_nullCount = 0; var _tmp_langUid = closure$_result.getLong_61zpoe$('langUid'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_name = closure$_result.getString_61zpoe$('name'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_1_standard = closure$_result.getString_61zpoe$('iso_639_1_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_2_standard = closure$_result.getString_61zpoe$('iso_639_2_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_iso_639_3_standard = closure$_result.getString_61zpoe$('iso_639_3_standard'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_Type = closure$_result.getString_61zpoe$('Language_Type'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_languageActive = closure$_result.getBoolean_61zpoe$('languageActive'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLocalChangeSeqNum = closure$_result.getLong_61zpoe$('langLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langMasterChangeSeqNum = closure$_result.getLong_61zpoe$('langMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLastChangedBy = closure$_result.getInt_61zpoe$('langLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_langLct = closure$_result.getLong_61zpoe$('langLct'); if (closure$_result.wasNull()) { _tmp_Language_nullCount = _tmp_Language_nullCount + 1 | 0; } var _tmp_Language_isAllNull = _tmp_Language_nullCount === 11; var $receiver = new SiteTermsWithLanguage(); $receiver.sTermsUid = _tmp_sTermsUid; $receiver.termsHtml = _tmp_termsHtml; $receiver.sTermsLang = _tmp_sTermsLang; $receiver.sTermsLangUid = _tmp_sTermsLangUid; $receiver.sTermsActive = _tmp_sTermsActive; $receiver.sTermsLastChangedBy = _tmp_sTermsLastChangedBy; $receiver.sTermsPrimaryCsn = _tmp_sTermsPrimaryCsn; $receiver.sTermsLocalCsn = _tmp_sTermsLocalCsn; $receiver.sTermsLct = _tmp_sTermsLct; if (!_tmp_Language_isAllNull) { var $receiver_0 = new Language(); $receiver_0.langUid = _tmp_langUid; $receiver_0.name = _tmp_name; $receiver_0.iso_639_1_standard = _tmp_iso_639_1_standard; $receiver_0.iso_639_2_standard = _tmp_iso_639_2_standard; $receiver_0.iso_639_3_standard = _tmp_iso_639_3_standard; $receiver_0.Language_Type = _tmp_Language_Type; $receiver_0.languageActive = _tmp_languageActive; $receiver_0.langLocalChangeSeqNum = _tmp_langLocalChangeSeqNum; $receiver_0.langMasterChangeSeqNum = _tmp_langMasterChangeSeqNum; $receiver_0.langLastChangedBy = _tmp_langLastChangedBy; $receiver_0.langLct = _tmp_langLct; $receiver.stLanguage = $receiver_0; } return $receiver; }; } function SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda$lambda(_result) { return mapRows(_result, SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda$lambda$lambda(_result)); } function Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda; Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } SiteTermsDao_JdbcKt.prototype.findAllWithLanguageAsList = function (continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT SiteTerms.*, Language.*\n | FROM SiteTerms\n | LEFT JOIN Language ON SiteTerms.sTermsLangUid = Language.langUid\n | WHERE CAST(sTermsActive AS INTEGER) = 1\n | \n ')), SiteTermsDao_JdbcKt$findAllWithLanguageAsList$lambda, continuation); }; function Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$sTermsUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$active = closure$active_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$sTermsUid = closure$sTermsUid_0; this.local$_stmt = _stmt_0; } Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda.prototype.constructor = Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda; Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setBoolean_fzusl$(1, this.local$closure$active); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$sTermsUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SiteTermsDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$sTermsUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SiteTermsDao_JdbcKt$updateActiveByUid$lambda(closure$active_0, closure$changeTime_0, closure$sTermsUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateActiveByUid_zaz62j$_11($this, sTermsUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sTermsUid = sTermsUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_11.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_11.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_11.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_11; Coroutine$updateActiveByUid_zaz62j$_11.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE SiteTerms \n | SET sTermsActive = ?,\n | sTermsLct = ?\n | WHERE sTermsUid = ?\n | \n ')), SiteTermsDao_JdbcKt$updateActiveByUid$lambda(this.local$active, this.local$changeTime, this.local$sTermsUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_JdbcKt.prototype.updateActiveByUid_zaz62j$ = function (sTermsUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_11(this, sTermsUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO SiteTerms (sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.sTermsUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.sTermsUid); } stmt.setString_vqvrqt$(2, entity.termsHtml); stmt.setString_vqvrqt$(3, entity.sTermsLang); stmt.setLong_6svq3l$(4, entity.sTermsLangUid); stmt.setBoolean_fzusl$(5, entity.sTermsActive); stmt.setInt_vux9f0$(6, entity.sTermsLastChangedBy); stmt.setLong_6svq3l$(7, entity.sTermsPrimaryCsn); stmt.setLong_6svq3l$(8, entity.sTermsLocalCsn); stmt.setLong_6svq3l$(9, entity.sTermsLct); }; SiteTermsDao_JdbcKt$_insertAdapterSiteTerms_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; SiteTermsDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteTermsDao_JdbcKt', interfaces: [SiteTermsDao]}; function SiteTermsDao_ReplicateWrapper(_db, _dao) { SiteTermsDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_150($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_150.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_150.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_150.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_150; Coroutine$replicateOnNewNode_s8cxhz$_150.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_150(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_153($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_153.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_153.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_153.prototype.constructor = Coroutine$replicateOnChange_153; Coroutine$replicateOnChange_153.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_153(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteTermsDao_ReplicateWrapper.prototype.findSiteTerms_61zpoe$ = function (langCode, continuation) { return this._dao_0.findSiteTerms_61zpoe$(langCode, continuation); }; function Coroutine$insertAsync_gc516$_0($this, siteTerms_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$siteTerms = siteTerms_0; } Coroutine$insertAsync_gc516$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_gc516$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_gc516$_0.prototype.constructor = Coroutine$insertAsync_gc516$_0; Coroutine$insertAsync_gc516$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$siteTerms.sTermsUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(272, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$siteTerms.sTermsUid = _newPk; this.state_0 = 3; continue; case 3: this.local$siteTerms.sTermsLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync_gc516$(this.local$siteTerms, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$siteTerms.sTermsUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_ReplicateWrapper.prototype.insertAsync_gc516$ = function (siteTerms_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_gc516$_0(this, siteTerms_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteTermsDao_ReplicateWrapper.prototype.findByUidAsync_s8cxhz$ = function (uid, continuation) { return this._dao_0.findByUidAsync_s8cxhz$(uid, continuation); }; SiteTermsDao_ReplicateWrapper.prototype.findAllTermsAsFactory = function () { return this._dao_0.findAllTermsAsFactory(); }; SiteTermsDao_ReplicateWrapper.prototype.findAllWithLanguageAsList = function (continuation) { return this._dao_0.findAllWithLanguageAsList(continuation); }; function Coroutine$updateActiveByUid_zaz62j$_12($this, sTermsUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sTermsUid = sTermsUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_12.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_12.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_12.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_12; Coroutine$updateActiveByUid_zaz62j$_12.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateActiveByUid_zaz62j$(this.local$sTermsUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_ReplicateWrapper.prototype.updateActiveByUid_zaz62j$ = function (sTermsUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_12(this, sTermsUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_4ezy5m$_21($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_21.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_21.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_21.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_21; Coroutine$insertListAsync_4ezy5m$_21.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.sTermsUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(272, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.sTermsUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.sTermsLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_ReplicateWrapper.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_21(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_21($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_21.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_21.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_21.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_21; Coroutine$updateListAsync_4ezy5m$_21.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _generatedPks = ArrayList_init(); var $receiver = this.local$entityList.iterator(); while ($receiver.hasNext()) { var element = $receiver.next(); element.sTermsLct = systemTimeInMillis(); } this.state_0 = 2; this.result_0 = this.$this._dao_0.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_ReplicateWrapper.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_21(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteTermsDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteTermsDao_ReplicateWrapper', interfaces: [SiteTermsDao]}; function SiteTermsDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { SiteTermsDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_151($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_151.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_151.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_151.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_151; Coroutine$replicateOnNewNode_s8cxhz$_151.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_151(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_154($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_154.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_154.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_154.prototype.constructor = Coroutine$replicateOnChange_154; Coroutine$replicateOnChange_154.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_154(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findSiteTerms_61zpoe$($this, langCode_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$langCode = langCode_0; } Coroutine$findSiteTerms_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSiteTerms_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSiteTerms_61zpoe$.prototype.constructor = Coroutine$findSiteTerms_61zpoe$; Coroutine$findSiteTerms_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findSiteTerms_61zpoe$(this.local$langCode, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.findSiteTerms_61zpoe$ = function (langCode_0, continuation_0, suspended) { var instance = new Coroutine$findSiteTerms_61zpoe$(this, langCode_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertAsync_gc516$_1($this, siteTerms_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$siteTerms = siteTerms_0; } Coroutine$insertAsync_gc516$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_gc516$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_gc516$_1.prototype.constructor = Coroutine$insertAsync_gc516$_1; Coroutine$insertAsync_gc516$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync_gc516$(this.local$siteTerms, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.insertAsync_gc516$ = function (siteTerms_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_gc516$_1(this, siteTerms_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findByUidAsync_s8cxhz$_16($this, uid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uid = uid_0; } Coroutine$findByUidAsync_s8cxhz$_16.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidAsync_s8cxhz$_16.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidAsync_s8cxhz$_16.prototype.constructor = Coroutine$findByUidAsync_s8cxhz$_16; Coroutine$findByUidAsync_s8cxhz$_16.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidAsync_s8cxhz$(this.local$uid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.findByUidAsync_s8cxhz$ = function (uid_0, continuation_0, suspended) { var instance = new Coroutine$findByUidAsync_s8cxhz$_16(this, uid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteTermsDao_Repo.prototype.findAllTermsAsFactory = function () { var _result = this._dao.findAllTermsAsFactory(); return _result; }; function Coroutine$findAllWithLanguageAsList($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$findAllWithLanguageAsList.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllWithLanguageAsList.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllWithLanguageAsList.prototype.constructor = Coroutine$findAllWithLanguageAsList; Coroutine$findAllWithLanguageAsList.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllWithLanguageAsList(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.findAllWithLanguageAsList = function (continuation_0, suspended) { var instance = new Coroutine$findAllWithLanguageAsList(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateActiveByUid_zaz62j$_13($this, sTermsUid_0, active_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sTermsUid = sTermsUid_0; this.local$active = active_0; this.local$changeTime = changeTime_0; } Coroutine$updateActiveByUid_zaz62j$_13.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateActiveByUid_zaz62j$_13.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateActiveByUid_zaz62j$_13.prototype.constructor = Coroutine$updateActiveByUid_zaz62j$_13; Coroutine$updateActiveByUid_zaz62j$_13.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateActiveByUid_zaz62j$(this.local$sTermsUid, this.local$active, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.updateActiveByUid_zaz62j$ = function (sTermsUid_0, active_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$updateActiveByUid_zaz62j$_13(this, sTermsUid_0, active_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_4ezy5m$_22($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_4ezy5m$_22.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_4ezy5m$_22.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_4ezy5m$_22.prototype.constructor = Coroutine$insertListAsync_4ezy5m$_22; Coroutine$insertListAsync_4ezy5m$_22.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.insertListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_4ezy5m$_22(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateListAsync_4ezy5m$_22($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$updateListAsync_4ezy5m$_22.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateListAsync_4ezy5m$_22.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateListAsync_4ezy5m$_22.prototype.constructor = Coroutine$updateListAsync_4ezy5m$_22; Coroutine$updateListAsync_4ezy5m$_22.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; SiteTermsDao_Repo.prototype.updateListAsync_4ezy5m$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$updateListAsync_4ezy5m$_22(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; SiteTermsDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteTermsDao_Repo', interfaces: [SiteTermsDao]}; function StateContentDao() { } StateContentDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateContentDao', interfaces: [BaseDao]}; function StateContentDao_JdbcKt(_db) { StateContentDao.call(this); this._db = _db; this._insertAdapterStateContentEntity_ = new StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral(this._db); } StateContentDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterStateContentEntity_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_154($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_154.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_154.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_154.prototype.constructor = Coroutine$insertAsync_154; Coroutine$insertAsync_154.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterStateContentEntity_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_154(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateContentDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterStateContentEntity_.insertList_4ezy5m$(entityList); }; function StateContentDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.stateContentStateUid); _stmt.setString_vqvrqt$(2, _entity.stateContentKey); _stmt.setString_vqvrqt$(3, _entity.stateContentValue); _stmt.setBoolean_fzusl$(4, _entity.isIsactive); _stmt.setLong_6svq3l$(5, _entity.stateContentMasterChangeSeqNum); _stmt.setLong_6svq3l$(6, _entity.stateContentLocalChangeSeqNum); _stmt.setInt_vux9f0$(7, _entity.stateContentLastChangedBy); _stmt.setLong_6svq3l$(8, _entity.stateContentLct); _stmt.setLong_6svq3l$(9, _entity.stateContentUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } StateContentDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE StateContentEntity SET stateContentStateUid = ?, stateContentKey = ?, stateContentValue = ?, isIsactive = ?, stateContentMasterChangeSeqNum = ?, stateContentLocalChangeSeqNum = ?, stateContentLastChangedBy = ?, stateContentLct = ? WHERE stateContentUid = ?'; prepareAndUseStatement(this._db, _sql, StateContentDao_JdbcKt$updateList$lambda(entityList)); }; function StateContentDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.stateContentStateUid); _stmt.setString_vqvrqt$(2, closure$entity.stateContentKey); _stmt.setString_vqvrqt$(3, closure$entity.stateContentValue); _stmt.setBoolean_fzusl$(4, closure$entity.isIsactive); _stmt.setLong_6svq3l$(5, closure$entity.stateContentMasterChangeSeqNum); _stmt.setLong_6svq3l$(6, closure$entity.stateContentLocalChangeSeqNum); _stmt.setInt_vux9f0$(7, closure$entity.stateContentLastChangedBy); _stmt.setLong_6svq3l$(8, closure$entity.stateContentLct); _stmt.setLong_6svq3l$(9, closure$entity.stateContentUid); return _stmt.executeUpdate(); }; } StateContentDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE StateContentEntity SET stateContentStateUid = ?, stateContentKey = ?, stateContentValue = ?, isIsactive = ?, stateContentMasterChangeSeqNum = ?, stateContentLocalChangeSeqNum = ?, stateContentLastChangedBy = ?, stateContentLct = ? WHERE stateContentUid = ?'; prepareAndUseStatement(this._db, _sql, StateContentDao_JdbcKt$update$lambda(entity)); }; function Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StateContentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StateContentDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_152($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_152.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_152.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_152.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_152; Coroutine$replicateOnNewNode_s8cxhz$_152.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO StateContentEntityReplicate(scePk, sceDestination)\n | SELECT DISTINCT StateContentEntity.stateContentUid AS scePk,\n | ? AS sceDestination\n | FROM StateContentEntity\n | WHERE StateContentEntity.stateContentLct != COALESCE(\n | (SELECT sceVersionId\n | FROM StateContentEntityReplicate\n | WHERE scePk = StateContentEntity.stateContentUid\n | AND sceDestination = ?), 0) \n | /*psql ON CONFLICT(scePk, sceDestination) DO UPDATE\n | SET scePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO StateContentEntityReplicate(scePk, sceDestination)\n | SELECT DISTINCT StateContentEntity.stateContentUid AS scePk,\n | ? AS sceDestination\n | FROM StateContentEntity\n | WHERE StateContentEntity.stateContentLct != COALESCE(\n | (SELECT sceVersionId\n | FROM StateContentEntityReplicate\n | WHERE scePk = StateContentEntity.stateContentUid\n | AND sceDestination = ?), 0) \n | ON CONFLICT(scePk, sceDestination) DO UPDATE\n | SET scePending = true\n | \n | \n |')), StateContentDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_152(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda; Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StateContentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StateContentDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_155($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_155.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_155.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_155.prototype.constructor = Coroutine$replicateOnChange_155; Coroutine$replicateOnChange_155.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO StateContentEntityReplicate(scePk, sceDestination)\n | SELECT DISTINCT StateContentEntity.stateContentUid AS sceUid,\n | UserSession.usClientNodeId AS sceDestination\n | FROM ChangeLog\n | JOIN StateContentEntity\n | ON ChangeLog.chTableId = 72\n | AND ChangeLog.chEntityPk = StateContentEntity.stateContentUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND StateContentEntity.stateContentLct != COALESCE(\n | (SELECT sceVersionId\n | FROM StateContentEntityReplicate\n | WHERE scePk = StateContentEntity.stateContentUid\n | AND sceDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(scePk, sceDestination) DO UPDATE\n | SET scePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO StateContentEntityReplicate(scePk, sceDestination)\n | SELECT DISTINCT StateContentEntity.stateContentUid AS sceUid,\n | UserSession.usClientNodeId AS sceDestination\n | FROM ChangeLog\n | JOIN StateContentEntity\n | ON ChangeLog.chTableId = 72\n | AND ChangeLog.chEntityPk = StateContentEntity.stateContentUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND StateContentEntity.stateContentLct != COALESCE(\n | (SELECT sceVersionId\n | FROM StateContentEntityReplicate\n | WHERE scePk = StateContentEntity.stateContentUid\n | AND sceDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(scePk, sceDestination) DO UPDATE\n | SET scePending = true\n | \n | \n |')), StateContentDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_155(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function StateContentDao_JdbcKt$findAllStateContentWithStateUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_stateContentUid = closure$_result.getLong_61zpoe$('stateContentUid'); var _tmp_stateContentStateUid = closure$_result.getLong_61zpoe$('stateContentStateUid'); var _tmp_stateContentKey = closure$_result.getString_61zpoe$('stateContentKey'); var _tmp_stateContentValue = closure$_result.getString_61zpoe$('stateContentValue'); var _tmp_isIsactive = closure$_result.getBoolean_61zpoe$('isIsactive'); var _tmp_stateContentMasterChangeSeqNum = closure$_result.getLong_61zpoe$('stateContentMasterChangeSeqNum'); var _tmp_stateContentLocalChangeSeqNum = closure$_result.getLong_61zpoe$('stateContentLocalChangeSeqNum'); var _tmp_stateContentLastChangedBy = closure$_result.getInt_61zpoe$('stateContentLastChangedBy'); var _tmp_stateContentLct = closure$_result.getLong_61zpoe$('stateContentLct'); var $receiver = StateContentEntity_init_1(); $receiver.stateContentUid = _tmp_stateContentUid; $receiver.stateContentStateUid = _tmp_stateContentStateUid; $receiver.stateContentKey = _tmp_stateContentKey; $receiver.stateContentValue = _tmp_stateContentValue; $receiver.isIsactive = _tmp_isIsactive; $receiver.stateContentMasterChangeSeqNum = _tmp_stateContentMasterChangeSeqNum; $receiver.stateContentLocalChangeSeqNum = _tmp_stateContentLocalChangeSeqNum; $receiver.stateContentLastChangedBy = _tmp_stateContentLastChangedBy; $receiver.stateContentLct = _tmp_stateContentLct; return $receiver; }; } function StateContentDao_JdbcKt$findAllStateContentWithStateUid$lambda$lambda(_result) { return mapRows(_result, StateContentDao_JdbcKt$findAllStateContentWithStateUid$lambda$lambda$lambda(_result)); } function StateContentDao_JdbcKt$findAllStateContentWithStateUid$lambda(closure$id) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$id); return useResults(_stmt.executeQuery(), StateContentDao_JdbcKt$findAllStateContentWithStateUid$lambda$lambda); }; } StateContentDao_JdbcKt.prototype.findAllStateContentWithStateUid_s8cxhz$ = function (id) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM StateContentEntity WHERE stateContentStateUid = ? AND isIsactive'), StateContentDao_JdbcKt$findAllStateContentWithStateUid$lambda(id)); }; function StateContentDao_JdbcKt$findStateContentByKeyAndStateUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_stateContentUid = closure$_result.getLong_61zpoe$('stateContentUid'); var _tmp_stateContentStateUid = closure$_result.getLong_61zpoe$('stateContentStateUid'); var _tmp_stateContentKey = closure$_result.getString_61zpoe$('stateContentKey'); var _tmp_stateContentValue = closure$_result.getString_61zpoe$('stateContentValue'); var _tmp_isIsactive = closure$_result.getBoolean_61zpoe$('isIsactive'); var _tmp_stateContentMasterChangeSeqNum = closure$_result.getLong_61zpoe$('stateContentMasterChangeSeqNum'); var _tmp_stateContentLocalChangeSeqNum = closure$_result.getLong_61zpoe$('stateContentLocalChangeSeqNum'); var _tmp_stateContentLastChangedBy = closure$_result.getInt_61zpoe$('stateContentLastChangedBy'); var _tmp_stateContentLct = closure$_result.getLong_61zpoe$('stateContentLct'); var $receiver = StateContentEntity_init_1(); $receiver.stateContentUid = _tmp_stateContentUid; $receiver.stateContentStateUid = _tmp_stateContentStateUid; $receiver.stateContentKey = _tmp_stateContentKey; $receiver.stateContentValue = _tmp_stateContentValue; $receiver.isIsactive = _tmp_isIsactive; $receiver.stateContentMasterChangeSeqNum = _tmp_stateContentMasterChangeSeqNum; $receiver.stateContentLocalChangeSeqNum = _tmp_stateContentLocalChangeSeqNum; $receiver.stateContentLastChangedBy = _tmp_stateContentLastChangedBy; $receiver.stateContentLct = _tmp_stateContentLct; return $receiver; }; } function StateContentDao_JdbcKt$findStateContentByKeyAndStateUid$lambda$lambda(_result) { return mapNextRow(_result, null, StateContentDao_JdbcKt$findStateContentByKeyAndStateUid$lambda$lambda$lambda(_result)); } function StateContentDao_JdbcKt$findStateContentByKeyAndStateUid$lambda(closure$stateUid, closure$key) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$stateUid); _stmt.setString_vqvrqt$(2, closure$key); return useResults(_stmt.executeQuery(), StateContentDao_JdbcKt$findStateContentByKeyAndStateUid$lambda$lambda); }; } StateContentDao_JdbcKt.prototype.findStateContentByKeyAndStateUid_4wgjuj$ = function (key, stateUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM StateContentEntity WHERE stateContentStateUid = ? AND stateContentKey = ? AND isIsactive'), StateContentDao_JdbcKt$findStateContentByKeyAndStateUid$lambda(stateUid, key)); }; function StateContentDao_JdbcKt$setInActiveStateContentByKeyAndUid$lambda(closure$isActive, closure$updateTime, closure$stateUid) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$isActive); _stmt.setLong_6svq3l$(2, closure$updateTime); _stmt.setLong_6svq3l$(3, closure$stateUid); return _stmt.executeUpdate(); }; } StateContentDao_JdbcKt.prototype.setInActiveStateContentByKeyAndUid_vhff2t$ = function (isActive, stateUid, updateTime) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE StateContentEntity \n | SET isIsactive = ?, \n | stateContentLct = ?\n | WHERE stateContentUid = ?\n | \n ')), StateContentDao_JdbcKt$setInActiveStateContentByKeyAndUid$lambda(isActive, updateTime, stateUid)); }; function StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO StateContentEntity (stateContentUid, stateContentStateUid, stateContentKey, stateContentValue, isIsactive, stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum, stateContentLastChangedBy, stateContentLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.stateContentUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.stateContentUid); } stmt.setLong_6svq3l$(2, entity.stateContentStateUid); stmt.setString_vqvrqt$(3, entity.stateContentKey); stmt.setString_vqvrqt$(4, entity.stateContentValue); stmt.setBoolean_fzusl$(5, entity.isIsactive); stmt.setLong_6svq3l$(6, entity.stateContentMasterChangeSeqNum); stmt.setLong_6svq3l$(7, entity.stateContentLocalChangeSeqNum); stmt.setInt_vux9f0$(8, entity.stateContentLastChangedBy); stmt.setLong_6svq3l$(9, entity.stateContentLct); }; StateContentDao_JdbcKt$_insertAdapterStateContentEntity_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; StateContentDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateContentDao_JdbcKt', interfaces: [StateContentDao]}; function StateContentDao_ReplicateWrapper(_db, _dao) { StateContentDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_153($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_153.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_153.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_153.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_153; Coroutine$replicateOnNewNode_s8cxhz$_153.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_153(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_156($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_156.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_156.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_156.prototype.constructor = Coroutine$replicateOnChange_156; Coroutine$replicateOnChange_156.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_156(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateContentDao_ReplicateWrapper.prototype.findAllStateContentWithStateUid_s8cxhz$ = function (id) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateContentDao_ReplicateWrapper.prototype.findStateContentByKeyAndStateUid_4wgjuj$ = function (key, stateUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateContentDao_ReplicateWrapper.prototype.setInActiveStateContentByKeyAndUid_vhff2t$ = function (isActive, stateUid, updateTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateContentDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_155($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_155.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_155.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_155.prototype.constructor = Coroutine$insertAsync_155; Coroutine$insertAsync_155.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.stateContentUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(72, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.stateContentUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.stateContentLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.stateContentUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_155(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateContentDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateContentDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateContentDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateContentDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateContentDao_ReplicateWrapper', interfaces: [StateContentDao]}; function StateContentDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { StateContentDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_154($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_154.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_154.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_154.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_154; Coroutine$replicateOnNewNode_s8cxhz$_154.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_154(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_157($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_157.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_157.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_157.prototype.constructor = Coroutine$replicateOnChange_157; Coroutine$replicateOnChange_157.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_157(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateContentDao_Repo.prototype.findAllStateContentWithStateUid_s8cxhz$ = function (id) { var _result = this._dao.findAllStateContentWithStateUid_s8cxhz$(id); return _result; }; StateContentDao_Repo.prototype.findStateContentByKeyAndStateUid_4wgjuj$ = function (key, stateUid) { var _result = this._dao.findStateContentByKeyAndStateUid_4wgjuj$(key, stateUid); return _result; }; StateContentDao_Repo.prototype.setInActiveStateContentByKeyAndUid_vhff2t$ = function (isActive, stateUid, updateTime) { this._dao.setInActiveStateContentByKeyAndUid_vhff2t$(isActive, stateUid, updateTime); }; StateContentDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_156($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_156.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_156.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_156.prototype.constructor = Coroutine$insertAsync_156; Coroutine$insertAsync_156.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateContentDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_156(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateContentDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; StateContentDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; StateContentDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; StateContentDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateContentDao_Repo', interfaces: [StateContentDao]}; function StateDao() { } StateDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateDao', interfaces: [BaseDao]}; function StateDao_JdbcKt(_db) { StateDao.call(this); this._db = _db; this._insertAdapterStateEntity_ = new StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral(this._db); } StateDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterStateEntity_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_157($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_157.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_157.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_157.prototype.constructor = Coroutine$insertAsync_157; Coroutine$insertAsync_157.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterStateEntity_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_157(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterStateEntity_.insertList_4ezy5m$(entityList); }; function StateDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.stateId); _stmt.setLong_6svq3l$(2, _entity.agentUid); _stmt.setString_vqvrqt$(3, _entity.activityId); _stmt.setString_vqvrqt$(4, _entity.registration); _stmt.setBoolean_fzusl$(5, _entity.isIsactive); _stmt.setLong_6svq3l$(6, _entity.timestamp); _stmt.setLong_6svq3l$(7, _entity.stateMasterChangeSeqNum); _stmt.setLong_6svq3l$(8, _entity.stateLocalChangeSeqNum); _stmt.setInt_vux9f0$(9, _entity.stateLastChangedBy); _stmt.setLong_6svq3l$(10, _entity.stateLct); _stmt.setLong_6svq3l$(11, _entity.stateUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } StateDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE StateEntity SET stateId = ?, agentUid = ?, activityId = ?, registration = ?, isIsactive = ?, timestamp = ?, stateMasterChangeSeqNum = ?, stateLocalChangeSeqNum = ?, stateLastChangedBy = ?, stateLct = ? WHERE stateUid = ?'; prepareAndUseStatement(this._db, _sql, StateDao_JdbcKt$updateList$lambda(entityList)); }; function StateDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.stateId); _stmt.setLong_6svq3l$(2, closure$entity.agentUid); _stmt.setString_vqvrqt$(3, closure$entity.activityId); _stmt.setString_vqvrqt$(4, closure$entity.registration); _stmt.setBoolean_fzusl$(5, closure$entity.isIsactive); _stmt.setLong_6svq3l$(6, closure$entity.timestamp); _stmt.setLong_6svq3l$(7, closure$entity.stateMasterChangeSeqNum); _stmt.setLong_6svq3l$(8, closure$entity.stateLocalChangeSeqNum); _stmt.setInt_vux9f0$(9, closure$entity.stateLastChangedBy); _stmt.setLong_6svq3l$(10, closure$entity.stateLct); _stmt.setLong_6svq3l$(11, closure$entity.stateUid); return _stmt.executeUpdate(); }; } StateDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE StateEntity SET stateId = ?, agentUid = ?, activityId = ?, registration = ?, isIsactive = ?, timestamp = ?, stateMasterChangeSeqNum = ?, stateLocalChangeSeqNum = ?, stateLastChangedBy = ?, stateLct = ? WHERE stateUid = ?'; prepareAndUseStatement(this._db, _sql, StateDao_JdbcKt$update$lambda(entity)); }; function Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StateDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StateDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_155($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_155.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_155.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_155.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_155; Coroutine$replicateOnNewNode_s8cxhz$_155.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO StateEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StateEntity.stateUid AS sePk,\n | ? AS seDestination\n | FROM StateEntity\n | JOIN AgentEntity\n | ON StateEntity.agentUid = AgentEntity.agentUid\n | JOIN UserSession\n | ON AgentEntity.agentPersonUid = UserSession.usPersonUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND StateEntity.stateLct != COALESCE(\n | (SELECT seVersionId\n | FROM StateEntityReplicate\n | WHERE sePk = StateEntity.stateUid\n | AND seDestination = ?), 0) \n | /*psql ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO StateEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StateEntity.stateUid AS sePk,\n | ? AS seDestination\n | FROM StateEntity\n | JOIN AgentEntity\n | ON StateEntity.agentUid = AgentEntity.agentUid\n | JOIN UserSession\n | ON AgentEntity.agentPersonUid = UserSession.usPersonUid\n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | AND StateEntity.stateLct != COALESCE(\n | (SELECT seVersionId\n | FROM StateEntityReplicate\n | WHERE sePk = StateEntity.stateUid\n | AND seDestination = ?), 0) \n | ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = true\n | \n | \n |')), StateDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_155(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$StateDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$StateDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StateDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StateDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$StateDao_JdbcKt$replicateOnChange$lambda; Coroutine$StateDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StateDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StateDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_158($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_158.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_158.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_158.prototype.constructor = Coroutine$replicateOnChange_158; Coroutine$replicateOnChange_158.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO StateEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StateEntity.stateUid AS seUid,\n | UserSession.usClientNodeId AS seDestination\n | FROM ChangeLog\n | JOIN StateEntity\n | ON ChangeLog.chTableId = 70\n | AND ChangeLog.chEntityPk = StateEntity.stateUid\n | JOIN AgentEntity\n | ON StateEntity.agentUid = AgentEntity.agentUid\n | JOIN UserSession\n | ON AgentEntity.agentPersonUid = UserSession.usPersonUid\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND StateEntity.stateLct != COALESCE(\n | (SELECT seVersionId\n | FROM StateEntityReplicate\n | WHERE sePk = StateEntity.stateUid\n | AND seDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO StateEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StateEntity.stateUid AS seUid,\n | UserSession.usClientNodeId AS seDestination\n | FROM ChangeLog\n | JOIN StateEntity\n | ON ChangeLog.chTableId = 70\n | AND ChangeLog.chEntityPk = StateEntity.stateUid\n | JOIN AgentEntity\n | ON StateEntity.agentUid = AgentEntity.agentUid\n | JOIN UserSession\n | ON AgentEntity.agentPersonUid = UserSession.usPersonUid\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND StateEntity.stateLct != COALESCE(\n | (SELECT seVersionId\n | FROM StateEntityReplicate\n | WHERE sePk = StateEntity.stateUid\n | AND seDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = true\n | \n | \n |')), StateDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_158(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function StateDao_JdbcKt$findByStateId$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_stateUid = closure$_result.getLong_61zpoe$('stateUid'); var _tmp_stateId = closure$_result.getString_61zpoe$('stateId'); var _tmp_agentUid = closure$_result.getLong_61zpoe$('agentUid'); var _tmp_activityId = closure$_result.getString_61zpoe$('activityId'); var _tmp_registration = closure$_result.getString_61zpoe$('registration'); var _tmp_isIsactive = closure$_result.getBoolean_61zpoe$('isIsactive'); var _tmp_timestamp = closure$_result.getLong_61zpoe$('timestamp'); var _tmp_stateMasterChangeSeqNum = closure$_result.getLong_61zpoe$('stateMasterChangeSeqNum'); var _tmp_stateLocalChangeSeqNum = closure$_result.getLong_61zpoe$('stateLocalChangeSeqNum'); var _tmp_stateLastChangedBy = closure$_result.getInt_61zpoe$('stateLastChangedBy'); var _tmp_stateLct = closure$_result.getLong_61zpoe$('stateLct'); var $receiver = new StateEntity(); $receiver.stateUid = _tmp_stateUid; $receiver.stateId = _tmp_stateId; $receiver.agentUid = _tmp_agentUid; $receiver.activityId = _tmp_activityId; $receiver.registration = _tmp_registration; $receiver.isIsactive = _tmp_isIsactive; $receiver.timestamp = _tmp_timestamp; $receiver.stateMasterChangeSeqNum = _tmp_stateMasterChangeSeqNum; $receiver.stateLocalChangeSeqNum = _tmp_stateLocalChangeSeqNum; $receiver.stateLastChangedBy = _tmp_stateLastChangedBy; $receiver.stateLct = _tmp_stateLct; return $receiver; }; } function StateDao_JdbcKt$findByStateId$lambda$lambda(_result) { return mapNextRow(_result, null, StateDao_JdbcKt$findByStateId$lambda$lambda$lambda(_result)); } function StateDao_JdbcKt$findByStateId$lambda(closure$id, closure$agentUid, closure$activityId, closure$registration) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$id); _stmt.setLong_6svq3l$(2, closure$agentUid); _stmt.setString_vqvrqt$(3, closure$activityId); _stmt.setString_vqvrqt$(4, closure$registration); return useResults(_stmt.executeQuery(), StateDao_JdbcKt$findByStateId$lambda$lambda); }; } StateDao_JdbcKt.prototype.findByStateId_r731ya$ = function (id, agentUid, activityId, registration) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM StateEntity WHERE stateId = ? AND agentUid = ? AND activityId = ? AND registration = ? AND isIsactive LIMIT 1'), StateDao_JdbcKt$findByStateId$lambda(id, agentUid, activityId, registration)); }; function StateDao_JdbcKt$findStateIdByAgentAndActivity$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_stateUid = closure$_result.getLong_61zpoe$('stateUid'); var _tmp_stateId = closure$_result.getString_61zpoe$('stateId'); var _tmp_agentUid = closure$_result.getLong_61zpoe$('agentUid'); var _tmp_activityId = closure$_result.getString_61zpoe$('activityId'); var _tmp_registration = closure$_result.getString_61zpoe$('registration'); var _tmp_isIsactive = closure$_result.getBoolean_61zpoe$('isIsactive'); var _tmp_timestamp = closure$_result.getLong_61zpoe$('timestamp'); var _tmp_stateMasterChangeSeqNum = closure$_result.getLong_61zpoe$('stateMasterChangeSeqNum'); var _tmp_stateLocalChangeSeqNum = closure$_result.getLong_61zpoe$('stateLocalChangeSeqNum'); var _tmp_stateLastChangedBy = closure$_result.getInt_61zpoe$('stateLastChangedBy'); var _tmp_stateLct = closure$_result.getLong_61zpoe$('stateLct'); var $receiver = new StateEntity(); $receiver.stateUid = _tmp_stateUid; $receiver.stateId = _tmp_stateId; $receiver.agentUid = _tmp_agentUid; $receiver.activityId = _tmp_activityId; $receiver.registration = _tmp_registration; $receiver.isIsactive = _tmp_isIsactive; $receiver.timestamp = _tmp_timestamp; $receiver.stateMasterChangeSeqNum = _tmp_stateMasterChangeSeqNum; $receiver.stateLocalChangeSeqNum = _tmp_stateLocalChangeSeqNum; $receiver.stateLastChangedBy = _tmp_stateLastChangedBy; $receiver.stateLct = _tmp_stateLct; return $receiver; }; } function StateDao_JdbcKt$findStateIdByAgentAndActivity$lambda$lambda(_result) { return mapRows(_result, StateDao_JdbcKt$findStateIdByAgentAndActivity$lambda$lambda$lambda(_result)); } function StateDao_JdbcKt$findStateIdByAgentAndActivity$lambda(closure$agentUid, closure$activityId, closure$registration, closure$since) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$agentUid); _stmt.setString_vqvrqt$(2, closure$activityId); _stmt.setString_vqvrqt$(3, closure$registration); _stmt.setString_vqvrqt$(4, closure$since); return useResults(_stmt.executeQuery(), StateDao_JdbcKt$findStateIdByAgentAndActivity$lambda$lambda); }; } StateDao_JdbcKt.prototype.findStateIdByAgentAndActivity_zeqzmn$ = function (agentUid, activityId, registration, since) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM StateEntity WHERE agentUid = ? AND activityId = ? AND registration = ? AND isIsactive AND timestamp > ?'), StateDao_JdbcKt$findStateIdByAgentAndActivity$lambda(agentUid, activityId, registration, since)); }; function StateDao_JdbcKt$updateStateToInActive$lambda(closure$isActive, closure$updateTime, closure$agentUid, closure$activityId, closure$registration) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$isActive); _stmt.setLong_6svq3l$(2, closure$updateTime); _stmt.setLong_6svq3l$(3, closure$agentUid); _stmt.setString_vqvrqt$(4, closure$activityId); _stmt.setString_vqvrqt$(5, closure$registration); return _stmt.executeUpdate(); }; } StateDao_JdbcKt.prototype.updateStateToInActive_idwj4n$ = function (agentUid, activityId, registration, isActive, updateTime) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE StateEntity \n | SET isIsactive = ?,\n | stateLct = ?\n | WHERE agentUid = ? AND activityId = ? \n | AND registration = ? AND isIsactive\n | \n ')), StateDao_JdbcKt$updateStateToInActive$lambda(isActive, updateTime, agentUid, activityId, registration)); }; function StateDao_JdbcKt$setStateInActive$lambda(closure$isActive, closure$updateTime, closure$stateId, closure$agentUid, closure$activityId, closure$registration) { return function (_stmt) { _stmt.setBoolean_fzusl$(1, closure$isActive); _stmt.setLong_6svq3l$(2, closure$updateTime); _stmt.setString_vqvrqt$(3, closure$stateId); _stmt.setLong_6svq3l$(4, closure$agentUid); _stmt.setString_vqvrqt$(5, closure$activityId); _stmt.setString_vqvrqt$(6, closure$registration); return _stmt.executeUpdate(); }; } StateDao_JdbcKt.prototype.setStateInActive_njdojp$ = function (stateId, agentUid, activityId, registration, isActive, updateTime) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE StateEntity \n | SET isIsactive = ?, \n | stateLct = ?\n | WHERE stateId = ? AND agentUid = ? \n | AND activityId = ? AND registration = ? \n | AND isIsactive\n ')), StateDao_JdbcKt$setStateInActive$lambda(isActive, updateTime, stateId, agentUid, activityId, registration)); }; function StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO StateEntity (stateUid, stateId, agentUid, activityId, registration, isIsactive, timestamp, stateMasterChangeSeqNum, stateLocalChangeSeqNum, stateLastChangedBy, stateLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.stateUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.stateUid); } stmt.setString_vqvrqt$(2, entity.stateId); stmt.setLong_6svq3l$(3, entity.agentUid); stmt.setString_vqvrqt$(4, entity.activityId); stmt.setString_vqvrqt$(5, entity.registration); stmt.setBoolean_fzusl$(6, entity.isIsactive); stmt.setLong_6svq3l$(7, entity.timestamp); stmt.setLong_6svq3l$(8, entity.stateMasterChangeSeqNum); stmt.setLong_6svq3l$(9, entity.stateLocalChangeSeqNum); stmt.setInt_vux9f0$(10, entity.stateLastChangedBy); stmt.setLong_6svq3l$(11, entity.stateLct); }; StateDao_JdbcKt$_insertAdapterStateEntity_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; StateDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateDao_JdbcKt', interfaces: [StateDao]}; function StateDao_ReplicateWrapper(_db, _dao) { StateDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_156($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_156.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_156.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_156.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_156; Coroutine$replicateOnNewNode_s8cxhz$_156.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_156(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_159($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_159.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_159.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_159.prototype.constructor = Coroutine$replicateOnChange_159; Coroutine$replicateOnChange_159.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_159(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateDao_ReplicateWrapper.prototype.findByStateId_r731ya$ = function (id, agentUid, activityId, registration) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.prototype.findStateIdByAgentAndActivity_zeqzmn$ = function (agentUid, activityId, registration, since) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.prototype.updateStateToInActive_idwj4n$ = function (agentUid, activityId, registration, isActive, updateTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.prototype.setStateInActive_njdojp$ = function (stateId, agentUid, activityId, registration, isActive, updateTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_158($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_158.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_158.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_158.prototype.constructor = Coroutine$insertAsync_158; Coroutine$insertAsync_158.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.stateUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(70, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.stateUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.stateLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.stateUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_158(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StateDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateDao_ReplicateWrapper', interfaces: [StateDao]}; function StateDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { StateDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_157($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_157.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_157.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_157.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_157; Coroutine$replicateOnNewNode_s8cxhz$_157.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_157(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_160($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_160.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_160.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_160.prototype.constructor = Coroutine$replicateOnChange_160; Coroutine$replicateOnChange_160.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_160(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateDao_Repo.prototype.findByStateId_r731ya$ = function (id, agentUid, activityId, registration) { var _result = this._dao.findByStateId_r731ya$(id, agentUid, activityId, registration); return _result; }; StateDao_Repo.prototype.findStateIdByAgentAndActivity_zeqzmn$ = function (agentUid, activityId, registration, since) { var _result = this._dao.findStateIdByAgentAndActivity_zeqzmn$(agentUid, activityId, registration, since); return _result; }; StateDao_Repo.prototype.updateStateToInActive_idwj4n$ = function (agentUid, activityId, registration, isActive, updateTime) { this._dao.updateStateToInActive_idwj4n$(agentUid, activityId, registration, isActive, updateTime); }; StateDao_Repo.prototype.setStateInActive_njdojp$ = function (stateId, agentUid, activityId, registration, isActive, updateTime) { this._dao.setStateInActive_njdojp$(stateId, agentUid, activityId, registration, isActive, updateTime); }; StateDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_159($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_159.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_159.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_159.prototype.constructor = Coroutine$insertAsync_159; Coroutine$insertAsync_159.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StateDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_159(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StateDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; StateDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; StateDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; StateDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateDao_Repo', interfaces: [StateDao]}; function StatementDao() { } StatementDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'StatementDao', interfaces: [BaseDao]}; function StatementDao_JdbcKt(_db) { StatementDao.call(this); this._db = _db; this._insertAdapterStatementEntity_ = new StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral(this._db); } function Coroutine$insertListAsync_6agjaz$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_6agjaz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_6agjaz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_6agjaz$.prototype.constructor = Coroutine$insertListAsync_6agjaz$; Coroutine$insertListAsync_6agjaz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterStatementEntity_.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.insertListAsync_6agjaz$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_6agjaz$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterStatementEntity_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_160($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_160.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_160.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_160.prototype.constructor = Coroutine$insertAsync_160; Coroutine$insertAsync_160.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterStatementEntity_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_160(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterStatementEntity_.insertList_4ezy5m$(entityList); }; function StatementDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.statementId); _stmt.setLong_6svq3l$(2, _entity.statementPersonUid); _stmt.setLong_6svq3l$(3, _entity.statementVerbUid); _stmt.setLong_6svq3l$(4, _entity.xObjectUid); _stmt.setLong_6svq3l$(5, _entity.subStatementActorUid); _stmt.setLong_6svq3l$(6, _entity.substatementVerbUid); _stmt.setLong_6svq3l$(7, _entity.subStatementObjectUid); _stmt.setLong_6svq3l$(8, _entity.agentUid); _stmt.setLong_6svq3l$(9, _entity.instructorUid); _stmt.setLong_6svq3l$(10, _entity.authorityUid); _stmt.setLong_6svq3l$(11, _entity.teamUid); _stmt.setBoolean_fzusl$(12, _entity.resultCompletion); _stmt.setByte_6t1wet$(13, _entity.resultSuccess); _stmt.setFloat_24o109$(14, _entity.resultScoreScaled); _stmt.setLong_6svq3l$(15, _entity.resultScoreRaw); _stmt.setLong_6svq3l$(16, _entity.resultScoreMin); _stmt.setLong_6svq3l$(17, _entity.resultScoreMax); _stmt.setLong_6svq3l$(18, _entity.resultDuration); _stmt.setString_vqvrqt$(19, _entity.resultResponse); _stmt.setLong_6svq3l$(20, _entity.timestamp); _stmt.setLong_6svq3l$(21, _entity.stored); _stmt.setString_vqvrqt$(22, _entity.contextRegistration); _stmt.setString_vqvrqt$(23, _entity.contextPlatform); _stmt.setString_vqvrqt$(24, _entity.contextStatementId); _stmt.setString_vqvrqt$(25, _entity.fullStatement); _stmt.setLong_6svq3l$(26, _entity.statementMasterChangeSeqNum); _stmt.setLong_6svq3l$(27, _entity.statementLocalChangeSeqNum); _stmt.setInt_vux9f0$(28, _entity.statementLastChangedBy); _stmt.setLong_6svq3l$(29, _entity.statementLct); _stmt.setInt_vux9f0$(30, _entity.extensionProgress); _stmt.setBoolean_fzusl$(31, _entity.contentEntryRoot); _stmt.setLong_6svq3l$(32, _entity.statementContentEntryUid); _stmt.setLong_6svq3l$(33, _entity.statementLearnerGroupUid); _stmt.setLong_6svq3l$(34, _entity.statementClazzUid); _stmt.setLong_6svq3l$(35, _entity.statementUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } StatementDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE StatementEntity SET statementId = ?, statementPersonUid = ?, statementVerbUid = ?, xObjectUid = ?, subStatementActorUid = ?, substatementVerbUid = ?, subStatementObjectUid = ?, agentUid = ?, instructorUid = ?, authorityUid = ?, teamUid = ?, resultCompletion = ?, resultSuccess = ?, resultScoreScaled = ?, resultScoreRaw = ?, resultScoreMin = ?, resultScoreMax = ?, resultDuration = ?, resultResponse = ?, timestamp = ?, stored = ?, contextRegistration = ?, contextPlatform = ?, contextStatementId = ?, fullStatement = ?, statementMasterChangeSeqNum = ?, statementLocalChangeSeqNum = ?, statementLastChangedBy = ?, statementLct = ?, extensionProgress = ?, contentEntryRoot = ?, statementContentEntryUid = ?, statementLearnerGroupUid = ?, statementClazzUid = ? WHERE statementUid = ?'; prepareAndUseStatement(this._db, _sql, StatementDao_JdbcKt$updateList$lambda(entityList)); }; function StatementDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.statementId); _stmt.setLong_6svq3l$(2, closure$entity.statementPersonUid); _stmt.setLong_6svq3l$(3, closure$entity.statementVerbUid); _stmt.setLong_6svq3l$(4, closure$entity.xObjectUid); _stmt.setLong_6svq3l$(5, closure$entity.subStatementActorUid); _stmt.setLong_6svq3l$(6, closure$entity.substatementVerbUid); _stmt.setLong_6svq3l$(7, closure$entity.subStatementObjectUid); _stmt.setLong_6svq3l$(8, closure$entity.agentUid); _stmt.setLong_6svq3l$(9, closure$entity.instructorUid); _stmt.setLong_6svq3l$(10, closure$entity.authorityUid); _stmt.setLong_6svq3l$(11, closure$entity.teamUid); _stmt.setBoolean_fzusl$(12, closure$entity.resultCompletion); _stmt.setByte_6t1wet$(13, closure$entity.resultSuccess); _stmt.setFloat_24o109$(14, closure$entity.resultScoreScaled); _stmt.setLong_6svq3l$(15, closure$entity.resultScoreRaw); _stmt.setLong_6svq3l$(16, closure$entity.resultScoreMin); _stmt.setLong_6svq3l$(17, closure$entity.resultScoreMax); _stmt.setLong_6svq3l$(18, closure$entity.resultDuration); _stmt.setString_vqvrqt$(19, closure$entity.resultResponse); _stmt.setLong_6svq3l$(20, closure$entity.timestamp); _stmt.setLong_6svq3l$(21, closure$entity.stored); _stmt.setString_vqvrqt$(22, closure$entity.contextRegistration); _stmt.setString_vqvrqt$(23, closure$entity.contextPlatform); _stmt.setString_vqvrqt$(24, closure$entity.contextStatementId); _stmt.setString_vqvrqt$(25, closure$entity.fullStatement); _stmt.setLong_6svq3l$(26, closure$entity.statementMasterChangeSeqNum); _stmt.setLong_6svq3l$(27, closure$entity.statementLocalChangeSeqNum); _stmt.setInt_vux9f0$(28, closure$entity.statementLastChangedBy); _stmt.setLong_6svq3l$(29, closure$entity.statementLct); _stmt.setInt_vux9f0$(30, closure$entity.extensionProgress); _stmt.setBoolean_fzusl$(31, closure$entity.contentEntryRoot); _stmt.setLong_6svq3l$(32, closure$entity.statementContentEntryUid); _stmt.setLong_6svq3l$(33, closure$entity.statementLearnerGroupUid); _stmt.setLong_6svq3l$(34, closure$entity.statementClazzUid); _stmt.setLong_6svq3l$(35, closure$entity.statementUid); return _stmt.executeUpdate(); }; } StatementDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE StatementEntity SET statementId = ?, statementPersonUid = ?, statementVerbUid = ?, xObjectUid = ?, subStatementActorUid = ?, substatementVerbUid = ?, subStatementObjectUid = ?, agentUid = ?, instructorUid = ?, authorityUid = ?, teamUid = ?, resultCompletion = ?, resultSuccess = ?, resultScoreScaled = ?, resultScoreRaw = ?, resultScoreMin = ?, resultScoreMax = ?, resultDuration = ?, resultResponse = ?, timestamp = ?, stored = ?, contextRegistration = ?, contextPlatform = ?, contextStatementId = ?, fullStatement = ?, statementMasterChangeSeqNum = ?, statementLocalChangeSeqNum = ?, statementLastChangedBy = ?, statementLct = ?, extensionProgress = ?, contentEntryRoot = ?, statementContentEntryUid = ?, statementLearnerGroupUid = ?, statementClazzUid = ? WHERE statementUid = ?'; prepareAndUseStatement(this._db, _sql, StatementDao_JdbcKt$update$lambda(entity)); }; function Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_158($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_158.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_158.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_158.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_158; Coroutine$replicateOnNewNode_s8cxhz$_158.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin("\n |\n | REPLACE INTO StatementEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StatementEntity.statementUid AS sePk,\n | ? AS seDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN StatementEntity\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz \n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | ) \n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | -- Temporary measure to prevent admin user getting clogged up\n | -- Restrict to the last 30 days of data\n | AND StatementEntity.timestamp > ( \n | --notpsql\n | strftime('%s', 'now') * 1000\n | --endnotpsql\n | /*psql\n | ROUND(EXTRACT(epoch from NOW())*1000)\n | */\n | - (30 * CAST(86400000 AS BIGINT)))\n | --notpsql\n | AND StatementEntity.statementLct != COALESCE(\n | (SELECT seVersionId\n | FROM StatementEntityReplicate\n | WHERE sePk = StatementEntity.statementUid\n | AND seDestination = UserSession.usClientNodeId), 0)\n | --endnotpsql \n | /*psql ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = (SELECT StatementEntity.statementLct\n | FROM StatementEntity\n | WHERE StatementEntity.statementUid = EXCLUDED.sePk ) \n | != StatementEntityReplicate.seVersionId\n | */ \n | \n "), void 0, void 0, void 0, trimMargin('\n |INSERT INTO StatementEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StatementEntity.statementUid AS sePk,\n | ? AS seDestination\n | FROM UserSession\n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN StatementEntity\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz \n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | ) \n | \n | WHERE UserSession.usClientNodeId = ?\n | AND UserSession.usStatus = 1\n | -- Temporary measure to prevent admin user getting clogged up\n | -- Restrict to the last 30 days of data\n | AND StatementEntity.timestamp > ( \n | \n | ROUND(EXTRACT(epoch from NOW())*1000)\n | \n | - (30 * CAST(86400000 AS BIGINT)))\n | ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = (SELECT StatementEntity.statementLct\n | FROM StatementEntity\n | WHERE StatementEntity.statementUid = EXCLUDED.sePk ) \n | != StatementEntityReplicate.seVersionId\n | \n | \n |')), StatementDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_158(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda; Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_161($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_161.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_161.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_161.prototype.constructor = Coroutine$replicateOnChange_161; Coroutine$replicateOnChange_161.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO StatementEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StatementEntity.statementUid AS seUid,\n | UserSession.usClientNodeId AS seDestination\n | FROM ChangeLog\n | JOIN StatementEntity\n | ON ChangeLog.chTableId = 60\n | AND ChangeLog.chEntityPk = StatementEntity.statementUid\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1)\n | AND StatementEntity.statementLct != COALESCE(\n | (SELECT seVersionId\n | FROM StatementEntityReplicate\n | WHERE sePk = StatementEntity.statementUid\n | AND seDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = true\n | */\n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO StatementEntityReplicate(sePk, seDestination)\n | SELECT DISTINCT StatementEntity.statementUid AS seUid,\n | UserSession.usClientNodeId AS seDestination\n | FROM ChangeLog\n | JOIN StatementEntity\n | ON ChangeLog.chTableId = 60\n | AND ChangeLog.chEntityPk = StatementEntity.statementUid\n | JOIN ScopedGrant\n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | AND UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1)\n | AND StatementEntity.statementLct != COALESCE(\n | (SELECT seVersionId\n | FROM StatementEntityReplicate\n | WHERE sePk = StatementEntity.statementUid\n | AND seDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(sePk, seDestination) DO UPDATE\n | SET sePending = true\n | \n | \n |')), StatementDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_161(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function StatementDao_JdbcKt$getOneStatement$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_statementUid = closure$_result.getLong_61zpoe$('statementUid'); var _tmp_statementId = closure$_result.getString_61zpoe$('statementId'); var _tmp_statementPersonUid = closure$_result.getLong_61zpoe$('statementPersonUid'); var _tmp_statementVerbUid = closure$_result.getLong_61zpoe$('statementVerbUid'); var _tmp_xObjectUid = closure$_result.getLong_61zpoe$('xObjectUid'); var _tmp_subStatementActorUid = closure$_result.getLong_61zpoe$('subStatementActorUid'); var _tmp_substatementVerbUid = closure$_result.getLong_61zpoe$('substatementVerbUid'); var _tmp_subStatementObjectUid = closure$_result.getLong_61zpoe$('subStatementObjectUid'); var _tmp_agentUid = closure$_result.getLong_61zpoe$('agentUid'); var _tmp_instructorUid = closure$_result.getLong_61zpoe$('instructorUid'); var _tmp_authorityUid = closure$_result.getLong_61zpoe$('authorityUid'); var _tmp_teamUid = closure$_result.getLong_61zpoe$('teamUid'); var _tmp_resultCompletion = closure$_result.getBoolean_61zpoe$('resultCompletion'); var _tmp_resultSuccess = closure$_result.getByte_61zpoe$('resultSuccess'); var _tmp_resultScoreScaled = closure$_result.getFloat_61zpoe$('resultScoreScaled'); var _tmp_resultScoreRaw = closure$_result.getLong_61zpoe$('resultScoreRaw'); var _tmp_resultScoreMin = closure$_result.getLong_61zpoe$('resultScoreMin'); var _tmp_resultScoreMax = closure$_result.getLong_61zpoe$('resultScoreMax'); var _tmp_resultDuration = closure$_result.getLong_61zpoe$('resultDuration'); var _tmp_resultResponse = closure$_result.getString_61zpoe$('resultResponse'); var _tmp_timestamp = closure$_result.getLong_61zpoe$('timestamp'); var _tmp_stored = closure$_result.getLong_61zpoe$('stored'); var _tmp_contextRegistration = closure$_result.getString_61zpoe$('contextRegistration'); var _tmp_contextPlatform = closure$_result.getString_61zpoe$('contextPlatform'); var _tmp_contextStatementId = closure$_result.getString_61zpoe$('contextStatementId'); var _tmp_fullStatement = closure$_result.getString_61zpoe$('fullStatement'); var _tmp_statementMasterChangeSeqNum = closure$_result.getLong_61zpoe$('statementMasterChangeSeqNum'); var _tmp_statementLocalChangeSeqNum = closure$_result.getLong_61zpoe$('statementLocalChangeSeqNum'); var _tmp_statementLastChangedBy = closure$_result.getInt_61zpoe$('statementLastChangedBy'); var _tmp_statementLct = closure$_result.getLong_61zpoe$('statementLct'); var _tmp_extensionProgress = closure$_result.getInt_61zpoe$('extensionProgress'); var _tmp_contentEntryRoot = closure$_result.getBoolean_61zpoe$('contentEntryRoot'); var _tmp_statementContentEntryUid = closure$_result.getLong_61zpoe$('statementContentEntryUid'); var _tmp_statementLearnerGroupUid = closure$_result.getLong_61zpoe$('statementLearnerGroupUid'); var _tmp_statementClazzUid = closure$_result.getLong_61zpoe$('statementClazzUid'); var $receiver = new StatementEntity(); $receiver.statementUid = _tmp_statementUid; $receiver.statementId = _tmp_statementId; $receiver.statementPersonUid = _tmp_statementPersonUid; $receiver.statementVerbUid = _tmp_statementVerbUid; $receiver.xObjectUid = _tmp_xObjectUid; $receiver.subStatementActorUid = _tmp_subStatementActorUid; $receiver.substatementVerbUid = _tmp_substatementVerbUid; $receiver.subStatementObjectUid = _tmp_subStatementObjectUid; $receiver.agentUid = _tmp_agentUid; $receiver.instructorUid = _tmp_instructorUid; $receiver.authorityUid = _tmp_authorityUid; $receiver.teamUid = _tmp_teamUid; $receiver.resultCompletion = _tmp_resultCompletion; $receiver.resultSuccess = _tmp_resultSuccess; $receiver.resultScoreScaled = _tmp_resultScoreScaled; $receiver.resultScoreRaw = _tmp_resultScoreRaw; $receiver.resultScoreMin = _tmp_resultScoreMin; $receiver.resultScoreMax = _tmp_resultScoreMax; $receiver.resultDuration = _tmp_resultDuration; $receiver.resultResponse = _tmp_resultResponse; $receiver.timestamp = _tmp_timestamp; $receiver.stored = _tmp_stored; $receiver.contextRegistration = _tmp_contextRegistration; $receiver.contextPlatform = _tmp_contextPlatform; $receiver.contextStatementId = _tmp_contextStatementId; $receiver.fullStatement = _tmp_fullStatement; $receiver.statementMasterChangeSeqNum = _tmp_statementMasterChangeSeqNum; $receiver.statementLocalChangeSeqNum = _tmp_statementLocalChangeSeqNum; $receiver.statementLastChangedBy = _tmp_statementLastChangedBy; $receiver.statementLct = _tmp_statementLct; $receiver.extensionProgress = _tmp_extensionProgress; $receiver.contentEntryRoot = _tmp_contentEntryRoot; $receiver.statementContentEntryUid = _tmp_statementContentEntryUid; $receiver.statementLearnerGroupUid = _tmp_statementLearnerGroupUid; $receiver.statementClazzUid = _tmp_statementClazzUid; return $receiver; }; } function StatementDao_JdbcKt$getOneStatement$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, StatementDao_JdbcKt$getOneStatement$lambda$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda; Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$getOneStatement$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getOneStatement$lambda$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getOneStatement$lambda$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$StatementDao_JdbcKt$getOneStatement$lambda(this$StatementDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; } Coroutine$StatementDao_JdbcKt$getOneStatement$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getOneStatement$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getOneStatement$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getOneStatement$lambda; Coroutine$StatementDao_JdbcKt$getOneStatement$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, new PreparedStatementConfig('SELECT * From StatementEntity LIMIT 1'), StatementDao_JdbcKt$getOneStatement$lambda$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getOneStatement$lambda(this$StatementDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getOneStatement$lambda(this$StatementDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt.prototype.getOneStatement = function () { return new LiveDataImpl(this._db, listOf_0('StatementEntity'), StatementDao_JdbcKt$getOneStatement$lambda(this)); }; function StatementDao_JdbcKt$findByStatementId$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_statementUid = closure$_result.getLong_61zpoe$('statementUid'); var _tmp_statementId = closure$_result.getString_61zpoe$('statementId'); var _tmp_statementPersonUid = closure$_result.getLong_61zpoe$('statementPersonUid'); var _tmp_statementVerbUid = closure$_result.getLong_61zpoe$('statementVerbUid'); var _tmp_xObjectUid = closure$_result.getLong_61zpoe$('xObjectUid'); var _tmp_subStatementActorUid = closure$_result.getLong_61zpoe$('subStatementActorUid'); var _tmp_substatementVerbUid = closure$_result.getLong_61zpoe$('substatementVerbUid'); var _tmp_subStatementObjectUid = closure$_result.getLong_61zpoe$('subStatementObjectUid'); var _tmp_agentUid = closure$_result.getLong_61zpoe$('agentUid'); var _tmp_instructorUid = closure$_result.getLong_61zpoe$('instructorUid'); var _tmp_authorityUid = closure$_result.getLong_61zpoe$('authorityUid'); var _tmp_teamUid = closure$_result.getLong_61zpoe$('teamUid'); var _tmp_resultCompletion = closure$_result.getBoolean_61zpoe$('resultCompletion'); var _tmp_resultSuccess = closure$_result.getByte_61zpoe$('resultSuccess'); var _tmp_resultScoreScaled = closure$_result.getFloat_61zpoe$('resultScoreScaled'); var _tmp_resultScoreRaw = closure$_result.getLong_61zpoe$('resultScoreRaw'); var _tmp_resultScoreMin = closure$_result.getLong_61zpoe$('resultScoreMin'); var _tmp_resultScoreMax = closure$_result.getLong_61zpoe$('resultScoreMax'); var _tmp_resultDuration = closure$_result.getLong_61zpoe$('resultDuration'); var _tmp_resultResponse = closure$_result.getString_61zpoe$('resultResponse'); var _tmp_timestamp = closure$_result.getLong_61zpoe$('timestamp'); var _tmp_stored = closure$_result.getLong_61zpoe$('stored'); var _tmp_contextRegistration = closure$_result.getString_61zpoe$('contextRegistration'); var _tmp_contextPlatform = closure$_result.getString_61zpoe$('contextPlatform'); var _tmp_contextStatementId = closure$_result.getString_61zpoe$('contextStatementId'); var _tmp_fullStatement = closure$_result.getString_61zpoe$('fullStatement'); var _tmp_statementMasterChangeSeqNum = closure$_result.getLong_61zpoe$('statementMasterChangeSeqNum'); var _tmp_statementLocalChangeSeqNum = closure$_result.getLong_61zpoe$('statementLocalChangeSeqNum'); var _tmp_statementLastChangedBy = closure$_result.getInt_61zpoe$('statementLastChangedBy'); var _tmp_statementLct = closure$_result.getLong_61zpoe$('statementLct'); var _tmp_extensionProgress = closure$_result.getInt_61zpoe$('extensionProgress'); var _tmp_contentEntryRoot = closure$_result.getBoolean_61zpoe$('contentEntryRoot'); var _tmp_statementContentEntryUid = closure$_result.getLong_61zpoe$('statementContentEntryUid'); var _tmp_statementLearnerGroupUid = closure$_result.getLong_61zpoe$('statementLearnerGroupUid'); var _tmp_statementClazzUid = closure$_result.getLong_61zpoe$('statementClazzUid'); var $receiver = new StatementEntity(); $receiver.statementUid = _tmp_statementUid; $receiver.statementId = _tmp_statementId; $receiver.statementPersonUid = _tmp_statementPersonUid; $receiver.statementVerbUid = _tmp_statementVerbUid; $receiver.xObjectUid = _tmp_xObjectUid; $receiver.subStatementActorUid = _tmp_subStatementActorUid; $receiver.substatementVerbUid = _tmp_substatementVerbUid; $receiver.subStatementObjectUid = _tmp_subStatementObjectUid; $receiver.agentUid = _tmp_agentUid; $receiver.instructorUid = _tmp_instructorUid; $receiver.authorityUid = _tmp_authorityUid; $receiver.teamUid = _tmp_teamUid; $receiver.resultCompletion = _tmp_resultCompletion; $receiver.resultSuccess = _tmp_resultSuccess; $receiver.resultScoreScaled = _tmp_resultScoreScaled; $receiver.resultScoreRaw = _tmp_resultScoreRaw; $receiver.resultScoreMin = _tmp_resultScoreMin; $receiver.resultScoreMax = _tmp_resultScoreMax; $receiver.resultDuration = _tmp_resultDuration; $receiver.resultResponse = _tmp_resultResponse; $receiver.timestamp = _tmp_timestamp; $receiver.stored = _tmp_stored; $receiver.contextRegistration = _tmp_contextRegistration; $receiver.contextPlatform = _tmp_contextPlatform; $receiver.contextStatementId = _tmp_contextStatementId; $receiver.fullStatement = _tmp_fullStatement; $receiver.statementMasterChangeSeqNum = _tmp_statementMasterChangeSeqNum; $receiver.statementLocalChangeSeqNum = _tmp_statementLocalChangeSeqNum; $receiver.statementLastChangedBy = _tmp_statementLastChangedBy; $receiver.statementLct = _tmp_statementLct; $receiver.extensionProgress = _tmp_extensionProgress; $receiver.contentEntryRoot = _tmp_contentEntryRoot; $receiver.statementContentEntryUid = _tmp_statementContentEntryUid; $receiver.statementLearnerGroupUid = _tmp_statementLearnerGroupUid; $receiver.statementClazzUid = _tmp_statementClazzUid; return $receiver; }; } function StatementDao_JdbcKt$findByStatementId$lambda$lambda(_result) { return mapNextRow(_result, null, StatementDao_JdbcKt$findByStatementId$lambda$lambda$lambda(_result)); } function StatementDao_JdbcKt$findByStatementId$lambda(closure$id) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$id); return useResults(_stmt.executeQuery(), StatementDao_JdbcKt$findByStatementId$lambda$lambda); }; } StatementDao_JdbcKt.prototype.findByStatementId_61zpoe$ = function (id) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM StatementEntity WHERE statementId = ? LIMIT 1'), StatementDao_JdbcKt$findByStatementId$lambda(id)); }; function StatementDao_JdbcKt$findByStatementIdList$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_statementUid = closure$_result.getLong_61zpoe$('statementUid'); var _tmp_statementId = closure$_result.getString_61zpoe$('statementId'); var _tmp_statementPersonUid = closure$_result.getLong_61zpoe$('statementPersonUid'); var _tmp_statementVerbUid = closure$_result.getLong_61zpoe$('statementVerbUid'); var _tmp_xObjectUid = closure$_result.getLong_61zpoe$('xObjectUid'); var _tmp_subStatementActorUid = closure$_result.getLong_61zpoe$('subStatementActorUid'); var _tmp_substatementVerbUid = closure$_result.getLong_61zpoe$('substatementVerbUid'); var _tmp_subStatementObjectUid = closure$_result.getLong_61zpoe$('subStatementObjectUid'); var _tmp_agentUid = closure$_result.getLong_61zpoe$('agentUid'); var _tmp_instructorUid = closure$_result.getLong_61zpoe$('instructorUid'); var _tmp_authorityUid = closure$_result.getLong_61zpoe$('authorityUid'); var _tmp_teamUid = closure$_result.getLong_61zpoe$('teamUid'); var _tmp_resultCompletion = closure$_result.getBoolean_61zpoe$('resultCompletion'); var _tmp_resultSuccess = closure$_result.getByte_61zpoe$('resultSuccess'); var _tmp_resultScoreScaled = closure$_result.getFloat_61zpoe$('resultScoreScaled'); var _tmp_resultScoreRaw = closure$_result.getLong_61zpoe$('resultScoreRaw'); var _tmp_resultScoreMin = closure$_result.getLong_61zpoe$('resultScoreMin'); var _tmp_resultScoreMax = closure$_result.getLong_61zpoe$('resultScoreMax'); var _tmp_resultDuration = closure$_result.getLong_61zpoe$('resultDuration'); var _tmp_resultResponse = closure$_result.getString_61zpoe$('resultResponse'); var _tmp_timestamp = closure$_result.getLong_61zpoe$('timestamp'); var _tmp_stored = closure$_result.getLong_61zpoe$('stored'); var _tmp_contextRegistration = closure$_result.getString_61zpoe$('contextRegistration'); var _tmp_contextPlatform = closure$_result.getString_61zpoe$('contextPlatform'); var _tmp_contextStatementId = closure$_result.getString_61zpoe$('contextStatementId'); var _tmp_fullStatement = closure$_result.getString_61zpoe$('fullStatement'); var _tmp_statementMasterChangeSeqNum = closure$_result.getLong_61zpoe$('statementMasterChangeSeqNum'); var _tmp_statementLocalChangeSeqNum = closure$_result.getLong_61zpoe$('statementLocalChangeSeqNum'); var _tmp_statementLastChangedBy = closure$_result.getInt_61zpoe$('statementLastChangedBy'); var _tmp_statementLct = closure$_result.getLong_61zpoe$('statementLct'); var _tmp_extensionProgress = closure$_result.getInt_61zpoe$('extensionProgress'); var _tmp_contentEntryRoot = closure$_result.getBoolean_61zpoe$('contentEntryRoot'); var _tmp_statementContentEntryUid = closure$_result.getLong_61zpoe$('statementContentEntryUid'); var _tmp_statementLearnerGroupUid = closure$_result.getLong_61zpoe$('statementLearnerGroupUid'); var _tmp_statementClazzUid = closure$_result.getLong_61zpoe$('statementClazzUid'); var $receiver = new StatementEntity(); $receiver.statementUid = _tmp_statementUid; $receiver.statementId = _tmp_statementId; $receiver.statementPersonUid = _tmp_statementPersonUid; $receiver.statementVerbUid = _tmp_statementVerbUid; $receiver.xObjectUid = _tmp_xObjectUid; $receiver.subStatementActorUid = _tmp_subStatementActorUid; $receiver.substatementVerbUid = _tmp_substatementVerbUid; $receiver.subStatementObjectUid = _tmp_subStatementObjectUid; $receiver.agentUid = _tmp_agentUid; $receiver.instructorUid = _tmp_instructorUid; $receiver.authorityUid = _tmp_authorityUid; $receiver.teamUid = _tmp_teamUid; $receiver.resultCompletion = _tmp_resultCompletion; $receiver.resultSuccess = _tmp_resultSuccess; $receiver.resultScoreScaled = _tmp_resultScoreScaled; $receiver.resultScoreRaw = _tmp_resultScoreRaw; $receiver.resultScoreMin = _tmp_resultScoreMin; $receiver.resultScoreMax = _tmp_resultScoreMax; $receiver.resultDuration = _tmp_resultDuration; $receiver.resultResponse = _tmp_resultResponse; $receiver.timestamp = _tmp_timestamp; $receiver.stored = _tmp_stored; $receiver.contextRegistration = _tmp_contextRegistration; $receiver.contextPlatform = _tmp_contextPlatform; $receiver.contextStatementId = _tmp_contextStatementId; $receiver.fullStatement = _tmp_fullStatement; $receiver.statementMasterChangeSeqNum = _tmp_statementMasterChangeSeqNum; $receiver.statementLocalChangeSeqNum = _tmp_statementLocalChangeSeqNum; $receiver.statementLastChangedBy = _tmp_statementLastChangedBy; $receiver.statementLct = _tmp_statementLct; $receiver.extensionProgress = _tmp_extensionProgress; $receiver.contentEntryRoot = _tmp_contentEntryRoot; $receiver.statementContentEntryUid = _tmp_statementContentEntryUid; $receiver.statementLearnerGroupUid = _tmp_statementLearnerGroupUid; $receiver.statementClazzUid = _tmp_statementClazzUid; return $receiver; }; } function StatementDao_JdbcKt$findByStatementIdList$lambda$lambda(_result) { return mapRows(_result, StatementDao_JdbcKt$findByStatementIdList$lambda$lambda$lambda(_result)); } function StatementDao_JdbcKt$findByStatementIdList$lambda(closure$id) { return function (_stmt) { _stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(_stmt.getConnection(), 'TEXT', copyToArray(closure$id))); return useResults(_stmt.executeQuery(), StatementDao_JdbcKt$findByStatementIdList$lambda$lambda); }; } StatementDao_JdbcKt.prototype.findByStatementIdList_mhpeer$ = function (id) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM StatementEntity WHERE statementId IN (?)', true), StatementDao_JdbcKt$findByStatementIdList$lambda(id)); }; function StatementDao_JdbcKt$getResults$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_yAxis = closure$_result.getFloat_61zpoe$('yAxis'); var _tmp_xAxis = closure$_result.getString_61zpoe$('xAxis'); var _tmp_subgroup = closure$_result.getString_61zpoe$('subgroup'); var $receiver = new StatementReportData(); $receiver.yAxis = _tmp_yAxis; $receiver.xAxis = _tmp_xAxis; $receiver.subgroup = _tmp_subgroup; return $receiver; }; } function StatementDao_JdbcKt$getResults$lambda$lambda(_result) { return mapRows(_result, StatementDao_JdbcKt$getResults$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$getResults$lambda(closure$query_0, this$StatementDao_JdbcKt_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$query = closure$query_0; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$getResults$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getResults$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getResults$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getResults$lambda; Coroutine$StatementDao_JdbcKt$getResults$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$closure$query.bindToPreparedStmt_q2o6dm$(this.local$_stmt, this.local$this$StatementDao_JdbcKt._db); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$getResults$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getResults$lambda(closure$query_0, this$StatementDao_JdbcKt_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getResults$lambda(closure$query_0, this$StatementDao_JdbcKt_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt.prototype.getResults_j49vja$ = function (query, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(query.getSql(), hasListOrArrayParams(query)), StatementDao_JdbcKt$getResults$lambda(query, this), continuation); }; function StatementDao_JdbcKt$getListResults$ObjectLiteral(closure$query, this$StatementDao_JdbcKt) { this.closure$query = closure$query; this.this$StatementDao_JdbcKt = this$StatementDao_JdbcKt; DataSourceFactory.call(this); } function StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_statementUid = closure$_result.getLong_61zpoe$('statementUid'); var _tmp_statementId = closure$_result.getString_61zpoe$('statementId'); var _tmp_statementPersonUid = closure$_result.getLong_61zpoe$('statementPersonUid'); var _tmp_statementVerbUid = closure$_result.getLong_61zpoe$('statementVerbUid'); var _tmp_xObjectUid = closure$_result.getLong_61zpoe$('xObjectUid'); var _tmp_subStatementActorUid = closure$_result.getLong_61zpoe$('subStatementActorUid'); var _tmp_substatementVerbUid = closure$_result.getLong_61zpoe$('substatementVerbUid'); var _tmp_subStatementObjectUid = closure$_result.getLong_61zpoe$('subStatementObjectUid'); var _tmp_agentUid = closure$_result.getLong_61zpoe$('agentUid'); var _tmp_instructorUid = closure$_result.getLong_61zpoe$('instructorUid'); var _tmp_authorityUid = closure$_result.getLong_61zpoe$('authorityUid'); var _tmp_teamUid = closure$_result.getLong_61zpoe$('teamUid'); var _tmp_resultCompletion = closure$_result.getBoolean_61zpoe$('resultCompletion'); var _tmp_resultSuccess = closure$_result.getByte_61zpoe$('resultSuccess'); var _tmp_resultScoreScaled = closure$_result.getFloat_61zpoe$('resultScoreScaled'); var _tmp_resultScoreRaw = closure$_result.getLong_61zpoe$('resultScoreRaw'); var _tmp_resultScoreMin = closure$_result.getLong_61zpoe$('resultScoreMin'); var _tmp_resultScoreMax = closure$_result.getLong_61zpoe$('resultScoreMax'); var _tmp_resultDuration = closure$_result.getLong_61zpoe$('resultDuration'); var _tmp_resultResponse = closure$_result.getString_61zpoe$('resultResponse'); var _tmp_timestamp = closure$_result.getLong_61zpoe$('timestamp'); var _tmp_stored = closure$_result.getLong_61zpoe$('stored'); var _tmp_contextRegistration = closure$_result.getString_61zpoe$('contextRegistration'); var _tmp_contextPlatform = closure$_result.getString_61zpoe$('contextPlatform'); var _tmp_contextStatementId = closure$_result.getString_61zpoe$('contextStatementId'); var _tmp_fullStatement = closure$_result.getString_61zpoe$('fullStatement'); var _tmp_statementMasterChangeSeqNum = closure$_result.getLong_61zpoe$('statementMasterChangeSeqNum'); var _tmp_statementLocalChangeSeqNum = closure$_result.getLong_61zpoe$('statementLocalChangeSeqNum'); var _tmp_statementLastChangedBy = closure$_result.getInt_61zpoe$('statementLastChangedBy'); var _tmp_statementLct = closure$_result.getLong_61zpoe$('statementLct'); var _tmp_extensionProgress = closure$_result.getInt_61zpoe$('extensionProgress'); var _tmp_contentEntryRoot = closure$_result.getBoolean_61zpoe$('contentEntryRoot'); var _tmp_statementContentEntryUid = closure$_result.getLong_61zpoe$('statementContentEntryUid'); var _tmp_statementLearnerGroupUid = closure$_result.getLong_61zpoe$('statementLearnerGroupUid'); var _tmp_statementClazzUid = closure$_result.getLong_61zpoe$('statementClazzUid'); var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var _tmp_XLangMapEntry_nullCount = 0; var _tmp_statementLangMapUid = closure$_result.getLong_61zpoe$('statementLangMapUid'); if (closure$_result.wasNull()) { _tmp_XLangMapEntry_nullCount = _tmp_XLangMapEntry_nullCount + 1 | 0; } var _tmp_verbLangMapUid = closure$_result.getLong_61zpoe$('verbLangMapUid'); if (closure$_result.wasNull()) { _tmp_XLangMapEntry_nullCount = _tmp_XLangMapEntry_nullCount + 1 | 0; } var _tmp_objectLangMapUid = closure$_result.getLong_61zpoe$('objectLangMapUid'); if (closure$_result.wasNull()) { _tmp_XLangMapEntry_nullCount = _tmp_XLangMapEntry_nullCount + 1 | 0; } var _tmp_languageLangMapUid = closure$_result.getLong_61zpoe$('languageLangMapUid'); if (closure$_result.wasNull()) { _tmp_XLangMapEntry_nullCount = _tmp_XLangMapEntry_nullCount + 1 | 0; } var _tmp_languageVariantLangMapUid = closure$_result.getLong_61zpoe$('languageVariantLangMapUid'); if (closure$_result.wasNull()) { _tmp_XLangMapEntry_nullCount = _tmp_XLangMapEntry_nullCount + 1 | 0; } var _tmp_valueLangMap = closure$_result.getString_61zpoe$('valueLangMap'); if (closure$_result.wasNull()) { _tmp_XLangMapEntry_nullCount = _tmp_XLangMapEntry_nullCount + 1 | 0; } var _tmp_statementLangMapMasterCsn = closure$_result.getInt_61zpoe$('statementLangMapMasterCsn'); if (closure$_result.wasNull()) { _tmp_XLangMapEntry_nullCount = _tmp_XLangMapEntry_nullCount + 1 | 0; } var _tmp_statementLangMapLocalCsn = closure$_result.getInt_61zpoe$('statementLangMapLocalCsn'); if (closure$_result.wasNull()) { _tmp_XLangMapEntry_nullCount = _tmp_XLangMapEntry_nullCount + 1 | 0; } var _tmp_statementLangMapLcb = closure$_result.getInt_61zpoe$('statementLangMapLcb'); if (closure$_result.wasNull()) { _tmp_XLangMapEntry_nullCount = _tmp_XLangMapEntry_nullCount + 1 | 0; } var _tmp_statementLangMapLct = closure$_result.getLong_61zpoe$('statementLangMapLct'); if (closure$_result.wasNull()) { _tmp_XLangMapEntry_nullCount = _tmp_XLangMapEntry_nullCount + 1 | 0; } var _tmp_XLangMapEntry_isAllNull = _tmp_XLangMapEntry_nullCount === 10; var $receiver = new StatementEntityWithDisplayDetails(); $receiver.statementUid = _tmp_statementUid; $receiver.statementId = _tmp_statementId; $receiver.statementPersonUid = _tmp_statementPersonUid; $receiver.statementVerbUid = _tmp_statementVerbUid; $receiver.xObjectUid = _tmp_xObjectUid; $receiver.subStatementActorUid = _tmp_subStatementActorUid; $receiver.substatementVerbUid = _tmp_substatementVerbUid; $receiver.subStatementObjectUid = _tmp_subStatementObjectUid; $receiver.agentUid = _tmp_agentUid; $receiver.instructorUid = _tmp_instructorUid; $receiver.authorityUid = _tmp_authorityUid; $receiver.teamUid = _tmp_teamUid; $receiver.resultCompletion = _tmp_resultCompletion; $receiver.resultSuccess = _tmp_resultSuccess; $receiver.resultScoreScaled = _tmp_resultScoreScaled; $receiver.resultScoreRaw = _tmp_resultScoreRaw; $receiver.resultScoreMin = _tmp_resultScoreMin; $receiver.resultScoreMax = _tmp_resultScoreMax; $receiver.resultDuration = _tmp_resultDuration; $receiver.resultResponse = _tmp_resultResponse; $receiver.timestamp = _tmp_timestamp; $receiver.stored = _tmp_stored; $receiver.contextRegistration = _tmp_contextRegistration; $receiver.contextPlatform = _tmp_contextPlatform; $receiver.contextStatementId = _tmp_contextStatementId; $receiver.fullStatement = _tmp_fullStatement; $receiver.statementMasterChangeSeqNum = _tmp_statementMasterChangeSeqNum; $receiver.statementLocalChangeSeqNum = _tmp_statementLocalChangeSeqNum; $receiver.statementLastChangedBy = _tmp_statementLastChangedBy; $receiver.statementLct = _tmp_statementLct; $receiver.extensionProgress = _tmp_extensionProgress; $receiver.contentEntryRoot = _tmp_contentEntryRoot; $receiver.statementContentEntryUid = _tmp_statementContentEntryUid; $receiver.statementLearnerGroupUid = _tmp_statementLearnerGroupUid; $receiver.statementClazzUid = _tmp_statementClazzUid; if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.person = $receiver_0; } if (!_tmp_XLangMapEntry_isAllNull) { var $receiver_1 = new XLangMapEntry(); $receiver_1.statementLangMapUid = _tmp_statementLangMapUid; $receiver_1.verbLangMapUid = _tmp_verbLangMapUid; $receiver_1.objectLangMapUid = _tmp_objectLangMapUid; $receiver_1.languageLangMapUid = _tmp_languageLangMapUid; $receiver_1.languageVariantLangMapUid = _tmp_languageVariantLangMapUid; $receiver_1.valueLangMap = _tmp_valueLangMap; $receiver_1.statementLangMapMasterCsn = _tmp_statementLangMapMasterCsn; $receiver_1.statementLangMapLocalCsn = _tmp_statementLangMapLocalCsn; $receiver_1.statementLangMapLcb = _tmp_statementLangMapLcb; $receiver_1.statementLangMapLct = _tmp_statementLangMapLct; $receiver.xlangMapEntry = $receiver_1; } return $receiver; }; } function StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda(closure$query_0, this$StatementDao_JdbcKt_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$query = closure$query_0; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$closure$query.bindToPreparedStmt_q2o6dm$(this.local$_stmt, this.local$this$StatementDao_JdbcKt._db); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda(closure$query_0, this$StatementDao_JdbcKt_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda(closure$query_0, this$StatementDao_JdbcKt_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$query_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$query = closure$query_0; } Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, new PreparedStatementConfig(this.local$closure$query.getSql(), hasListOrArrayParams(this.local$closure$query)), StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda$lambda(this.local$closure$query, this.local$this$StatementDao_JdbcKt), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$query_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$query_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$getListResults$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { var query = copyWithExtraParams(this.closure$query, 'SELECT * FROM (' + this.closure$query.getSql() + ') LIMIT ? OFFSET ?', [_limit, _offset]); return new LiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['StatementEntity', 'Person', 'XLangMapEntry']), StatementDao_JdbcKt$getListResults$ObjectLiteral$getData$lambda(this.this$StatementDao_JdbcKt, query)); }; function StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda(closure$query_0, this$StatementDao_JdbcKt_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$query = closure$query_0; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$closure$query.bindToPreparedStmt_q2o6dm$(this.local$_stmt, this.local$this$StatementDao_JdbcKt._db); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda(closure$query_0, this$StatementDao_JdbcKt_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda(closure$query_0, this$StatementDao_JdbcKt_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$query_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$query = closure$query_0; } Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda; Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, new PreparedStatementConfig(this.local$closure$query.getSql(), hasListOrArrayParams(this.local$closure$query)), StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda$lambda(this.local$closure$query, this.local$this$StatementDao_JdbcKt), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$query_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$query_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$getListResults$ObjectLiteral.prototype.getLength = function () { var query = copy(this.closure$query, 'SELECT COUNT(*) FROM (' + this.closure$query.getSql() + ')'); return new LiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['StatementEntity', 'Person', 'XLangMapEntry']), StatementDao_JdbcKt$getListResults$ObjectLiteral$getLength$lambda(this.this$StatementDao_JdbcKt, query)); }; StatementDao_JdbcKt$getListResults$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; StatementDao_JdbcKt.prototype.getListResults_j49vja$ = function (query) { return new StatementDao_JdbcKt$getListResults$ObjectLiteral(query, this); }; function StatementDao_JdbcKt$getPerson$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_username = closure$_result.getString_61zpoe$('username'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); var $receiver = new Person(); $receiver.personUid = _tmp_personUid; $receiver.username = _tmp_username; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.emailAddr = _tmp_emailAddr; $receiver.phoneNum = _tmp_phoneNum; $receiver.gender = _tmp_gender; $receiver.active = _tmp_active; $receiver.admin = _tmp_admin; $receiver.personNotes = _tmp_personNotes; $receiver.fatherName = _tmp_fatherName; $receiver.fatherNumber = _tmp_fatherNumber; $receiver.motherName = _tmp_motherName; $receiver.motherNum = _tmp_motherNum; $receiver.dateOfBirth = _tmp_dateOfBirth; $receiver.personAddress = _tmp_personAddress; $receiver.personOrgId = _tmp_personOrgId; $receiver.personGroupUid = _tmp_personGroupUid; $receiver.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver.personLastChangedBy = _tmp_personLastChangedBy; $receiver.personLct = _tmp_personLct; $receiver.personCountry = _tmp_personCountry; $receiver.personType = _tmp_personType; return $receiver; }; } function StatementDao_JdbcKt$getPerson$lambda$lambda(_result) { return mapNextRow(_result, null, StatementDao_JdbcKt$getPerson$lambda$lambda$lambda(_result)); } function StatementDao_JdbcKt$getPerson$lambda(_stmt) { return useResults(_stmt.executeQuery(), StatementDao_JdbcKt$getPerson$lambda$lambda); } StatementDao_JdbcKt.prototype.getPerson = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM PERSON LIMIT 1'), StatementDao_JdbcKt$getPerson$lambda); }; function StatementDao_JdbcKt$getXLangMap$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_statementLangMapUid = closure$_result.getLong_61zpoe$('statementLangMapUid'); var _tmp_verbLangMapUid = closure$_result.getLong_61zpoe$('verbLangMapUid'); var _tmp_objectLangMapUid = closure$_result.getLong_61zpoe$('objectLangMapUid'); var _tmp_languageLangMapUid = closure$_result.getLong_61zpoe$('languageLangMapUid'); var _tmp_languageVariantLangMapUid = closure$_result.getLong_61zpoe$('languageVariantLangMapUid'); var _tmp_valueLangMap = closure$_result.getString_61zpoe$('valueLangMap'); var _tmp_statementLangMapMasterCsn = closure$_result.getInt_61zpoe$('statementLangMapMasterCsn'); var _tmp_statementLangMapLocalCsn = closure$_result.getInt_61zpoe$('statementLangMapLocalCsn'); var _tmp_statementLangMapLcb = closure$_result.getInt_61zpoe$('statementLangMapLcb'); var _tmp_statementLangMapLct = closure$_result.getLong_61zpoe$('statementLangMapLct'); var $receiver = new XLangMapEntry(); $receiver.statementLangMapUid = _tmp_statementLangMapUid; $receiver.verbLangMapUid = _tmp_verbLangMapUid; $receiver.objectLangMapUid = _tmp_objectLangMapUid; $receiver.languageLangMapUid = _tmp_languageLangMapUid; $receiver.languageVariantLangMapUid = _tmp_languageVariantLangMapUid; $receiver.valueLangMap = _tmp_valueLangMap; $receiver.statementLangMapMasterCsn = _tmp_statementLangMapMasterCsn; $receiver.statementLangMapLocalCsn = _tmp_statementLangMapLocalCsn; $receiver.statementLangMapLcb = _tmp_statementLangMapLcb; $receiver.statementLangMapLct = _tmp_statementLangMapLct; return $receiver; }; } function StatementDao_JdbcKt$getXLangMap$lambda$lambda(_result) { return mapNextRow(_result, null, StatementDao_JdbcKt$getXLangMap$lambda$lambda$lambda(_result)); } function StatementDao_JdbcKt$getXLangMap$lambda(_stmt) { return useResults(_stmt.executeQuery(), StatementDao_JdbcKt$getXLangMap$lambda$lambda); } StatementDao_JdbcKt.prototype.getXLangMap = function () { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM XLangMapEntry LIMIT 1'), StatementDao_JdbcKt$getXLangMap$lambda); }; function StatementDao_JdbcKt$updateProgress$lambda(closure$progress, closure$updateTime, closure$uid) { return function (_stmt) { _stmt.setInt_vux9f0$(1, closure$progress); _stmt.setLong_6svq3l$(2, closure$updateTime); _stmt.setLong_6svq3l$(3, closure$uid); return _stmt.executeUpdate(); }; } StatementDao_JdbcKt.prototype.updateProgress_ro19vi$ = function (uid, progress, updateTime) { prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE StatementEntity \n | SET extensionProgress = ?,\n | statementLct = ? \n | WHERE statementUid = ?\n ')), StatementDao_JdbcKt$updateProgress$lambda(progress, updateTime, uid)); }; function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral(this$StatementDao_JdbcKt, closure$accountPersonUid, closure$contentEntryUid, closure$searchText, closure$sortOrder) { this.this$StatementDao_JdbcKt = this$StatementDao_JdbcKt; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$contentEntryUid = closure$contentEntryUid; this.closure$searchText = closure$searchText; this.closure$sortOrder = closure$sortOrder; DataSourceFactory.call(this); } function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); var _tmp_attempts = closure$_result.getInt_61zpoe$('attempts'); var _tmp_startDate = closure$_result.getLong_61zpoe$('startDate'); var _tmp_endDate = closure$_result.getLong_61zpoe$('endDate'); var _tmp_duration = closure$_result.getLong_61zpoe$('duration'); var _tmp_latestPrivateComment = closure$_result.getString_61zpoe$('latestPrivateComment'); var _tmp_fileSubmissionStatus = closure$_result.getInt_61zpoe$('fileSubmissionStatus'); var _tmp_ContentEntryStatementScoreProgress_nullCount = 0; var _tmp_resultScore = closure$_result.getInt_61zpoe$('resultScore'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultMax = closure$_result.getInt_61zpoe$('resultMax'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultScaled = closure$_result.getFloat_61zpoe$('resultScaled'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_resultWeight = closure$_result.getInt_61zpoe$('resultWeight'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_contentComplete = closure$_result.getBoolean_61zpoe$('contentComplete'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_progress = closure$_result.getInt_61zpoe$('progress'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_success = closure$_result.getByte_61zpoe$('success'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_penalty = closure$_result.getInt_61zpoe$('penalty'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalContent = closure$_result.getInt_61zpoe$('totalContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_totalCompletedContent = closure$_result.getInt_61zpoe$('totalCompletedContent'); if (closure$_result.wasNull()) { _tmp_ContentEntryStatementScoreProgress_nullCount = _tmp_ContentEntryStatementScoreProgress_nullCount + 1 | 0; } var _tmp_ContentEntryStatementScoreProgress_isAllNull = _tmp_ContentEntryStatementScoreProgress_nullCount === 10; var $receiver = new PersonWithAttemptsSummary(); $receiver.personUid = _tmp_personUid; $receiver.firstNames = _tmp_firstNames; $receiver.lastName = _tmp_lastName; $receiver.attempts = _tmp_attempts; $receiver.startDate = _tmp_startDate; $receiver.endDate = _tmp_endDate; $receiver.duration = _tmp_duration; $receiver.latestPrivateComment = _tmp_latestPrivateComment; $receiver.fileSubmissionStatus = _tmp_fileSubmissionStatus; if (!_tmp_ContentEntryStatementScoreProgress_isAllNull) { var $receiver_0 = new ContentEntryStatementScoreProgress(); $receiver_0.resultScore = _tmp_resultScore; $receiver_0.resultMax = _tmp_resultMax; $receiver_0.resultScaled = _tmp_resultScaled; $receiver_0.resultWeight = _tmp_resultWeight; $receiver_0.contentComplete = _tmp_contentComplete; $receiver_0.progress = _tmp_progress; $receiver_0.success = _tmp_success; $receiver_0.penalty = _tmp_penalty; $receiver_0.totalContent = _tmp_totalContent; $receiver_0.totalCompletedContent = _tmp_totalCompletedContent; $receiver.scoreProgress = $receiver_0; } return $receiver; }; } function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(8, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(9, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT * FROM (\n | SELECT ResultSource.personUid, ResultSource.firstNames, ResultSource.lastName,\n | COUNT(DISTINCT(ResultSource.contextRegistration)) AS attempts, \n | MIN(ResultSource.timestamp) AS startDate, \n | MAX(ResultSource.timestamp) AS endDate, \n | SUM(ResultSource.resultDuration) AS duration, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreRaw\n | ELSE 0 END) AS resultScore, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreMax\n | ELSE 0 END) AS resultMax, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreScaled\n | ELSE 0 END) AS resultScaled, \n | MAX(ResultSource.extensionProgress) AS progress,\n | 0 AS penalty,\n | 0 as resultWeight,\n | 'FALSE' AS contentComplete,\n | 0 AS success,\n | \n | CASE WHEN ResultSource.resultCompletion \n | THEN 1 ELSE 0 END AS totalCompletedContent,\n | \n | 1 as totalContent, \n | \n | 0 as fileSubmissionStatus, \n | \n | '' AS latestPrivateComment\n | \n | FROM (SELECT Person.personUid, Person.firstNames, Person.lastName, \n | StatementEntity.contextRegistration, StatementEntity.timestamp, \n | StatementEntity.resultDuration, StatementEntity.resultScoreRaw, \n | StatementEntity.resultScoreMax, StatementEntity.resultScoreScaled,\n | StatementEntity.contentEntryRoot, StatementEntity.extensionProgress, \n | StatementEntity.resultCompletion\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888 \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | LEFT JOIN StatementEntity \n | ON StatementEntity.statementPersonUid = Person.personUid \n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND PersonGroupMember.groupMemberActive \n | AND statementContentEntryUid = ?\n | AND Person.firstNames || ' ' || Person.lastName LIKE ? \n | GROUP BY StatementEntity.statementUid \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC) AS ResultSource \n | GROUP BY ResultSource.personUid \n | ORDER BY CASE(?) \n | WHEN 1 THEN ResultSource.firstNames\n | WHEN 3 THEN ResultSource.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN ResultSource.firstNames\n | WHEN 4 THEN ResultSource.lastName\n | ELSE ''\n | END DESC,\n | CASE(?)\n | WHEN 5 THEN endDate \n | ELSE 0\n | END ASC,\n | CASE(?)\n | WHEN 6 then endDate\n | ELSE 0\n | END DESC\n | ) LIMIT ? OFFSET ?\n ")), StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$contentEntryUid, this.local$closure$searchText, this.local$closure$sortOrder, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['PersonGroupMember', 'ScopedGrant', 'Person', 'StatementEntity']), StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getData$lambda(this.this$StatementDao_JdbcKt, this.closure$accountPersonUid, this.closure$contentEntryUid, this.closure$searchText, this.closure$sortOrder, _limit, _offset)); }; function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setString_vqvrqt$(3, this.local$closure$searchText); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$sortOrder); this.local$_stmt.setInt_vux9f0$(7, this.local$closure$sortOrder); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$searchText = closure$searchText_0; this.local$closure$sortOrder = closure$sortOrder_0; } Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda; Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, new PreparedStatementConfig(trimMargin("\n |SELECT COUNT(*) FROM (\n | SELECT ResultSource.personUid, ResultSource.firstNames, ResultSource.lastName,\n | COUNT(DISTINCT(ResultSource.contextRegistration)) AS attempts, \n | MIN(ResultSource.timestamp) AS startDate, \n | MAX(ResultSource.timestamp) AS endDate, \n | SUM(ResultSource.resultDuration) AS duration, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreRaw\n | ELSE 0 END) AS resultScore, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreMax\n | ELSE 0 END) AS resultMax, \n | MAX(CASE WHEN ResultSource.contentEntryRoot \n | THEN resultScoreScaled\n | ELSE 0 END) AS resultScaled, \n | MAX(ResultSource.extensionProgress) AS progress,\n | 0 AS penalty,\n | 0 as resultWeight,\n | 'FALSE' AS contentComplete,\n | 0 AS success,\n | \n | CASE WHEN ResultSource.resultCompletion \n | THEN 1 ELSE 0 END AS totalCompletedContent,\n | \n | 1 as totalContent, \n | \n | 0 as fileSubmissionStatus, \n | \n | '' AS latestPrivateComment\n | \n | FROM (SELECT Person.personUid, Person.firstNames, Person.lastName, \n | StatementEntity.contextRegistration, StatementEntity.timestamp, \n | StatementEntity.resultDuration, StatementEntity.resultScoreRaw, \n | StatementEntity.resultScoreMax, StatementEntity.resultScoreScaled,\n | StatementEntity.contentEntryRoot, StatementEntity.extensionProgress, \n | StatementEntity.resultCompletion\n | FROM PersonGroupMember\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions & 549755813888 \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | LEFT JOIN StatementEntity \n | ON StatementEntity.statementPersonUid = Person.personUid \n | WHERE PersonGroupMember.groupMemberPersonUid = ? \n | AND PersonGroupMember.groupMemberActive \n | AND statementContentEntryUid = ?\n | AND Person.firstNames || ' ' || Person.lastName LIKE ? \n | GROUP BY StatementEntity.statementUid \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC) AS ResultSource \n | GROUP BY ResultSource.personUid \n | ORDER BY CASE(?) \n | WHEN 1 THEN ResultSource.firstNames\n | WHEN 3 THEN ResultSource.lastName\n | ELSE ''\n | END ASC,\n | CASE(?)\n | WHEN 2 THEN ResultSource.firstNames\n | WHEN 4 THEN ResultSource.lastName\n | ELSE ''\n | END DESC,\n | CASE(?)\n | WHEN 5 THEN endDate \n | ELSE 0\n | END ASC,\n | CASE(?)\n | WHEN 6 then endDate\n | ELSE 0\n | END DESC\n | ) \n ")), StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$contentEntryUid, this.local$closure$searchText, this.local$closure$sortOrder), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$searchText_0, closure$sortOrder_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['PersonGroupMember', 'ScopedGrant', 'Person', 'StatementEntity']), StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral$getLength$lambda(this.this$StatementDao_JdbcKt, this.closure$accountPersonUid, this.closure$contentEntryUid, this.closure$searchText, this.closure$sortOrder)); }; StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; StatementDao_JdbcKt.prototype.findPersonsWithContentEntryAttempts_vqkbx2$ = function (contentEntryUid, accountPersonUid, searchText, sortOrder) { return new StatementDao_JdbcKt$findPersonsWithContentEntryAttempts$ObjectLiteral(this, accountPersonUid, contentEntryUid, searchText, sortOrder); }; function StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_resultScore = closure$_result.getInt_61zpoe$('resultScore'); var _tmp_resultMax = closure$_result.getInt_61zpoe$('resultMax'); var _tmp_resultScaled = closure$_result.getFloat_61zpoe$('resultScaled'); var _tmp_resultWeight = closure$_result.getInt_61zpoe$('resultWeight'); var _tmp_contentComplete = closure$_result.getBoolean_61zpoe$('contentComplete'); var _tmp_progress = closure$_result.getInt_61zpoe$('progress'); var _tmp_success = closure$_result.getByte_61zpoe$('success'); var _tmp_penalty = closure$_result.getInt_61zpoe$('penalty'); var _tmp_totalContent = closure$_result.getInt_61zpoe$('totalContent'); var _tmp_totalCompletedContent = closure$_result.getInt_61zpoe$('totalCompletedContent'); var $receiver = new ContentEntryStatementScoreProgress(); $receiver.resultScore = _tmp_resultScore; $receiver.resultMax = _tmp_resultMax; $receiver.resultScaled = _tmp_resultScaled; $receiver.resultWeight = _tmp_resultWeight; $receiver.contentComplete = _tmp_contentComplete; $receiver.progress = _tmp_progress; $receiver.success = _tmp_success; $receiver.penalty = _tmp_penalty; $receiver.totalContent = _tmp_totalContent; $receiver.totalCompletedContent = _tmp_totalCompletedContent; return $receiver; }; } function StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda$lambda(_result) { return mapNextRow(_result, null, StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda; Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt.prototype.getBestScoreForContentForPerson_3pjtqy$ = function (contentEntryUid, accountPersonUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin("\n |\n | SELECT \n | COALESCE(StatementEntity.resultScoreMax,0) AS resultMax, \n | COALESCE(StatementEntity.resultScoreRaw,0) AS resultScore, \n | COALESCE(StatementEntity.resultScoreScaled,0) AS resultScaled, \n | COALESCE(StatementEntity.extensionProgress,0) AS progress, \n | COALESCE(StatementEntity.resultCompletion,'FALSE') AS contentComplete,\n | COALESCE(StatementEntity.resultSuccess, 0) AS success,\n | 0 as resultWeight,\n | \n | COALESCE((CASE WHEN resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 1 as totalContent, \n | 0 as penalty\n | \n | FROM ContentEntry\n | LEFT JOIN StatementEntity\n |\t\t\t\t\t\t\tON StatementEntity.statementUid = \n | (SELECT statementUid \n |\t\t\t\t\t\t\t FROM StatementEntity \n | WHERE statementContentEntryUid = ContentEntry.contentEntryUid \n |\t\t\t\t\t\t\t AND StatementEntity.statementPersonUid = ?\n |\t\t\t\t\t\t\t AND contentEntryRoot \n | ORDER BY resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC LIMIT 1)\n | \n | WHERE contentEntryUid = ?\n | \n ")), StatementDao_JdbcKt$getBestScoreForContentForPerson$lambda(accountPersonUid, contentEntryUid), continuation); }; function StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda$lambda(_result) { return mapNextRow(_result, L0, StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda(closure$assignmentUid_0, closure$currentStudentUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$assignmentUid = closure$assignmentUid_0; this.local$closure$currentStudentUid = closure$currentStudentUid_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda; Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$assignmentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$currentStudentUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda(closure$assignmentUid_0, closure$currentStudentUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda(closure$assignmentUid_0, closure$currentStudentUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt.prototype.findNextStudentNotMarkedForAssignment_3pjtqy$ = function (assignmentUid, currentStudentUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE((\n | SELECT DISTINCT(statementpersonUid)\n | FROM ClazzAssignment \n | JOIN ClazzEnrolment\n | ON ClazzEnrolment.clazzEnrolmentClazzUid = ClazzAssignment.caClazzUid\n | \n | JOIN CourseBlock\n | ON CourseBlock.cbEntityUid = ClazzAssignment.caUid\n | AND CourseBlock.cbType = 103\n | \n | \t JOIN StatementEntity AS SubmissionStatement\n | \t ON SubmissionStatement.statementUid = (SELECT statementUid \n | FROM StatementEntity\n | WHERE StatementEntity.statementContentEntryUid = 0\n | AND xObjectUid = ClazzAssignment.caXObjectUid\n | AND StatementEntity.statementPersonUid = ClazzEnrolment.clazzEnrolmentPersonUid\n | AND StatementEntity.timestamp \n | BETWEEN CourseBlock.cbHideUntilDate\n | AND CourseBlock.cbGracePeriodDate\n | ORDER BY timestamp DESC LIMIT 1)\n | \n | \t LEFT JOIN XObjectEntity\n | ON XObjectEntity.objectStatementRefUid = SubmissionStatement.statementUid \n | \n | WHERE ClazzAssignment.caUid = ?\n | AND XObjectEntity.xobjectUid IS NULL\n | AND ClazzEnrolment.clazzEnrolmentActive\n | AND ClazzEnrolment.clazzEnrolmentRole = 1000\n | AND ClazzEnrolment.clazzEnrolmentPersonUid != ?\n | LIMIT 1),0)\n | \n ')), StatementDao_JdbcKt$findNextStudentNotMarkedForAssignment$lambda(assignmentUid, currentStudentUid), continuation); }; function StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_statementUid = closure$_result.getLong_61zpoe$('statementUid'); var _tmp_statementId = closure$_result.getString_61zpoe$('statementId'); var _tmp_statementPersonUid = closure$_result.getLong_61zpoe$('statementPersonUid'); var _tmp_statementVerbUid = closure$_result.getLong_61zpoe$('statementVerbUid'); var _tmp_xObjectUid = closure$_result.getLong_61zpoe$('xObjectUid'); var _tmp_subStatementActorUid = closure$_result.getLong_61zpoe$('subStatementActorUid'); var _tmp_substatementVerbUid = closure$_result.getLong_61zpoe$('substatementVerbUid'); var _tmp_subStatementObjectUid = closure$_result.getLong_61zpoe$('subStatementObjectUid'); var _tmp_agentUid = closure$_result.getLong_61zpoe$('agentUid'); var _tmp_instructorUid = closure$_result.getLong_61zpoe$('instructorUid'); var _tmp_authorityUid = closure$_result.getLong_61zpoe$('authorityUid'); var _tmp_teamUid = closure$_result.getLong_61zpoe$('teamUid'); var _tmp_resultCompletion = closure$_result.getBoolean_61zpoe$('resultCompletion'); var _tmp_resultSuccess = closure$_result.getByte_61zpoe$('resultSuccess'); var _tmp_resultScoreScaled = closure$_result.getFloat_61zpoe$('resultScoreScaled'); var _tmp_resultScoreRaw = closure$_result.getLong_61zpoe$('resultScoreRaw'); var _tmp_resultScoreMin = closure$_result.getLong_61zpoe$('resultScoreMin'); var _tmp_resultScoreMax = closure$_result.getLong_61zpoe$('resultScoreMax'); var _tmp_resultDuration = closure$_result.getLong_61zpoe$('resultDuration'); var _tmp_resultResponse = closure$_result.getString_61zpoe$('resultResponse'); var _tmp_timestamp = closure$_result.getLong_61zpoe$('timestamp'); var _tmp_stored = closure$_result.getLong_61zpoe$('stored'); var _tmp_contextRegistration = closure$_result.getString_61zpoe$('contextRegistration'); var _tmp_contextPlatform = closure$_result.getString_61zpoe$('contextPlatform'); var _tmp_contextStatementId = closure$_result.getString_61zpoe$('contextStatementId'); var _tmp_fullStatement = closure$_result.getString_61zpoe$('fullStatement'); var _tmp_statementMasterChangeSeqNum = closure$_result.getLong_61zpoe$('statementMasterChangeSeqNum'); var _tmp_statementLocalChangeSeqNum = closure$_result.getLong_61zpoe$('statementLocalChangeSeqNum'); var _tmp_statementLastChangedBy = closure$_result.getInt_61zpoe$('statementLastChangedBy'); var _tmp_statementLct = closure$_result.getLong_61zpoe$('statementLct'); var _tmp_extensionProgress = closure$_result.getInt_61zpoe$('extensionProgress'); var _tmp_contentEntryRoot = closure$_result.getBoolean_61zpoe$('contentEntryRoot'); var _tmp_statementContentEntryUid = closure$_result.getLong_61zpoe$('statementContentEntryUid'); var _tmp_statementLearnerGroupUid = closure$_result.getLong_61zpoe$('statementLearnerGroupUid'); var _tmp_statementClazzUid = closure$_result.getLong_61zpoe$('statementClazzUid'); var $receiver = new StatementEntity(); $receiver.statementUid = _tmp_statementUid; $receiver.statementId = _tmp_statementId; $receiver.statementPersonUid = _tmp_statementPersonUid; $receiver.statementVerbUid = _tmp_statementVerbUid; $receiver.xObjectUid = _tmp_xObjectUid; $receiver.subStatementActorUid = _tmp_subStatementActorUid; $receiver.substatementVerbUid = _tmp_substatementVerbUid; $receiver.subStatementObjectUid = _tmp_subStatementObjectUid; $receiver.agentUid = _tmp_agentUid; $receiver.instructorUid = _tmp_instructorUid; $receiver.authorityUid = _tmp_authorityUid; $receiver.teamUid = _tmp_teamUid; $receiver.resultCompletion = _tmp_resultCompletion; $receiver.resultSuccess = _tmp_resultSuccess; $receiver.resultScoreScaled = _tmp_resultScoreScaled; $receiver.resultScoreRaw = _tmp_resultScoreRaw; $receiver.resultScoreMin = _tmp_resultScoreMin; $receiver.resultScoreMax = _tmp_resultScoreMax; $receiver.resultDuration = _tmp_resultDuration; $receiver.resultResponse = _tmp_resultResponse; $receiver.timestamp = _tmp_timestamp; $receiver.stored = _tmp_stored; $receiver.contextRegistration = _tmp_contextRegistration; $receiver.contextPlatform = _tmp_contextPlatform; $receiver.contextStatementId = _tmp_contextStatementId; $receiver.fullStatement = _tmp_fullStatement; $receiver.statementMasterChangeSeqNum = _tmp_statementMasterChangeSeqNum; $receiver.statementLocalChangeSeqNum = _tmp_statementLocalChangeSeqNum; $receiver.statementLastChangedBy = _tmp_statementLastChangedBy; $receiver.statementLct = _tmp_statementLct; $receiver.extensionProgress = _tmp_extensionProgress; $receiver.contentEntryRoot = _tmp_contentEntryRoot; $receiver.statementContentEntryUid = _tmp_statementContentEntryUid; $receiver.statementLearnerGroupUid = _tmp_statementLearnerGroupUid; $receiver.statementClazzUid = _tmp_statementClazzUid; return $receiver; }; } function StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda$lambda(_result) { return mapNextRow(_result, null, StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda(closure$studentUid_0, closure$assignmentObjectUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$studentUid = closure$studentUid_0; this.local$closure$assignmentObjectUid = closure$assignmentObjectUid_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda; Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$studentUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$assignmentObjectUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda(closure$studentUid_0, closure$assignmentObjectUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda(closure$studentUid_0, closure$assignmentObjectUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt.prototype.findSubmittedStatementFromStudent_3pjtqy$ = function (studentUid, assignmentObjectUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM StatementEntity\n | WHERE statementPersonUid = ?\n | AND statementVerbUid = 10008\n | AND xObjectUid = ? \n | ORDER BY timestamp \n | \n ')), StatementDao_JdbcKt$findSubmittedStatementFromStudent$lambda(studentUid, assignmentObjectUid), continuation); }; function StatementDao_JdbcKt$findScoreStatementForStudent$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_statementUid = closure$_result.getLong_61zpoe$('statementUid'); var _tmp_statementId = closure$_result.getString_61zpoe$('statementId'); var _tmp_statementPersonUid = closure$_result.getLong_61zpoe$('statementPersonUid'); var _tmp_statementVerbUid = closure$_result.getLong_61zpoe$('statementVerbUid'); var _tmp_xObjectUid = closure$_result.getLong_61zpoe$('xObjectUid'); var _tmp_subStatementActorUid = closure$_result.getLong_61zpoe$('subStatementActorUid'); var _tmp_substatementVerbUid = closure$_result.getLong_61zpoe$('substatementVerbUid'); var _tmp_subStatementObjectUid = closure$_result.getLong_61zpoe$('subStatementObjectUid'); var _tmp_agentUid = closure$_result.getLong_61zpoe$('agentUid'); var _tmp_instructorUid = closure$_result.getLong_61zpoe$('instructorUid'); var _tmp_authorityUid = closure$_result.getLong_61zpoe$('authorityUid'); var _tmp_teamUid = closure$_result.getLong_61zpoe$('teamUid'); var _tmp_resultCompletion = closure$_result.getBoolean_61zpoe$('resultCompletion'); var _tmp_resultSuccess = closure$_result.getByte_61zpoe$('resultSuccess'); var _tmp_resultScoreScaled = closure$_result.getFloat_61zpoe$('resultScoreScaled'); var _tmp_resultScoreRaw = closure$_result.getLong_61zpoe$('resultScoreRaw'); var _tmp_resultScoreMin = closure$_result.getLong_61zpoe$('resultScoreMin'); var _tmp_resultScoreMax = closure$_result.getLong_61zpoe$('resultScoreMax'); var _tmp_resultDuration = closure$_result.getLong_61zpoe$('resultDuration'); var _tmp_resultResponse = closure$_result.getString_61zpoe$('resultResponse'); var _tmp_timestamp = closure$_result.getLong_61zpoe$('timestamp'); var _tmp_stored = closure$_result.getLong_61zpoe$('stored'); var _tmp_contextRegistration = closure$_result.getString_61zpoe$('contextRegistration'); var _tmp_contextPlatform = closure$_result.getString_61zpoe$('contextPlatform'); var _tmp_contextStatementId = closure$_result.getString_61zpoe$('contextStatementId'); var _tmp_fullStatement = closure$_result.getString_61zpoe$('fullStatement'); var _tmp_statementMasterChangeSeqNum = closure$_result.getLong_61zpoe$('statementMasterChangeSeqNum'); var _tmp_statementLocalChangeSeqNum = closure$_result.getLong_61zpoe$('statementLocalChangeSeqNum'); var _tmp_statementLastChangedBy = closure$_result.getInt_61zpoe$('statementLastChangedBy'); var _tmp_statementLct = closure$_result.getLong_61zpoe$('statementLct'); var _tmp_extensionProgress = closure$_result.getInt_61zpoe$('extensionProgress'); var _tmp_contentEntryRoot = closure$_result.getBoolean_61zpoe$('contentEntryRoot'); var _tmp_statementContentEntryUid = closure$_result.getLong_61zpoe$('statementContentEntryUid'); var _tmp_statementLearnerGroupUid = closure$_result.getLong_61zpoe$('statementLearnerGroupUid'); var _tmp_statementClazzUid = closure$_result.getLong_61zpoe$('statementClazzUid'); var $receiver = new StatementEntity(); $receiver.statementUid = _tmp_statementUid; $receiver.statementId = _tmp_statementId; $receiver.statementPersonUid = _tmp_statementPersonUid; $receiver.statementVerbUid = _tmp_statementVerbUid; $receiver.xObjectUid = _tmp_xObjectUid; $receiver.subStatementActorUid = _tmp_subStatementActorUid; $receiver.substatementVerbUid = _tmp_substatementVerbUid; $receiver.subStatementObjectUid = _tmp_subStatementObjectUid; $receiver.agentUid = _tmp_agentUid; $receiver.instructorUid = _tmp_instructorUid; $receiver.authorityUid = _tmp_authorityUid; $receiver.teamUid = _tmp_teamUid; $receiver.resultCompletion = _tmp_resultCompletion; $receiver.resultSuccess = _tmp_resultSuccess; $receiver.resultScoreScaled = _tmp_resultScoreScaled; $receiver.resultScoreRaw = _tmp_resultScoreRaw; $receiver.resultScoreMin = _tmp_resultScoreMin; $receiver.resultScoreMax = _tmp_resultScoreMax; $receiver.resultDuration = _tmp_resultDuration; $receiver.resultResponse = _tmp_resultResponse; $receiver.timestamp = _tmp_timestamp; $receiver.stored = _tmp_stored; $receiver.contextRegistration = _tmp_contextRegistration; $receiver.contextPlatform = _tmp_contextPlatform; $receiver.contextStatementId = _tmp_contextStatementId; $receiver.fullStatement = _tmp_fullStatement; $receiver.statementMasterChangeSeqNum = _tmp_statementMasterChangeSeqNum; $receiver.statementLocalChangeSeqNum = _tmp_statementLocalChangeSeqNum; $receiver.statementLastChangedBy = _tmp_statementLastChangedBy; $receiver.statementLct = _tmp_statementLct; $receiver.extensionProgress = _tmp_extensionProgress; $receiver.contentEntryRoot = _tmp_contentEntryRoot; $receiver.statementContentEntryUid = _tmp_statementContentEntryUid; $receiver.statementLearnerGroupUid = _tmp_statementLearnerGroupUid; $receiver.statementClazzUid = _tmp_statementClazzUid; return $receiver; }; } function StatementDao_JdbcKt$findScoreStatementForStudent$lambda$lambda(_result) { return mapNextRow(_result, null, StatementDao_JdbcKt$findScoreStatementForStudent$lambda$lambda$lambda(_result)); } function StatementDao_JdbcKt$findScoreStatementForStudent$lambda(closure$studentUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$studentUid); return useResults(_stmt.executeQuery(), StatementDao_JdbcKt$findScoreStatementForStudent$lambda$lambda); }; } StatementDao_JdbcKt.prototype.findScoreStatementForStudent_s8cxhz$ = function (studentUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT * \n | FROM StatementEntity\n | WHERE statementPersonUid = ?\n | AND statementVerbUid = 10009\n | ORDER BY timestamp \n | \n ')), StatementDao_JdbcKt$findScoreStatementForStudent$lambda(studentUid)); }; function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral(this$StatementDao_JdbcKt, closure$accountPersonUid, closure$contentEntryUid, closure$personUid) { this.this$StatementDao_JdbcKt = this$StatementDao_JdbcKt; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$contentEntryUid = closure$contentEntryUid; this.closure$personUid = closure$personUid; DataSourceFactory.call(this); } function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_startDate = closure$_result.getLong_61zpoe$('startDate'); var _tmp_contextRegistration = closure$_result.getString_61zpoe$('contextRegistration'); var _tmp_duration = closure$_result.getLong_61zpoe$('duration'); var _tmp_resultSuccess = closure$_result.getByte_61zpoe$('resultSuccess'); var _tmp_resultComplete = closure$_result.getBoolean_61zpoe$('resultComplete'); var _tmp_resultScoreScaled = closure$_result.getFloat_61zpoe$('resultScoreScaled'); var _tmp_resultMax = closure$_result.getInt_61zpoe$('resultMax'); var _tmp_resultScore = closure$_result.getInt_61zpoe$('resultScore'); var $receiver = new PersonWithSessionsDisplay(); $receiver.startDate = _tmp_startDate; $receiver.contextRegistration = _tmp_contextRegistration; $receiver.duration = _tmp_duration; $receiver.resultSuccess = _tmp_resultSuccess; $receiver.resultComplete = _tmp_resultComplete; $receiver.resultScoreScaled = _tmp_resultScoreScaled; $receiver.resultMax = _tmp_resultMax; $receiver.resultScore = _tmp_resultScore; return $receiver; }; } function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setInt_vux9f0$(4, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT MIN(timestamp) AS startDate, \n | MAX(CASE \n | WHEN StatementEntity.resultSuccess > 0 \n | AND StatementEntity.contentEntryRoot \n | THEN StatementEntity.resultSuccess \n | ELSE 0 END) AS resultSuccess, \n | SUM(CASE \n | WHEN CAST(resultCompletion AS INTEGER) > 0 \n | AND StatementEntity.contentEntryRoot \n | THEN 1 \n | ELSE 0 END) AS resultComplete, \n | SUM(resultDuration) AS duration, contextRegistration, \n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreRaw ELSE 0 END) AS resultScore, \n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreMax ELSE 0 END) AS resultMax,\n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreScaled ELSE 0 END) AS resultScoreScaled,\n | \n | SUM(CASE WHEN resultCompletion AND StatementEntity.contentEntryRoot \n | THEN 1 ELSE 0 END) AS totalCompletedContent,\n | \n | 1 as totalContent \n | \n | FROM StatementEntity \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid \n | AND PersonGroupMember.groupMemberPersonUid = ?\n | WHERE statementContentEntryUid = ? \n | AND statementPersonUid = ? \n | GROUP BY StatementEntity.contextRegistration \n | ORDER BY startDate DESC, resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC\n | ) LIMIT ? OFFSET ?\n ')), StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$contentEntryUid, this.local$closure$personUid, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['StatementEntity', 'ScopedGrant', 'PersonGroupMember']), StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getData$lambda(this.this$StatementDao_JdbcKt, this.closure$accountPersonUid, this.closure$contentEntryUid, this.closure$personUid, _limit, _offset)); }; function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; } Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda; Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT MIN(timestamp) AS startDate, \n | MAX(CASE \n | WHEN StatementEntity.resultSuccess > 0 \n | AND StatementEntity.contentEntryRoot \n | THEN StatementEntity.resultSuccess \n | ELSE 0 END) AS resultSuccess, \n | SUM(CASE \n | WHEN CAST(resultCompletion AS INTEGER) > 0 \n | AND StatementEntity.contentEntryRoot \n | THEN 1 \n | ELSE 0 END) AS resultComplete, \n | SUM(resultDuration) AS duration, contextRegistration, \n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreRaw ELSE 0 END) AS resultScore, \n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreMax ELSE 0 END) AS resultMax,\n | MAX(CASE WHEN contentEntryRoot \n | THEN resultScoreScaled ELSE 0 END) AS resultScoreScaled,\n | \n | SUM(CASE WHEN resultCompletion AND StatementEntity.contentEntryRoot \n | THEN 1 ELSE 0 END) AS totalCompletedContent,\n | \n | 1 as totalContent \n | \n | FROM StatementEntity \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid \n | AND PersonGroupMember.groupMemberPersonUid = ?\n | WHERE statementContentEntryUid = ? \n | AND statementPersonUid = ? \n | GROUP BY StatementEntity.contextRegistration \n | ORDER BY startDate DESC, resultScoreScaled DESC, extensionProgress DESC, resultSuccess DESC\n | ) \n ')), StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$contentEntryUid, this.local$closure$personUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['StatementEntity', 'ScopedGrant', 'PersonGroupMember']), StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral$getLength$lambda(this.this$StatementDao_JdbcKt, this.closure$accountPersonUid, this.closure$contentEntryUid, this.closure$personUid)); }; StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; StatementDao_JdbcKt.prototype.findSessionsForPerson_b9bd0d$ = function (contentEntryUid, accountPersonUid, personUid) { return new StatementDao_JdbcKt$findSessionsForPerson$ObjectLiteral(this, accountPersonUid, contentEntryUid, personUid); }; function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral(this$StatementDao_JdbcKt, closure$accountPersonUid, closure$contentEntryUid, closure$personUid, closure$contextRegistration) { this.this$StatementDao_JdbcKt = this$StatementDao_JdbcKt; this.closure$accountPersonUid = closure$accountPersonUid; this.closure$contentEntryUid = closure$contentEntryUid; this.closure$personUid = closure$personUid; this.closure$contextRegistration = closure$contextRegistration; DataSourceFactory.call(this); } function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_verbDisplay = closure$_result.getString_61zpoe$('verbDisplay'); var _tmp_objectDisplay = closure$_result.getString_61zpoe$('objectDisplay'); var _tmp_statementUid = closure$_result.getLong_61zpoe$('statementUid'); var _tmp_statementId = closure$_result.getString_61zpoe$('statementId'); var _tmp_statementPersonUid = closure$_result.getLong_61zpoe$('statementPersonUid'); var _tmp_statementVerbUid = closure$_result.getLong_61zpoe$('statementVerbUid'); var _tmp_xObjectUid = closure$_result.getLong_61zpoe$('xObjectUid'); var _tmp_subStatementActorUid = closure$_result.getLong_61zpoe$('subStatementActorUid'); var _tmp_substatementVerbUid = closure$_result.getLong_61zpoe$('substatementVerbUid'); var _tmp_subStatementObjectUid = closure$_result.getLong_61zpoe$('subStatementObjectUid'); var _tmp_agentUid = closure$_result.getLong_61zpoe$('agentUid'); var _tmp_instructorUid = closure$_result.getLong_61zpoe$('instructorUid'); var _tmp_authorityUid = closure$_result.getLong_61zpoe$('authorityUid'); var _tmp_teamUid = closure$_result.getLong_61zpoe$('teamUid'); var _tmp_resultCompletion = closure$_result.getBoolean_61zpoe$('resultCompletion'); var _tmp_resultSuccess = closure$_result.getByte_61zpoe$('resultSuccess'); var _tmp_resultScoreScaled = closure$_result.getFloat_61zpoe$('resultScoreScaled'); var _tmp_resultScoreRaw = closure$_result.getLong_61zpoe$('resultScoreRaw'); var _tmp_resultScoreMin = closure$_result.getLong_61zpoe$('resultScoreMin'); var _tmp_resultScoreMax = closure$_result.getLong_61zpoe$('resultScoreMax'); var _tmp_resultDuration = closure$_result.getLong_61zpoe$('resultDuration'); var _tmp_resultResponse = closure$_result.getString_61zpoe$('resultResponse'); var _tmp_timestamp = closure$_result.getLong_61zpoe$('timestamp'); var _tmp_stored = closure$_result.getLong_61zpoe$('stored'); var _tmp_contextRegistration = closure$_result.getString_61zpoe$('contextRegistration'); var _tmp_contextPlatform = closure$_result.getString_61zpoe$('contextPlatform'); var _tmp_contextStatementId = closure$_result.getString_61zpoe$('contextStatementId'); var _tmp_fullStatement = closure$_result.getString_61zpoe$('fullStatement'); var _tmp_statementMasterChangeSeqNum = closure$_result.getLong_61zpoe$('statementMasterChangeSeqNum'); var _tmp_statementLocalChangeSeqNum = closure$_result.getLong_61zpoe$('statementLocalChangeSeqNum'); var _tmp_statementLastChangedBy = closure$_result.getInt_61zpoe$('statementLastChangedBy'); var _tmp_statementLct = closure$_result.getLong_61zpoe$('statementLct'); var _tmp_extensionProgress = closure$_result.getInt_61zpoe$('extensionProgress'); var _tmp_contentEntryRoot = closure$_result.getBoolean_61zpoe$('contentEntryRoot'); var _tmp_statementContentEntryUid = closure$_result.getLong_61zpoe$('statementContentEntryUid'); var _tmp_statementLearnerGroupUid = closure$_result.getLong_61zpoe$('statementLearnerGroupUid'); var _tmp_statementClazzUid = closure$_result.getLong_61zpoe$('statementClazzUid'); var _tmp_VerbEntity_nullCount = 0; var _tmp_verbUid = closure$_result.getLong_61zpoe$('verbUid'); if (closure$_result.wasNull()) { _tmp_VerbEntity_nullCount = _tmp_VerbEntity_nullCount + 1 | 0; } var _tmp_urlId = closure$_result.getString_61zpoe$('urlId'); if (closure$_result.wasNull()) { _tmp_VerbEntity_nullCount = _tmp_VerbEntity_nullCount + 1 | 0; } var _tmp_verbInActive = closure$_result.getBoolean_61zpoe$('verbInActive'); if (closure$_result.wasNull()) { _tmp_VerbEntity_nullCount = _tmp_VerbEntity_nullCount + 1 | 0; } var _tmp_verbMasterChangeSeqNum = closure$_result.getLong_61zpoe$('verbMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_VerbEntity_nullCount = _tmp_VerbEntity_nullCount + 1 | 0; } var _tmp_verbLocalChangeSeqNum = closure$_result.getLong_61zpoe$('verbLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_VerbEntity_nullCount = _tmp_VerbEntity_nullCount + 1 | 0; } var _tmp_verbLastChangedBy = closure$_result.getInt_61zpoe$('verbLastChangedBy'); if (closure$_result.wasNull()) { _tmp_VerbEntity_nullCount = _tmp_VerbEntity_nullCount + 1 | 0; } var _tmp_verbLct = closure$_result.getLong_61zpoe$('verbLct'); if (closure$_result.wasNull()) { _tmp_VerbEntity_nullCount = _tmp_VerbEntity_nullCount + 1 | 0; } var _tmp_VerbEntity_isAllNull = _tmp_VerbEntity_nullCount === 7; var $receiver = new StatementWithSessionDetailDisplay(); $receiver.verbDisplay = _tmp_verbDisplay; $receiver.objectDisplay = _tmp_objectDisplay; $receiver.statementUid = _tmp_statementUid; $receiver.statementId = _tmp_statementId; $receiver.statementPersonUid = _tmp_statementPersonUid; $receiver.statementVerbUid = _tmp_statementVerbUid; $receiver.xObjectUid = _tmp_xObjectUid; $receiver.subStatementActorUid = _tmp_subStatementActorUid; $receiver.substatementVerbUid = _tmp_substatementVerbUid; $receiver.subStatementObjectUid = _tmp_subStatementObjectUid; $receiver.agentUid = _tmp_agentUid; $receiver.instructorUid = _tmp_instructorUid; $receiver.authorityUid = _tmp_authorityUid; $receiver.teamUid = _tmp_teamUid; $receiver.resultCompletion = _tmp_resultCompletion; $receiver.resultSuccess = _tmp_resultSuccess; $receiver.resultScoreScaled = _tmp_resultScoreScaled; $receiver.resultScoreRaw = _tmp_resultScoreRaw; $receiver.resultScoreMin = _tmp_resultScoreMin; $receiver.resultScoreMax = _tmp_resultScoreMax; $receiver.resultDuration = _tmp_resultDuration; $receiver.resultResponse = _tmp_resultResponse; $receiver.timestamp = _tmp_timestamp; $receiver.stored = _tmp_stored; $receiver.contextRegistration = _tmp_contextRegistration; $receiver.contextPlatform = _tmp_contextPlatform; $receiver.contextStatementId = _tmp_contextStatementId; $receiver.fullStatement = _tmp_fullStatement; $receiver.statementMasterChangeSeqNum = _tmp_statementMasterChangeSeqNum; $receiver.statementLocalChangeSeqNum = _tmp_statementLocalChangeSeqNum; $receiver.statementLastChangedBy = _tmp_statementLastChangedBy; $receiver.statementLct = _tmp_statementLct; $receiver.extensionProgress = _tmp_extensionProgress; $receiver.contentEntryRoot = _tmp_contentEntryRoot; $receiver.statementContentEntryUid = _tmp_statementContentEntryUid; $receiver.statementLearnerGroupUid = _tmp_statementLearnerGroupUid; $receiver.statementClazzUid = _tmp_statementClazzUid; if (!_tmp_VerbEntity_isAllNull) { var $receiver_0 = new VerbEntity(); $receiver_0.verbUid = _tmp_verbUid; $receiver_0.urlId = _tmp_urlId; $receiver_0.verbInActive = _tmp_verbInActive; $receiver_0.verbMasterChangeSeqNum = _tmp_verbMasterChangeSeqNum; $receiver_0.verbLocalChangeSeqNum = _tmp_verbLocalChangeSeqNum; $receiver_0.verbLastChangedBy = _tmp_verbLastChangedBy; $receiver_0.verbLct = _tmp_verbLct; $receiver.verb = $receiver_0; } return $receiver; }; } function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$contextRegistration = closure$contextRegistration_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$contextRegistration); this.local$_stmt.setInt_vux9f0$(5, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$contextRegistration = closure$contextRegistration_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (\n | SELECT StatementEntity.*, VerbEntity.*, \n | verbLangMap.valueLangMap AS verbDisplay, \n | xobjectMap.valueLangMap AS objectDisplay \n | FROM StatementEntity\n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid \n | AND PersonGroupMember.groupMemberPersonUid = ?\n | LEFT JOIN VerbEntity \n | ON VerbEntity.verbUid = StatementEntity.statementVerbUid \n | LEFT JOIN XLangMapEntry verbLangMap \n | ON verbLangMap.verbLangMapUid = VerbEntity.verbUid\n | LEFT JOIN XLangMapEntry xobjectMap \n | ON xobjectMap.objectLangMapUid = StatementEntity.xObjectUid\n | WHERE statementContentEntryUid = ? \n | AND statementPersonUid = ? \n | AND contextRegistration = ? \n | ORDER BY StatementEntity.timestamp DESC\n | ) LIMIT ? OFFSET ?\n ')), StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$contentEntryUid, this.local$closure$personUid, this.local$closure$contextRegistration, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['StatementEntity', 'ScopedGrant', 'PersonGroupMember', 'VerbEntity', 'XLangMapEntry']), StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getData$lambda(this.this$StatementDao_JdbcKt, this.closure$accountPersonUid, this.closure$contentEntryUid, this.closure$personUid, this.closure$contextRegistration, _limit, _offset)); }; function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$contextRegistration = closure$contextRegistration_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$contentEntryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$personUid); this.local$_stmt.setString_vqvrqt$(4, this.local$closure$contextRegistration); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda(closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$StatementDao_JdbcKt = this$StatementDao_JdbcKt_0; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$contentEntryUid = closure$contentEntryUid_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$contextRegistration = closure$contextRegistration_0; } Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda; Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$StatementDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (\n | SELECT StatementEntity.*, VerbEntity.*, \n | verbLangMap.valueLangMap AS verbDisplay, \n | xobjectMap.valueLangMap AS objectDisplay \n | FROM StatementEntity\n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n | OR (ScopedGrant.sgTableId = 6\n | AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid = (\n | SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid = StatementEntity.statementClazzUid))\n | )\n | \n | AND (ScopedGrant.sgPermissions & 549755813888) > 0\n | JOIN PersonGroupMember \n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid \n | AND PersonGroupMember.groupMemberPersonUid = ?\n | LEFT JOIN VerbEntity \n | ON VerbEntity.verbUid = StatementEntity.statementVerbUid \n | LEFT JOIN XLangMapEntry verbLangMap \n | ON verbLangMap.verbLangMapUid = VerbEntity.verbUid\n | LEFT JOIN XLangMapEntry xobjectMap \n | ON xobjectMap.objectLangMapUid = StatementEntity.xObjectUid\n | WHERE statementContentEntryUid = ? \n | AND statementPersonUid = ? \n | AND contextRegistration = ? \n | ORDER BY StatementEntity.timestamp DESC\n | ) \n ')), StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda$lambda(this.local$closure$accountPersonUid, this.local$closure$contentEntryUid, this.local$closure$personUid, this.local$closure$contextRegistration), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0) { return function (continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda(this$StatementDao_JdbcKt_0, closure$accountPersonUid_0, closure$contentEntryUid_0, closure$personUid_0, closure$contextRegistration_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$StatementDao_JdbcKt._db, listOf(['StatementEntity', 'ScopedGrant', 'PersonGroupMember', 'VerbEntity', 'XLangMapEntry']), StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral$getLength$lambda(this.this$StatementDao_JdbcKt, this.closure$accountPersonUid, this.closure$contentEntryUid, this.closure$personUid, this.closure$contextRegistration)); }; StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; StatementDao_JdbcKt.prototype.findSessionDetailForPerson_pkyi17$ = function (contentEntryUid, accountPersonUid, personUid, contextRegistration) { return new StatementDao_JdbcKt$findSessionDetailForPerson$ObjectLiteral(this, accountPersonUid, contentEntryUid, personUid, contextRegistration); }; function StatementDao_JdbcKt$calculateScoreForSession$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_resultScore = closure$_result.getInt_61zpoe$('resultScore'); var _tmp_resultMax = closure$_result.getInt_61zpoe$('resultMax'); var _tmp_resultScaled = closure$_result.getFloat_61zpoe$('resultScaled'); var _tmp_resultWeight = closure$_result.getInt_61zpoe$('resultWeight'); var _tmp_contentComplete = closure$_result.getBoolean_61zpoe$('contentComplete'); var _tmp_progress = closure$_result.getInt_61zpoe$('progress'); var _tmp_success = closure$_result.getByte_61zpoe$('success'); var _tmp_penalty = closure$_result.getInt_61zpoe$('penalty'); var _tmp_totalContent = closure$_result.getInt_61zpoe$('totalContent'); var _tmp_totalCompletedContent = closure$_result.getInt_61zpoe$('totalCompletedContent'); var $receiver = new ContentEntryStatementScoreProgress(); $receiver.resultScore = _tmp_resultScore; $receiver.resultMax = _tmp_resultMax; $receiver.resultScaled = _tmp_resultScaled; $receiver.resultWeight = _tmp_resultWeight; $receiver.contentComplete = _tmp_contentComplete; $receiver.progress = _tmp_progress; $receiver.success = _tmp_success; $receiver.penalty = _tmp_penalty; $receiver.totalContent = _tmp_totalContent; $receiver.totalCompletedContent = _tmp_totalCompletedContent; return $receiver; }; } function StatementDao_JdbcKt$calculateScoreForSession$lambda$lambda(_result) { return mapNextRow(_result, null, StatementDao_JdbcKt$calculateScoreForSession$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda(closure$contextRegistration_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contextRegistration = closure$contextRegistration_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda; Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$contextRegistration); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$calculateScoreForSession$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$calculateScoreForSession$lambda(closure$contextRegistration_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$calculateScoreForSession$lambda(closure$contextRegistration_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt.prototype.calculateScoreForSession_61zpoe$ = function (contextRegistration, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin("\n |\n | SELECT SUM(resultScoreRaw) AS resultScore, \n | SUM(resultScoreMax) AS resultMax,\n | MAX(extensionProgress) AS progress,\n | 0 as resultWeight,\n | 0 as penalty,\n | 0 as success,\n | 'FALSE' as contentComplete,\n | 0 AS resultScaled, \n | COALESCE((CASE WHEN resultCompletion \n | THEN 1 ELSE 0 END),0) AS totalCompletedContent,\n | \n | 1 as totalContent\n | \n | FROM (SELECT * \n | FROM StatementEntity \n | WHERE contextRegistration = ?\n | AND NOT contentEntryRoot\n | AND statementVerbUid = 10007 \n | GROUP BY xObjectUid) AS SessionStatements\n | \n ")), StatementDao_JdbcKt$calculateScoreForSession$lambda(contextRegistration), continuation); }; function StatementDao_JdbcKt$findCompletedScoreForSession$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_resultScore = closure$_result.getInt_61zpoe$('resultScore'); var _tmp_resultMax = closure$_result.getInt_61zpoe$('resultMax'); var _tmp_resultScaled = closure$_result.getFloat_61zpoe$('resultScaled'); var _tmp_resultWeight = closure$_result.getInt_61zpoe$('resultWeight'); var _tmp_contentComplete = closure$_result.getBoolean_61zpoe$('contentComplete'); var _tmp_progress = closure$_result.getInt_61zpoe$('progress'); var _tmp_success = closure$_result.getByte_61zpoe$('success'); var _tmp_penalty = closure$_result.getInt_61zpoe$('penalty'); var _tmp_totalContent = closure$_result.getInt_61zpoe$('totalContent'); var _tmp_totalCompletedContent = closure$_result.getInt_61zpoe$('totalCompletedContent'); var $receiver = new ContentEntryStatementScoreProgress(); $receiver.resultScore = _tmp_resultScore; $receiver.resultMax = _tmp_resultMax; $receiver.resultScaled = _tmp_resultScaled; $receiver.resultWeight = _tmp_resultWeight; $receiver.contentComplete = _tmp_contentComplete; $receiver.progress = _tmp_progress; $receiver.success = _tmp_success; $receiver.penalty = _tmp_penalty; $receiver.totalContent = _tmp_totalContent; $receiver.totalCompletedContent = _tmp_totalCompletedContent; return $receiver; }; } function StatementDao_JdbcKt$findCompletedScoreForSession$lambda$lambda(_result) { return mapNextRow(_result, null, StatementDao_JdbcKt$findCompletedScoreForSession$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda(closure$contextRegistration_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$contextRegistration = closure$contextRegistration_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda; Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setString_vqvrqt$(1, this.local$closure$contextRegistration); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findCompletedScoreForSession$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findCompletedScoreForSession$lambda(closure$contextRegistration_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findCompletedScoreForSession$lambda(closure$contextRegistration_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt.prototype.findCompletedScoreForSession_61zpoe$ = function (contextRegistration, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT resultScoreRaw AS resultScore, \n | resultScoreMax AS resultMax,\n | extensionProgress AS progress,\n | 0 AS penalty,\n | 0 as resultWeight,\n | resultSuccess AS success,\n | resultCompletion AS contentComplete, \n | resultScoreScaled AS resultScaled,\n | 1 AS totalCompletedContent,\n | 1 as totalContent\n | \n | FROM StatementEntity\n | WHERE resultCompletion\n | AND contextRegistration = ?\n | AND contentEntryRoot\n | ORDER BY resultScoreScaled DESC, \n | extensionProgress DESC, \n | resultSuccess DESC \n | LIMIT 1\n | \n ')), StatementDao_JdbcKt$findCompletedScoreForSession$lambda(contextRegistration), continuation); }; function StatementDao_JdbcKt$findLatestRegistrationStatement$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getString_za3lpa$(1); }; } function StatementDao_JdbcKt$findLatestRegistrationStatement$lambda$lambda(_result) { return mapNextRow(_result, null, StatementDao_JdbcKt$findLatestRegistrationStatement$lambda$lambda$lambda(_result)); } function Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda(closure$accountPersonUid_0, closure$entryUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$accountPersonUid = closure$accountPersonUid_0; this.local$closure$entryUid = closure$entryUid_0; this.local$_stmt = _stmt_0; } Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda.prototype.constructor = Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda; Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$entryUid); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$accountPersonUid); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$entryUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, StatementDao_JdbcKt$findLatestRegistrationStatement$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function StatementDao_JdbcKt$findLatestRegistrationStatement$lambda(closure$accountPersonUid_0, closure$entryUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$StatementDao_JdbcKt$findLatestRegistrationStatement$lambda(closure$accountPersonUid_0, closure$entryUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } StatementDao_JdbcKt.prototype.findLatestRegistrationStatement_3pjtqy$ = function (accountPersonUid, entryUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT contextRegistration \n | FROM StatementEntity\n | WHERE statementPersonUid = ?\n | AND statementContentEntryUid = ?\n | AND NOT EXISTS (SELECT statementUid FROM StatementEntity\n | WHERE statementPersonUid = ?\n | AND statementContentEntryUid = ?\n | AND (statementVerbUid = 10001 \n | OR statementVerbUid = 10004))\n | ORDER BY timestamp DESC \n | \n ')), StatementDao_JdbcKt$findLatestRegistrationStatement$lambda(accountPersonUid, entryUid), continuation); }; function StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO StatementEntity (statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.statementUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.statementUid); } stmt.setString_vqvrqt$(2, entity.statementId); stmt.setLong_6svq3l$(3, entity.statementPersonUid); stmt.setLong_6svq3l$(4, entity.statementVerbUid); stmt.setLong_6svq3l$(5, entity.xObjectUid); stmt.setLong_6svq3l$(6, entity.subStatementActorUid); stmt.setLong_6svq3l$(7, entity.substatementVerbUid); stmt.setLong_6svq3l$(8, entity.subStatementObjectUid); stmt.setLong_6svq3l$(9, entity.agentUid); stmt.setLong_6svq3l$(10, entity.instructorUid); stmt.setLong_6svq3l$(11, entity.authorityUid); stmt.setLong_6svq3l$(12, entity.teamUid); stmt.setBoolean_fzusl$(13, entity.resultCompletion); stmt.setByte_6t1wet$(14, entity.resultSuccess); stmt.setFloat_24o109$(15, entity.resultScoreScaled); stmt.setLong_6svq3l$(16, entity.resultScoreRaw); stmt.setLong_6svq3l$(17, entity.resultScoreMin); stmt.setLong_6svq3l$(18, entity.resultScoreMax); stmt.setLong_6svq3l$(19, entity.resultDuration); stmt.setString_vqvrqt$(20, entity.resultResponse); stmt.setLong_6svq3l$(21, entity.timestamp); stmt.setLong_6svq3l$(22, entity.stored); stmt.setString_vqvrqt$(23, entity.contextRegistration); stmt.setString_vqvrqt$(24, entity.contextPlatform); stmt.setString_vqvrqt$(25, entity.contextStatementId); stmt.setString_vqvrqt$(26, entity.fullStatement); stmt.setLong_6svq3l$(27, entity.statementMasterChangeSeqNum); stmt.setLong_6svq3l$(28, entity.statementLocalChangeSeqNum); stmt.setInt_vux9f0$(29, entity.statementLastChangedBy); stmt.setLong_6svq3l$(30, entity.statementLct); stmt.setInt_vux9f0$(31, entity.extensionProgress); stmt.setBoolean_fzusl$(32, entity.contentEntryRoot); stmt.setLong_6svq3l$(33, entity.statementContentEntryUid); stmt.setLong_6svq3l$(34, entity.statementLearnerGroupUid); stmt.setLong_6svq3l$(35, entity.statementClazzUid); }; StatementDao_JdbcKt$_insertAdapterStatementEntity_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; StatementDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'StatementDao_JdbcKt', interfaces: [StatementDao]}; function StatementDao_ReplicateWrapper(_db, _dao) { StatementDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_159($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_159.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_159.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_159.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_159; Coroutine$replicateOnNewNode_s8cxhz$_159.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_159(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_162($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_162.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_162.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_162.prototype.constructor = Coroutine$replicateOnChange_162; Coroutine$replicateOnChange_162.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_162(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_6agjaz$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$insertListAsync_6agjaz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_6agjaz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_6agjaz$_0.prototype.constructor = Coroutine$insertListAsync_6agjaz$_0; Coroutine$insertListAsync_6agjaz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.statementUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(60, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.statementUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.statementLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.insertListAsync_6agjaz$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_ReplicateWrapper.prototype.insertListAsync_6agjaz$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_6agjaz$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_ReplicateWrapper.prototype.getOneStatement = function () { return this._dao_0.getOneStatement(); }; StatementDao_ReplicateWrapper.prototype.findByStatementId_61zpoe$ = function (id) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.findByStatementIdList_mhpeer$ = function (id) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.getResults_j49vja$ = function (query, continuation) { return this._dao_0.getResults_j49vja$(query, continuation); }; StatementDao_ReplicateWrapper.prototype.getListResults_j49vja$ = function (query) { return this._dao_0.getListResults_j49vja$(query); }; StatementDao_ReplicateWrapper.prototype.getPerson = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.getXLangMap = function () { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.updateProgress_ro19vi$ = function (uid, progress, updateTime) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.findPersonsWithContentEntryAttempts_vqkbx2$ = function (contentEntryUid, accountPersonUid, searchText, sortOrder) { return this._dao_0.findPersonsWithContentEntryAttempts_vqkbx2$(contentEntryUid, accountPersonUid, searchText, sortOrder); }; StatementDao_ReplicateWrapper.prototype.getBestScoreForContentForPerson_3pjtqy$ = function (contentEntryUid, accountPersonUid, continuation) { return this._dao_0.getBestScoreForContentForPerson_3pjtqy$(contentEntryUid, accountPersonUid, continuation); }; StatementDao_ReplicateWrapper.prototype.findNextStudentNotMarkedForAssignment_3pjtqy$ = function (assignmentUid, currentStudentUid, continuation) { return this._dao_0.findNextStudentNotMarkedForAssignment_3pjtqy$(assignmentUid, currentStudentUid, continuation); }; StatementDao_ReplicateWrapper.prototype.findSubmittedStatementFromStudent_3pjtqy$ = function (studentUid, assignmentObjectUid, continuation) { return this._dao_0.findSubmittedStatementFromStudent_3pjtqy$(studentUid, assignmentObjectUid, continuation); }; StatementDao_ReplicateWrapper.prototype.findScoreStatementForStudent_s8cxhz$ = function (studentUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.findSessionsForPerson_b9bd0d$ = function (contentEntryUid, accountPersonUid, personUid) { return this._dao_0.findSessionsForPerson_b9bd0d$(contentEntryUid, accountPersonUid, personUid); }; StatementDao_ReplicateWrapper.prototype.findSessionDetailForPerson_pkyi17$ = function (contentEntryUid, accountPersonUid, personUid, contextRegistration) { return this._dao_0.findSessionDetailForPerson_pkyi17$(contentEntryUid, accountPersonUid, personUid, contextRegistration); }; StatementDao_ReplicateWrapper.prototype.calculateScoreForSession_61zpoe$ = function (contextRegistration, continuation) { return this._dao_0.calculateScoreForSession_61zpoe$(contextRegistration, continuation); }; StatementDao_ReplicateWrapper.prototype.findCompletedScoreForSession_61zpoe$ = function (contextRegistration, continuation) { return this._dao_0.findCompletedScoreForSession_61zpoe$(contextRegistration, continuation); }; StatementDao_ReplicateWrapper.prototype.findLatestRegistrationStatement_3pjtqy$ = function (accountPersonUid, entryUid, continuation) { return this._dao_0.findLatestRegistrationStatement_3pjtqy$(accountPersonUid, entryUid, continuation); }; StatementDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_161($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_161.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_161.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_161.prototype.constructor = Coroutine$insertAsync_161; Coroutine$insertAsync_161.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.statementUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(60, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.statementUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.statementLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.statementUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_161(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; StatementDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'StatementDao_ReplicateWrapper', interfaces: [StatementDao]}; function StatementDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { StatementDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_160($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_160.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_160.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_160.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_160; Coroutine$replicateOnNewNode_s8cxhz$_160.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_160(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_163($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_163.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_163.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_163.prototype.constructor = Coroutine$replicateOnChange_163; Coroutine$replicateOnChange_163.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_163(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertListAsync_6agjaz$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$insertListAsync_6agjaz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertListAsync_6agjaz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertListAsync_6agjaz$_1.prototype.constructor = Coroutine$insertListAsync_6agjaz$_1; Coroutine$insertListAsync_6agjaz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertListAsync_6agjaz$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.insertListAsync_6agjaz$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$insertListAsync_6agjaz$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_Repo.prototype.getOneStatement = function () { var _result = this._dao.getOneStatement(); return _result; }; StatementDao_Repo.prototype.findByStatementId_61zpoe$ = function (id) { var _result = this._dao.findByStatementId_61zpoe$(id); return _result; }; StatementDao_Repo.prototype.findByStatementIdList_mhpeer$ = function (id) { var _result = this._dao.findByStatementIdList_mhpeer$(id); return _result; }; function Coroutine$getResults_j49vja$($this, query_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$query = query_0; } Coroutine$getResults_j49vja$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getResults_j49vja$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getResults_j49vja$.prototype.constructor = Coroutine$getResults_j49vja$; Coroutine$getResults_j49vja$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getResults_j49vja$(this.local$query, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.getResults_j49vja$ = function (query_0, continuation_0, suspended) { var instance = new Coroutine$getResults_j49vja$(this, query_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_Repo.prototype.getListResults_j49vja$ = function (query) { var _result = this._dao.getListResults_j49vja$(query); return _result; }; StatementDao_Repo.prototype.getPerson = function () { var _result = this._dao.getPerson(); return _result; }; StatementDao_Repo.prototype.getXLangMap = function () { var _result = this._dao.getXLangMap(); return _result; }; StatementDao_Repo.prototype.updateProgress_ro19vi$ = function (uid, progress, updateTime) { this._dao.updateProgress_ro19vi$(uid, progress, updateTime); }; StatementDao_Repo.prototype.findPersonsWithContentEntryAttempts_vqkbx2$ = function (contentEntryUid, accountPersonUid, searchText, sortOrder) { var _result = this._dao.findPersonsWithContentEntryAttempts_vqkbx2$(contentEntryUid, accountPersonUid, searchText, sortOrder); return _result; }; function Coroutine$getBestScoreForContentForPerson_3pjtqy$($this, contentEntryUid_0, accountPersonUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contentEntryUid = contentEntryUid_0; this.local$accountPersonUid = accountPersonUid_0; } Coroutine$getBestScoreForContentForPerson_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getBestScoreForContentForPerson_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getBestScoreForContentForPerson_3pjtqy$.prototype.constructor = Coroutine$getBestScoreForContentForPerson_3pjtqy$; Coroutine$getBestScoreForContentForPerson_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getBestScoreForContentForPerson_3pjtqy$(this.local$contentEntryUid, this.local$accountPersonUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.getBestScoreForContentForPerson_3pjtqy$ = function (contentEntryUid_0, accountPersonUid_0, continuation_0, suspended) { var instance = new Coroutine$getBestScoreForContentForPerson_3pjtqy$(this, contentEntryUid_0, accountPersonUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$($this, assignmentUid_0, currentStudentUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$assignmentUid = assignmentUid_0; this.local$currentStudentUid = currentStudentUid_0; } Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$.prototype.constructor = Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$; Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findNextStudentNotMarkedForAssignment_3pjtqy$(this.local$assignmentUid, this.local$currentStudentUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.findNextStudentNotMarkedForAssignment_3pjtqy$ = function (assignmentUid_0, currentStudentUid_0, continuation_0, suspended) { var instance = new Coroutine$findNextStudentNotMarkedForAssignment_3pjtqy$(this, assignmentUid_0, currentStudentUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findSubmittedStatementFromStudent_3pjtqy$($this, studentUid_0, assignmentObjectUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$studentUid = studentUid_0; this.local$assignmentObjectUid = assignmentObjectUid_0; } Coroutine$findSubmittedStatementFromStudent_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSubmittedStatementFromStudent_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSubmittedStatementFromStudent_3pjtqy$.prototype.constructor = Coroutine$findSubmittedStatementFromStudent_3pjtqy$; Coroutine$findSubmittedStatementFromStudent_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findSubmittedStatementFromStudent_3pjtqy$(this.local$studentUid, this.local$assignmentObjectUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.findSubmittedStatementFromStudent_3pjtqy$ = function (studentUid_0, assignmentObjectUid_0, continuation_0, suspended) { var instance = new Coroutine$findSubmittedStatementFromStudent_3pjtqy$(this, studentUid_0, assignmentObjectUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_Repo.prototype.findScoreStatementForStudent_s8cxhz$ = function (studentUid) { var _result = this._dao.findScoreStatementForStudent_s8cxhz$(studentUid); return _result; }; StatementDao_Repo.prototype.findSessionsForPerson_b9bd0d$ = function (contentEntryUid, accountPersonUid, personUid) { var _result = this._dao.findSessionsForPerson_b9bd0d$(contentEntryUid, accountPersonUid, personUid); return _result; }; StatementDao_Repo.prototype.findSessionDetailForPerson_pkyi17$ = function (contentEntryUid, accountPersonUid, personUid, contextRegistration) { var _result = this._dao.findSessionDetailForPerson_pkyi17$(contentEntryUid, accountPersonUid, personUid, contextRegistration); return _result; }; function Coroutine$calculateScoreForSession_61zpoe$($this, contextRegistration_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contextRegistration = contextRegistration_0; } Coroutine$calculateScoreForSession_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$calculateScoreForSession_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$calculateScoreForSession_61zpoe$.prototype.constructor = Coroutine$calculateScoreForSession_61zpoe$; Coroutine$calculateScoreForSession_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.calculateScoreForSession_61zpoe$(this.local$contextRegistration, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.calculateScoreForSession_61zpoe$ = function (contextRegistration_0, continuation_0, suspended) { var instance = new Coroutine$calculateScoreForSession_61zpoe$(this, contextRegistration_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findCompletedScoreForSession_61zpoe$($this, contextRegistration_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$contextRegistration = contextRegistration_0; } Coroutine$findCompletedScoreForSession_61zpoe$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findCompletedScoreForSession_61zpoe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findCompletedScoreForSession_61zpoe$.prototype.constructor = Coroutine$findCompletedScoreForSession_61zpoe$; Coroutine$findCompletedScoreForSession_61zpoe$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findCompletedScoreForSession_61zpoe$(this.local$contextRegistration, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.findCompletedScoreForSession_61zpoe$ = function (contextRegistration_0, continuation_0, suspended) { var instance = new Coroutine$findCompletedScoreForSession_61zpoe$(this, contextRegistration_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findLatestRegistrationStatement_3pjtqy$($this, accountPersonUid_0, entryUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$accountPersonUid = accountPersonUid_0; this.local$entryUid = entryUid_0; } Coroutine$findLatestRegistrationStatement_3pjtqy$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findLatestRegistrationStatement_3pjtqy$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findLatestRegistrationStatement_3pjtqy$.prototype.constructor = Coroutine$findLatestRegistrationStatement_3pjtqy$; Coroutine$findLatestRegistrationStatement_3pjtqy$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findLatestRegistrationStatement_3pjtqy$(this.local$accountPersonUid, this.local$entryUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.findLatestRegistrationStatement_3pjtqy$ = function (accountPersonUid_0, entryUid_0, continuation_0, suspended) { var instance = new Coroutine$findLatestRegistrationStatement_3pjtqy$(this, accountPersonUid_0, entryUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_162($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_162.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_162.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_162.prototype.constructor = Coroutine$insertAsync_162; Coroutine$insertAsync_162.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; StatementDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_162(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; StatementDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; StatementDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; StatementDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; StatementDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'StatementDao_Repo', interfaces: [StatementDao]}; function SyncNodeDao() { } SyncNodeDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'SyncNodeDao', interfaces: []}; function SyncNodeDao_JdbcKt(_db) { SyncNodeDao.call(this); this._db = _db; this._insertAdapterSyncNode_upsert = new SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral(this._db); } SyncNodeDao_JdbcKt.prototype.replace_xzdt0j$ = function (syncNode) { this._insertAdapterSyncNode_upsert.insert_11rb$(syncNode); }; function SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda$lambda(_result) { return mapNextRow(_result, L0, SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda$lambda$lambda(_result)); } function Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda.prototype.constructor = Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda; Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } SyncNodeDao_JdbcKt.prototype.getLocalNodeClientId = function (continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT COALESCE(\n | (SELECT nodeClientId \n | FROM SyncNode \n | LIMIT 1), 0)\n | \n ')), SyncNodeDao_JdbcKt$getLocalNodeClientId$lambda, continuation); }; function SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO SyncNode (nodeClientId) VALUES(?)'; }; SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { stmt.setLong_6svq3l$(1, entity.nodeClientId); }; SyncNodeDao_JdbcKt$_insertAdapterSyncNode_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; SyncNodeDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'SyncNodeDao_JdbcKt', interfaces: [SyncNodeDao]}; function UserSessionDao() { } UserSessionDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'UserSessionDao', interfaces: []}; function UserSessionDao_JdbcKt(_db) { UserSessionDao.call(this); this._db = _db; this._insertAdapterUserSession_ = new UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral(this._db); } function Coroutine$insertSession_g3losl$($this, session_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$session = session_0; } Coroutine$insertSession_g3losl$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertSession_g3losl$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertSession_g3losl$.prototype.constructor = Coroutine$insertSession_g3losl$; Coroutine$insertSession_g3losl$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterUserSession_.insertAndReturnIdAsync_11rb$(this.local$session, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.insertSession_g3losl$ = function (session_0, continuation_0, suspended) { var instance = new Coroutine$insertSession_g3losl$(this, session_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda; Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$updateReplicationTrackers$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackers$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$updateReplicationTrackers($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$updateReplicationTrackers.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateReplicationTrackers.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateReplicationTrackers.prototype.constructor = Coroutine$updateReplicationTrackers; Coroutine$updateReplicationTrackers.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO UserSessionReplicate(usPk, usDestination)\n | SELECT DISTINCT UserSessionSubject.usUid AS usPk,\n | UserSession.usClientNodeId AS usDestination\n | FROM ChangeLog\n | JOIN UserSession UserSessionSubject\n | ON ChangeLog.chTableId = 679\n | AND ChangeLog.chEntityPk = UserSessionSubject.usUid\n | AND UserSessionSubject.usSessionType = 1\n | JOIN Person\n | ON UserSessionSubject.usPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | /* Modify second part of query - remove requirement for session to be active.\n | * This ensures that deactivations are distributed\n | */\n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | WHERE UserSessionSubject.usClientNodeId = UserSessionSubject.usClientNodeId \n | --notpsql \n | AND UserSessionSubject.usLct != COALESCE(\n | (SELECT usVersionId\n | FROM UserSessionReplicate\n | WHERE UserSessionReplicate.usPk = UserSessionSubject.usUid\n | AND UserSessionReplicate.usDestination = UserSession.usClientNodeId), 0)\n | --endnotpsql \n | /*psql ON CONFLICT(usPk, usDestination) \n | DO UPDATE SET usPending = \n | (SELECT UserSession.usLct\n | FROM UserSession\n | WHERE UserSession.usUid = EXCLUDED.usPk ) \n | != UserSessionReplicate.usVersionId\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO UserSessionReplicate(usPk, usDestination)\n | SELECT DISTINCT UserSessionSubject.usUid AS usPk,\n | UserSession.usClientNodeId AS usDestination\n | FROM ChangeLog\n | JOIN UserSession UserSessionSubject\n | ON ChangeLog.chTableId = 679\n | AND ChangeLog.chEntityPk = UserSessionSubject.usUid\n | AND UserSessionSubject.usSessionType = 1\n | JOIN Person\n | ON UserSessionSubject.usPersonUid = Person.personUid\n | \n | JOIN ScopedGrant \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT clazzEnrolmentClazzUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentPersonUid = Person.personUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND ScopedGrant.sgEntityUid IN (\n | SELECT DISTINCT schoolMemberSchoolUid\n | FROM SchoolMember\n | WHERE schoolMemberPersonUid = Person.personUid\n | AND schoolMemberActive))\n | )\n | \n | AND (ScopedGrant.sgPermissions & \n | \n | 64\n | /* Modify second part of query - remove requirement for session to be active.\n | * This ensures that deactivations are distributed\n | */\n | ) > 0\n | JOIN PersonGroupMember AS PrsGrpMbr\n | ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n | WHERE UserSessionSubject.usClientNodeId = UserSessionSubject.usClientNodeId \n | ON CONFLICT(usPk, usDestination) \n | DO UPDATE SET usPending = \n | (SELECT UserSession.usLct\n | FROM UserSession\n | WHERE UserSession.usUid = EXCLUDED.usPk ) \n | != UserSessionReplicate.usVersionId\n | \n | \n |')), UserSessionDao_JdbcKt$updateReplicationTrackers$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.updateReplicationTrackers = function (continuation_0, suspended) { var instance = new Coroutine$updateReplicationTrackers(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda; Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$.prototype.constructor = Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$; Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO UserSessionReplicate(usPk, usDestination)\n | SELECT DISTINCT UserSessionSubject.usUid AS usPk,\n | UserSession.usClientNodeId AS usDestination\n | FROM UserSession \n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN UserSession UserSessionSubject\n | ON UserSessionSubject.usPersonUid = Person.personUid\n | AND UserSessionSubject.usSessionType = 1\n | AND UserSessionSubject.usClientNodeId = ?\n | WHERE UserSession.usClientNodeId = ?\n | --notpsql\n | AND UserSessionSubject.usLct != COALESCE(\n | (SELECT usVersionId\n | FROM UserSessionReplicate\n | WHERE UserSessionReplicate.usPk = UserSessionSubject.usUid\n | AND UserSessionReplicate.usDestination = UserSession.usClientNodeId), 0)\n | --endnotpsql \n | /*psql ON CONFLICT(usPk, usDestination) \n | DO UPDATE SET usPending = \n | (SELECT UserSession.usLct\n | FROM UserSession\n | WHERE UserSession.usUid = EXCLUDED.usPk ) \n | != UserSessionReplicate.usVersionId\n | */\n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO UserSessionReplicate(usPk, usDestination)\n | SELECT DISTINCT UserSessionSubject.usUid AS usPk,\n | UserSession.usClientNodeId AS usDestination\n | FROM UserSession \n | JOIN PersonGroupMember\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | \n | JOIN ScopedGrant\n | ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n | AND (ScopedGrant.sgPermissions &\n | 64\n | \n | ) > 0\n | JOIN Person \n | ON \n | ((ScopedGrant.sgTableId = -2\n | AND ScopedGrant.sgEntityUid = -2)\n | OR (ScopedGrant.sgTableId = 9\n | AND ScopedGrant.sgEntityUid = Person.personUid)\n | OR (ScopedGrant.sgTableId = 6 \n | AND Person.personUid IN (\n | SELECT DISTINCT clazzEnrolmentPersonUid\n | FROM ClazzEnrolment\n | WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n | AND ClazzEnrolment.clazzEnrolmentActive))\n | OR (ScopedGrant.sgTableId = 164\n | AND Person.personUid IN (\n | SELECT DISTINCT schoolMemberPersonUid\n | FROM SchoolMember\n | WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n | AND schoolMemberActive))\n | ) \n | \n | \n | JOIN UserSession UserSessionSubject\n | ON UserSessionSubject.usPersonUid = Person.personUid\n | AND UserSessionSubject.usSessionType = 1\n | AND UserSessionSubject.usClientNodeId = ?\n | WHERE UserSession.usClientNodeId = ?\n | ON CONFLICT(usPk, usDestination) \n | DO UPDATE SET usPending = \n | (SELECT UserSession.usLct\n | FROM UserSession\n | WHERE UserSession.usUid = EXCLUDED.usPk ) \n | != UserSessionReplicate.usVersionId\n | \n | \n |')), UserSessionDao_JdbcKt$updateReplicationTrackersOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.updateReplicationTrackersOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function UserSessionDao_JdbcKt$findSessionsByPerson$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_usUid = closure$_result.getLong_61zpoe$('usUid'); var _tmp_usPcsn = closure$_result.getLong_61zpoe$('usPcsn'); var _tmp_usLcsn = closure$_result.getLong_61zpoe$('usLcsn'); var _tmp_usLcb = closure$_result.getInt_61zpoe$('usLcb'); var _tmp_usLct = closure$_result.getLong_61zpoe$('usLct'); var _tmp_usPersonUid = closure$_result.getLong_61zpoe$('usPersonUid'); var _tmp_usClientNodeId = closure$_result.getLong_61zpoe$('usClientNodeId'); var _tmp_usStartTime = closure$_result.getLong_61zpoe$('usStartTime'); var _tmp_usEndTime = closure$_result.getLong_61zpoe$('usEndTime'); var _tmp_usStatus = closure$_result.getInt_61zpoe$('usStatus'); var _tmp_usReason = closure$_result.getInt_61zpoe$('usReason'); var _tmp_usAuth = closure$_result.getString_61zpoe$('usAuth'); var _tmp_usSessionType = closure$_result.getInt_61zpoe$('usSessionType'); var $receiver = new UserSession(); $receiver.usUid = _tmp_usUid; $receiver.usPcsn = _tmp_usPcsn; $receiver.usLcsn = _tmp_usLcsn; $receiver.usLcb = _tmp_usLcb; $receiver.usLct = _tmp_usLct; $receiver.usPersonUid = _tmp_usPersonUid; $receiver.usClientNodeId = _tmp_usClientNodeId; $receiver.usStartTime = _tmp_usStartTime; $receiver.usEndTime = _tmp_usEndTime; $receiver.usStatus = _tmp_usStatus; $receiver.usReason = _tmp_usReason; $receiver.usAuth = _tmp_usAuth; $receiver.usSessionType = _tmp_usSessionType; return $receiver; }; } function UserSessionDao_JdbcKt$findSessionsByPerson$lambda$lambda(_result) { return mapRows(_result, UserSessionDao_JdbcKt$findSessionsByPerson$lambda$lambda$lambda(_result)); } function Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda(closure$personUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUid = closure$personUid_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda; Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$personUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findSessionsByPerson$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findSessionsByPerson$lambda(closure$personUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findSessionsByPerson$lambda(closure$personUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } UserSessionDao_JdbcKt.prototype.findSessionsByPerson_s8cxhz$ = function (personUid, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT UserSession.*\n | FROM UserSession\n | WHERE usPersonUid = ? \n | \n ')), UserSessionDao_JdbcKt$findSessionsByPerson$lambda(personUid), continuation); }; function UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var _tmp_UserSession_nullCount = 0; var _tmp_usUid = closure$_result.getLong_61zpoe$('usUid'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usPcsn = closure$_result.getLong_61zpoe$('usPcsn'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usLcsn = closure$_result.getLong_61zpoe$('usLcsn'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usLcb = closure$_result.getInt_61zpoe$('usLcb'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usLct = closure$_result.getLong_61zpoe$('usLct'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usPersonUid = closure$_result.getLong_61zpoe$('usPersonUid'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usClientNodeId = closure$_result.getLong_61zpoe$('usClientNodeId'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usStartTime = closure$_result.getLong_61zpoe$('usStartTime'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usEndTime = closure$_result.getLong_61zpoe$('usEndTime'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usStatus = closure$_result.getInt_61zpoe$('usStatus'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usReason = closure$_result.getInt_61zpoe$('usReason'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usAuth = closure$_result.getString_61zpoe$('usAuth'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usSessionType = closure$_result.getInt_61zpoe$('usSessionType'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_UserSession_isAllNull = _tmp_UserSession_nullCount === 13; var $receiver = new UserSessionAndPerson(); if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.person = $receiver_0; } if (!_tmp_UserSession_isAllNull) { var $receiver_1 = new UserSession(); $receiver_1.usUid = _tmp_usUid; $receiver_1.usPcsn = _tmp_usPcsn; $receiver_1.usLcsn = _tmp_usLcsn; $receiver_1.usLcb = _tmp_usLcb; $receiver_1.usLct = _tmp_usLct; $receiver_1.usPersonUid = _tmp_usPersonUid; $receiver_1.usClientNodeId = _tmp_usClientNodeId; $receiver_1.usStartTime = _tmp_usStartTime; $receiver_1.usEndTime = _tmp_usEndTime; $receiver_1.usStatus = _tmp_usStatus; $receiver_1.usReason = _tmp_usReason; $receiver_1.usAuth = _tmp_usAuth; $receiver_1.usSessionType = _tmp_usSessionType; $receiver.userSession = $receiver_1; } return $receiver; }; } function UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda$lambda(_result) { return mapRows(_result, UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda; Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda(this$UserSessionDao_JdbcKt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$UserSessionDao_JdbcKt = this$UserSessionDao_JdbcKt_0; } Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda; Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$UserSessionDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT UserSession.*, Person.*\n | FROM UserSession\n | JOIN Person ON UserSession.usPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = (\n | SELECT COALESCE(\n | (SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1), 0))\n | AND UserSession.usStatus = 1 \n | \n ')), UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda(this$UserSessionDao_JdbcKt_0) { return function (continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda(this$UserSessionDao_JdbcKt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } UserSessionDao_JdbcKt.prototype.findAllLocalSessionsLive = function () { return new LiveDataImpl(this._db, listOf(['UserSession', 'Person', 'SyncNode']), UserSessionDao_JdbcKt$findAllLocalSessionsLive$lambda(this)); }; function UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_Person_nullCount = 0; var _tmp_personUid = closure$_result.getLong_61zpoe$('personUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_username = closure$_result.getString_61zpoe$('username'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_firstNames = closure$_result.getString_61zpoe$('firstNames'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_lastName = closure$_result.getString_61zpoe$('lastName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_emailAddr = closure$_result.getString_61zpoe$('emailAddr'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_phoneNum = closure$_result.getString_61zpoe$('phoneNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_gender = closure$_result.getInt_61zpoe$('gender'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_active = closure$_result.getBoolean_61zpoe$('active'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_admin = closure$_result.getBoolean_61zpoe$('admin'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personNotes = closure$_result.getString_61zpoe$('personNotes'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherName = closure$_result.getString_61zpoe$('fatherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_fatherNumber = closure$_result.getString_61zpoe$('fatherNumber'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherName = closure$_result.getString_61zpoe$('motherName'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_motherNum = closure$_result.getString_61zpoe$('motherNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_dateOfBirth = closure$_result.getLong_61zpoe$('dateOfBirth'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personAddress = closure$_result.getString_61zpoe$('personAddress'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personOrgId = closure$_result.getString_61zpoe$('personOrgId'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personGroupUid = closure$_result.getLong_61zpoe$('personGroupUid'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personMasterChangeSeqNum = closure$_result.getLong_61zpoe$('personMasterChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLocalChangeSeqNum = closure$_result.getLong_61zpoe$('personLocalChangeSeqNum'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLastChangedBy = closure$_result.getInt_61zpoe$('personLastChangedBy'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personLct = closure$_result.getLong_61zpoe$('personLct'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personCountry = closure$_result.getString_61zpoe$('personCountry'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_personType = closure$_result.getInt_61zpoe$('personType'); if (closure$_result.wasNull()) { _tmp_Person_nullCount = _tmp_Person_nullCount + 1 | 0; } var _tmp_Person_isAllNull = _tmp_Person_nullCount === 24; var _tmp_UserSession_nullCount = 0; var _tmp_usUid = closure$_result.getLong_61zpoe$('usUid'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usPcsn = closure$_result.getLong_61zpoe$('usPcsn'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usLcsn = closure$_result.getLong_61zpoe$('usLcsn'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usLcb = closure$_result.getInt_61zpoe$('usLcb'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usLct = closure$_result.getLong_61zpoe$('usLct'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usPersonUid = closure$_result.getLong_61zpoe$('usPersonUid'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usClientNodeId = closure$_result.getLong_61zpoe$('usClientNodeId'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usStartTime = closure$_result.getLong_61zpoe$('usStartTime'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usEndTime = closure$_result.getLong_61zpoe$('usEndTime'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usStatus = closure$_result.getInt_61zpoe$('usStatus'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usReason = closure$_result.getInt_61zpoe$('usReason'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usAuth = closure$_result.getString_61zpoe$('usAuth'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_usSessionType = closure$_result.getInt_61zpoe$('usSessionType'); if (closure$_result.wasNull()) { _tmp_UserSession_nullCount = _tmp_UserSession_nullCount + 1 | 0; } var _tmp_UserSession_isAllNull = _tmp_UserSession_nullCount === 13; var $receiver = new UserSessionAndPerson(); if (!_tmp_Person_isAllNull) { var $receiver_0 = new Person(); $receiver_0.personUid = _tmp_personUid; $receiver_0.username = _tmp_username; $receiver_0.firstNames = _tmp_firstNames; $receiver_0.lastName = _tmp_lastName; $receiver_0.emailAddr = _tmp_emailAddr; $receiver_0.phoneNum = _tmp_phoneNum; $receiver_0.gender = _tmp_gender; $receiver_0.active = _tmp_active; $receiver_0.admin = _tmp_admin; $receiver_0.personNotes = _tmp_personNotes; $receiver_0.fatherName = _tmp_fatherName; $receiver_0.fatherNumber = _tmp_fatherNumber; $receiver_0.motherName = _tmp_motherName; $receiver_0.motherNum = _tmp_motherNum; $receiver_0.dateOfBirth = _tmp_dateOfBirth; $receiver_0.personAddress = _tmp_personAddress; $receiver_0.personOrgId = _tmp_personOrgId; $receiver_0.personGroupUid = _tmp_personGroupUid; $receiver_0.personMasterChangeSeqNum = _tmp_personMasterChangeSeqNum; $receiver_0.personLocalChangeSeqNum = _tmp_personLocalChangeSeqNum; $receiver_0.personLastChangedBy = _tmp_personLastChangedBy; $receiver_0.personLct = _tmp_personLct; $receiver_0.personCountry = _tmp_personCountry; $receiver_0.personType = _tmp_personType; $receiver.person = $receiver_0; } if (!_tmp_UserSession_isAllNull) { var $receiver_1 = new UserSession(); $receiver_1.usUid = _tmp_usUid; $receiver_1.usPcsn = _tmp_usPcsn; $receiver_1.usLcsn = _tmp_usLcsn; $receiver_1.usLcb = _tmp_usLcb; $receiver_1.usLct = _tmp_usLct; $receiver_1.usPersonUid = _tmp_usPersonUid; $receiver_1.usClientNodeId = _tmp_usClientNodeId; $receiver_1.usStartTime = _tmp_usStartTime; $receiver_1.usEndTime = _tmp_usEndTime; $receiver_1.usStatus = _tmp_usStatus; $receiver_1.usReason = _tmp_usReason; $receiver_1.usAuth = _tmp_usAuth; $receiver_1.usSessionType = _tmp_usSessionType; $receiver.userSession = $receiver_1; } return $receiver; }; } function UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda$lambda(_result) { return mapRows(_result, UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda$lambda$lambda(_result)); } function Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda; Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } UserSessionDao_JdbcKt.prototype.findAllLocalSessionsAsync = function (continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT UserSession.*, Person.*\n | FROM UserSession\n | JOIN Person ON UserSession.usPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = (\n | SELECT COALESCE(\n | (SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1), 0))\n | AND UserSession.usStatus = 1 \n | \n ')), UserSessionDao_JdbcKt$findAllLocalSessionsAsync$lambda, continuation); }; function UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda$lambda(_result) { return mapNextRow(_result, 0, UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda$lambda$lambda(_result)); } function Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda(closure$maxDateOfBirth_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$maxDateOfBirth = closure$maxDateOfBirth_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda; Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$maxDateOfBirth); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$maxDateOfBirth); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda(closure$maxDateOfBirth_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda(closure$maxDateOfBirth_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } UserSessionDao_JdbcKt.prototype.countAllLocalSessionsAsync_s8cxhz$ = function (maxDateOfBirth, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT COUNT(*)\n | FROM UserSession\n | JOIN Person \n | ON UserSession.usPersonUid = Person.personUid\n | WHERE UserSession.usClientNodeId = (\n | SELECT COALESCE(\n | (SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1), 0))\n | AND UserSession.usStatus = 1 \n | AND (? = 0 OR Person.dateOfBirth < ?) \n | \n ')), UserSessionDao_JdbcKt$countAllLocalSessionsAsync$lambda(maxDateOfBirth), continuation); }; function Coroutine$UserSessionDao_JdbcKt$endSession$lambda(closure$newStatus_0, closure$reason_0, closure$sessionUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newStatus = closure$newStatus_0; this.local$closure$reason = closure$reason_0; this.local$closure$sessionUid = closure$sessionUid_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$endSession$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$endSession$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$endSession$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$endSession$lambda; Coroutine$UserSessionDao_JdbcKt$endSession$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$newStatus); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$reason); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$sessionUid); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$endSession$lambda(closure$newStatus_0, closure$reason_0, closure$sessionUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$endSession$lambda(closure$newStatus_0, closure$reason_0, closure$sessionUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$endSession_liip7b$($this, sessionUid_0, newStatus_0, reason_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sessionUid = sessionUid_0; this.local$newStatus = newStatus_0; this.local$reason = reason_0; } Coroutine$endSession_liip7b$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$endSession_liip7b$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$endSession_liip7b$.prototype.constructor = Coroutine$endSession_liip7b$; Coroutine$endSession_liip7b$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE UserSession\n | SET usAuth = null,\n | usStatus = ?,\n | usReason = ?,\n | usLcb = COALESCE(\n | (SELECT nodeClientId\n | FROM SyncNode\n | LIMIT 1), 0)\n | WHERE UserSession.usUid = ? \n | \n | \n ')), UserSessionDao_JdbcKt$endSession$lambda(this.local$newStatus, this.local$reason, this.local$sessionUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.endSession_liip7b$ = function (sessionUid_0, newStatus_0, reason_0, continuation_0, suspended) { var instance = new Coroutine$endSession_liip7b$(this, sessionUid_0, newStatus_0, reason_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function UserSessionDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_usUid = closure$_result.getLong_61zpoe$('usUid'); var _tmp_usPcsn = closure$_result.getLong_61zpoe$('usPcsn'); var _tmp_usLcsn = closure$_result.getLong_61zpoe$('usLcsn'); var _tmp_usLcb = closure$_result.getInt_61zpoe$('usLcb'); var _tmp_usLct = closure$_result.getLong_61zpoe$('usLct'); var _tmp_usPersonUid = closure$_result.getLong_61zpoe$('usPersonUid'); var _tmp_usClientNodeId = closure$_result.getLong_61zpoe$('usClientNodeId'); var _tmp_usStartTime = closure$_result.getLong_61zpoe$('usStartTime'); var _tmp_usEndTime = closure$_result.getLong_61zpoe$('usEndTime'); var _tmp_usStatus = closure$_result.getInt_61zpoe$('usStatus'); var _tmp_usReason = closure$_result.getInt_61zpoe$('usReason'); var _tmp_usAuth = closure$_result.getString_61zpoe$('usAuth'); var _tmp_usSessionType = closure$_result.getInt_61zpoe$('usSessionType'); var $receiver = new UserSession(); $receiver.usUid = _tmp_usUid; $receiver.usPcsn = _tmp_usPcsn; $receiver.usLcsn = _tmp_usLcsn; $receiver.usLcb = _tmp_usLcb; $receiver.usLct = _tmp_usLct; $receiver.usPersonUid = _tmp_usPersonUid; $receiver.usClientNodeId = _tmp_usClientNodeId; $receiver.usStartTime = _tmp_usStartTime; $receiver.usEndTime = _tmp_usEndTime; $receiver.usStatus = _tmp_usStatus; $receiver.usReason = _tmp_usReason; $receiver.usAuth = _tmp_usAuth; $receiver.usSessionType = _tmp_usSessionType; return $receiver; }; } function UserSessionDao_JdbcKt$findByUidLive$lambda$lambda$lambda(_result) { return mapNextRow(_result, null, UserSessionDao_JdbcKt$findByUidLive$lambda$lambda$lambda$lambda(_result)); } function Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda(closure$sessionUid_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$sessionUid = closure$sessionUid_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda; Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$sessionUid); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findByUidLive$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findByUidLive$lambda$lambda(closure$sessionUid_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda$lambda(closure$sessionUid_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda(this$UserSessionDao_JdbcKt_0, closure$sessionUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$UserSessionDao_JdbcKt = this$UserSessionDao_JdbcKt_0; this.local$closure$sessionUid = closure$sessionUid_0; } Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda; Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$UserSessionDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT UserSession.*\n | FROM UserSession\n | WHERE UserSession.usUid = ?\n | LIMIT 1\n | \n ')), UserSessionDao_JdbcKt$findByUidLive$lambda$lambda(this.local$closure$sessionUid), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findByUidLive$lambda(this$UserSessionDao_JdbcKt_0, closure$sessionUid_0) { return function (continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findByUidLive$lambda(this$UserSessionDao_JdbcKt_0, closure$sessionUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } UserSessionDao_JdbcKt.prototype.findByUidLive_s8cxhz$ = function (sessionUid) { return new LiveDataImpl(this._db, listOf_0('UserSession'), UserSessionDao_JdbcKt$findByUidLive$lambda(this, sessionUid)); }; function Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda(closure$newStatus_0, closure$reason_0, closure$changeTime_0, closure$personUid_0, closure$exemptNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newStatus = closure$newStatus_0; this.local$closure$reason = closure$reason_0; this.local$closure$changeTime = closure$changeTime_0; this.local$closure$personUid = closure$personUid_0; this.local$closure$exemptNodeId = closure$exemptNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda; Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setInt_vux9f0$(1, this.local$closure$newStatus); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$reason); this.local$_stmt.setLong_6svq3l$(3, this.local$closure$changeTime); this.local$_stmt.setLong_6svq3l$(4, this.local$closure$personUid); this.local$_stmt.setLong_6svq3l$(5, this.local$closure$exemptNodeId); this.local$_stmt.setInt_vux9f0$(6, this.local$closure$newStatus); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$endOtherSessions$lambda(closure$newStatus_0, closure$reason_0, closure$changeTime_0, closure$personUid_0, closure$exemptNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$endOtherSessions$lambda(closure$newStatus_0, closure$reason_0, closure$changeTime_0, closure$personUid_0, closure$exemptNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$endOtherSessions_d2c2sj$($this, personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$exemptNodeId = exemptNodeId_0; this.local$newStatus = newStatus_0; this.local$reason = reason_0; this.local$changeTime = changeTime_0; } Coroutine$endOtherSessions_d2c2sj$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$endOtherSessions_d2c2sj$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$endOtherSessions_d2c2sj$.prototype.constructor = Coroutine$endOtherSessions_d2c2sj$; Coroutine$endOtherSessions_d2c2sj$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | UPDATE UserSession\n | SET usAuth = null,\n | usStatus = ?,\n | usReason = ?,\n | usLct = ?\n | WHERE usPersonUid = ?\n | AND usClientNodeId != ?\n | AND usStatus != ? \n | \n ')), UserSessionDao_JdbcKt$endOtherSessions$lambda(this.local$newStatus, this.local$reason, this.local$changeTime, this.local$personUid, this.local$exemptNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_JdbcKt.prototype.endOtherSessions_d2c2sj$ = function (personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$endOtherSessions_d2c2sj$(this, personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda$lambda(_result) { return mapRows(_result, UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda$lambda$lambda(_result)); } function Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda(closure$personUids_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$personUids = closure$personUids_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda; Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$personUids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda(closure$personUids_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda(closure$personUids_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } UserSessionDao_JdbcKt.prototype.findActiveNodeIdsByPersonUids_gox9k8$ = function (personUids, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT DISTINCT UserSession.usClientNodeId\n | FROM UserSession\n | WHERE UserSession.usPersonUid IN (?)\n | AND UserSession.usStatus = 1\n | \n '), true), UserSessionDao_JdbcKt$findActiveNodeIdsByPersonUids$lambda(personUids), continuation); }; function UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda$lambda(_result) { return mapRows(_result, UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda$lambda$lambda(_result)); } function Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda(closure$groupUids_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$groupUids = closure$groupUids_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda; Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$groupUids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda(closure$groupUids_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda(closure$groupUids_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } UserSessionDao_JdbcKt.prototype.findActiveNodesIdsByGroupUids_gox9k8$ = function (groupUids, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT DISTINCT UserSession.usClientNodeId\n | FROM UserSession\n | JOIN PersonGroupMember \n | ON PersonGroupMember.groupMemberPersonUid = UserSession.usPersonUid\n | WHERE PersonGroupMember.groupMemberGroupUid IN (?) \n | \n '), true), UserSessionDao_JdbcKt$findActiveNodesIdsByGroupUids$lambda(groupUids), continuation); }; function UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda$lambda(_result) { return mapRows(_result, UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda$lambda$lambda(_result)); } function Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda(closure$clazzUids_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$clazzUids = closure$clazzUids_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda; Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$clazzUids))); this.local$_stmt.setArray_wqp8hw$(2, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$clazzUids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda(closure$clazzUids_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda(closure$clazzUids_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } UserSessionDao_JdbcKt.prototype.findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$ = function (clazzUids, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT UserSession.usClientNodeId\n | FROM ScopedGrant\n | JOIN PersonGroupMember \n | ON PersonGroupMember.groupMemberGroupUid = ScopedGrant.sgGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | WHERE (ScopedGrant.sgTableId = 6 AND ScopedGrant.sgEntityUid IN (?))\n | OR (ScopedGrant.sgTableId = 164 AND ScopedGrant.sgEntityUid IN \n | (SELECT clazzSchoolUid\n | FROM Clazz\n | WHERE clazzUid IN (?)))\n | \n | \n '), true), UserSessionDao_JdbcKt$findAllActiveNodeIdsWithClazzBasedPermission$lambda(clazzUids), continuation); }; function UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda$lambda(_result) { return mapRows(_result, UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda$lambda$lambda(_result)); } function Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda(closure$schoolUids_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$schoolUids = closure$schoolUids_0; this.local$_stmt = _stmt_0; } Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda.prototype.constructor = Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda; Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$schoolUids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda(closure$schoolUids_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda(closure$schoolUids_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } UserSessionDao_JdbcKt.prototype.findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$ = function (schoolUids, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig(trimMargin('\n |\n | SELECT UserSession.usClientNodeId\n | FROM ScopedGrant\n | JOIN PersonGroupMember \n | ON PersonGroupMember.groupMemberGroupUid = ScopedGrant.sgGroupUid\n | JOIN UserSession\n | ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n | WHERE ScopedGrant.sgTableId = 164 \n | AND ScopedGrant.sgEntityUid IN (?) \n | \n '), true), UserSessionDao_JdbcKt$findAllActiveNodeIdsWithSchoolBasedPermission$lambda(schoolUids), continuation); }; function UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO UserSession (usUid, usPcsn, usLcsn, usLcb, usLct, usPersonUid, usClientNodeId, usStartTime, usEndTime, usStatus, usReason, usAuth, usSessionType) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.usUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.usUid); } stmt.setLong_6svq3l$(2, entity.usPcsn); stmt.setLong_6svq3l$(3, entity.usLcsn); stmt.setInt_vux9f0$(4, entity.usLcb); stmt.setLong_6svq3l$(5, entity.usLct); stmt.setLong_6svq3l$(6, entity.usPersonUid); stmt.setLong_6svq3l$(7, entity.usClientNodeId); stmt.setLong_6svq3l$(8, entity.usStartTime); stmt.setLong_6svq3l$(9, entity.usEndTime); stmt.setInt_vux9f0$(10, entity.usStatus); stmt.setInt_vux9f0$(11, entity.usReason); stmt.setString_vqvrqt$(12, entity.usAuth); stmt.setInt_vux9f0$(13, entity.usSessionType); }; UserSessionDao_JdbcKt$_insertAdapterUserSession_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; UserSessionDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'UserSessionDao_JdbcKt', interfaces: [UserSessionDao]}; function UserSessionDao_ReplicateWrapper(_db, _dao) { UserSessionDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$updateReplicationTrackers_0($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$updateReplicationTrackers_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateReplicationTrackers_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateReplicationTrackers_0.prototype.constructor = Coroutine$updateReplicationTrackers_0; Coroutine$updateReplicationTrackers_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateReplicationTrackers(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_ReplicateWrapper.prototype.updateReplicationTrackers = function (continuation_0, suspended) { var instance = new Coroutine$updateReplicationTrackers_0(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0.prototype.constructor = Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0; Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.updateReplicationTrackersOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_ReplicateWrapper.prototype.updateReplicationTrackersOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_0(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertSession_g3losl$_0($this, session_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$session = session_0; } Coroutine$insertSession_g3losl$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertSession_g3losl$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertSession_g3losl$_0.prototype.constructor = Coroutine$insertSession_g3losl$_0; Coroutine$insertSession_g3losl$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$session.usUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(679, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$session.usUid = _newPk; this.state_0 = 3; continue; case 3: this.local$session.usLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertSession_g3losl$(this.local$session, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$session.usUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_ReplicateWrapper.prototype.insertSession_g3losl$ = function (session_0, continuation_0, suspended) { var instance = new Coroutine$insertSession_g3losl$_0(this, session_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UserSessionDao_ReplicateWrapper.prototype.findSessionsByPerson_s8cxhz$ = function (personUid, continuation) { return this._dao_0.findSessionsByPerson_s8cxhz$(personUid, continuation); }; UserSessionDao_ReplicateWrapper.prototype.findAllLocalSessionsLive = function () { return this._dao_0.findAllLocalSessionsLive(); }; UserSessionDao_ReplicateWrapper.prototype.findAllLocalSessionsAsync = function (continuation) { return this._dao_0.findAllLocalSessionsAsync(continuation); }; UserSessionDao_ReplicateWrapper.prototype.countAllLocalSessionsAsync_s8cxhz$ = function (maxDateOfBirth, continuation) { return this._dao_0.countAllLocalSessionsAsync_s8cxhz$(maxDateOfBirth, continuation); }; function Coroutine$endSession_liip7b$_0($this, sessionUid_0, newStatus_0, reason_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sessionUid = sessionUid_0; this.local$newStatus = newStatus_0; this.local$reason = reason_0; } Coroutine$endSession_liip7b$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$endSession_liip7b$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$endSession_liip7b$_0.prototype.constructor = Coroutine$endSession_liip7b$_0; Coroutine$endSession_liip7b$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.endSession_liip7b$(this.local$sessionUid, this.local$newStatus, this.local$reason, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_ReplicateWrapper.prototype.endSession_liip7b$ = function (sessionUid_0, newStatus_0, reason_0, continuation_0, suspended) { var instance = new Coroutine$endSession_liip7b$_0(this, sessionUid_0, newStatus_0, reason_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UserSessionDao_ReplicateWrapper.prototype.findByUidLive_s8cxhz$ = function (sessionUid) { return this._dao_0.findByUidLive_s8cxhz$(sessionUid); }; function Coroutine$endOtherSessions_d2c2sj$_0($this, personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$exemptNodeId = exemptNodeId_0; this.local$newStatus = newStatus_0; this.local$reason = reason_0; this.local$changeTime = changeTime_0; } Coroutine$endOtherSessions_d2c2sj$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$endOtherSessions_d2c2sj$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$endOtherSessions_d2c2sj$_0.prototype.constructor = Coroutine$endOtherSessions_d2c2sj$_0; Coroutine$endOtherSessions_d2c2sj$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.endOtherSessions_d2c2sj$(this.local$personUid, this.local$exemptNodeId, this.local$newStatus, this.local$reason, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_ReplicateWrapper.prototype.endOtherSessions_d2c2sj$ = function (personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$endOtherSessions_d2c2sj$_0(this, personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UserSessionDao_ReplicateWrapper.prototype.findActiveNodeIdsByPersonUids_gox9k8$ = function (personUids, continuation) { return this._dao_0.findActiveNodeIdsByPersonUids_gox9k8$(personUids, continuation); }; UserSessionDao_ReplicateWrapper.prototype.findActiveNodesIdsByGroupUids_gox9k8$ = function (groupUids, continuation) { return this._dao_0.findActiveNodesIdsByGroupUids_gox9k8$(groupUids, continuation); }; UserSessionDao_ReplicateWrapper.prototype.findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$ = function (clazzUids, continuation) { return this._dao_0.findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$(clazzUids, continuation); }; UserSessionDao_ReplicateWrapper.prototype.findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$ = function (schoolUids, continuation) { return this._dao_0.findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$(schoolUids, continuation); }; UserSessionDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'UserSessionDao_ReplicateWrapper', interfaces: [UserSessionDao]}; function UserSessionDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { UserSessionDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$updateReplicationTrackers_1($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$updateReplicationTrackers_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateReplicationTrackers_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateReplicationTrackers_1.prototype.constructor = Coroutine$updateReplicationTrackers_1; Coroutine$updateReplicationTrackers_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateReplicationTrackers(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.updateReplicationTrackers = function (continuation_0, suspended) { var instance = new Coroutine$updateReplicationTrackers_1(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1.prototype.constructor = Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1; Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.updateReplicationTrackersOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.updateReplicationTrackersOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$updateReplicationTrackersOnNewNode_s8cxhz$_1(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$insertSession_g3losl$_1($this, session_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$session = session_0; } Coroutine$insertSession_g3losl$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertSession_g3losl$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertSession_g3losl$_1.prototype.constructor = Coroutine$insertSession_g3losl$_1; Coroutine$insertSession_g3losl$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertSession_g3losl$(this.local$session, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.insertSession_g3losl$ = function (session_0, continuation_0, suspended) { var instance = new Coroutine$insertSession_g3losl$_1(this, session_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findSessionsByPerson_s8cxhz$($this, personUid_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; } Coroutine$findSessionsByPerson_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findSessionsByPerson_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findSessionsByPerson_s8cxhz$.prototype.constructor = Coroutine$findSessionsByPerson_s8cxhz$; Coroutine$findSessionsByPerson_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findSessionsByPerson_s8cxhz$(this.local$personUid, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.findSessionsByPerson_s8cxhz$ = function (personUid_0, continuation_0, suspended) { var instance = new Coroutine$findSessionsByPerson_s8cxhz$(this, personUid_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UserSessionDao_Repo.prototype.findAllLocalSessionsLive = function () { var _result = this._dao.findAllLocalSessionsLive(); return _result; }; function Coroutine$findAllLocalSessionsAsync($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$findAllLocalSessionsAsync.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllLocalSessionsAsync.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllLocalSessionsAsync.prototype.constructor = Coroutine$findAllLocalSessionsAsync; Coroutine$findAllLocalSessionsAsync.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllLocalSessionsAsync(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.findAllLocalSessionsAsync = function (continuation_0, suspended) { var instance = new Coroutine$findAllLocalSessionsAsync(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$countAllLocalSessionsAsync_s8cxhz$($this, maxDateOfBirth_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$maxDateOfBirth = maxDateOfBirth_0; } Coroutine$countAllLocalSessionsAsync_s8cxhz$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$countAllLocalSessionsAsync_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$countAllLocalSessionsAsync_s8cxhz$.prototype.constructor = Coroutine$countAllLocalSessionsAsync_s8cxhz$; Coroutine$countAllLocalSessionsAsync_s8cxhz$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.countAllLocalSessionsAsync_s8cxhz$(this.local$maxDateOfBirth, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.countAllLocalSessionsAsync_s8cxhz$ = function (maxDateOfBirth_0, continuation_0, suspended) { var instance = new Coroutine$countAllLocalSessionsAsync_s8cxhz$(this, maxDateOfBirth_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$endSession_liip7b$_1($this, sessionUid_0, newStatus_0, reason_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$sessionUid = sessionUid_0; this.local$newStatus = newStatus_0; this.local$reason = reason_0; } Coroutine$endSession_liip7b$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$endSession_liip7b$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$endSession_liip7b$_1.prototype.constructor = Coroutine$endSession_liip7b$_1; Coroutine$endSession_liip7b$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.endSession_liip7b$(this.local$sessionUid, this.local$newStatus, this.local$reason, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.endSession_liip7b$ = function (sessionUid_0, newStatus_0, reason_0, continuation_0, suspended) { var instance = new Coroutine$endSession_liip7b$_1(this, sessionUid_0, newStatus_0, reason_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UserSessionDao_Repo.prototype.findByUidLive_s8cxhz$ = function (sessionUid) { var _result = this._dao.findByUidLive_s8cxhz$(sessionUid); return _result; }; function Coroutine$endOtherSessions_d2c2sj$_1($this, personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUid = personUid_0; this.local$exemptNodeId = exemptNodeId_0; this.local$newStatus = newStatus_0; this.local$reason = reason_0; this.local$changeTime = changeTime_0; } Coroutine$endOtherSessions_d2c2sj$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$endOtherSessions_d2c2sj$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$endOtherSessions_d2c2sj$_1.prototype.constructor = Coroutine$endOtherSessions_d2c2sj$_1; Coroutine$endOtherSessions_d2c2sj$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.endOtherSessions_d2c2sj$(this.local$personUid, this.local$exemptNodeId, this.local$newStatus, this.local$reason, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.endOtherSessions_d2c2sj$ = function (personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$endOtherSessions_d2c2sj$_1(this, personUid_0, exemptNodeId_0, newStatus_0, reason_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findActiveNodeIdsByPersonUids_gox9k8$($this, personUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$personUids = personUids_0; } Coroutine$findActiveNodeIdsByPersonUids_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findActiveNodeIdsByPersonUids_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findActiveNodeIdsByPersonUids_gox9k8$.prototype.constructor = Coroutine$findActiveNodeIdsByPersonUids_gox9k8$; Coroutine$findActiveNodeIdsByPersonUids_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findActiveNodeIdsByPersonUids_gox9k8$(this.local$personUids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.findActiveNodeIdsByPersonUids_gox9k8$ = function (personUids_0, continuation_0, suspended) { var instance = new Coroutine$findActiveNodeIdsByPersonUids_gox9k8$(this, personUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findActiveNodesIdsByGroupUids_gox9k8$($this, groupUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$groupUids = groupUids_0; } Coroutine$findActiveNodesIdsByGroupUids_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findActiveNodesIdsByGroupUids_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findActiveNodesIdsByGroupUids_gox9k8$.prototype.constructor = Coroutine$findActiveNodesIdsByGroupUids_gox9k8$; Coroutine$findActiveNodesIdsByGroupUids_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findActiveNodesIdsByGroupUids_gox9k8$(this.local$groupUids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.findActiveNodesIdsByGroupUids_gox9k8$ = function (groupUids_0, continuation_0, suspended) { var instance = new Coroutine$findActiveNodesIdsByGroupUids_gox9k8$(this, groupUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$($this, clazzUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$clazzUids = clazzUids_0; } Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$.prototype.constructor = Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$; Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$(this.local$clazzUids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$ = function (clazzUids_0, continuation_0, suspended) { var instance = new Coroutine$findAllActiveNodeIdsWithClazzBasedPermission_gox9k8$(this, clazzUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$($this, schoolUids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$schoolUids = schoolUids_0; } Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$.prototype.constructor = Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$; Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$(this.local$schoolUids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; UserSessionDao_Repo.prototype.findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$ = function (schoolUids_0, continuation_0, suspended) { var instance = new Coroutine$findAllActiveNodeIdsWithSchoolBasedPermission_gox9k8$(this, schoolUids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; UserSessionDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'UserSessionDao_Repo', interfaces: [UserSessionDao]}; function VerbDao() { } VerbDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'VerbDao', interfaces: [BaseDao]}; function VerbDao_JdbcKt(_db) { VerbDao.call(this); this._db = _db; this._insertAdapterVerbEntity_upsert = new VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral(this._db); this._insertAdapterVerbEntity_ = new VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral(this._db); } function Coroutine$replaceList_qj1loj$($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$replaceList_qj1loj$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceList_qj1loj$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceList_qj1loj$.prototype.constructor = Coroutine$replaceList_qj1loj$; Coroutine$replaceList_qj1loj$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterVerbEntity_upsert.insertListAsync_4ezy5m$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_JdbcKt.prototype.replaceList_qj1loj$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$replaceList_qj1loj$(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterVerbEntity_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_163($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_163.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_163.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_163.prototype.constructor = Coroutine$insertAsync_163; Coroutine$insertAsync_163.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterVerbEntity_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_163(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterVerbEntity_.insertList_4ezy5m$(entityList); }; function VerbDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.urlId); _stmt.setBoolean_fzusl$(2, _entity.verbInActive); _stmt.setLong_6svq3l$(3, _entity.verbMasterChangeSeqNum); _stmt.setLong_6svq3l$(4, _entity.verbLocalChangeSeqNum); _stmt.setInt_vux9f0$(5, _entity.verbLastChangedBy); _stmt.setLong_6svq3l$(6, _entity.verbLct); _stmt.setLong_6svq3l$(7, _entity.verbUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } VerbDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE VerbEntity SET urlId = ?, verbInActive = ?, verbMasterChangeSeqNum = ?, verbLocalChangeSeqNum = ?, verbLastChangedBy = ?, verbLct = ? WHERE verbUid = ?'; prepareAndUseStatement(this._db, _sql, VerbDao_JdbcKt$updateList$lambda(entityList)); }; function VerbDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.urlId); _stmt.setBoolean_fzusl$(2, closure$entity.verbInActive); _stmt.setLong_6svq3l$(3, closure$entity.verbMasterChangeSeqNum); _stmt.setLong_6svq3l$(4, closure$entity.verbLocalChangeSeqNum); _stmt.setInt_vux9f0$(5, closure$entity.verbLastChangedBy); _stmt.setLong_6svq3l$(6, closure$entity.verbLct); _stmt.setLong_6svq3l$(7, closure$entity.verbUid); return _stmt.executeUpdate(); }; } VerbDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE VerbEntity SET urlId = ?, verbInActive = ?, verbMasterChangeSeqNum = ?, verbLocalChangeSeqNum = ?, verbLastChangedBy = ?, verbLct = ? WHERE verbUid = ?'; prepareAndUseStatement(this._db, _sql, VerbDao_JdbcKt$update$lambda(entity)); }; function Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_161($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_161.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_161.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_161.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_161; Coroutine$replicateOnNewNode_s8cxhz$_161.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO VerbEntityReplicate(vePk, veDestination)\n | SELECT DISTINCT VerbEntity.verbUid AS vePk,\n | ? AS veDestination\n | FROM VerbEntity\n | WHERE VerbEntity.verbLct != COALESCE(\n | (SELECT veVersionId\n | FROM VerbEntityReplicate\n | WHERE vePk = VerbEntity.verbUid\n | AND veDestination = ?), 0) \n | /*psql ON CONFLICT(vePk, veDestination) DO UPDATE\n | SET vePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO VerbEntityReplicate(vePk, veDestination)\n | SELECT DISTINCT VerbEntity.verbUid AS vePk,\n | ? AS veDestination\n | FROM VerbEntity\n | WHERE VerbEntity.verbLct != COALESCE(\n | (SELECT veVersionId\n | FROM VerbEntityReplicate\n | WHERE vePk = VerbEntity.verbUid\n | AND veDestination = ?), 0) \n | ON CONFLICT(vePk, veDestination) DO UPDATE\n | SET vePending = true\n | \n | \n |')), VerbDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_161(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda; Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_164($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_164.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_164.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_164.prototype.constructor = Coroutine$replicateOnChange_164; Coroutine$replicateOnChange_164.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO VerbEntityReplicate(vePk, veDestination)\n | SELECT DISTINCT VerbEntity.verbUid AS veUid,\n | UserSession.usClientNodeId AS veDestination\n | FROM ChangeLog\n | JOIN VerbEntity\n | ON ChangeLog.chTableId = 62\n | AND ChangeLog.chEntityPk = VerbEntity.verbUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND VerbEntity.verbLct != COALESCE(\n | (SELECT veVersionId\n | FROM VerbEntityReplicate\n | WHERE vePk = VerbEntity.verbUid\n | AND veDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(vePk, veDestination) DO UPDATE\n | SET vePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO VerbEntityReplicate(vePk, veDestination)\n | SELECT DISTINCT VerbEntity.verbUid AS veUid,\n | UserSession.usClientNodeId AS veDestination\n | FROM ChangeLog\n | JOIN VerbEntity\n | ON ChangeLog.chTableId = 62\n | AND ChangeLog.chEntityPk = VerbEntity.verbUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND VerbEntity.verbLct != COALESCE(\n | (SELECT veVersionId\n | FROM VerbEntityReplicate\n | WHERE vePk = VerbEntity.verbUid\n | AND veDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(vePk, veDestination) DO UPDATE\n | SET vePending = true\n | \n | \n |')), VerbDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_164(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function VerbDao_JdbcKt$findByUrl$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_verbUid = closure$_result.getLong_61zpoe$('verbUid'); var _tmp_urlId = closure$_result.getString_61zpoe$('urlId'); var _tmp_verbInActive = closure$_result.getBoolean_61zpoe$('verbInActive'); var _tmp_verbMasterChangeSeqNum = closure$_result.getLong_61zpoe$('verbMasterChangeSeqNum'); var _tmp_verbLocalChangeSeqNum = closure$_result.getLong_61zpoe$('verbLocalChangeSeqNum'); var _tmp_verbLastChangedBy = closure$_result.getInt_61zpoe$('verbLastChangedBy'); var _tmp_verbLct = closure$_result.getLong_61zpoe$('verbLct'); var $receiver = new VerbEntity(); $receiver.verbUid = _tmp_verbUid; $receiver.urlId = _tmp_urlId; $receiver.verbInActive = _tmp_verbInActive; $receiver.verbMasterChangeSeqNum = _tmp_verbMasterChangeSeqNum; $receiver.verbLocalChangeSeqNum = _tmp_verbLocalChangeSeqNum; $receiver.verbLastChangedBy = _tmp_verbLastChangedBy; $receiver.verbLct = _tmp_verbLct; return $receiver; }; } function VerbDao_JdbcKt$findByUrl$lambda$lambda(_result) { return mapNextRow(_result, null, VerbDao_JdbcKt$findByUrl$lambda$lambda$lambda(_result)); } function VerbDao_JdbcKt$findByUrl$lambda(closure$urlId) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$urlId); return useResults(_stmt.executeQuery(), VerbDao_JdbcKt$findByUrl$lambda$lambda); }; } VerbDao_JdbcKt.prototype.findByUrl_pdl1vj$ = function (urlId) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * FROM VerbEntity WHERE urlId = ?'), VerbDao_JdbcKt$findByUrl$lambda(urlId)); }; function VerbDao_JdbcKt$findByUidList$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getLong_za3lpa$(1); }; } function VerbDao_JdbcKt$findByUidList$lambda$lambda(_result) { return mapRows(_result, VerbDao_JdbcKt$findByUidList$lambda$lambda$lambda(_result)); } function Coroutine$VerbDao_JdbcKt$findByUidList$lambda(closure$uidList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uidList = closure$uidList_0; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$findByUidList$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findByUidList$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findByUidList$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findByUidList$lambda; Coroutine$VerbDao_JdbcKt$findByUidList$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, VerbDao_JdbcKt$findByUidList$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findByUidList$lambda(closure$uidList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findByUidList$lambda(closure$uidList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } VerbDao_JdbcKt.prototype.findByUidList_gox9k8$ = function (uidList, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT verbUid FROM VerbEntity WHERE verbUid IN (?)', true), VerbDao_JdbcKt$findByUidList$lambda(uidList), continuation); }; function VerbDao_JdbcKt$findAllVerbsAscList$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_verbUid = closure$_result.getLong_61zpoe$('verbUid'); var _tmp_urlId = closure$_result.getString_61zpoe$('urlId'); var _tmp_display = closure$_result.getString_61zpoe$('display'); var $receiver = new VerbDisplay(); $receiver.verbUid = _tmp_verbUid; $receiver.urlId = _tmp_urlId; $receiver.display = _tmp_display; return $receiver; }; } function VerbDao_JdbcKt$findAllVerbsAscList$lambda$lambda(_result) { return mapRows(_result, VerbDao_JdbcKt$findAllVerbsAscList$lambda$lambda$lambda(_result)); } function VerbDao_JdbcKt$findAllVerbsAscList$lambda(closure$uidList) { return function (_stmt) { _stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(_stmt.getConnection(), 'BIGINT', copyToArray(closure$uidList))); return useResults(_stmt.executeQuery(), VerbDao_JdbcKt$findAllVerbsAscList$lambda$lambda); }; } VerbDao_JdbcKt.prototype.findAllVerbsAscList_gox9k8$ = function (uidList) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display\n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | XLangMapEntry.verbLangMapUid NOT IN (?)\n '), true), VerbDao_JdbcKt$findAllVerbsAscList$lambda(uidList)); }; function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral(this$VerbDao_JdbcKt, closure$uidList) { this.this$VerbDao_JdbcKt = this$VerbDao_JdbcKt; this.closure$uidList = closure$uidList; DataSourceFactory.call(this); } function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_verbUid = closure$_result.getLong_61zpoe$('verbUid'); var _tmp_urlId = closure$_result.getString_61zpoe$('urlId'); var _tmp_display = closure$_result.getString_61zpoe$('display'); var $receiver = new VerbDisplay(); $receiver.verbUid = _tmp_verbUid; $receiver.urlId = _tmp_urlId; $receiver.display = _tmp_display; return $receiver; }; } function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda(closure$uidList_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uidList = closure$uidList_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda(closure$uidList_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda(closure$uidList_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$VerbDao_JdbcKt = this$VerbDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$VerbDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display \n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | VerbEntity.verbUid NOT IN (?) ORDER BY display ASC) LIMIT ? OFFSET ?\n '), true), VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda$lambda(this.local$closure$uidList, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$VerbDao_JdbcKt._db, listOf(['VerbEntity', 'XLangMapEntry']), VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getData$lambda(this.this$VerbDao_JdbcKt, this.closure$uidList, _limit, _offset)); }; function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda(closure$uidList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uidList = closure$uidList_0; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda(closure$uidList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda(closure$uidList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$VerbDao_JdbcKt = this$VerbDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; } Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$VerbDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display \n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | VerbEntity.verbUid NOT IN (?) ORDER BY display ASC) \n '), true), VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda$lambda(this.local$closure$uidList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0) { return function (continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$VerbDao_JdbcKt._db, listOf(['VerbEntity', 'XLangMapEntry']), VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral$getLength$lambda(this.this$VerbDao_JdbcKt, this.closure$uidList)); }; VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; VerbDao_JdbcKt.prototype.findAllVerbsAsc_gox9k8$ = function (uidList) { return new VerbDao_JdbcKt$findAllVerbsAsc$ObjectLiteral(this, uidList); }; function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral(this$VerbDao_JdbcKt, closure$uidList) { this.this$VerbDao_JdbcKt = this$VerbDao_JdbcKt; this.closure$uidList = closure$uidList; DataSourceFactory.call(this); } function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_verbUid = closure$_result.getLong_61zpoe$('verbUid'); var _tmp_urlId = closure$_result.getString_61zpoe$('urlId'); var _tmp_display = closure$_result.getString_61zpoe$('display'); var $receiver = new VerbDisplay(); $receiver.verbUid = _tmp_verbUid; $receiver.urlId = _tmp_urlId; $receiver.display = _tmp_display; return $receiver; }; } function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda$lambda(_result) { return mapRows(_result, VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda$lambda$lambda(_result)); } function Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda(closure$uidList_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uidList = closure$uidList_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.local$_stmt.setInt_vux9f0$(2, this.local$closure$_limit); this.local$_stmt.setInt_vux9f0$(3, this.local$closure$_offset); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda(closure$uidList_0, closure$_limit_0, closure$_offset_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda(closure$uidList_0, closure$_limit_0, closure$_offset_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$VerbDao_JdbcKt = this$VerbDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; this.local$closure$_limit = closure$_limit_0; this.local$closure$_offset = closure$_offset_0; } Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$VerbDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM (SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display \n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | VerbEntity.verbUid NOT IN (?) ORDER BY display DESC) LIMIT ? OFFSET ?\n '), true), VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda$lambda(this.local$closure$uidList, this.local$closure$_limit, this.local$closure$_offset), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0) { return function (continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, closure$_limit_0, closure$_offset_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral.prototype.getData_vux9f0$ = function (_offset, _limit) { return new LiveDataImpl(this.this$VerbDao_JdbcKt._db, listOf(['VerbEntity', 'XLangMapEntry']), VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getData$lambda(this.this$VerbDao_JdbcKt, this.closure$uidList, _limit, _offset)); }; function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(closure$_result) { return function (it) { return closure$_result.getInt_za3lpa$(1); }; } function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda$lambda(_result) { return mapNextRow(_result, 0, VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda$lambda$lambda(_result)); } function Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda(closure$uidList_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$uidList = closure$uidList_0; this.local$_stmt = _stmt_0; } Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'BIGINT', copyToArray(this.local$closure$uidList))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda(closure$uidList_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda(closure$uidList_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$this$VerbDao_JdbcKt = this$VerbDao_JdbcKt_0; this.local$closure$uidList = closure$uidList_0; } Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda.prototype.constructor = Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda; Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.local$this$VerbDao_JdbcKt._db, new PreparedStatementConfig(trimMargin('\n |SELECT COUNT(*) FROM (SELECT VerbEntity.verbUid, VerbEntity.urlId, XLangMapEntry.valueLangMap AS display \n | FROM VerbEntity LEFT JOIN XLangMapEntry on XLangMapEntry.verbLangMapUid = VerbEntity.verbUid WHERE \n | VerbEntity.verbUid NOT IN (?) ORDER BY display DESC) \n '), true), VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda$lambda(this.local$closure$uidList), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0) { return function (continuation_0, suspended) { var instance = new Coroutine$VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda(this$VerbDao_JdbcKt_0, closure$uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral.prototype.getLength = function () { return new LiveDataImpl(this.this$VerbDao_JdbcKt._db, listOf(['VerbEntity', 'XLangMapEntry']), VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral$getLength$lambda(this.this$VerbDao_JdbcKt, this.closure$uidList)); }; VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [DataSourceFactory]}; VerbDao_JdbcKt.prototype.findAllVerbsDesc_gox9k8$ = function (uidList) { return new VerbDao_JdbcKt$findAllVerbsDesc$ObjectLiteral(this, uidList); }; function VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT OR REPLACE INTO VerbEntity (verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; }; VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.verbUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.verbUid); } stmt.setString_vqvrqt$(2, entity.urlId); stmt.setBoolean_fzusl$(3, entity.verbInActive); stmt.setLong_6svq3l$(4, entity.verbMasterChangeSeqNum); stmt.setLong_6svq3l$(5, entity.verbLocalChangeSeqNum); stmt.setInt_vux9f0$(6, entity.verbLastChangedBy); stmt.setLong_6svq3l$(7, entity.verbLct); }; VerbDao_JdbcKt$_insertAdapterVerbEntity_upsert$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; function VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO VerbEntity (verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES(?, ?, ?, ?, ?, ?, ?)'; }; VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.verbUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.verbUid); } stmt.setString_vqvrqt$(2, entity.urlId); stmt.setBoolean_fzusl$(3, entity.verbInActive); stmt.setLong_6svq3l$(4, entity.verbMasterChangeSeqNum); stmt.setLong_6svq3l$(5, entity.verbLocalChangeSeqNum); stmt.setInt_vux9f0$(6, entity.verbLastChangedBy); stmt.setLong_6svq3l$(7, entity.verbLct); }; VerbDao_JdbcKt$_insertAdapterVerbEntity_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; VerbDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'VerbDao_JdbcKt', interfaces: [VerbDao]}; function VerbDao_ReplicateWrapper(_db, _dao) { VerbDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_162($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_162.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_162.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_162.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_162; Coroutine$replicateOnNewNode_s8cxhz$_162.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_162(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_165($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_165.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_165.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_165.prototype.constructor = Coroutine$replicateOnChange_165; Coroutine$replicateOnChange_165.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_165(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_ReplicateWrapper.prototype.findByUrl_pdl1vj$ = function (urlId) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; VerbDao_ReplicateWrapper.prototype.findByUidList_gox9k8$ = function (uidList, continuation) { return this._dao_0.findByUidList_gox9k8$(uidList, continuation); }; function Coroutine$replaceList_qj1loj$_0($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$_pkManager = void 0; this.local$_generatedPks = void 0; this.local$$receiver = void 0; this.local$element = void 0; this.local$entityList = entityList_0; } Coroutine$replaceList_qj1loj$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceList_qj1loj$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceList_qj1loj$_0.prototype.constructor = Coroutine$replaceList_qj1loj$_0; Coroutine$replaceList_qj1loj$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); this.local$_generatedPks = ArrayList_init(); this.local$$receiver = this.local$entityList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$$receiver.hasNext()) { this.state_0 = 5; continue; } this.local$element = this.local$$receiver.next(); if (equals(this.local$element.verbUid, L0)) { this.state_0 = 3; this.result_0 = this.local$_pkManager.nextIdAsync_za3lpa$(62, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 4; continue; } case 3: var _newPk = this.result_0; this.local$element.verbUid = _newPk; this.local$_generatedPks.add_11rb$(_newPk); this.state_0 = 4; continue; case 4: this.local$element.verbLct = systemTimeInMillis(); this.state_0 = 2; continue; case 5: this.state_0 = 6; this.result_0 = this.$this._dao_0.replaceList_qj1loj$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 6: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_ReplicateWrapper.prototype.replaceList_qj1loj$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$replaceList_qj1loj$_0(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_ReplicateWrapper.prototype.findAllVerbsAscList_gox9k8$ = function (uidList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; VerbDao_ReplicateWrapper.prototype.findAllVerbsAsc_gox9k8$ = function (uidList) { return this._dao_0.findAllVerbsAsc_gox9k8$(uidList); }; VerbDao_ReplicateWrapper.prototype.findAllVerbsDesc_gox9k8$ = function (uidList) { return this._dao_0.findAllVerbsDesc_gox9k8$(uidList); }; VerbDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_164($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_164.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_164.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_164.prototype.constructor = Coroutine$insertAsync_164; Coroutine$insertAsync_164.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.verbUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(62, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.verbUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.verbLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.verbUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_164(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; VerbDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; VerbDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; VerbDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'VerbDao_ReplicateWrapper', interfaces: [VerbDao]}; function VerbDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { VerbDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_163($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_163.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_163.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_163.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_163; Coroutine$replicateOnNewNode_s8cxhz$_163.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_163(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_166($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_166.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_166.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_166.prototype.constructor = Coroutine$replicateOnChange_166; Coroutine$replicateOnChange_166.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_166(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_Repo.prototype.findByUrl_pdl1vj$ = function (urlId) { var _result = this._dao.findByUrl_pdl1vj$(urlId); return _result; }; function Coroutine$findByUidList_gox9k8$_0($this, uidList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$uidList = uidList_0; } Coroutine$findByUidList_gox9k8$_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$findByUidList_gox9k8$_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$findByUidList_gox9k8$_0.prototype.constructor = Coroutine$findByUidList_gox9k8$_0; Coroutine$findByUidList_gox9k8$_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.findByUidList_gox9k8$(this.local$uidList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_Repo.prototype.findByUidList_gox9k8$ = function (uidList_0, continuation_0, suspended) { var instance = new Coroutine$findByUidList_gox9k8$_0(this, uidList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replaceList_qj1loj$_1($this, entityList_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entityList = entityList_0; } Coroutine$replaceList_qj1loj$_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replaceList_qj1loj$_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replaceList_qj1loj$_1.prototype.constructor = Coroutine$replaceList_qj1loj$_1; Coroutine$replaceList_qj1loj$_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replaceList_qj1loj$(this.local$entityList, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_Repo.prototype.replaceList_qj1loj$ = function (entityList_0, continuation_0, suspended) { var instance = new Coroutine$replaceList_qj1loj$_1(this, entityList_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_Repo.prototype.findAllVerbsAscList_gox9k8$ = function (uidList) { var _result = this._dao.findAllVerbsAscList_gox9k8$(uidList); return _result; }; VerbDao_Repo.prototype.findAllVerbsAsc_gox9k8$ = function (uidList) { var _result = this._dao.findAllVerbsAsc_gox9k8$(uidList); return _result; }; VerbDao_Repo.prototype.findAllVerbsDesc_gox9k8$ = function (uidList) { var _result = this._dao.findAllVerbsDesc_gox9k8$(uidList); return _result; }; VerbDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_165($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_165.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_165.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_165.prototype.constructor = Coroutine$insertAsync_165; Coroutine$insertAsync_165.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; VerbDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_165(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; VerbDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; VerbDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; VerbDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; VerbDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'VerbDao_Repo', interfaces: [VerbDao]}; function XLangMapEntryDao() { } XLangMapEntryDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'XLangMapEntryDao', interfaces: [BaseDao]}; function XLangMapEntryDao_JdbcKt(_db) { XLangMapEntryDao.call(this); this._db = _db; this._insertAdapterXLangMapEntry_ = new XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral(this._db); } XLangMapEntryDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterXLangMapEntry_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_166($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_166.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_166.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_166.prototype.constructor = Coroutine$insertAsync_166; Coroutine$insertAsync_166.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterXLangMapEntry_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_166(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XLangMapEntryDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterXLangMapEntry_.insertList_4ezy5m$(entityList); }; function XLangMapEntryDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setLong_6svq3l$(1, _entity.verbLangMapUid); _stmt.setLong_6svq3l$(2, _entity.objectLangMapUid); _stmt.setLong_6svq3l$(3, _entity.languageLangMapUid); _stmt.setLong_6svq3l$(4, _entity.languageVariantLangMapUid); _stmt.setString_vqvrqt$(5, _entity.valueLangMap); _stmt.setInt_vux9f0$(6, _entity.statementLangMapMasterCsn); _stmt.setInt_vux9f0$(7, _entity.statementLangMapLocalCsn); _stmt.setInt_vux9f0$(8, _entity.statementLangMapLcb); _stmt.setLong_6svq3l$(9, _entity.statementLangMapLct); _stmt.setLong_6svq3l$(10, _entity.statementLangMapUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } XLangMapEntryDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE XLangMapEntry SET verbLangMapUid = ?, objectLangMapUid = ?, languageLangMapUid = ?, languageVariantLangMapUid = ?, valueLangMap = ?, statementLangMapMasterCsn = ?, statementLangMapLocalCsn = ?, statementLangMapLcb = ?, statementLangMapLct = ? WHERE statementLangMapUid = ?'; prepareAndUseStatement(this._db, _sql, XLangMapEntryDao_JdbcKt$updateList$lambda(entityList)); }; function XLangMapEntryDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$entity.verbLangMapUid); _stmt.setLong_6svq3l$(2, closure$entity.objectLangMapUid); _stmt.setLong_6svq3l$(3, closure$entity.languageLangMapUid); _stmt.setLong_6svq3l$(4, closure$entity.languageVariantLangMapUid); _stmt.setString_vqvrqt$(5, closure$entity.valueLangMap); _stmt.setInt_vux9f0$(6, closure$entity.statementLangMapMasterCsn); _stmt.setInt_vux9f0$(7, closure$entity.statementLangMapLocalCsn); _stmt.setInt_vux9f0$(8, closure$entity.statementLangMapLcb); _stmt.setLong_6svq3l$(9, closure$entity.statementLangMapLct); _stmt.setLong_6svq3l$(10, closure$entity.statementLangMapUid); return _stmt.executeUpdate(); }; } XLangMapEntryDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE XLangMapEntry SET verbLangMapUid = ?, objectLangMapUid = ?, languageLangMapUid = ?, languageVariantLangMapUid = ?, valueLangMap = ?, statementLangMapMasterCsn = ?, statementLangMapLocalCsn = ?, statementLangMapLcb = ?, statementLangMapLct = ? WHERE statementLangMapUid = ?'; prepareAndUseStatement(this._db, _sql, XLangMapEntryDao_JdbcKt$update$lambda(entity)); }; function Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_164($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_164.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_164.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_164.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_164; Coroutine$replicateOnNewNode_s8cxhz$_164.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO XLangMapEntryReplicate(xlmePk, xlmeDestination)\n | SELECT DISTINCT XLangMapEntry.statementLangMapUid AS xlmePk,\n | ? AS xlmeDestination\n | FROM XLangMapEntry\n | JOIN UserSession ON UserSession.usClientNodeId = ?\n | --notpsql \n | WHERE XLangMapEntry.statementLangMapLct != COALESCE(\n | (SELECT xlmeVersionId\n | FROM XLangMapEntryReplicate\n | WHERE xlmePk = XLangMapEntry.statementLangMapUid\n | AND xlmeDestination = UserSession.usClientNodeId), 0)\n | --endnotpsql \n | /*psql ON CONFLICT(xlmePk, xlmeDestination) DO UPDATE\n | SET xlmePending = (SELECT XLangMapEntry.statementLangMapLct\n | FROM XLangmapEntry\n | WHERE XLangmapEntry.statementLangMapUid = EXCLUDED.xlmePk)\n | != XLangMapEntryReplicate.xlmeVersionId\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO XLangMapEntryReplicate(xlmePk, xlmeDestination)\n | SELECT DISTINCT XLangMapEntry.statementLangMapUid AS xlmePk,\n | ? AS xlmeDestination\n | FROM XLangMapEntry\n | JOIN UserSession ON UserSession.usClientNodeId = ?\n | ON CONFLICT(xlmePk, xlmeDestination) DO UPDATE\n | SET xlmePending = (SELECT XLangMapEntry.statementLangMapLct\n | FROM XLangmapEntry\n | WHERE XLangmapEntry.statementLangMapUid = EXCLUDED.xlmePk)\n | != XLangMapEntryReplicate.xlmeVersionId\n | \n | \n |')), XLangMapEntryDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_164(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda; Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function XLangMapEntryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$XLangMapEntryDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_167($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_167.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_167.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_167.prototype.constructor = Coroutine$replicateOnChange_167; Coroutine$replicateOnChange_167.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO XLangMapEntryReplicate(xlmePk, xlmeDestination)\n | SELECT DISTINCT XLangMapEntry.statementLangMapUid AS xlmeUid,\n | UserSession.usClientNodeId AS xlmeDestination\n | FROM ChangeLog\n | JOIN XLangMapEntry\n | ON ChangeLog.chTableId = 74\n | AND ChangeLog.chEntityPk = XLangMapEntry.statementLangMapUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND XLangMapEntry.statementLangMapLct != COALESCE(\n | (SELECT xlmeVersionId\n | FROM XLangMapEntryReplicate\n | WHERE xlmePk = XLangMapEntry.statementLangMapUid\n | AND xlmeDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(xlmePk, xlmeDestination) DO UPDATE\n | SET xlmePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO XLangMapEntryReplicate(xlmePk, xlmeDestination)\n | SELECT DISTINCT XLangMapEntry.statementLangMapUid AS xlmeUid,\n | UserSession.usClientNodeId AS xlmeDestination\n | FROM ChangeLog\n | JOIN XLangMapEntry\n | ON ChangeLog.chTableId = 74\n | AND ChangeLog.chEntityPk = XLangMapEntry.statementLangMapUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND XLangMapEntry.statementLangMapLct != COALESCE(\n | (SELECT xlmeVersionId\n | FROM XLangMapEntryReplicate\n | WHERE xlmePk = XLangMapEntry.statementLangMapUid\n | AND xlmeDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(xlmePk, xlmeDestination) DO UPDATE\n | SET xlmePending = true\n | \n | \n |')), XLangMapEntryDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_167(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_statementLangMapUid = closure$_result.getLong_61zpoe$('statementLangMapUid'); var _tmp_verbLangMapUid = closure$_result.getLong_61zpoe$('verbLangMapUid'); var _tmp_objectLangMapUid = closure$_result.getLong_61zpoe$('objectLangMapUid'); var _tmp_languageLangMapUid = closure$_result.getLong_61zpoe$('languageLangMapUid'); var _tmp_languageVariantLangMapUid = closure$_result.getLong_61zpoe$('languageVariantLangMapUid'); var _tmp_valueLangMap = closure$_result.getString_61zpoe$('valueLangMap'); var _tmp_statementLangMapMasterCsn = closure$_result.getInt_61zpoe$('statementLangMapMasterCsn'); var _tmp_statementLangMapLocalCsn = closure$_result.getInt_61zpoe$('statementLangMapLocalCsn'); var _tmp_statementLangMapLcb = closure$_result.getInt_61zpoe$('statementLangMapLcb'); var _tmp_statementLangMapLct = closure$_result.getLong_61zpoe$('statementLangMapLct'); var $receiver = new XLangMapEntry(); $receiver.statementLangMapUid = _tmp_statementLangMapUid; $receiver.verbLangMapUid = _tmp_verbLangMapUid; $receiver.objectLangMapUid = _tmp_objectLangMapUid; $receiver.languageLangMapUid = _tmp_languageLangMapUid; $receiver.languageVariantLangMapUid = _tmp_languageVariantLangMapUid; $receiver.valueLangMap = _tmp_valueLangMap; $receiver.statementLangMapMasterCsn = _tmp_statementLangMapMasterCsn; $receiver.statementLangMapLocalCsn = _tmp_statementLangMapLocalCsn; $receiver.statementLangMapLcb = _tmp_statementLangMapLcb; $receiver.statementLangMapLct = _tmp_statementLangMapLct; return $receiver; }; } function XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda$lambda(_result) { return mapRows(_result, XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda$lambda$lambda(_result)); } function Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda(closure$ids_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$ids = closure$ids_0; this.local$_stmt = _stmt_0; } Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda.prototype.constructor = Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda; Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setArray_wqp8hw$(1, createArrayOrProxyArrayOf(this.local$_stmt.getConnection(), 'INTEGER', copyToArray(this.local$closure$ids))); this.state_0 = 2; this.result_0 = executeQueryAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return useResults(this.result_0, XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda$lambda); default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda(closure$ids_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda(closure$ids_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } XLangMapEntryDao_JdbcKt.prototype.getValuesWithListOfId_pqoyrt$ = function (ids, continuation) { return prepareAndUseStatementAsync(this._db, new PreparedStatementConfig('SELECT * FROM XLangMapEntry WHERE objectLangMapUid IN (?)', true), XLangMapEntryDao_JdbcKt$getValuesWithListOfId$lambda(ids), continuation); }; function XLangMapEntryDao_JdbcKt$getXLangMapFromVerb$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_statementLangMapUid = closure$_result.getLong_61zpoe$('statementLangMapUid'); var _tmp_verbLangMapUid = closure$_result.getLong_61zpoe$('verbLangMapUid'); var _tmp_objectLangMapUid = closure$_result.getLong_61zpoe$('objectLangMapUid'); var _tmp_languageLangMapUid = closure$_result.getLong_61zpoe$('languageLangMapUid'); var _tmp_languageVariantLangMapUid = closure$_result.getLong_61zpoe$('languageVariantLangMapUid'); var _tmp_valueLangMap = closure$_result.getString_61zpoe$('valueLangMap'); var _tmp_statementLangMapMasterCsn = closure$_result.getInt_61zpoe$('statementLangMapMasterCsn'); var _tmp_statementLangMapLocalCsn = closure$_result.getInt_61zpoe$('statementLangMapLocalCsn'); var _tmp_statementLangMapLcb = closure$_result.getInt_61zpoe$('statementLangMapLcb'); var _tmp_statementLangMapLct = closure$_result.getLong_61zpoe$('statementLangMapLct'); var $receiver = new XLangMapEntry(); $receiver.statementLangMapUid = _tmp_statementLangMapUid; $receiver.verbLangMapUid = _tmp_verbLangMapUid; $receiver.objectLangMapUid = _tmp_objectLangMapUid; $receiver.languageLangMapUid = _tmp_languageLangMapUid; $receiver.languageVariantLangMapUid = _tmp_languageVariantLangMapUid; $receiver.valueLangMap = _tmp_valueLangMap; $receiver.statementLangMapMasterCsn = _tmp_statementLangMapMasterCsn; $receiver.statementLangMapLocalCsn = _tmp_statementLangMapLocalCsn; $receiver.statementLangMapLcb = _tmp_statementLangMapLcb; $receiver.statementLangMapLct = _tmp_statementLangMapLct; return $receiver; }; } function XLangMapEntryDao_JdbcKt$getXLangMapFromVerb$lambda$lambda(_result) { return mapNextRow(_result, null, XLangMapEntryDao_JdbcKt$getXLangMapFromVerb$lambda$lambda$lambda(_result)); } function XLangMapEntryDao_JdbcKt$getXLangMapFromVerb$lambda(closure$verbUid, closure$langMapUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$verbUid); _stmt.setLong_6svq3l$(2, closure$langMapUid); return useResults(_stmt.executeQuery(), XLangMapEntryDao_JdbcKt$getXLangMapFromVerb$lambda$lambda); }; } XLangMapEntryDao_JdbcKt.prototype.getXLangMapFromVerb_3pjtqy$ = function (verbUid, langMapUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM XLangMapEntry WHERE \n | verbLangMapUid = ? AND languageLangMapUid = ? LIMIT 1\n ')), XLangMapEntryDao_JdbcKt$getXLangMapFromVerb$lambda(verbUid, langMapUid)); }; function XLangMapEntryDao_JdbcKt$getXLangMapFromObject$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_statementLangMapUid = closure$_result.getLong_61zpoe$('statementLangMapUid'); var _tmp_verbLangMapUid = closure$_result.getLong_61zpoe$('verbLangMapUid'); var _tmp_objectLangMapUid = closure$_result.getLong_61zpoe$('objectLangMapUid'); var _tmp_languageLangMapUid = closure$_result.getLong_61zpoe$('languageLangMapUid'); var _tmp_languageVariantLangMapUid = closure$_result.getLong_61zpoe$('languageVariantLangMapUid'); var _tmp_valueLangMap = closure$_result.getString_61zpoe$('valueLangMap'); var _tmp_statementLangMapMasterCsn = closure$_result.getInt_61zpoe$('statementLangMapMasterCsn'); var _tmp_statementLangMapLocalCsn = closure$_result.getInt_61zpoe$('statementLangMapLocalCsn'); var _tmp_statementLangMapLcb = closure$_result.getInt_61zpoe$('statementLangMapLcb'); var _tmp_statementLangMapLct = closure$_result.getLong_61zpoe$('statementLangMapLct'); var $receiver = new XLangMapEntry(); $receiver.statementLangMapUid = _tmp_statementLangMapUid; $receiver.verbLangMapUid = _tmp_verbLangMapUid; $receiver.objectLangMapUid = _tmp_objectLangMapUid; $receiver.languageLangMapUid = _tmp_languageLangMapUid; $receiver.languageVariantLangMapUid = _tmp_languageVariantLangMapUid; $receiver.valueLangMap = _tmp_valueLangMap; $receiver.statementLangMapMasterCsn = _tmp_statementLangMapMasterCsn; $receiver.statementLangMapLocalCsn = _tmp_statementLangMapLocalCsn; $receiver.statementLangMapLcb = _tmp_statementLangMapLcb; $receiver.statementLangMapLct = _tmp_statementLangMapLct; return $receiver; }; } function XLangMapEntryDao_JdbcKt$getXLangMapFromObject$lambda$lambda(_result) { return mapNextRow(_result, null, XLangMapEntryDao_JdbcKt$getXLangMapFromObject$lambda$lambda$lambda(_result)); } function XLangMapEntryDao_JdbcKt$getXLangMapFromObject$lambda(closure$objectUid, closure$langMapUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$objectUid); _stmt.setLong_6svq3l$(2, closure$langMapUid); return useResults(_stmt.executeQuery(), XLangMapEntryDao_JdbcKt$getXLangMapFromObject$lambda$lambda); }; } XLangMapEntryDao_JdbcKt.prototype.getXLangMapFromObject_3pjtqy$ = function (objectUid, langMapUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig(trimMargin('\n |SELECT * FROM XLangMapEntry WHERE \n | objectLangMapUid = ? AND languageLangMapUid = ? LIMIT 1\n ')), XLangMapEntryDao_JdbcKt$getXLangMapFromObject$lambda(objectUid, langMapUid)); }; function XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO XLangMapEntry (statementLangMapUid, verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.statementLangMapUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.statementLangMapUid); } stmt.setLong_6svq3l$(2, entity.verbLangMapUid); stmt.setLong_6svq3l$(3, entity.objectLangMapUid); stmt.setLong_6svq3l$(4, entity.languageLangMapUid); stmt.setLong_6svq3l$(5, entity.languageVariantLangMapUid); stmt.setString_vqvrqt$(6, entity.valueLangMap); stmt.setInt_vux9f0$(7, entity.statementLangMapMasterCsn); stmt.setInt_vux9f0$(8, entity.statementLangMapLocalCsn); stmt.setInt_vux9f0$(9, entity.statementLangMapLcb); stmt.setLong_6svq3l$(10, entity.statementLangMapLct); }; XLangMapEntryDao_JdbcKt$_insertAdapterXLangMapEntry_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; XLangMapEntryDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'XLangMapEntryDao_JdbcKt', interfaces: [XLangMapEntryDao]}; function XLangMapEntryDao_ReplicateWrapper(_db, _dao) { XLangMapEntryDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_165($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_165.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_165.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_165.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_165; Coroutine$replicateOnNewNode_s8cxhz$_165.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_165(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_168($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_168.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_168.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_168.prototype.constructor = Coroutine$replicateOnChange_168; Coroutine$replicateOnChange_168.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_168(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XLangMapEntryDao_ReplicateWrapper.prototype.getValuesWithListOfId_pqoyrt$ = function (ids, continuation) { return this._dao_0.getValuesWithListOfId_pqoyrt$(ids, continuation); }; XLangMapEntryDao_ReplicateWrapper.prototype.getXLangMapFromVerb_3pjtqy$ = function (verbUid, langMapUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XLangMapEntryDao_ReplicateWrapper.prototype.getXLangMapFromObject_3pjtqy$ = function (objectUid, langMapUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XLangMapEntryDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_167($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_167.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_167.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_167.prototype.constructor = Coroutine$insertAsync_167; Coroutine$insertAsync_167.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.statementLangMapUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(74, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.statementLangMapUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.statementLangMapLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.statementLangMapUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_167(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XLangMapEntryDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XLangMapEntryDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XLangMapEntryDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XLangMapEntryDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'XLangMapEntryDao_ReplicateWrapper', interfaces: [XLangMapEntryDao]}; function XLangMapEntryDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { XLangMapEntryDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_166($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_166.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_166.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_166.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_166; Coroutine$replicateOnNewNode_s8cxhz$_166.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_166(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_169($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_169.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_169.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_169.prototype.constructor = Coroutine$replicateOnChange_169; Coroutine$replicateOnChange_169.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_169(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$getValuesWithListOfId_pqoyrt$($this, ids_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$ids = ids_0; } Coroutine$getValuesWithListOfId_pqoyrt$.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getValuesWithListOfId_pqoyrt$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getValuesWithListOfId_pqoyrt$.prototype.constructor = Coroutine$getValuesWithListOfId_pqoyrt$; Coroutine$getValuesWithListOfId_pqoyrt$.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.getValuesWithListOfId_pqoyrt$(this.local$ids, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_Repo.prototype.getValuesWithListOfId_pqoyrt$ = function (ids_0, continuation_0, suspended) { var instance = new Coroutine$getValuesWithListOfId_pqoyrt$(this, ids_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XLangMapEntryDao_Repo.prototype.getXLangMapFromVerb_3pjtqy$ = function (verbUid, langMapUid) { var _result = this._dao.getXLangMapFromVerb_3pjtqy$(verbUid, langMapUid); return _result; }; XLangMapEntryDao_Repo.prototype.getXLangMapFromObject_3pjtqy$ = function (objectUid, langMapUid) { var _result = this._dao.getXLangMapFromObject_3pjtqy$(objectUid, langMapUid); return _result; }; XLangMapEntryDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_168($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_168.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_168.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_168.prototype.constructor = Coroutine$insertAsync_168; Coroutine$insertAsync_168.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XLangMapEntryDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_168(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XLangMapEntryDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; XLangMapEntryDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; XLangMapEntryDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; XLangMapEntryDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'XLangMapEntryDao_Repo', interfaces: [XLangMapEntryDao]}; function XObjectDao() { } XObjectDao.$metadata$ = {kind: Kind_CLASS, simpleName: 'XObjectDao', interfaces: [BaseDao]}; function XObjectDao_JdbcKt(_db) { XObjectDao.call(this); this._db = _db; this._insertAdapterXObjectEntity_ = new XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral(this._db); } XObjectDao_JdbcKt.prototype.insert_11rb$ = function (entity) { var _retVal = this._insertAdapterXObjectEntity_.insertAndReturnId_11rb$(entity); return _retVal; }; function Coroutine$insertAsync_169($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_169.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_169.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_169.prototype.constructor = Coroutine$insertAsync_169; Coroutine$insertAsync_169.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._insertAdapterXObjectEntity_.insertAndReturnIdAsync_11rb$(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _retVal = this.result_0; return _retVal; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_JdbcKt.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_169(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XObjectDao_JdbcKt.prototype.insertList_4ezy5m$ = function (entityList) { this._insertAdapterXObjectEntity_.insertList_4ezy5m$(entityList); }; function XObjectDao_JdbcKt$updateList$lambda(closure$entityList) { return function (_stmt) { var tmp$; _stmt.getConnection().setAutoCommit_6taknv$(false); tmp$ = closure$entityList.iterator(); while (tmp$.hasNext()) { var _entity = tmp$.next(); _stmt.setString_vqvrqt$(1, _entity.objectType); _stmt.setString_vqvrqt$(2, _entity.objectId); _stmt.setString_vqvrqt$(3, _entity.definitionType); _stmt.setString_vqvrqt$(4, _entity.interactionType); _stmt.setString_vqvrqt$(5, _entity.correctResponsePattern); _stmt.setLong_6svq3l$(6, _entity.objectContentEntryUid); _stmt.setLong_6svq3l$(7, _entity.objectStatementRefUid); _stmt.setLong_6svq3l$(8, _entity.xObjectMasterChangeSeqNum); _stmt.setLong_6svq3l$(9, _entity.xObjectocalChangeSeqNum); _stmt.setInt_vux9f0$(10, _entity.xObjectLastChangedBy); _stmt.setLong_6svq3l$(11, _entity.xObjectLct); _stmt.setLong_6svq3l$(12, _entity.xObjectUid); _stmt.executeUpdate(); } _stmt.getConnection().commit(); return Unit; }; } XObjectDao_JdbcKt.prototype.updateList_4ezy5m$ = function (entityList) { var _sql = 'UPDATE XObjectEntity SET objectType = ?, objectId = ?, definitionType = ?, interactionType = ?, correctResponsePattern = ?, objectContentEntryUid = ?, objectStatementRefUid = ?, xObjectMasterChangeSeqNum = ?, xObjectocalChangeSeqNum = ?, xObjectLastChangedBy = ?, xObjectLct = ? WHERE xObjectUid = ?'; prepareAndUseStatement(this._db, _sql, XObjectDao_JdbcKt$updateList$lambda(entityList)); }; function XObjectDao_JdbcKt$update$lambda(closure$entity) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$entity.objectType); _stmt.setString_vqvrqt$(2, closure$entity.objectId); _stmt.setString_vqvrqt$(3, closure$entity.definitionType); _stmt.setString_vqvrqt$(4, closure$entity.interactionType); _stmt.setString_vqvrqt$(5, closure$entity.correctResponsePattern); _stmt.setLong_6svq3l$(6, closure$entity.objectContentEntryUid); _stmt.setLong_6svq3l$(7, closure$entity.objectStatementRefUid); _stmt.setLong_6svq3l$(8, closure$entity.xObjectMasterChangeSeqNum); _stmt.setLong_6svq3l$(9, closure$entity.xObjectocalChangeSeqNum); _stmt.setInt_vux9f0$(10, closure$entity.xObjectLastChangedBy); _stmt.setLong_6svq3l$(11, closure$entity.xObjectLct); _stmt.setLong_6svq3l$(12, closure$entity.xObjectUid); return _stmt.executeUpdate(); }; } XObjectDao_JdbcKt.prototype.update_11rb$ = function (entity) { var _sql = 'UPDATE XObjectEntity SET objectType = ?, objectId = ?, definitionType = ?, interactionType = ?, correctResponsePattern = ?, objectContentEntryUid = ?, objectStatementRefUid = ?, xObjectMasterChangeSeqNum = ?, xObjectocalChangeSeqNum = ?, xObjectLastChangedBy = ?, xObjectLct = ? WHERE xObjectUid = ?'; prepareAndUseStatement(this._db, _sql, XObjectDao_JdbcKt$update$lambda(entity)); }; function Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$closure$newNodeId = closure$newNodeId_0; this.local$_stmt = _stmt_0; } Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda.prototype.constructor = Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda; Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$_stmt.setLong_6svq3l$(1, this.local$closure$newNodeId); this.local$_stmt.setLong_6svq3l$(2, this.local$closure$newNodeId); this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function XObjectDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0) { return function (_stmt_0, continuation_0, suspended) { var instance = new Coroutine$XObjectDao_JdbcKt$replicateOnNewNode$lambda(closure$newNodeId_0, _stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; } function Coroutine$replicateOnNewNode_s8cxhz$_167($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_167.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_167.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_167.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_167; Coroutine$replicateOnNewNode_s8cxhz$_167.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO XObjectEntityReplicate(xoePk, xoeDestination)\n | SELECT DISTINCT XObjectEntity.xObjectUid AS xoePk,\n | ? AS xoeDestination\n | FROM XObjectEntity\n | WHERE XObjectEntity.xObjectLct != COALESCE(\n | (SELECT xoeVersionId\n | FROM XObjectEntityReplicate\n | WHERE xoePk = XObjectEntity.xObjectUid\n | AND xoeDestination = ?), 0) \n | /*psql ON CONFLICT(xoePk, xoeDestination) DO UPDATE\n | SET xoePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO XObjectEntityReplicate(xoePk, xoeDestination)\n | SELECT DISTINCT XObjectEntity.xObjectUid AS xoePk,\n | ? AS xoeDestination\n | FROM XObjectEntity\n | WHERE XObjectEntity.xObjectLct != COALESCE(\n | (SELECT xoeVersionId\n | FROM XObjectEntityReplicate\n | WHERE xoePk = XObjectEntity.xObjectUid\n | AND xoeDestination = ?), 0) \n | ON CONFLICT(xoePk, xoeDestination) DO UPDATE\n | SET xoePending = true\n | \n | \n |')), XObjectDao_JdbcKt$replicateOnNewNode$lambda(this.local$newNodeId), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_JdbcKt.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_167(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$_stmt = _stmt_0; } Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda.prototype = Object.create(CoroutineImpl.prototype); Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda.prototype.constructor = Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda; Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = executeUpdateAsyncKmp(this.local$_stmt, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return this.result_0; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function XObjectDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0, suspended) { var instance = new Coroutine$XObjectDao_JdbcKt$replicateOnChange$lambda(_stmt_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$replicateOnChange_170($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_170.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_170.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_170.prototype.constructor = Coroutine$replicateOnChange_170; Coroutine$replicateOnChange_170.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = prepareAndUseStatementAsync(this.$this._db, new PreparedStatementConfig(trimMargin('\n |\n | REPLACE INTO XObjectEntityReplicate(xoePk, xoeDestination)\n | SELECT DISTINCT XObjectEntity.xObjectUid AS xoeUid,\n | UserSession.usClientNodeId AS xoeDestination\n | FROM ChangeLog\n | JOIN XObjectEntity\n | ON ChangeLog.chTableId = 64\n | AND ChangeLog.chEntityPk = XObjectEntity.xObjectUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND XObjectEntity.xObjectLct != COALESCE(\n | (SELECT xoeVersionId\n | FROM XObjectEntityReplicate\n | WHERE xoePk = XObjectEntity.xObjectUid\n | AND xoeDestination = UserSession.usClientNodeId), 0)\n | /*psql ON CONFLICT(xoePk, xoeDestination) DO UPDATE\n | SET xoePending = true\n | */ \n | \n '), void 0, void 0, void 0, trimMargin('\n |INSERT INTO XObjectEntityReplicate(xoePk, xoeDestination)\n | SELECT DISTINCT XObjectEntity.xObjectUid AS xoeUid,\n | UserSession.usClientNodeId AS xoeDestination\n | FROM ChangeLog\n | JOIN XObjectEntity\n | ON ChangeLog.chTableId = 64\n | AND ChangeLog.chEntityPk = XObjectEntity.xObjectUid\n | JOIN UserSession ON UserSession.usStatus = 1\n | WHERE UserSession.usClientNodeId != (\n | SELECT nodeClientId \n | FROM SyncNode\n | LIMIT 1)\n | AND XObjectEntity.xObjectLct != COALESCE(\n | (SELECT xoeVersionId\n | FROM XObjectEntityReplicate\n | WHERE xoePk = XObjectEntity.xObjectUid\n | AND xoeDestination = UserSession.usClientNodeId), 0)\n | ON CONFLICT(xoePk, xoeDestination) DO UPDATE\n | SET xoePending = true\n | \n | \n |')), XObjectDao_JdbcKt$replicateOnChange$lambda, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_JdbcKt.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_170(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function XObjectDao_JdbcKt$findByObjectId$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_xObjectUid = closure$_result.getLong_61zpoe$('xObjectUid'); var _tmp_objectType = closure$_result.getString_61zpoe$('objectType'); var _tmp_objectId = closure$_result.getString_61zpoe$('objectId'); var _tmp_definitionType = closure$_result.getString_61zpoe$('definitionType'); var _tmp_interactionType = closure$_result.getString_61zpoe$('interactionType'); var _tmp_correctResponsePattern = closure$_result.getString_61zpoe$('correctResponsePattern'); var _tmp_objectContentEntryUid = closure$_result.getLong_61zpoe$('objectContentEntryUid'); var _tmp_objectStatementRefUid = closure$_result.getLong_61zpoe$('objectStatementRefUid'); var _tmp_xObjectMasterChangeSeqNum = closure$_result.getLong_61zpoe$('xObjectMasterChangeSeqNum'); var _tmp_xObjectocalChangeSeqNum = closure$_result.getLong_61zpoe$('xObjectocalChangeSeqNum'); var _tmp_xObjectLastChangedBy = closure$_result.getInt_61zpoe$('xObjectLastChangedBy'); var _tmp_xObjectLct = closure$_result.getLong_61zpoe$('xObjectLct'); var $receiver = XObjectEntity_init_0(); $receiver.xObjectUid = _tmp_xObjectUid; $receiver.objectType = _tmp_objectType; $receiver.objectId = _tmp_objectId; $receiver.definitionType = _tmp_definitionType; $receiver.interactionType = _tmp_interactionType; $receiver.correctResponsePattern = _tmp_correctResponsePattern; $receiver.objectContentEntryUid = _tmp_objectContentEntryUid; $receiver.objectStatementRefUid = _tmp_objectStatementRefUid; $receiver.xObjectMasterChangeSeqNum = _tmp_xObjectMasterChangeSeqNum; $receiver.xObjectocalChangeSeqNum = _tmp_xObjectocalChangeSeqNum; $receiver.xObjectLastChangedBy = _tmp_xObjectLastChangedBy; $receiver.xObjectLct = _tmp_xObjectLct; return $receiver; }; } function XObjectDao_JdbcKt$findByObjectId$lambda$lambda(_result) { return mapNextRow(_result, null, XObjectDao_JdbcKt$findByObjectId$lambda$lambda$lambda(_result)); } function XObjectDao_JdbcKt$findByObjectId$lambda(closure$id) { return function (_stmt) { _stmt.setString_vqvrqt$(1, closure$id); return useResults(_stmt.executeQuery(), XObjectDao_JdbcKt$findByObjectId$lambda$lambda); }; } XObjectDao_JdbcKt.prototype.findByObjectId_pdl1vj$ = function (id) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * from XObjectEntity WHERE objectId = ?'), XObjectDao_JdbcKt$findByObjectId$lambda(id)); }; function XObjectDao_JdbcKt$findByXobjectUid$lambda$lambda$lambda(closure$_result) { return function (it) { var _tmp_xObjectUid = closure$_result.getLong_61zpoe$('xObjectUid'); var _tmp_objectType = closure$_result.getString_61zpoe$('objectType'); var _tmp_objectId = closure$_result.getString_61zpoe$('objectId'); var _tmp_definitionType = closure$_result.getString_61zpoe$('definitionType'); var _tmp_interactionType = closure$_result.getString_61zpoe$('interactionType'); var _tmp_correctResponsePattern = closure$_result.getString_61zpoe$('correctResponsePattern'); var _tmp_objectContentEntryUid = closure$_result.getLong_61zpoe$('objectContentEntryUid'); var _tmp_objectStatementRefUid = closure$_result.getLong_61zpoe$('objectStatementRefUid'); var _tmp_xObjectMasterChangeSeqNum = closure$_result.getLong_61zpoe$('xObjectMasterChangeSeqNum'); var _tmp_xObjectocalChangeSeqNum = closure$_result.getLong_61zpoe$('xObjectocalChangeSeqNum'); var _tmp_xObjectLastChangedBy = closure$_result.getInt_61zpoe$('xObjectLastChangedBy'); var _tmp_xObjectLct = closure$_result.getLong_61zpoe$('xObjectLct'); var $receiver = XObjectEntity_init_0(); $receiver.xObjectUid = _tmp_xObjectUid; $receiver.objectType = _tmp_objectType; $receiver.objectId = _tmp_objectId; $receiver.definitionType = _tmp_definitionType; $receiver.interactionType = _tmp_interactionType; $receiver.correctResponsePattern = _tmp_correctResponsePattern; $receiver.objectContentEntryUid = _tmp_objectContentEntryUid; $receiver.objectStatementRefUid = _tmp_objectStatementRefUid; $receiver.xObjectMasterChangeSeqNum = _tmp_xObjectMasterChangeSeqNum; $receiver.xObjectocalChangeSeqNum = _tmp_xObjectocalChangeSeqNum; $receiver.xObjectLastChangedBy = _tmp_xObjectLastChangedBy; $receiver.xObjectLct = _tmp_xObjectLct; return $receiver; }; } function XObjectDao_JdbcKt$findByXobjectUid$lambda$lambda(_result) { return mapNextRow(_result, null, XObjectDao_JdbcKt$findByXobjectUid$lambda$lambda$lambda(_result)); } function XObjectDao_JdbcKt$findByXobjectUid$lambda(closure$xObjectUid) { return function (_stmt) { _stmt.setLong_6svq3l$(1, closure$xObjectUid); return useResults(_stmt.executeQuery(), XObjectDao_JdbcKt$findByXobjectUid$lambda$lambda); }; } XObjectDao_JdbcKt.prototype.findByXobjectUid_s8cxhz$ = function (xObjectUid) { return prepareAndUseStatement_0(this._db, new PreparedStatementConfig('SELECT * from XObjectEntity WHERE xObjectUid = ?'), XObjectDao_JdbcKt$findByXobjectUid$lambda(xObjectUid)); }; function XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral(db) { EntityInsertionAdapter.call(this, db); } XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral.prototype.makeSql_6taknv$ = function (returnsId) { return 'INSERT INTO XObjectEntity (xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, objectStatementRefUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'; }; XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral.prototype.bindPreparedStmtToEntity_wfgq1m$ = function (stmt, entity) { if (equals(entity.xObjectUid, L0)) { stmt.setObject_6t2rgq$(1, null); } else { stmt.setLong_6svq3l$(1, entity.xObjectUid); } stmt.setString_vqvrqt$(2, entity.objectType); stmt.setString_vqvrqt$(3, entity.objectId); stmt.setString_vqvrqt$(4, entity.definitionType); stmt.setString_vqvrqt$(5, entity.interactionType); stmt.setString_vqvrqt$(6, entity.correctResponsePattern); stmt.setLong_6svq3l$(7, entity.objectContentEntryUid); stmt.setLong_6svq3l$(8, entity.objectStatementRefUid); stmt.setLong_6svq3l$(9, entity.xObjectMasterChangeSeqNum); stmt.setLong_6svq3l$(10, entity.xObjectocalChangeSeqNum); stmt.setInt_vux9f0$(11, entity.xObjectLastChangedBy); stmt.setLong_6svq3l$(12, entity.xObjectLct); }; XObjectDao_JdbcKt$_insertAdapterXObjectEntity_$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [EntityInsertionAdapter]}; XObjectDao_JdbcKt.$metadata$ = {kind: Kind_CLASS, simpleName: 'XObjectDao_JdbcKt', interfaces: [XObjectDao]}; function XObjectDao_ReplicateWrapper(_db, _dao) { XObjectDao.call(this); this._db_0 = _db; this._dao_0 = _dao; } function Coroutine$replicateOnNewNode_s8cxhz$_168($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_168.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_168.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_168.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_168; Coroutine$replicateOnNewNode_s8cxhz$_168.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_ReplicateWrapper.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_168(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_171($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_171.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_171.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_171.prototype.constructor = Coroutine$replicateOnChange_171; Coroutine$replicateOnChange_171.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao_0.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_ReplicateWrapper.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_171(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XObjectDao_ReplicateWrapper.prototype.findByObjectId_pdl1vj$ = function (id) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XObjectDao_ReplicateWrapper.prototype.findByXobjectUid_s8cxhz$ = function (xObjectUid) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XObjectDao_ReplicateWrapper.prototype.insert_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; function Coroutine$insertAsync_170($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_170.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_170.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_170.prototype.constructor = Coroutine$insertAsync_170; Coroutine$insertAsync_170.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var _pkManager = get_doorPrimaryKeyManager(get_rootDatabase(this.$this._db_0)); if (equals(this.local$entity.xObjectUid, L0)) { this.state_0 = 2; this.result_0 = _pkManager.nextIdAsync_za3lpa$(64, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: var _newPk = this.result_0; this.local$entity.xObjectUid = _newPk; this.state_0 = 3; continue; case 3: this.local$entity.xObjectLct = systemTimeInMillis(); this.state_0 = 4; this.result_0 = this.$this._dao_0.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 4: return this.local$entity.xObjectUid; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_ReplicateWrapper.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_170(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XObjectDao_ReplicateWrapper.prototype.insertList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XObjectDao_ReplicateWrapper.prototype.updateList_4ezy5m$ = function (entityList) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XObjectDao_ReplicateWrapper.prototype.update_11rb$ = function (entity) { throw IllegalStateException_init('Synchronous db access is NOT possible on Javascript!'); }; XObjectDao_ReplicateWrapper.$metadata$ = {kind: Kind_CLASS, simpleName: 'XObjectDao_ReplicateWrapper', interfaces: [XObjectDao]}; function XObjectDao_Repo(_db, _repo, _dao, _httpClient, _clientId, _endpoint) { XObjectDao.call(this); this._db = _db; this._repo = _repo; this._dao = _dao; this._httpClient = _httpClient; this._clientId = _clientId; this._endpoint = _endpoint; } function Coroutine$replicateOnNewNode_s8cxhz$_169($this, newNodeId_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$newNodeId = newNodeId_0; } Coroutine$replicateOnNewNode_s8cxhz$_169.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnNewNode_s8cxhz$_169.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnNewNode_s8cxhz$_169.prototype.constructor = Coroutine$replicateOnNewNode_s8cxhz$_169; Coroutine$replicateOnNewNode_s8cxhz$_169.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnNewNode_s8cxhz$(this.local$newNodeId, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_Repo.prototype.replicateOnNewNode_s8cxhz$ = function (newNodeId_0, continuation_0, suspended) { var instance = new Coroutine$replicateOnNewNode_s8cxhz$_169(this, newNodeId_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$replicateOnChange_172($this, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; } Coroutine$replicateOnChange_172.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$replicateOnChange_172.prototype = Object.create(CoroutineImpl.prototype); Coroutine$replicateOnChange_172.prototype.constructor = Coroutine$replicateOnChange_172; Coroutine$replicateOnChange_172.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.replicateOnChange(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_Repo.prototype.replicateOnChange = function (continuation_0, suspended) { var instance = new Coroutine$replicateOnChange_172(this, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XObjectDao_Repo.prototype.findByObjectId_pdl1vj$ = function (id) { var _result = this._dao.findByObjectId_pdl1vj$(id); return _result; }; XObjectDao_Repo.prototype.findByXobjectUid_s8cxhz$ = function (xObjectUid) { var _result = this._dao.findByXobjectUid_s8cxhz$(xObjectUid); return _result; }; XObjectDao_Repo.prototype.insert_11rb$ = function (entity) { var _result = this._dao.insert_11rb$(entity); return _result; }; function Coroutine$insertAsync_171($this, entity_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$entity = entity_0; } Coroutine$insertAsync_171.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$insertAsync_171.prototype = Object.create(CoroutineImpl.prototype); Coroutine$insertAsync_171.prototype.constructor = Coroutine$insertAsync_171; Coroutine$insertAsync_171.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this._dao.insertAsync(this.local$entity, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var _result = this.result_0; return _result; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; XObjectDao_Repo.prototype.insertAsync = function (entity_0, continuation_0, suspended) { var instance = new Coroutine$insertAsync_171(this, entity_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; XObjectDao_Repo.prototype.insertList_4ezy5m$ = function (entityList) { this._dao.insertList_4ezy5m$(entityList); }; XObjectDao_Repo.prototype.updateList_4ezy5m$ = function (entityList) { this._dao.updateList_4ezy5m$(entityList); }; XObjectDao_Repo.prototype.update_11rb$ = function (entity) { this._dao.update_11rb$(entity); }; XObjectDao_Repo.$metadata$ = {kind: Kind_CLASS, simpleName: 'XObjectDao_Repo', interfaces: [XObjectDao]}; function ContentEntryPicture_EwaAdapter(entity) { this.entity_0 = entity; } Object.defineProperty(ContentEntryPicture_EwaAdapter.prototype, 'attachmentUri', {configurable: true, get: function () { return this.entity_0.cepUri; }, set: function (value) { this.entity_0.cepUri = value; }}); Object.defineProperty(ContentEntryPicture_EwaAdapter.prototype, 'attachmentMd5', {configurable: true, get: function () { return this.entity_0.cepMd5; }, set: function (value) { this.entity_0.cepMd5 = value; }}); Object.defineProperty(ContentEntryPicture_EwaAdapter.prototype, 'attachmentSize', {configurable: true, get: function () { return this.entity_0.cepFileSize; }, set: function (value) { this.entity_0.cepFileSize = value; }}); Object.defineProperty(ContentEntryPicture_EwaAdapter.prototype, 'tableName', {configurable: true, get: function () { return 'ContentEntryPicture'; }}); ContentEntryPicture_EwaAdapter.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryPicture_EwaAdapter', interfaces: [EntityWithAttachment]}; ContentEntryPicture_EwaAdapter.prototype.unbox = function () { return this.entity_0; }; ContentEntryPicture_EwaAdapter.prototype.toString = function () { return 'ContentEntryPicture_EwaAdapter(entity=' + Kotlin.toString(this.entity_0) + ')'; }; ContentEntryPicture_EwaAdapter.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.entity_0) | 0; return result; }; ContentEntryPicture_EwaAdapter.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && Kotlin.equals(this.entity_0, other.entity_0)))); }; function CourseAssignmentSubmissionAttachment_EwaAdapter(entity) { this.entity_0 = entity; } Object.defineProperty(CourseAssignmentSubmissionAttachment_EwaAdapter.prototype, 'attachmentUri', {configurable: true, get: function () { return this.entity_0.casaUri; }, set: function (value) { this.entity_0.casaUri = value; }}); Object.defineProperty(CourseAssignmentSubmissionAttachment_EwaAdapter.prototype, 'attachmentMd5', {configurable: true, get: function () { return this.entity_0.casaMd5; }, set: function (value) { this.entity_0.casaMd5 = value; }}); Object.defineProperty(CourseAssignmentSubmissionAttachment_EwaAdapter.prototype, 'attachmentSize', {configurable: true, get: function () { return this.entity_0.casaSize; }, set: function (value) { this.entity_0.casaSize = value; }}); Object.defineProperty(CourseAssignmentSubmissionAttachment_EwaAdapter.prototype, 'tableName', {configurable: true, get: function () { return 'CourseAssignmentSubmissionAttachment'; }}); CourseAssignmentSubmissionAttachment_EwaAdapter.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionAttachment_EwaAdapter', interfaces: [EntityWithAttachment]}; CourseAssignmentSubmissionAttachment_EwaAdapter.prototype.unbox = function () { return this.entity_0; }; CourseAssignmentSubmissionAttachment_EwaAdapter.prototype.toString = function () { return 'CourseAssignmentSubmissionAttachment_EwaAdapter(entity=' + Kotlin.toString(this.entity_0) + ')'; }; CourseAssignmentSubmissionAttachment_EwaAdapter.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.entity_0) | 0; return result; }; CourseAssignmentSubmissionAttachment_EwaAdapter.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && Kotlin.equals(this.entity_0, other.entity_0)))); }; function CoursePicture_EwaAdapter(entity) { this.entity_0 = entity; } Object.defineProperty(CoursePicture_EwaAdapter.prototype, 'attachmentUri', {configurable: true, get: function () { return this.entity_0.coursePictureUri; }, set: function (value) { this.entity_0.coursePictureUri = value; }}); Object.defineProperty(CoursePicture_EwaAdapter.prototype, 'attachmentMd5', {configurable: true, get: function () { return this.entity_0.coursePictureMd5; }, set: function (value) { this.entity_0.coursePictureMd5 = value; }}); Object.defineProperty(CoursePicture_EwaAdapter.prototype, 'attachmentSize', {configurable: true, get: function () { return this.entity_0.coursePictureFileSize; }, set: function (value) { this.entity_0.coursePictureFileSize = value; }}); Object.defineProperty(CoursePicture_EwaAdapter.prototype, 'tableName', {configurable: true, get: function () { return 'CoursePicture'; }}); CoursePicture_EwaAdapter.$metadata$ = {kind: Kind_CLASS, simpleName: 'CoursePicture_EwaAdapter', interfaces: [EntityWithAttachment]}; CoursePicture_EwaAdapter.prototype.unbox = function () { return this.entity_0; }; CoursePicture_EwaAdapter.prototype.toString = function () { return 'CoursePicture_EwaAdapter(entity=' + Kotlin.toString(this.entity_0) + ')'; }; CoursePicture_EwaAdapter.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.entity_0) | 0; return result; }; CoursePicture_EwaAdapter.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && Kotlin.equals(this.entity_0, other.entity_0)))); }; function PersonPicture_EwaAdapter(entity) { this.entity_0 = entity; } Object.defineProperty(PersonPicture_EwaAdapter.prototype, 'attachmentUri', {configurable: true, get: function () { return this.entity_0.personPictureUri; }, set: function (value) { this.entity_0.personPictureUri = value; }}); Object.defineProperty(PersonPicture_EwaAdapter.prototype, 'attachmentMd5', {configurable: true, get: function () { return this.entity_0.personPictureMd5; }, set: function (value) { this.entity_0.personPictureMd5 = value; }}); Object.defineProperty(PersonPicture_EwaAdapter.prototype, 'attachmentSize', {configurable: true, get: function () { return this.entity_0.fileSize; }, set: function (value) { this.entity_0.fileSize = value; }}); Object.defineProperty(PersonPicture_EwaAdapter.prototype, 'tableName', {configurable: true, get: function () { return 'PersonPicture'; }}); PersonPicture_EwaAdapter.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonPicture_EwaAdapter', interfaces: [EntityWithAttachment]}; PersonPicture_EwaAdapter.prototype.unbox = function () { return this.entity_0; }; PersonPicture_EwaAdapter.prototype.toString = function () { return 'PersonPicture_EwaAdapter(entity=' + Kotlin.toString(this.entity_0) + ')'; }; PersonPicture_EwaAdapter.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.entity_0) | 0; return result; }; PersonPicture_EwaAdapter.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && Kotlin.equals(this.entity_0, other.entity_0)))); }; function ContentJobItemTriggersCallback() { ContentJobItemTriggersCallback$Companion_getInstance(); } ContentJobItemTriggersCallback.prototype.onCreate_j4i37p$ = function (db) { var tmp$; if (dbType(db) === 1) { tmp$ = toList(ContentJobItemTriggersCallback$Companion_getInstance().sqliteContentJobItemTriggers_0); } else { tmp$ = toList(ContentJobItemTriggersCallback$Companion_getInstance().postgresContentJobItemTriggers_0); } return tmp$; }; ContentJobItemTriggersCallback.prototype.onOpen_j4i37p$ = function (db) { var tmp$; if (dbType(db) === 1) { tmp$ = listOf_0('\n PRAGMA recursive_triggers = ON;\n '); } else { tmp$ = emptyList(); } return tmp$; }; function ContentJobItemTriggersCallback$Companion() { ContentJobItemTriggersCallback$Companion_instance = this; this.sqliteContentJobItemTriggers_0 = ['\n CREATE TRIGGER ContentJobItem_InsertTrigger \n AFTER INSERT ON ContentJobItem\n BEGIN\n UPDATE ContentJobItem \n SET cjiRecursiveProgress = NEW.cjiItemProgress,\n cjiRecursiveTotal = NEW.cjiItemTotal\n WHERE ContentJobItem.cjiUid = NEW.cjiUid;\n END;\n ', '\n CREATE TRIGGER ContentJobItem_UpdateRecursiveTotals \n AFTER UPDATE ON ContentJobItem\n FOR EACH ROW WHEN (\n NEW.cjiItemProgress != OLD.cjiItemProgress\n OR NEW.cjiItemTotal != OLD.cjiItemTotal)\n BEGIN\n UPDATE ContentJobItem \n SET cjiRecursiveProgress = (cjiRecursiveProgress + (NEW.cjiItemProgress - OLD.cjiItemProgress)),\n cjiRecursiveTotal = (cjiRecursiveTotal + (NEW.cjiItemTotal - OLD.cjiItemTotal))\n WHERE ContentJobItem.cjiUid = NEW.cjiUid;\n END;\n ', '\n' + ' CREATE TRIGGER ContentJobItem_UpdateRecursiveStatus' + '\n' + ' AFTER UPDATE ON ContentJobItem' + '\n' + ' FOR EACH ROW WHEN (NEW.cjiStatus != OLD.cjiStatus)' + '\n' + ' BEGIN ' + '\n' + ' UPDATE ContentJobItem' + '\n' + ' SET cjiRecursiveStatus = ' + this.recursiveStatusCaseClause_61zpoe$('NEW.cjiUid') + '\n' + ' WHERE contentJobItem.cjiUid = NEW.cjiUid;' + '\n' + ' END; ' + '\n' + ' ', '\n CREATE TRIGGER ContentJobItem_UpdateParents\n AFTER UPDATE ON ContentJobItem\n FOR EACH ROW WHEN (\n NEW.cjiParentCjiUid != 0 \n AND (NEW.cjiRecursiveProgress != OLD.cjiRecursiveProgress\n OR NEW.cjiRecursiveTotal != OLD.cjiRecursiveTotal))\n BEGIN\n UPDATE ContentJobItem \n SET cjiRecursiveProgress = (cjiRecursiveProgress + (NEW.cjiRecursiveProgress - OLD.cjiRecursiveProgress)),\n cjiRecursiveTotal = (cjiRecursiveTotal + (NEW.cjiRecursiveTotal - OLD.cjiRecursiveTotal))\n WHERE ContentJobItem.cjiUid = NEW.cjiParentCjiUid;\n END;\n ', '\n' + ' CREATE TRIGGER ContentJobItem_UpdateStatusParent' + '\n' + ' AFTER UPDATE ON ContentJobItem' + '\n' + ' FOR EACH ROW WHEN (' + '\n' + ' NEW.cjiParentCjiUid != 0' + '\n' + ' AND (New.cjiRecursiveStatus != OLD.cjiRecursiveStatus))' + '\n' + ' BEGIN' + '\n' + ' UPDATE ContentJobItem' + '\n' + ' SET cjiRecursiveStatus = ' + this.recursiveStatusCaseClause_61zpoe$('NEW.cjiParentCjiUid') + '\n' + ' WHERE ContentJobItem.cjiUid = NEW.cjiParentCjiUid;' + '\n' + ' END;' + '\n' + ' ']; this.postgresContentJobItemTriggers_0 = ['\n CREATE OR REPLACE FUNCTION contentjobiteminsert_fn() RETURNS TRIGGER AS $$ \n BEGIN\n UPDATE ContentJobItem \n SET cjiRecursiveProgress = NEW.cjiItemProgress,\n cjiRecursiveTotal = NEW.cjiItemTotal\n WHERE ContentJobItem.cjiUid = NEW.cjiUid;\n RETURN NEW; \n END $$ LANGUAGE plpgsql\n ', '\n CREATE TRIGGER contentjobiteminsert_trig \n AFTER INSERT ON ContentJobItem\n FOR EACH ROW EXECUTE PROCEDURE contentjobiteminsert_fn() \n ', '\n CREATE OR REPLACE FUNCTION contentjobitem_updaterecursivetotals_fn() RETURNS TRIGGER AS $$\n BEGIN\n UPDATE ContentJobItem \n SET cjiRecursiveProgress = (cjiRecursiveProgress + (NEW.cjiItemProgress - OLD.cjiItemProgress)),\n cjiRecursiveTotal = (cjiRecursiveTotal + (NEW.cjiItemTotal - OLD.cjiItemTotal))\n WHERE (NEW.cjiItemProgress != OLD.cjiItemProgress OR NEW.cjiItemTotal != OLD.cjiItemTotal)\n AND ContentJobItem.cjiUid = NEW.cjiUid;\n RETURN NEW;\n END $$ LANGUAGE plpgsql\n ', '\n CREATE TRIGGER contentjobitem_updaterecursivetotals_trig\n AFTER UPDATE ON ContentJobItem\n FOR EACH ROW EXECUTE PROCEDURE contentjobitem_updaterecursivetotals_fn();\n ', '\n CREATE OR REPLACE FUNCTION contentjobitem_updateparents_fn() RETURNS TRIGGER AS $$\n BEGIN \n UPDATE ContentJobItem \n SET cjiRecursiveProgress = (cjiRecursiveProgress + (NEW.cjiRecursiveProgress - OLD.cjiRecursiveProgress)),\n cjiRecursiveTotal = (cjiRecursiveTotal + (NEW.cjiRecursiveTotal - OLD.cjiRecursiveTotal))\n WHERE (NEW.cjiRecursiveProgress != OLD.cjiRecursiveProgress\n OR NEW.cjiRecursiveTotal != OLD.cjiRecursiveTotal)\n AND ContentJobItem.cjiUid = NEW.cjiParentCjiUid\n AND NEW.cjiParentCjiUid != 0; \n RETURN NEW;\n END $$ LANGUAGE plpgsql\n ', '\n CREATE TRIGGER contentjobitem_updateparents_trig\n AFTER UPDATE ON ContentJobItem\n FOR EACH ROW EXECUTE PROCEDURE contentjobitem_updateparents_fn(); \n ', '\n' + ' CREATE OR REPLACE FUNCTION contentjobitem_updatestatus_fn() RETURNS TRIGGER AS ' + String.fromCharCode(36) + String.fromCharCode(36) + '\n' + ' BEGIN ' + '\n' + ' UPDATE ContentJobItem' + '\n' + ' SET cjiRecursiveStatus = ' + this.recursiveStatusCaseClause_61zpoe$('NEW.cjiUid') + '\n' + ' WHERE contentJobItem.cjiUid = NEW.cjiUid ' + '\n' + ' AND NEW.cjiStatus != OLD.cjiStatus;' + '\n' + ' RETURN NEW; ' + '\n' + ' END ' + String.fromCharCode(36) + String.fromCharCode(36) + ' LANGUAGE plpgsql ' + '\n' + ' ', '\n CREATE TRIGGER contentjobitem_updatestatus_trig\n AFTER UPDATE ON ContentJobItem\n FOR EACH ROW EXECUTE PROCEDURE contentjobitem_updatestatus_fn(); \n ', '\n' + ' CREATE OR REPLACE FUNCTION contentjobitem_updatestatusparents_fn() RETURNS TRIGGER AS ' + String.fromCharCode(36) + String.fromCharCode(36) + '\n' + ' BEGIN' + '\n' + ' UPDATE ContentJobItem' + '\n' + ' SET cjiRecursiveStatus = ' + this.recursiveStatusCaseClause_61zpoe$('NEW.cjiParentCjiUid') + '\n' + ' WHERE NEW.cjiParentCjiUid != 0 ' + '\n' + ' AND NEW.cjiRecursiveStatus != OLD.cjiRecursiveStatus' + '\n' + ' AND ContentJobItem.cjiUid = NEW.cjiParentCjiUid; ' + '\n' + ' RETURN NEW; ' + '\n' + ' END ' + String.fromCharCode(36) + String.fromCharCode(36) + ' LANGUAGE plpgsql ' + '\n' + ' ', '\n CREATE TRIGGER contentjobitem_updatestatusparents_trig\n AFTER UPDATE ON ContentJobItem\n FOR EACH ROW EXECUTE PROCEDURE contentjobitem_updatestatusparents_fn(); \n ']; } function ContentJobItemTriggersCallback$Companion$dumpSqlStatements$lambda(it) { return minifySql(it); } function ContentJobItemTriggersCallback$Companion$dumpSqlStatements$lambda_0(it) { return minifySql(it); } ContentJobItemTriggersCallback$Companion.prototype.dumpSqlStatements = function () { println('SQLITE:'); println(joinToString(this.sqliteContentJobItemTriggers_0, '",\n"', '"', '"', void 0, void 0, ContentJobItemTriggersCallback$Companion$dumpSqlStatements$lambda)); println('POSTGRES'); println(joinToString(this.postgresContentJobItemTriggers_0, '",\n"', '"', '"', void 0, void 0, ContentJobItemTriggersCallback$Companion$dumpSqlStatements$lambda_0)); }; ContentJobItemTriggersCallback$Companion.prototype.getStatusOfItemAndChildrenSql_0 = function (contentJobItemUidExpression) { return '\n' + ' (SELECT cjiRecursiveStatus AS status ' + '\n' + ' FROM ContentJobItem ' + '\n' + ' WHERE cjiParentCjiUid = ' + contentJobItemUidExpression + '\n' + ' UNION' + '\n' + ' SELECT cjiStatus AS status' + '\n' + ' FROM ContentJobItem ' + '\n' + ' WHERE cjiUid = ' + contentJobItemUidExpression + ') AS JobStatus' + '\n' + ' '; }; ContentJobItemTriggersCallback$Companion.prototype.recursiveStatusCaseClause_61zpoe$ = function (contentJobItemUidExpression) { return '\n' + ' (CASE WHEN ' + '\n' + '\t\t\t\t\t\t\t(SELECT Count(*) FROM ' + this.getStatusOfItemAndChildrenSql_0(contentJobItemUidExpression) + ') = ' + '\n' + '\t\t\t\t\t\t\t(SELECT Count(*) ' + '\n' + '\t\t\t\t\t\t\t FROM ' + this.getStatusOfItemAndChildrenSql_0(contentJobItemUidExpression) + ' ' + '\n' + '\t\t\t\t\t\t\t WHERE status = ' + '24' + ') ' + '\n' + '\t\t\t\t\t THEN ' + '24' + ' ' + '\n' + ' WHEN (SELECT Count(*) FROM ' + this.getStatusOfItemAndChildrenSql_0(contentJobItemUidExpression) + ') = ' + '\n' + ' (SELECT Count(*) ' + '\n' + '\t\t\t\t\t\t\t FROM ' + this.getStatusOfItemAndChildrenSql_0(contentJobItemUidExpression) + ' ' + '\n' + '\t\t\t\t\t\t\t WHERE status = ' + '25' + ') ' + '\n' + ' THEN ' + '25' + '\n' + ' WHEN(SELECT COUNT(*) FROM ' + this.getStatusOfItemAndChildrenSql_0(contentJobItemUidExpression) + ') = ' + '\n' + ' (SELECT COUNT(*)' + '\n' + ' FROM ' + this.getStatusOfItemAndChildrenSql_0(contentJobItemUidExpression) + '\n' + ' WHERE status = ' + '28' + ')' + '\n' + ' THEN ' + '28' + '\n' + '\t\t\t\t\t\t WHEN EXISTS (SELECT status ' + '\n' + '\t\t\t\t\t\t\t\t\t\tFROM ' + this.getStatusOfItemAndChildrenSql_0(contentJobItemUidExpression) + '\t' + '\n' + '\t\t\t\t\t\t\t\t\t\tWHERE status = ' + '12' + ')' + '\n' + '\t\t\t\t\t\t THEN ' + '12' + '\n' + ' WHEN EXISTS (SELECT status' + '\n' + '\t\t\t\t\t\t\t\t\t\tFROM ' + this.getStatusOfItemAndChildrenSql_0(contentJobItemUidExpression) + ' ' + '\n' + '\t\t\t\t\t\t\t\t\t WHERE (status = ' + '25' + '\n' + ' OR status = ' + '23' + '))' + '\n' + '\t\t\t\t\t\t THEN ' + '23' + '\n' + '\t\t\t\t\t\t WHEN EXISTS (SELECT status' + '\n' + '\t\t\t\t\t\t\t\t\t\tFROM ' + this.getStatusOfItemAndChildrenSql_0(contentJobItemUidExpression) + ' ' + '\n' + '\t\t\t\t\t\t\t\t\t WHERE status = ' + '5' + ')' + '\n' + '\t\t\t\t\t\t THEN ' + '5' + ' ' + '\n' + '\t\t\t\t\t\t ELSE ' + '4' + ' END) ' + '\n' + ' '; }; ContentJobItemTriggersCallback$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentJobItemTriggersCallback$Companion_instance = null; function ContentJobItemTriggersCallback$Companion_getInstance() { if (ContentJobItemTriggersCallback$Companion_instance === null) { new ContentJobItemTriggersCallback$Companion(); } return ContentJobItemTriggersCallback$Companion_instance; } ContentJobItemTriggersCallback.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentJobItemTriggersCallback', interfaces: [DoorDatabaseCallbackStatementList]}; var JobStatus_instance = null; function dropOldSqliteTriggers($receiver) { var db = $receiver; db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_14'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_14'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_14'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_14'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_15'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_15'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_15'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_15'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_21'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_21'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_21'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_21'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_17'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_17'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_17'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_17'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_28'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_28'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_28'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_28'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_99'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_99'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_99'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_99'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_173'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_173'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_173'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_173'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_53'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_53'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_53'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_53'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_56'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_56'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_56'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_56'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_57'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_57'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_57'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_57'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_55'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_55'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_55'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_55'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_9'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_9'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_9'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_9'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_6'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_6'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_6'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_6'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_65'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_65'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_65'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_65'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_410'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_410'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_410'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_410'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_178'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_178'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_178'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_178'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_42'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_42'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_42'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_42'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_3'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_3'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_3'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_3'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_7'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_7'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_7'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_7'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_8'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_8'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_8'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_8'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_2'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_2'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_2'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_2'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_1'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_1'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_1'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_1'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_13'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_13'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_13'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_13'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_10'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_10'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_10'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_10'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_45'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_45'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_45'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_45'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_47'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_47'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_47'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_47'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_43'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_43'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_43'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_43'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_44'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_44'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_44'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_44'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_50'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_50'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_50'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_50'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_51'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_51'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_51'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_51'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_62'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_62'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_62'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_62'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_64'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_64'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_64'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_64'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_60'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_60'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_60'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_60'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_66'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_66'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_66'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_66'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_68'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_68'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_68'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_68'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_70'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_70'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_70'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_70'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_72'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_72'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_72'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_72'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_74'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_74'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_74'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_74'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_164'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_164'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_164'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_164'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_200'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_200'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_200'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_200'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_208'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_208'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_208'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_208'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_101'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_101'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_101'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_101'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_189'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_189'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_189'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_189'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_301'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_301'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_301'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_301'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_300'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_300'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_300'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_300'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_302'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_302'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_302'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_302'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_272'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_272'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_272'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_272'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_134'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_134'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_134'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_134'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_512'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_512'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_512'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_512'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_48'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_48'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_48'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_48'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_419'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_419'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_419'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_419'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_520'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_520'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_520'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_520'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_521'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_521'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_521'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_521'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_678'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_678'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_678'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_678'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_LOC_679'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS INS_PRI_679'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_LOC_679'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS UPD_PRI_679'); } function dropOldPostgresTriggers($receiver) { var db = $receiver; db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_14_trig ON clazzlog'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_15_trig ON clazzlogattendancerecord'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_15_trig ON clazzlogattendancerecord'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_21_trig ON schedule'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_21_trig ON schedule'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_17_trig ON daterange'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_17_trig ON daterange'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_28_trig ON holidaycalendar'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_28_trig ON holidaycalendar'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_99_trig ON holiday'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_99_trig ON holiday'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_173_trig ON scheduledcheck'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_173_trig ON scheduledcheck'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_53_trig ON auditlog'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_53_trig ON auditlog'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_56_trig ON customfield'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_56_trig ON customfield'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_57_trig ON customfieldvalue'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_57_trig ON customfieldvalue'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_55_trig ON customfieldvalueoption'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_55_trig ON customfieldvalueoption'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_9_trig ON person'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_9_trig ON person'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_6_trig ON clazz'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_6_trig ON clazz'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_65_trig ON clazzenrolment'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_65_trig ON clazzenrolment'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_410_trig ON leavingreason'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_410_trig ON leavingreason'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_178_trig ON personcustomfieldvalue'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_178_trig ON personcustomfieldvalue'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_42_trig ON contententry'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_42_trig ON contententry'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_3_trig ON contententrycontentcategoryjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_3_trig ON contententrycontentcategoryjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_7_trig ON contententryparentchildjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_7_trig ON contententryparentchildjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_8_trig ON contententryrelatedentryjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_8_trig ON contententryrelatedentryjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_2_trig ON contentcategoryschema'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_2_trig ON contentcategoryschema'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_1_trig ON contentcategory'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_1_trig ON contentcategory'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_13_trig ON language'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_13_trig ON language'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_10_trig ON languagevariant'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_10_trig ON languagevariant'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_45_trig ON role'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_45_trig ON role'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_47_trig ON entityrole'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_47_trig ON entityrole'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_43_trig ON persongroup'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_43_trig ON persongroup'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_44_trig ON persongroupmember'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_44_trig ON persongroupmember'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_50_trig ON personpicture'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_50_trig ON personpicture'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_51_trig ON container'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_51_trig ON container'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_62_trig ON verbentity'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_62_trig ON verbentity'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_64_trig ON xobjectentity'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_64_trig ON xobjectentity'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_60_trig ON statemententity'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_60_trig ON statemententity'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_66_trig ON contextxobjectstatementjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_66_trig ON contextxobjectstatementjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_68_trig ON agententity'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_68_trig ON agententity'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_70_trig ON stateentity'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_70_trig ON stateentity'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_72_trig ON statecontententity'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_72_trig ON statecontententity'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_74_trig ON xlangmapentry'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_74_trig ON xlangmapentry'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_164_trig ON school'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_164_trig ON school'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_200_trig ON schoolmember'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_200_trig ON schoolmember'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_208_trig ON comments'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_208_trig ON comments'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_101_trig ON report'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_101_trig ON report'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_189_trig ON site'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_189_trig ON site'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_301_trig ON learnergroup'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_301_trig ON learnergroup'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_300_trig ON learnergroupmember'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_300_trig ON learnergroupmember'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_302_trig ON grouplearningsession'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_302_trig ON grouplearningsession'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_272_trig ON siteterms'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_272_trig ON siteterms'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_134_trig ON clazzcontentjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_134_trig ON clazzcontentjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_512_trig ON personparentjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_512_trig ON personparentjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_48_trig ON scopedgrant'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_48_trig ON scopedgrant'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_419_trig ON errorreport'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_419_trig ON errorreport'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_520_trig ON clazzassignment'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_520_trig ON clazzassignment'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_521_trig ON clazzassignmentcontentjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_521_trig ON clazzassignmentcontentjoin'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_678_trig ON personauth2'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_678_trig ON personauth2'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_679_trig ON usersession'); db.execSQL_61zpoe$('DROP TRIGGER IF EXISTS inccsn_679_trig ON usersession'); } function dropOldPostgresFunctions($receiver) { $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_101_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_10_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_134_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_13_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_14_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_15_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_164_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_173_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_178_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_17_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_189_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_1_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_200_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_208_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_21_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_272_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_28_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_2_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_300_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_301_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_302_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_3_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_410_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_419_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_42_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_43_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_44_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_45_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_47_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_48_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_50_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_512_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_51_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_520_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_521_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_53_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_55_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_56_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_57_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_60_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_62_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_64_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_65_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_66_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_678_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_679_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_68_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_6_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_70_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_72_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_74_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_7_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_8_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_99_fn'); $receiver.execSQL_61zpoe$('DROP FUNCTION IF EXISTS inccsn_9_fn'); } function addReplicationEntities($receiver) { var _stmtList = ArrayList_init(); var element = 'DROP TABLE IF EXISTS PersonCustomFieldValue'; _stmtList.add_11rb$(element); var db = $receiver; if (dbType(db) === 1) { var element_0 = ' CREATE TABLE IF NOT EXISTS ClazzLogReplicate ( clPk INTEGER NOT NULL, clVersionId INTEGER NOT NULL DEFAULT 0, clDestination INTEGER NOT NULL, clPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (clPk, clDestination)) '; _stmtList.add_11rb$(element_0); var element_1 = ' CREATE INDEX index_ClazzLogReplicate_clPk_clDestination_clVersionId ON ClazzLogReplicate (clPk, clDestination, clVersionId) '; _stmtList.add_11rb$(element_1); var element_2 = ' CREATE INDEX index_ClazzLogReplicate_clDestination_clPending ON ClazzLogReplicate (clDestination, clPending) '; _stmtList.add_11rb$(element_2); var element_3 = ' CREATE TRIGGER ch_ins_14 AFTER INSERT ON ClazzLog BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 14 AS chTableId, NEW.clazzLogUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 14 AND chEntityPk = NEW.clazzLogUid); END '; _stmtList.add_11rb$(element_3); var element_4 = ' CREATE TRIGGER ch_upd_14 AFTER UPDATE ON ClazzLog BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 14 AS chTableId, NEW.clazzLogUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 14 AND chEntityPk = NEW.clazzLogUid); END '; _stmtList.add_11rb$(element_4); var element_5 = ' CREATE TRIGGER ch_del_14 AFTER DELETE ON ClazzLog BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 14 AS chTableId, OLD.clazzLogUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 14 AND chEntityPk = OLD.clazzLogUid); END '; _stmtList.add_11rb$(element_5); var element_6 = 'CREATE VIEW ClazzLog_ReceiveView AS SELECT ClazzLog.*, ClazzLogReplicate.* FROM ClazzLog LEFT JOIN ClazzLogReplicate ON ClazzLogReplicate.clPk = ClazzLog.clazzLogUid '; _stmtList.add_11rb$(element_6); var element_7 = ' CREATE TRIGGER clazzlog_remote_insert_ins INSTEAD OF INSERT ON ClazzLog_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzLog(clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES (NEW.clazzLogUid, NEW.clazzLogClazzUid, NEW.logDate, NEW.timeRecorded, NEW.clazzLogDone, NEW.cancellationNote, NEW.clazzLogCancelled, NEW.clazzLogNumPresent, NEW.clazzLogNumAbsent, NEW.clazzLogNumPartial, NEW.clazzLogScheduleUid, NEW.clazzLogStatusFlag, NEW.clazzLogMSQN, NEW.clazzLogLCSN, NEW.clazzLogLCB, NEW.clazzLogLastChangedTime) /*psql ON CONFLICT (clazzLogUid) DO UPDATE SET clazzLogClazzUid = EXCLUDED.clazzLogClazzUid, logDate = EXCLUDED.logDate, timeRecorded = EXCLUDED.timeRecorded, clazzLogDone = EXCLUDED.clazzLogDone, cancellationNote = EXCLUDED.cancellationNote, clazzLogCancelled = EXCLUDED.clazzLogCancelled, clazzLogNumPresent = EXCLUDED.clazzLogNumPresent, clazzLogNumAbsent = EXCLUDED.clazzLogNumAbsent, clazzLogNumPartial = EXCLUDED.clazzLogNumPartial, clazzLogScheduleUid = EXCLUDED.clazzLogScheduleUid, clazzLogStatusFlag = EXCLUDED.clazzLogStatusFlag, clazzLogMSQN = EXCLUDED.clazzLogMSQN, clazzLogLCSN = EXCLUDED.clazzLogLCSN, clazzLogLCB = EXCLUDED.clazzLogLCB, clazzLogLastChangedTime = EXCLUDED.clazzLogLastChangedTime */; END '; _stmtList.add_11rb$(element_7); var element_8 = ' CREATE TABLE IF NOT EXISTS ClazzLogAttendanceRecordReplicate ( clarPk INTEGER NOT NULL, clarVersionId INTEGER NOT NULL DEFAULT 0, clarDestination INTEGER NOT NULL, clarPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (clarPk, clarDestination)) '; _stmtList.add_11rb$(element_8); var element_9 = ' CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarPk_clarDestination_clarVersionId ON ClazzLogAttendanceRecordReplicate (clarPk, clarDestination, clarVersionId) '; _stmtList.add_11rb$(element_9); var element_10 = ' CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarDestination_clarPending ON ClazzLogAttendanceRecordReplicate (clarDestination, clarPending) '; _stmtList.add_11rb$(element_10); var element_11 = ' CREATE TRIGGER ch_ins_15 AFTER INSERT ON ClazzLogAttendanceRecord BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 15 AS chTableId, NEW.clazzLogAttendanceRecordUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 15 AND chEntityPk = NEW.clazzLogAttendanceRecordUid); END '; _stmtList.add_11rb$(element_11); var element_12 = ' CREATE TRIGGER ch_upd_15 AFTER UPDATE ON ClazzLogAttendanceRecord BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 15 AS chTableId, NEW.clazzLogAttendanceRecordUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 15 AND chEntityPk = NEW.clazzLogAttendanceRecordUid); END '; _stmtList.add_11rb$(element_12); var element_13 = ' CREATE TRIGGER ch_del_15 AFTER DELETE ON ClazzLogAttendanceRecord BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 15 AS chTableId, OLD.clazzLogAttendanceRecordUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 15 AND chEntityPk = OLD.clazzLogAttendanceRecordUid); END '; _stmtList.add_11rb$(element_13); var element_14 = 'CREATE VIEW ClazzLogAttendanceRecord_ReceiveView AS SELECT ClazzLogAttendanceRecord.*, ClazzLogAttendanceRecordReplicate.* FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLogAttendanceRecordReplicate ON ClazzLogAttendanceRecordReplicate.clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid '; _stmtList.add_11rb$(element_14); var element_15 = ' CREATE TRIGGER clazzlogattendancerecord_remote_insert_ins INSTEAD OF INSERT ON ClazzLogAttendanceRecord_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzLogAttendanceRecord(clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES (NEW.clazzLogAttendanceRecordUid, NEW.clazzLogAttendanceRecordClazzLogUid, NEW.clazzLogAttendanceRecordPersonUid, NEW.attendanceStatus, NEW.clazzLogAttendanceRecordMasterChangeSeqNum, NEW.clazzLogAttendanceRecordLocalChangeSeqNum, NEW.clazzLogAttendanceRecordLastChangedBy, NEW.clazzLogAttendanceRecordLastChangedTime) /*psql ON CONFLICT (clazzLogAttendanceRecordUid) DO UPDATE SET clazzLogAttendanceRecordClazzLogUid = EXCLUDED.clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid = EXCLUDED.clazzLogAttendanceRecordPersonUid, attendanceStatus = EXCLUDED.attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy = EXCLUDED.clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime = EXCLUDED.clazzLogAttendanceRecordLastChangedTime */; END '; _stmtList.add_11rb$(element_15); var element_16 = ' CREATE TABLE IF NOT EXISTS ScheduleReplicate ( schedulePk INTEGER NOT NULL, scheduleVersionId INTEGER NOT NULL DEFAULT 0, scheduleDestination INTEGER NOT NULL, schedulePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (schedulePk, scheduleDestination)) '; _stmtList.add_11rb$(element_16); var element_17 = ' CREATE INDEX index_ScheduleReplicate_schedulePk_scheduleDestination_scheduleVersionId ON ScheduleReplicate (schedulePk, scheduleDestination, scheduleVersionId) '; _stmtList.add_11rb$(element_17); var element_18 = ' CREATE INDEX index_ScheduleReplicate_scheduleDestination_schedulePending ON ScheduleReplicate (scheduleDestination, schedulePending) '; _stmtList.add_11rb$(element_18); var element_19 = ' CREATE TRIGGER ch_ins_21 AFTER INSERT ON Schedule BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 21 AS chTableId, NEW.scheduleUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 21 AND chEntityPk = NEW.scheduleUid); END '; _stmtList.add_11rb$(element_19); var element_20 = ' CREATE TRIGGER ch_upd_21 AFTER UPDATE ON Schedule BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 21 AS chTableId, NEW.scheduleUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 21 AND chEntityPk = NEW.scheduleUid); END '; _stmtList.add_11rb$(element_20); var element_21 = ' CREATE TRIGGER ch_del_21 AFTER DELETE ON Schedule BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 21 AS chTableId, OLD.scheduleUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 21 AND chEntityPk = OLD.scheduleUid); END '; _stmtList.add_11rb$(element_21); var element_22 = 'CREATE VIEW Schedule_ReceiveView AS SELECT Schedule.*, ScheduleReplicate.* FROM Schedule LEFT JOIN ScheduleReplicate ON ScheduleReplicate.schedulePk = Schedule.scheduleUid '; _stmtList.add_11rb$(element_22); var element_23 = ' CREATE TRIGGER schedule_remote_insert_ins INSTEAD OF INSERT ON Schedule_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Schedule(scheduleUid, sceduleStartTime, scheduleEndTime, scheduleDay, scheduleMonth, scheduleFrequency, umCalendarUid, scheduleClazzUid, scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum, scheduleLastChangedBy, scheduleLastChangedTime, scheduleActive) VALUES (NEW.scheduleUid, NEW.sceduleStartTime, NEW.scheduleEndTime, NEW.scheduleDay, NEW.scheduleMonth, NEW.scheduleFrequency, NEW.umCalendarUid, NEW.scheduleClazzUid, NEW.scheduleMasterChangeSeqNum, NEW.scheduleLocalChangeSeqNum, NEW.scheduleLastChangedBy, NEW.scheduleLastChangedTime, NEW.scheduleActive) /*psql ON CONFLICT (scheduleUid) DO UPDATE SET sceduleStartTime = EXCLUDED.sceduleStartTime, scheduleEndTime = EXCLUDED.scheduleEndTime, scheduleDay = EXCLUDED.scheduleDay, scheduleMonth = EXCLUDED.scheduleMonth, scheduleFrequency = EXCLUDED.scheduleFrequency, umCalendarUid = EXCLUDED.umCalendarUid, scheduleClazzUid = EXCLUDED.scheduleClazzUid, scheduleMasterChangeSeqNum = EXCLUDED.scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum = EXCLUDED.scheduleLocalChangeSeqNum, scheduleLastChangedBy = EXCLUDED.scheduleLastChangedBy, scheduleLastChangedTime = EXCLUDED.scheduleLastChangedTime, scheduleActive = EXCLUDED.scheduleActive */; END '; _stmtList.add_11rb$(element_23); var element_24 = ' CREATE TABLE IF NOT EXISTS HolidayCalendarReplicate ( hcPk INTEGER NOT NULL, hcVersionId INTEGER NOT NULL DEFAULT 0, hcDestination INTEGER NOT NULL, hcPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (hcPk, hcDestination)) '; _stmtList.add_11rb$(element_24); var element_25 = ' CREATE INDEX index_HolidayCalendarReplicate_hcPk_hcDestination_hcVersionId ON HolidayCalendarReplicate (hcPk, hcDestination, hcVersionId) '; _stmtList.add_11rb$(element_25); var element_26 = ' CREATE INDEX index_HolidayCalendarReplicate_hcDestination_hcPending ON HolidayCalendarReplicate (hcDestination, hcPending) '; _stmtList.add_11rb$(element_26); var element_27 = ' CREATE TRIGGER ch_ins_28 AFTER INSERT ON HolidayCalendar BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 28 AS chTableId, NEW.umCalendarUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 28 AND chEntityPk = NEW.umCalendarUid); END '; _stmtList.add_11rb$(element_27); var element_28 = ' CREATE TRIGGER ch_upd_28 AFTER UPDATE ON HolidayCalendar BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 28 AS chTableId, NEW.umCalendarUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 28 AND chEntityPk = NEW.umCalendarUid); END '; _stmtList.add_11rb$(element_28); var element_29 = ' CREATE TRIGGER ch_del_28 AFTER DELETE ON HolidayCalendar BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 28 AS chTableId, OLD.umCalendarUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 28 AND chEntityPk = OLD.umCalendarUid); END '; _stmtList.add_11rb$(element_29); var element_30 = 'CREATE VIEW HolidayCalendar_ReceiveView AS SELECT HolidayCalendar.*, HolidayCalendarReplicate.* FROM HolidayCalendar LEFT JOIN HolidayCalendarReplicate ON HolidayCalendarReplicate.hcPk = HolidayCalendar.umCalendarUid '; _stmtList.add_11rb$(element_30); var element_31 = ' CREATE TRIGGER holidaycalendar_remote_insert_ins INSTEAD OF INSERT ON HolidayCalendar_ReceiveView FOR EACH ROW BEGIN REPLACE INTO HolidayCalendar(umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES (NEW.umCalendarUid, NEW.umCalendarName, NEW.umCalendarCategory, NEW.umCalendarActive, NEW.umCalendarMasterChangeSeqNum, NEW.umCalendarLocalChangeSeqNum, NEW.umCalendarLastChangedBy, NEW.umCalendarLct) /*psql ON CONFLICT (umCalendarUid) DO UPDATE SET umCalendarName = EXCLUDED.umCalendarName, umCalendarCategory = EXCLUDED.umCalendarCategory, umCalendarActive = EXCLUDED.umCalendarActive, umCalendarMasterChangeSeqNum = EXCLUDED.umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum = EXCLUDED.umCalendarLocalChangeSeqNum, umCalendarLastChangedBy = EXCLUDED.umCalendarLastChangedBy, umCalendarLct = EXCLUDED.umCalendarLct */; END '; _stmtList.add_11rb$(element_31); var element_32 = ' CREATE TABLE IF NOT EXISTS HolidayReplicate ( holidayPk INTEGER NOT NULL, holidayVersionId INTEGER NOT NULL DEFAULT 0, holidayDestination INTEGER NOT NULL, holidayPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (holidayPk, holidayDestination)) '; _stmtList.add_11rb$(element_32); var element_33 = ' CREATE INDEX index_HolidayReplicate_holidayPk_holidayDestination_holidayVersionId ON HolidayReplicate (holidayPk, holidayDestination, holidayVersionId) '; _stmtList.add_11rb$(element_33); var element_34 = ' CREATE INDEX index_HolidayReplicate_holidayDestination_holidayPending ON HolidayReplicate (holidayDestination, holidayPending) '; _stmtList.add_11rb$(element_34); var element_35 = ' CREATE TRIGGER ch_ins_99 AFTER INSERT ON Holiday BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 99 AS chTableId, NEW.holUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 99 AND chEntityPk = NEW.holUid); END '; _stmtList.add_11rb$(element_35); var element_36 = ' CREATE TRIGGER ch_upd_99 AFTER UPDATE ON Holiday BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 99 AS chTableId, NEW.holUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 99 AND chEntityPk = NEW.holUid); END '; _stmtList.add_11rb$(element_36); var element_37 = ' CREATE TRIGGER ch_del_99 AFTER DELETE ON Holiday BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 99 AS chTableId, OLD.holUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 99 AND chEntityPk = OLD.holUid); END '; _stmtList.add_11rb$(element_37); var element_38 = 'CREATE VIEW Holiday_ReceiveView AS SELECT Holiday.*, HolidayReplicate.* FROM Holiday LEFT JOIN HolidayReplicate ON HolidayReplicate.holidayPk = Holiday.holUid '; _stmtList.add_11rb$(element_38); var element_39 = ' CREATE TRIGGER holiday_remote_insert_ins INSTEAD OF INSERT ON Holiday_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Holiday(holUid, holMasterCsn, holLocalCsn, holLastModBy, holLct, holActive, holHolidayCalendarUid, holStartTime, holEndTime, holName) VALUES (NEW.holUid, NEW.holMasterCsn, NEW.holLocalCsn, NEW.holLastModBy, NEW.holLct, NEW.holActive, NEW.holHolidayCalendarUid, NEW.holStartTime, NEW.holEndTime, NEW.holName) /*psql ON CONFLICT (holUid) DO UPDATE SET holMasterCsn = EXCLUDED.holMasterCsn, holLocalCsn = EXCLUDED.holLocalCsn, holLastModBy = EXCLUDED.holLastModBy, holLct = EXCLUDED.holLct, holActive = EXCLUDED.holActive, holHolidayCalendarUid = EXCLUDED.holHolidayCalendarUid, holStartTime = EXCLUDED.holStartTime, holEndTime = EXCLUDED.holEndTime, holName = EXCLUDED.holName */; END '; _stmtList.add_11rb$(element_39); var element_40 = ' CREATE TABLE IF NOT EXISTS PersonReplicate ( personPk INTEGER NOT NULL, personVersionId INTEGER NOT NULL DEFAULT 0, personDestination INTEGER NOT NULL, personPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (personPk, personDestination)) '; _stmtList.add_11rb$(element_40); var element_41 = ' CREATE INDEX index_PersonReplicate_personPk_personDestination_personVersionId ON PersonReplicate (personPk, personDestination, personVersionId) '; _stmtList.add_11rb$(element_41); var element_42 = ' CREATE INDEX index_PersonReplicate_personDestination_personPending ON PersonReplicate (personDestination, personPending) '; _stmtList.add_11rb$(element_42); var element_43 = ' CREATE TRIGGER ch_ins_9 AFTER INSERT ON Person BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 9 AS chTableId, NEW.personUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 9 AND chEntityPk = NEW.personUid); END '; _stmtList.add_11rb$(element_43); var element_44 = ' CREATE TRIGGER ch_upd_9 AFTER UPDATE ON Person BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 9 AS chTableId, NEW.personUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 9 AND chEntityPk = NEW.personUid); END '; _stmtList.add_11rb$(element_44); var element_45 = ' CREATE TRIGGER ch_del_9 AFTER DELETE ON Person BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 9 AS chTableId, OLD.personUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 9 AND chEntityPk = OLD.personUid); END '; _stmtList.add_11rb$(element_45); var element_46 = 'CREATE VIEW Person_ReceiveView AS SELECT Person.*, PersonReplicate.* FROM Person LEFT JOIN PersonReplicate ON PersonReplicate.personPk = Person.personUid '; _stmtList.add_11rb$(element_46); var element_47 = ' CREATE TRIGGER person_remote_insert_ins INSTEAD OF INSERT ON Person_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Person(personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES (NEW.personUid, NEW.username, NEW.firstNames, NEW.lastName, NEW.emailAddr, NEW.phoneNum, NEW.gender, NEW.active, NEW.admin, NEW.personNotes, NEW.fatherName, NEW.fatherNumber, NEW.motherName, NEW.motherNum, NEW.dateOfBirth, NEW.personAddress, NEW.personOrgId, NEW.personGroupUid, NEW.personMasterChangeSeqNum, NEW.personLocalChangeSeqNum, NEW.personLastChangedBy, NEW.personLct, NEW.personCountry, NEW.personType) /*psql ON CONFLICT (personUid) DO UPDATE SET username = EXCLUDED.username, firstNames = EXCLUDED.firstNames, lastName = EXCLUDED.lastName, emailAddr = EXCLUDED.emailAddr, phoneNum = EXCLUDED.phoneNum, gender = EXCLUDED.gender, active = EXCLUDED.active, admin = EXCLUDED.admin, personNotes = EXCLUDED.personNotes, fatherName = EXCLUDED.fatherName, fatherNumber = EXCLUDED.fatherNumber, motherName = EXCLUDED.motherName, motherNum = EXCLUDED.motherNum, dateOfBirth = EXCLUDED.dateOfBirth, personAddress = EXCLUDED.personAddress, personOrgId = EXCLUDED.personOrgId, personGroupUid = EXCLUDED.personGroupUid, personMasterChangeSeqNum = EXCLUDED.personMasterChangeSeqNum, personLocalChangeSeqNum = EXCLUDED.personLocalChangeSeqNum, personLastChangedBy = EXCLUDED.personLastChangedBy, personLct = EXCLUDED.personLct, personCountry = EXCLUDED.personCountry, personType = EXCLUDED.personType */; END '; _stmtList.add_11rb$(element_47); var element_48 = ' CREATE TABLE IF NOT EXISTS ClazzReplicate ( clazzPk INTEGER NOT NULL, clazzVersionId INTEGER NOT NULL DEFAULT 0, clazzDestination INTEGER NOT NULL, clazzPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (clazzPk, clazzDestination)) '; _stmtList.add_11rb$(element_48); var element_49 = ' CREATE INDEX index_ClazzReplicate_clazzPk_clazzDestination_clazzVersionId ON ClazzReplicate (clazzPk, clazzDestination, clazzVersionId) '; _stmtList.add_11rb$(element_49); var element_50 = ' CREATE INDEX index_ClazzReplicate_clazzDestination_clazzPending ON ClazzReplicate (clazzDestination, clazzPending) '; _stmtList.add_11rb$(element_50); var element_51 = ' CREATE TRIGGER ch_ins_6 AFTER INSERT ON Clazz BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 6 AS chTableId, NEW.clazzUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 6 AND chEntityPk = NEW.clazzUid); END '; _stmtList.add_11rb$(element_51); var element_52 = ' CREATE TRIGGER ch_upd_6 AFTER UPDATE ON Clazz BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 6 AS chTableId, NEW.clazzUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 6 AND chEntityPk = NEW.clazzUid); END '; _stmtList.add_11rb$(element_52); var element_53 = ' CREATE TRIGGER ch_del_6 AFTER DELETE ON Clazz BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 6 AS chTableId, OLD.clazzUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 6 AND chEntityPk = OLD.clazzUid); END '; _stmtList.add_11rb$(element_53); var element_54 = 'CREATE VIEW Clazz_ReceiveView AS SELECT Clazz.*, ClazzReplicate.* FROM Clazz LEFT JOIN ClazzReplicate ON ClazzReplicate.clazzPk = Clazz.clazzUid '; _stmtList.add_11rb$(element_54); var element_55 = ' CREATE TRIGGER clazz_remote_insert_ins INSTEAD OF INSERT ON Clazz_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Clazz(clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES (NEW.clazzUid, NEW.clazzName, NEW.clazzDesc, NEW.attendanceAverage, NEW.clazzHolidayUMCalendarUid, NEW.clazzScheuleUMCalendarUid, NEW.isClazzActive, NEW.clazzLocationUid, NEW.clazzStartTime, NEW.clazzEndTime, NEW.clazzFeatures, NEW.clazzSchoolUid, NEW.clazzMasterChangeSeqNum, NEW.clazzLocalChangeSeqNum, NEW.clazzLastChangedBy, NEW.clazzLct, NEW.clazzTimeZone, NEW.clazzStudentsPersonGroupUid, NEW.clazzTeachersPersonGroupUid, NEW.clazzPendingStudentsPersonGroupUid, NEW.clazzParentsPersonGroupUid, NEW.clazzCode) /*psql ON CONFLICT (clazzUid) DO UPDATE SET clazzName = EXCLUDED.clazzName, clazzDesc = EXCLUDED.clazzDesc, attendanceAverage = EXCLUDED.attendanceAverage, clazzHolidayUMCalendarUid = EXCLUDED.clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid = EXCLUDED.clazzScheuleUMCalendarUid, isClazzActive = EXCLUDED.isClazzActive, clazzLocationUid = EXCLUDED.clazzLocationUid, clazzStartTime = EXCLUDED.clazzStartTime, clazzEndTime = EXCLUDED.clazzEndTime, clazzFeatures = EXCLUDED.clazzFeatures, clazzSchoolUid = EXCLUDED.clazzSchoolUid, clazzMasterChangeSeqNum = EXCLUDED.clazzMasterChangeSeqNum, clazzLocalChangeSeqNum = EXCLUDED.clazzLocalChangeSeqNum, clazzLastChangedBy = EXCLUDED.clazzLastChangedBy, clazzLct = EXCLUDED.clazzLct, clazzTimeZone = EXCLUDED.clazzTimeZone, clazzStudentsPersonGroupUid = EXCLUDED.clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid = EXCLUDED.clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid = EXCLUDED.clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid = EXCLUDED.clazzParentsPersonGroupUid, clazzCode = EXCLUDED.clazzCode */; END '; _stmtList.add_11rb$(element_55); var element_56 = ' CREATE TABLE IF NOT EXISTS ClazzEnrolmentReplicate ( cePk INTEGER NOT NULL, ceVersionId INTEGER NOT NULL DEFAULT 0, ceDestination INTEGER NOT NULL, cePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (cePk, ceDestination)) '; _stmtList.add_11rb$(element_56); var element_57 = ' CREATE INDEX index_ClazzEnrolmentReplicate_cePk_ceDestination_ceVersionId ON ClazzEnrolmentReplicate (cePk, ceDestination, ceVersionId) '; _stmtList.add_11rb$(element_57); var element_58 = ' CREATE INDEX index_ClazzEnrolmentReplicate_ceDestination_cePending ON ClazzEnrolmentReplicate (ceDestination, cePending) '; _stmtList.add_11rb$(element_58); var element_59 = ' CREATE TRIGGER ch_ins_65 AFTER INSERT ON ClazzEnrolment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 65 AS chTableId, NEW.clazzEnrolmentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 65 AND chEntityPk = NEW.clazzEnrolmentUid); END '; _stmtList.add_11rb$(element_59); var element_60 = ' CREATE TRIGGER ch_upd_65 AFTER UPDATE ON ClazzEnrolment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 65 AS chTableId, NEW.clazzEnrolmentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 65 AND chEntityPk = NEW.clazzEnrolmentUid); END '; _stmtList.add_11rb$(element_60); var element_61 = ' CREATE TRIGGER ch_del_65 AFTER DELETE ON ClazzEnrolment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 65 AS chTableId, OLD.clazzEnrolmentUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 65 AND chEntityPk = OLD.clazzEnrolmentUid); END '; _stmtList.add_11rb$(element_61); var element_62 = 'CREATE VIEW ClazzEnrolment_ReceiveView AS SELECT ClazzEnrolment.*, ClazzEnrolmentReplicate.* FROM ClazzEnrolment LEFT JOIN ClazzEnrolmentReplicate ON ClazzEnrolmentReplicate.cePk = ClazzEnrolment.clazzEnrolmentUid '; _stmtList.add_11rb$(element_62); var element_63 = ' CREATE TRIGGER clazzenrolment_remote_insert_ins INSTEAD OF INSERT ON ClazzEnrolment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzEnrolment(clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct) VALUES (NEW.clazzEnrolmentUid, NEW.clazzEnrolmentPersonUid, NEW.clazzEnrolmentClazzUid, NEW.clazzEnrolmentDateJoined, NEW.clazzEnrolmentDateLeft, NEW.clazzEnrolmentRole, NEW.clazzEnrolmentAttendancePercentage, NEW.clazzEnrolmentActive, NEW.clazzEnrolmentLeavingReasonUid, NEW.clazzEnrolmentOutcome, NEW.clazzEnrolmentLocalChangeSeqNum, NEW.clazzEnrolmentMasterChangeSeqNum, NEW.clazzEnrolmentLastChangedBy, NEW.clazzEnrolmentLct) /*psql ON CONFLICT (clazzEnrolmentUid) DO UPDATE SET clazzEnrolmentPersonUid = EXCLUDED.clazzEnrolmentPersonUid, clazzEnrolmentClazzUid = EXCLUDED.clazzEnrolmentClazzUid, clazzEnrolmentDateJoined = EXCLUDED.clazzEnrolmentDateJoined, clazzEnrolmentDateLeft = EXCLUDED.clazzEnrolmentDateLeft, clazzEnrolmentRole = EXCLUDED.clazzEnrolmentRole, clazzEnrolmentAttendancePercentage = EXCLUDED.clazzEnrolmentAttendancePercentage, clazzEnrolmentActive = EXCLUDED.clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid = EXCLUDED.clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome = EXCLUDED.clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum = EXCLUDED.clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum = EXCLUDED.clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy = EXCLUDED.clazzEnrolmentLastChangedBy, clazzEnrolmentLct = EXCLUDED.clazzEnrolmentLct */; END '; _stmtList.add_11rb$(element_63); var element_64 = ' CREATE TABLE IF NOT EXISTS LeavingReasonReplicate ( lrPk INTEGER NOT NULL, lrVersionId INTEGER NOT NULL DEFAULT 0, lrDestination INTEGER NOT NULL, lrPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (lrPk, lrDestination)) '; _stmtList.add_11rb$(element_64); var element_65 = ' CREATE INDEX index_LeavingReasonReplicate_lrPk_lrDestination_lrVersionId ON LeavingReasonReplicate (lrPk, lrDestination, lrVersionId) '; _stmtList.add_11rb$(element_65); var element_66 = ' CREATE INDEX index_LeavingReasonReplicate_lrDestination_lrPending ON LeavingReasonReplicate (lrDestination, lrPending) '; _stmtList.add_11rb$(element_66); var element_67 = ' CREATE TRIGGER ch_ins_410 AFTER INSERT ON LeavingReason BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 410 AS chTableId, NEW.leavingReasonUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 410 AND chEntityPk = NEW.leavingReasonUid); END '; _stmtList.add_11rb$(element_67); var element_68 = ' CREATE TRIGGER ch_upd_410 AFTER UPDATE ON LeavingReason BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 410 AS chTableId, NEW.leavingReasonUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 410 AND chEntityPk = NEW.leavingReasonUid); END '; _stmtList.add_11rb$(element_68); var element_69 = ' CREATE TRIGGER ch_del_410 AFTER DELETE ON LeavingReason BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 410 AS chTableId, OLD.leavingReasonUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 410 AND chEntityPk = OLD.leavingReasonUid); END '; _stmtList.add_11rb$(element_69); var element_70 = 'CREATE VIEW LeavingReason_ReceiveView AS SELECT LeavingReason.*, LeavingReasonReplicate.* FROM LeavingReason LEFT JOIN LeavingReasonReplicate ON LeavingReasonReplicate.lrPk = LeavingReason.leavingReasonUid '; _stmtList.add_11rb$(element_70); var element_71 = ' CREATE TRIGGER leavingreason_remote_insert_ins INSTEAD OF INSERT ON LeavingReason_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LeavingReason(leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES (NEW.leavingReasonUid, NEW.leavingReasonTitle, NEW.leavingReasonMCSN, NEW.leavingReasonCSN, NEW.leavingReasonLCB, NEW.leavingReasonLct) /*psql ON CONFLICT (leavingReasonUid) DO UPDATE SET leavingReasonTitle = EXCLUDED.leavingReasonTitle, leavingReasonMCSN = EXCLUDED.leavingReasonMCSN, leavingReasonCSN = EXCLUDED.leavingReasonCSN, leavingReasonLCB = EXCLUDED.leavingReasonLCB, leavingReasonLct = EXCLUDED.leavingReasonLct */; END '; _stmtList.add_11rb$(element_71); var element_72 = ' CREATE TABLE IF NOT EXISTS ContentEntryReplicate ( cePk INTEGER NOT NULL, ceVersionId INTEGER NOT NULL DEFAULT 0, ceDestination INTEGER NOT NULL, cePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (cePk, ceDestination)) '; _stmtList.add_11rb$(element_72); var element_73 = ' CREATE INDEX index_ContentEntryReplicate_cePk_ceDestination_ceVersionId ON ContentEntryReplicate (cePk, ceDestination, ceVersionId) '; _stmtList.add_11rb$(element_73); var element_74 = ' CREATE INDEX index_ContentEntryReplicate_ceDestination_cePending ON ContentEntryReplicate (ceDestination, cePending) '; _stmtList.add_11rb$(element_74); var element_75 = ' CREATE TRIGGER ch_ins_42 AFTER INSERT ON ContentEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 42 AS chTableId, NEW.contentEntryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 42 AND chEntityPk = NEW.contentEntryUid); END '; _stmtList.add_11rb$(element_75); var element_76 = ' CREATE TRIGGER ch_upd_42 AFTER UPDATE ON ContentEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 42 AS chTableId, NEW.contentEntryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 42 AND chEntityPk = NEW.contentEntryUid); END '; _stmtList.add_11rb$(element_76); var element_77 = ' CREATE TRIGGER ch_del_42 AFTER DELETE ON ContentEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 42 AS chTableId, OLD.contentEntryUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 42 AND chEntityPk = OLD.contentEntryUid); END '; _stmtList.add_11rb$(element_77); var element_78 = 'CREATE VIEW ContentEntry_ReceiveView AS SELECT ContentEntry.*, ContentEntryReplicate.* FROM ContentEntry LEFT JOIN ContentEntryReplicate ON ContentEntryReplicate.cePk = ContentEntry.contentEntryUid '; _stmtList.add_11rb$(element_78); var element_79 = ' CREATE TRIGGER contententry_remote_insert_ins INSTEAD OF INSERT ON ContentEntry_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntry(contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES (NEW.contentEntryUid, NEW.title, NEW.description, NEW.entryId, NEW.author, NEW.publisher, NEW.licenseType, NEW.licenseName, NEW.licenseUrl, NEW.sourceUrl, NEW.thumbnailUrl, NEW.lastModified, NEW.primaryLanguageUid, NEW.languageVariantUid, NEW.contentFlags, NEW.leaf, NEW.publik, NEW.ceInactive, NEW.completionCriteria, NEW.minScore, NEW.contentTypeFlag, NEW.contentOwner, NEW.contentEntryLocalChangeSeqNum, NEW.contentEntryMasterChangeSeqNum, NEW.contentEntryLastChangedBy, NEW.contentEntryLct) /*psql ON CONFLICT (contentEntryUid) DO UPDATE SET title = EXCLUDED.title, description = EXCLUDED.description, entryId = EXCLUDED.entryId, author = EXCLUDED.author, publisher = EXCLUDED.publisher, licenseType = EXCLUDED.licenseType, licenseName = EXCLUDED.licenseName, licenseUrl = EXCLUDED.licenseUrl, sourceUrl = EXCLUDED.sourceUrl, thumbnailUrl = EXCLUDED.thumbnailUrl, lastModified = EXCLUDED.lastModified, primaryLanguageUid = EXCLUDED.primaryLanguageUid, languageVariantUid = EXCLUDED.languageVariantUid, contentFlags = EXCLUDED.contentFlags, leaf = EXCLUDED.leaf, publik = EXCLUDED.publik, ceInactive = EXCLUDED.ceInactive, completionCriteria = EXCLUDED.completionCriteria, minScore = EXCLUDED.minScore, contentTypeFlag = EXCLUDED.contentTypeFlag, contentOwner = EXCLUDED.contentOwner, contentEntryLocalChangeSeqNum = EXCLUDED.contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum = EXCLUDED.contentEntryMasterChangeSeqNum, contentEntryLastChangedBy = EXCLUDED.contentEntryLastChangedBy, contentEntryLct = EXCLUDED.contentEntryLct*/; END '; _stmtList.add_11rb$(element_79); var element_80 = ' CREATE TABLE IF NOT EXISTS ContentEntryContentCategoryJoinReplicate ( ceccjPk INTEGER NOT NULL, ceccjVersionId INTEGER NOT NULL DEFAULT 0, ceccjDestination INTEGER NOT NULL, ceccjPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (ceccjPk, ceccjDestination)) '; _stmtList.add_11rb$(element_80); var element_81 = ' CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjPk_ceccjDestination_ceccjVersionId ON ContentEntryContentCategoryJoinReplicate (ceccjPk, ceccjDestination, ceccjVersionId) '; _stmtList.add_11rb$(element_81); var element_82 = ' CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjDestination_ceccjPending ON ContentEntryContentCategoryJoinReplicate (ceccjDestination, ceccjPending) '; _stmtList.add_11rb$(element_82); var element_83 = ' CREATE TRIGGER ch_ins_3 AFTER INSERT ON ContentEntryContentCategoryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 3 AS chTableId, NEW.ceccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 3 AND chEntityPk = NEW.ceccjUid); END '; _stmtList.add_11rb$(element_83); var element_84 = ' CREATE TRIGGER ch_upd_3 AFTER UPDATE ON ContentEntryContentCategoryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 3 AS chTableId, NEW.ceccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 3 AND chEntityPk = NEW.ceccjUid); END '; _stmtList.add_11rb$(element_84); var element_85 = ' CREATE TRIGGER ch_del_3 AFTER DELETE ON ContentEntryContentCategoryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 3 AS chTableId, OLD.ceccjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 3 AND chEntityPk = OLD.ceccjUid); END '; _stmtList.add_11rb$(element_85); var element_86 = 'CREATE VIEW ContentEntryContentCategoryJoin_ReceiveView AS SELECT ContentEntryContentCategoryJoin.*, ContentEntryContentCategoryJoinReplicate.* FROM ContentEntryContentCategoryJoin LEFT JOIN ContentEntryContentCategoryJoinReplicate ON ContentEntryContentCategoryJoinReplicate.ceccjPk = ContentEntryContentCategoryJoin.ceccjUid '; _stmtList.add_11rb$(element_86); var element_87 = ' CREATE TRIGGER contententrycontentcategoryjoin_remote_insert_ins INSTEAD OF INSERT ON ContentEntryContentCategoryJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryContentCategoryJoin(ceccjUid, ceccjContentEntryUid, ceccjContentCategoryUid, ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum, ceccjLastChangedBy, ceccjLct) VALUES (NEW.ceccjUid, NEW.ceccjContentEntryUid, NEW.ceccjContentCategoryUid, NEW.ceccjLocalChangeSeqNum, NEW.ceccjMasterChangeSeqNum, NEW.ceccjLastChangedBy, NEW.ceccjLct) /*psql ON CONFLICT (ceccjUid) DO UPDATE SET ceccjContentEntryUid = EXCLUDED.ceccjContentEntryUid, ceccjContentCategoryUid = EXCLUDED.ceccjContentCategoryUid, ceccjLocalChangeSeqNum = EXCLUDED.ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum = EXCLUDED.ceccjMasterChangeSeqNum, ceccjLastChangedBy = EXCLUDED.ceccjLastChangedBy, ceccjLct = EXCLUDED.ceccjLct */; END '; _stmtList.add_11rb$(element_87); var element_88 = ' CREATE TABLE IF NOT EXISTS ContentEntryParentChildJoinReplicate ( cepcjPk INTEGER NOT NULL, cepcjVersionId INTEGER NOT NULL DEFAULT 0, cepcjDestination INTEGER NOT NULL, cepcjPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (cepcjPk, cepcjDestination)) '; _stmtList.add_11rb$(element_88); var element_89 = ' CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjPk_cepcjDestination_cepcjVersionId ON ContentEntryParentChildJoinReplicate (cepcjPk, cepcjDestination, cepcjVersionId) '; _stmtList.add_11rb$(element_89); var element_90 = ' CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjDestination_cepcjPending ON ContentEntryParentChildJoinReplicate (cepcjDestination, cepcjPending) '; _stmtList.add_11rb$(element_90); var element_91 = ' CREATE TRIGGER ch_ins_7 AFTER INSERT ON ContentEntryParentChildJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 7 AS chTableId, NEW.cepcjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 7 AND chEntityPk = NEW.cepcjUid); END '; _stmtList.add_11rb$(element_91); var element_92 = ' CREATE TRIGGER ch_upd_7 AFTER UPDATE ON ContentEntryParentChildJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 7 AS chTableId, NEW.cepcjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 7 AND chEntityPk = NEW.cepcjUid); END '; _stmtList.add_11rb$(element_92); var element_93 = ' CREATE TRIGGER ch_del_7 AFTER DELETE ON ContentEntryParentChildJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 7 AS chTableId, OLD.cepcjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 7 AND chEntityPk = OLD.cepcjUid); END '; _stmtList.add_11rb$(element_93); var element_94 = 'CREATE VIEW ContentEntryParentChildJoin_ReceiveView AS SELECT ContentEntryParentChildJoin.*, ContentEntryParentChildJoinReplicate.* FROM ContentEntryParentChildJoin LEFT JOIN ContentEntryParentChildJoinReplicate ON ContentEntryParentChildJoinReplicate.cepcjPk = ContentEntryParentChildJoin.cepcjUid '; _stmtList.add_11rb$(element_94); var element_95 = ' CREATE TRIGGER contententryparentchildjoin_remote_insert_ins INSTEAD OF INSERT ON ContentEntryParentChildJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryParentChildJoin(cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex, cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct) VALUES (NEW.cepcjParentContentEntryUid, NEW.cepcjChildContentEntryUid, NEW.childIndex, NEW.cepcjUid, NEW.cepcjLocalChangeSeqNum, NEW.cepcjMasterChangeSeqNum, NEW.cepcjLastChangedBy, NEW.cepcjLct) /*psql ON CONFLICT (cepcjUid) DO UPDATE SET cepcjParentContentEntryUid = EXCLUDED.cepcjParentContentEntryUid, cepcjChildContentEntryUid = EXCLUDED.cepcjChildContentEntryUid, childIndex = EXCLUDED.childIndex, cepcjLocalChangeSeqNum = EXCLUDED.cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum = EXCLUDED.cepcjMasterChangeSeqNum, cepcjLastChangedBy = EXCLUDED.cepcjLastChangedBy, cepcjLct = EXCLUDED.cepcjLct */; END '; _stmtList.add_11rb$(element_95); var element_96 = ' CREATE TABLE IF NOT EXISTS ContentEntryRelatedEntryJoinReplicate ( cerejPk INTEGER NOT NULL, cerejVersionId INTEGER NOT NULL DEFAULT 0, cerejDestination INTEGER NOT NULL, cerejPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (cerejPk, cerejDestination)) '; _stmtList.add_11rb$(element_96); var element_97 = ' CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejPk_cerejDestination_cerejVersionId ON ContentEntryRelatedEntryJoinReplicate (cerejPk, cerejDestination, cerejVersionId) '; _stmtList.add_11rb$(element_97); var element_98 = ' CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejDestination_cerejPending ON ContentEntryRelatedEntryJoinReplicate (cerejDestination, cerejPending) '; _stmtList.add_11rb$(element_98); var element_99 = ' CREATE TRIGGER ch_ins_8 AFTER INSERT ON ContentEntryRelatedEntryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 8 AS chTableId, NEW.cerejUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 8 AND chEntityPk = NEW.cerejUid); END '; _stmtList.add_11rb$(element_99); var element_100 = ' CREATE TRIGGER ch_upd_8 AFTER UPDATE ON ContentEntryRelatedEntryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 8 AS chTableId, NEW.cerejUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 8 AND chEntityPk = NEW.cerejUid); END '; _stmtList.add_11rb$(element_100); var element_101 = ' CREATE TRIGGER ch_del_8 AFTER DELETE ON ContentEntryRelatedEntryJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 8 AS chTableId, OLD.cerejUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 8 AND chEntityPk = OLD.cerejUid); END '; _stmtList.add_11rb$(element_101); var element_102 = 'CREATE VIEW ContentEntryRelatedEntryJoin_ReceiveView AS SELECT ContentEntryRelatedEntryJoin.*, ContentEntryRelatedEntryJoinReplicate.* FROM ContentEntryRelatedEntryJoin LEFT JOIN ContentEntryRelatedEntryJoinReplicate ON ContentEntryRelatedEntryJoinReplicate.cerejPk = ContentEntryRelatedEntryJoin.cerejUid '; _stmtList.add_11rb$(element_102); var element_103 = ' CREATE TRIGGER contententryrelatedentryjoin_remote_insert_ins INSTEAD OF INSERT ON ContentEntryRelatedEntryJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryRelatedEntryJoin(cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct) VALUES (NEW.cerejUid, NEW.cerejContentEntryUid, NEW.cerejRelatedEntryUid, NEW.cerejLastChangedBy, NEW.relType, NEW.comment, NEW.cerejRelLanguageUid, NEW.cerejLocalChangeSeqNum, NEW.cerejMasterChangeSeqNum, NEW.cerejLct) /*psql ON CONFLICT (cerejUid) DO UPDATE SET cerejContentEntryUid = EXCLUDED.cerejContentEntryUid, cerejRelatedEntryUid = EXCLUDED.cerejRelatedEntryUid, cerejLastChangedBy = EXCLUDED.cerejLastChangedBy, relType = EXCLUDED.relType, comment = EXCLUDED.comment, cerejRelLanguageUid = EXCLUDED.cerejRelLanguageUid, cerejLocalChangeSeqNum = EXCLUDED.cerejLocalChangeSeqNum, cerejMasterChangeSeqNum = EXCLUDED.cerejMasterChangeSeqNum, cerejLct = EXCLUDED.cerejLct */; END '; _stmtList.add_11rb$(element_103); var element_104 = ' CREATE TABLE IF NOT EXISTS ContentCategorySchemaReplicate ( ccsPk INTEGER NOT NULL, ccsVersionId INTEGER NOT NULL DEFAULT 0, ccsDestination INTEGER NOT NULL, ccsPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (ccsPk, ccsDestination)) '; _stmtList.add_11rb$(element_104); var element_105 = ' CREATE INDEX index_ContentCategorySchemaReplicate_ccsPk_ccsDestination_ccsVersionId ON ContentCategorySchemaReplicate (ccsPk, ccsDestination, ccsVersionId) '; _stmtList.add_11rb$(element_105); var element_106 = ' CREATE INDEX index_ContentCategorySchemaReplicate_ccsDestination_ccsPending ON ContentCategorySchemaReplicate (ccsDestination, ccsPending) '; _stmtList.add_11rb$(element_106); var element_107 = ' CREATE TRIGGER ch_ins_2 AFTER INSERT ON ContentCategorySchema BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 2 AS chTableId, NEW.contentCategorySchemaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 2 AND chEntityPk = NEW.contentCategorySchemaUid); END '; _stmtList.add_11rb$(element_107); var element_108 = ' CREATE TRIGGER ch_upd_2 AFTER UPDATE ON ContentCategorySchema BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 2 AS chTableId, NEW.contentCategorySchemaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 2 AND chEntityPk = NEW.contentCategorySchemaUid); END '; _stmtList.add_11rb$(element_108); var element_109 = ' CREATE TRIGGER ch_del_2 AFTER DELETE ON ContentCategorySchema BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 2 AS chTableId, OLD.contentCategorySchemaUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 2 AND chEntityPk = OLD.contentCategorySchemaUid); END '; _stmtList.add_11rb$(element_109); var element_110 = 'CREATE VIEW ContentCategorySchema_ReceiveView AS SELECT ContentCategorySchema.*, ContentCategorySchemaReplicate.* FROM ContentCategorySchema LEFT JOIN ContentCategorySchemaReplicate ON ContentCategorySchemaReplicate.ccsPk = ContentCategorySchema.contentCategorySchemaUid '; _stmtList.add_11rb$(element_110); var element_111 = ' CREATE TRIGGER contentcategoryschema_remote_insert_ins INSTEAD OF INSERT ON ContentCategorySchema_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentCategorySchema(contentCategorySchemaUid, schemaName, schemaUrl, contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy, contentCategorySchemaLct) VALUES (NEW.contentCategorySchemaUid, NEW.schemaName, NEW.schemaUrl, NEW.contentCategorySchemaLocalChangeSeqNum, NEW.contentCategorySchemaMasterChangeSeqNum, NEW.contentCategorySchemaLastChangedBy, NEW.contentCategorySchemaLct) /*psql ON CONFLICT (contentCategorySchemaUid) DO UPDATE SET schemaName = EXCLUDED.schemaName, schemaUrl = EXCLUDED.schemaUrl, contentCategorySchemaLocalChangeSeqNum = EXCLUDED.contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum = EXCLUDED.contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy = EXCLUDED.contentCategorySchemaLastChangedBy, contentCategorySchemaLct = EXCLUDED.contentCategorySchemaLct */; END '; _stmtList.add_11rb$(element_111); var element_112 = ' CREATE TABLE IF NOT EXISTS ContentCategoryReplicate ( ccPk INTEGER NOT NULL, ccVersionId INTEGER NOT NULL DEFAULT 0, ccDestination INTEGER NOT NULL, ccPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (ccPk, ccDestination)) '; _stmtList.add_11rb$(element_112); var element_113 = ' CREATE INDEX index_ContentCategoryReplicate_ccPk_ccDestination_ccVersionId ON ContentCategoryReplicate (ccPk, ccDestination, ccVersionId) '; _stmtList.add_11rb$(element_113); var element_114 = ' CREATE INDEX index_ContentCategoryReplicate_ccDestination_ccPending ON ContentCategoryReplicate (ccDestination, ccPending) '; _stmtList.add_11rb$(element_114); var element_115 = ' CREATE TRIGGER ch_ins_1 AFTER INSERT ON ContentCategory BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 1 AS chTableId, NEW.contentCategoryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 1 AND chEntityPk = NEW.contentCategoryUid); END '; _stmtList.add_11rb$(element_115); var element_116 = ' CREATE TRIGGER ch_upd_1 AFTER UPDATE ON ContentCategory BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 1 AS chTableId, NEW.contentCategoryUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 1 AND chEntityPk = NEW.contentCategoryUid); END '; _stmtList.add_11rb$(element_116); var element_117 = ' CREATE TRIGGER ch_del_1 AFTER DELETE ON ContentCategory BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 1 AS chTableId, OLD.contentCategoryUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 1 AND chEntityPk = OLD.contentCategoryUid); END '; _stmtList.add_11rb$(element_117); var element_118 = 'CREATE VIEW ContentCategory_ReceiveView AS SELECT ContentCategory.*, ContentCategoryReplicate.* FROM ContentCategory LEFT JOIN ContentCategoryReplicate ON ContentCategoryReplicate.ccPk = ContentCategory.contentCategoryUid '; _stmtList.add_11rb$(element_118); var element_119 = ' CREATE TRIGGER contentcategory_remote_insert_ins INSTEAD OF INSERT ON ContentCategory_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentCategory(contentCategoryUid, ctnCatContentCategorySchemaUid, name, contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy, contentCategoryLct) VALUES (NEW.contentCategoryUid, NEW.ctnCatContentCategorySchemaUid, NEW.name, NEW.contentCategoryLocalChangeSeqNum, NEW.contentCategoryMasterChangeSeqNum, NEW.contentCategoryLastChangedBy, NEW.contentCategoryLct) /*psql ON CONFLICT (contentCategoryUid) DO UPDATE SET ctnCatContentCategorySchemaUid = EXCLUDED.ctnCatContentCategorySchemaUid, name = EXCLUDED.name, contentCategoryLocalChangeSeqNum = EXCLUDED.contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum = EXCLUDED.contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy = EXCLUDED.contentCategoryLastChangedBy, contentCategoryLct = EXCLUDED.contentCategoryLct */; END '; _stmtList.add_11rb$(element_119); var element_120 = ' CREATE TABLE IF NOT EXISTS LanguageReplicate ( languagePk INTEGER NOT NULL, languageVersionId INTEGER NOT NULL DEFAULT 0, languageDestination INTEGER NOT NULL, languagePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (languagePk, languageDestination)) '; _stmtList.add_11rb$(element_120); var element_121 = ' CREATE INDEX index_LanguageReplicate_languagePk_languageDestination_languageVersionId ON LanguageReplicate (languagePk, languageDestination, languageVersionId) '; _stmtList.add_11rb$(element_121); var element_122 = ' CREATE INDEX index_LanguageReplicate_languageDestination_languagePending ON LanguageReplicate (languageDestination, languagePending) '; _stmtList.add_11rb$(element_122); var element_123 = ' CREATE TRIGGER ch_ins_13 AFTER INSERT ON Language BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 13 AS chTableId, NEW.langUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 13 AND chEntityPk = NEW.langUid); END '; _stmtList.add_11rb$(element_123); var element_124 = ' CREATE TRIGGER ch_upd_13 AFTER UPDATE ON Language BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 13 AS chTableId, NEW.langUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 13 AND chEntityPk = NEW.langUid); END '; _stmtList.add_11rb$(element_124); var element_125 = ' CREATE TRIGGER ch_del_13 AFTER DELETE ON Language BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 13 AS chTableId, OLD.langUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 13 AND chEntityPk = OLD.langUid); END '; _stmtList.add_11rb$(element_125); var element_126 = 'CREATE VIEW Language_ReceiveView AS SELECT Language.*, LanguageReplicate.* FROM Language LEFT JOIN LanguageReplicate ON LanguageReplicate.languagePk = Language.langUid '; _stmtList.add_11rb$(element_126); var element_127 = ' CREATE TRIGGER language_remote_insert_ins INSTEAD OF INSERT ON Language_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Language(langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES (NEW.langUid, NEW.name, NEW.iso_639_1_standard, NEW.iso_639_2_standard, NEW.iso_639_3_standard, NEW.Language_Type, NEW.languageActive, NEW.langLocalChangeSeqNum, NEW.langMasterChangeSeqNum, NEW.langLastChangedBy, NEW.langLct) /*psql ON CONFLICT (langUid) DO UPDATE SET name = EXCLUDED.name, iso_639_1_standard = EXCLUDED.iso_639_1_standard, iso_639_2_standard = EXCLUDED.iso_639_2_standard, iso_639_3_standard = EXCLUDED.iso_639_3_standard, Language_Type = EXCLUDED.Language_Type, languageActive = EXCLUDED.languageActive, langLocalChangeSeqNum = EXCLUDED.langLocalChangeSeqNum, langMasterChangeSeqNum = EXCLUDED.langMasterChangeSeqNum, langLastChangedBy = EXCLUDED.langLastChangedBy, langLct = EXCLUDED.langLct */; END '; _stmtList.add_11rb$(element_127); var element_128 = ' CREATE TABLE IF NOT EXISTS LanguageVariantReplicate ( lvPk INTEGER NOT NULL, lvVersionId INTEGER NOT NULL DEFAULT 0, lvDestination INTEGER NOT NULL, lvPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (lvPk, lvDestination)) '; _stmtList.add_11rb$(element_128); var element_129 = ' CREATE INDEX index_LanguageVariantReplicate_lvPk_lvDestination_lvVersionId ON LanguageVariantReplicate (lvPk, lvDestination, lvVersionId) '; _stmtList.add_11rb$(element_129); var element_130 = ' CREATE INDEX index_LanguageVariantReplicate_lvDestination_lvPending ON LanguageVariantReplicate (lvDestination, lvPending) '; _stmtList.add_11rb$(element_130); var element_131 = ' CREATE TRIGGER ch_ins_10 AFTER INSERT ON LanguageVariant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 10 AS chTableId, NEW.langVariantUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 10 AND chEntityPk = NEW.langVariantUid); END '; _stmtList.add_11rb$(element_131); var element_132 = ' CREATE TRIGGER ch_upd_10 AFTER UPDATE ON LanguageVariant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 10 AS chTableId, NEW.langVariantUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 10 AND chEntityPk = NEW.langVariantUid); END '; _stmtList.add_11rb$(element_132); var element_133 = ' CREATE TRIGGER ch_del_10 AFTER DELETE ON LanguageVariant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 10 AS chTableId, OLD.langVariantUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 10 AND chEntityPk = OLD.langVariantUid); END '; _stmtList.add_11rb$(element_133); var element_134 = 'CREATE VIEW LanguageVariant_ReceiveView AS SELECT LanguageVariant.*, LanguageVariantReplicate.* FROM LanguageVariant LEFT JOIN LanguageVariantReplicate ON LanguageVariantReplicate.lvPk = LanguageVariant.langVariantUid '; _stmtList.add_11rb$(element_134); var element_135 = ' CREATE TRIGGER languagevariant_remote_insert_ins INSTEAD OF INSERT ON LanguageVariant_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LanguageVariant(langVariantUid, langUid, countryCode, name, langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum, langVariantLastChangedBy, langVariantLct) VALUES (NEW.langVariantUid, NEW.langUid, NEW.countryCode, NEW.name, NEW.langVariantLocalChangeSeqNum, NEW.langVariantMasterChangeSeqNum, NEW.langVariantLastChangedBy, NEW.langVariantLct) /*psql ON CONFLICT (langVariantUid) DO UPDATE SET langUid = EXCLUDED.langUid, countryCode = EXCLUDED.countryCode, name = EXCLUDED.name, langVariantLocalChangeSeqNum = EXCLUDED.langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum = EXCLUDED.langVariantMasterChangeSeqNum, langVariantLastChangedBy = EXCLUDED.langVariantLastChangedBy, langVariantLct = EXCLUDED.langVariantLct */; END '; _stmtList.add_11rb$(element_135); var element_136 = ' CREATE TABLE IF NOT EXISTS PersonGroupReplicate ( pgPk INTEGER NOT NULL, pgVersionId INTEGER NOT NULL DEFAULT 0, pgDestination INTEGER NOT NULL, pgPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (pgPk, pgDestination)) '; _stmtList.add_11rb$(element_136); var element_137 = ' CREATE INDEX index_PersonGroupReplicate_pgPk_pgDestination_pgVersionId ON PersonGroupReplicate (pgPk, pgDestination, pgVersionId) '; _stmtList.add_11rb$(element_137); var element_138 = ' CREATE INDEX index_PersonGroupReplicate_pgDestination_pgPending ON PersonGroupReplicate (pgDestination, pgPending) '; _stmtList.add_11rb$(element_138); var element_139 = ' CREATE TRIGGER ch_ins_43 AFTER INSERT ON PersonGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 43 AS chTableId, NEW.groupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 43 AND chEntityPk = NEW.groupUid); END '; _stmtList.add_11rb$(element_139); var element_140 = ' CREATE TRIGGER ch_upd_43 AFTER UPDATE ON PersonGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 43 AS chTableId, NEW.groupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 43 AND chEntityPk = NEW.groupUid); END '; _stmtList.add_11rb$(element_140); var element_141 = ' CREATE TRIGGER ch_del_43 AFTER DELETE ON PersonGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 43 AS chTableId, OLD.groupUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 43 AND chEntityPk = OLD.groupUid); END '; _stmtList.add_11rb$(element_141); var element_142 = 'CREATE VIEW PersonGroup_ReceiveView AS SELECT PersonGroup.*, PersonGroupReplicate.* FROM PersonGroup LEFT JOIN PersonGroupReplicate ON PersonGroupReplicate.pgPk = PersonGroup.groupUid '; _stmtList.add_11rb$(element_142); var element_143 = ' CREATE TRIGGER persongroup_remote_insert_ins INSTEAD OF INSERT ON PersonGroup_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonGroup(groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES (NEW.groupUid, NEW.groupMasterCsn, NEW.groupLocalCsn, NEW.groupLastChangedBy, NEW.groupLct, NEW.groupName, NEW.groupActive, NEW.personGroupFlag) /*psql ON CONFLICT (groupUid) DO UPDATE SET groupMasterCsn = EXCLUDED.groupMasterCsn, groupLocalCsn = EXCLUDED.groupLocalCsn, groupLastChangedBy = EXCLUDED.groupLastChangedBy, groupLct = EXCLUDED.groupLct, groupName = EXCLUDED.groupName, groupActive = EXCLUDED.groupActive, personGroupFlag = EXCLUDED.personGroupFlag */; END '; _stmtList.add_11rb$(element_143); var element_144 = ' CREATE TABLE IF NOT EXISTS PersonGroupMemberReplicate ( pgmPk INTEGER NOT NULL, pgmVersionId INTEGER NOT NULL DEFAULT 0, pgmDestination INTEGER NOT NULL, pgmPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (pgmPk, pgmDestination)) '; _stmtList.add_11rb$(element_144); var element_145 = ' CREATE INDEX index_PersonGroupMemberReplicate_pgmPk_pgmDestination_pgmVersionId ON PersonGroupMemberReplicate (pgmPk, pgmDestination, pgmVersionId) '; _stmtList.add_11rb$(element_145); var element_146 = ' CREATE INDEX index_PersonGroupMemberReplicate_pgmDestination_pgmPending ON PersonGroupMemberReplicate (pgmDestination, pgmPending) '; _stmtList.add_11rb$(element_146); var element_147 = ' CREATE TRIGGER ch_ins_44 AFTER INSERT ON PersonGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 44 AS chTableId, NEW.groupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 44 AND chEntityPk = NEW.groupMemberUid); END '; _stmtList.add_11rb$(element_147); var element_148 = ' CREATE TRIGGER ch_upd_44 AFTER UPDATE ON PersonGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 44 AS chTableId, NEW.groupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 44 AND chEntityPk = NEW.groupMemberUid); END '; _stmtList.add_11rb$(element_148); var element_149 = ' CREATE TRIGGER ch_del_44 AFTER DELETE ON PersonGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 44 AS chTableId, OLD.groupMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 44 AND chEntityPk = OLD.groupMemberUid); END '; _stmtList.add_11rb$(element_149); var element_150 = 'CREATE VIEW PersonGroupMember_ReceiveView AS SELECT PersonGroupMember.*, PersonGroupMemberReplicate.* FROM PersonGroupMember LEFT JOIN PersonGroupMemberReplicate ON PersonGroupMemberReplicate.pgmPk = PersonGroupMember.groupMemberUid '; _stmtList.add_11rb$(element_150); var element_151 = ' CREATE TRIGGER persongroupmember_remote_insert_ins INSTEAD OF INSERT ON PersonGroupMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonGroupMember(groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES (NEW.groupMemberUid, NEW.groupMemberActive, NEW.groupMemberPersonUid, NEW.groupMemberGroupUid, NEW.groupMemberMasterCsn, NEW.groupMemberLocalCsn, NEW.groupMemberLastChangedBy, NEW.groupMemberLct) /*psql ON CONFLICT (groupMemberUid) DO UPDATE SET groupMemberActive = EXCLUDED.groupMemberActive, groupMemberPersonUid = EXCLUDED.groupMemberPersonUid, groupMemberGroupUid = EXCLUDED.groupMemberGroupUid, groupMemberMasterCsn = EXCLUDED.groupMemberMasterCsn, groupMemberLocalCsn = EXCLUDED.groupMemberLocalCsn, groupMemberLastChangedBy = EXCLUDED.groupMemberLastChangedBy, groupMemberLct = EXCLUDED.groupMemberLct */; END '; _stmtList.add_11rb$(element_151); var element_152 = ' CREATE TABLE IF NOT EXISTS PersonPictureReplicate ( ppPk INTEGER NOT NULL, ppVersionId INTEGER NOT NULL DEFAULT 0, ppDestination INTEGER NOT NULL, ppPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (ppPk, ppDestination)) '; _stmtList.add_11rb$(element_152); var element_153 = ' CREATE INDEX index_PersonPictureReplicate_ppPk_ppDestination_ppVersionId ON PersonPictureReplicate (ppPk, ppDestination, ppVersionId) '; _stmtList.add_11rb$(element_153); var element_154 = ' CREATE INDEX index_PersonPictureReplicate_ppDestination_ppPending ON PersonPictureReplicate (ppDestination, ppPending) '; _stmtList.add_11rb$(element_154); var element_155 = ' CREATE TRIGGER ch_ins_50 AFTER INSERT ON PersonPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 50 AS chTableId, NEW.personPictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 50 AND chEntityPk = NEW.personPictureUid); END '; _stmtList.add_11rb$(element_155); var element_156 = ' CREATE TRIGGER ch_upd_50 AFTER UPDATE ON PersonPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 50 AS chTableId, NEW.personPictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 50 AND chEntityPk = NEW.personPictureUid); END '; _stmtList.add_11rb$(element_156); var element_157 = ' CREATE TRIGGER ch_del_50 AFTER DELETE ON PersonPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 50 AS chTableId, OLD.personPictureUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 50 AND chEntityPk = OLD.personPictureUid); END '; _stmtList.add_11rb$(element_157); var element_158 = 'CREATE VIEW PersonPicture_ReceiveView AS SELECT PersonPicture.*, PersonPictureReplicate.* FROM PersonPicture LEFT JOIN PersonPictureReplicate ON PersonPictureReplicate.ppPk = PersonPicture.personPictureUid '; _stmtList.add_11rb$(element_158); var element_159 = ' CREATE TRIGGER personpicture_remote_insert_ins INSTEAD OF INSERT ON PersonPicture_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonPicture(personPictureUid, personPicturePersonUid, personPictureMasterCsn, personPictureLocalCsn, personPictureLastChangedBy, personPictureLct, personPictureUri, personPictureMd5, fileSize, picTimestamp, mimeType, personPictureActive) VALUES (NEW.personPictureUid, NEW.personPicturePersonUid, NEW.personPictureMasterCsn, NEW.personPictureLocalCsn, NEW.personPictureLastChangedBy, NEW.personPictureLct, NEW.personPictureUri, NEW.personPictureMd5, NEW.fileSize, NEW.picTimestamp, NEW.mimeType, NEW.personPictureActive) /*psql ON CONFLICT (personPictureUid) DO UPDATE SET personPicturePersonUid = EXCLUDED.personPicturePersonUid, personPictureMasterCsn = EXCLUDED.personPictureMasterCsn, personPictureLocalCsn = EXCLUDED.personPictureLocalCsn, personPictureLastChangedBy = EXCLUDED.personPictureLastChangedBy, personPictureLct = EXCLUDED.personPictureLct, personPictureUri = EXCLUDED.personPictureUri, personPictureMd5 = EXCLUDED.personPictureMd5, fileSize = EXCLUDED.fileSize, picTimestamp = EXCLUDED.picTimestamp, mimeType = EXCLUDED.mimeType, personPictureActive = EXCLUDED.personPictureActive */; END '; _stmtList.add_11rb$(element_159); var element_160 = ' CREATE TABLE IF NOT EXISTS ContainerReplicate ( containerPk INTEGER NOT NULL, containerVersionId INTEGER NOT NULL DEFAULT 0, containerDestination INTEGER NOT NULL, containerPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (containerPk, containerDestination)) '; _stmtList.add_11rb$(element_160); var element_161 = ' CREATE INDEX index_ContainerReplicate_containerPk_containerDestination_containerVersionId ON ContainerReplicate (containerPk, containerDestination, containerVersionId) '; _stmtList.add_11rb$(element_161); var element_162 = ' CREATE INDEX index_ContainerReplicate_containerDestination_containerPending ON ContainerReplicate (containerDestination, containerPending) '; _stmtList.add_11rb$(element_162); var element_163 = ' CREATE TRIGGER ch_ins_51 AFTER INSERT ON Container BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 51 AS chTableId, NEW.containerUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 51 AND chEntityPk = NEW.containerUid); END '; _stmtList.add_11rb$(element_163); var element_164 = ' CREATE TRIGGER ch_upd_51 AFTER UPDATE ON Container BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 51 AS chTableId, NEW.containerUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 51 AND chEntityPk = NEW.containerUid); END '; _stmtList.add_11rb$(element_164); var element_165 = ' CREATE TRIGGER ch_del_51 AFTER DELETE ON Container BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 51 AS chTableId, OLD.containerUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 51 AND chEntityPk = OLD.containerUid); END '; _stmtList.add_11rb$(element_165); var element_166 = 'CREATE VIEW Container_ReceiveView AS SELECT Container.*, ContainerReplicate.* FROM Container LEFT JOIN ContainerReplicate ON ContainerReplicate.containerPk = Container.containerUid '; _stmtList.add_11rb$(element_166); var element_167 = ' CREATE TRIGGER container_remote_insert_ins INSTEAD OF INSERT ON Container_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Container(containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) VALUES (NEW.containerUid, NEW.cntLocalCsn, NEW.cntMasterCsn, NEW.cntLastModBy, NEW.cntLct, NEW.fileSize, NEW.containerContentEntryUid, NEW.cntLastModified, NEW.mimeType, NEW.remarks, NEW.mobileOptimized, NEW.cntNumEntries) /*psql ON CONFLICT (containerUid) DO UPDATE SET cntLocalCsn = EXCLUDED.cntLocalCsn, cntMasterCsn = EXCLUDED.cntMasterCsn, cntLastModBy = EXCLUDED.cntLastModBy, cntLct = EXCLUDED.cntLct, fileSize = EXCLUDED.fileSize, containerContentEntryUid = EXCLUDED.containerContentEntryUid, cntLastModified = EXCLUDED.cntLastModified, mimeType = EXCLUDED.mimeType, remarks = EXCLUDED.remarks, mobileOptimized = EXCLUDED.mobileOptimized, cntNumEntries = EXCLUDED.cntNumEntries */; END '; _stmtList.add_11rb$(element_167); var element_168 = ' CREATE TABLE IF NOT EXISTS VerbEntityReplicate ( vePk INTEGER NOT NULL, veVersionId INTEGER NOT NULL DEFAULT 0, veDestination INTEGER NOT NULL, vePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (vePk, veDestination)) '; _stmtList.add_11rb$(element_168); var element_169 = ' CREATE INDEX index_VerbEntityReplicate_vePk_veDestination_veVersionId ON VerbEntityReplicate (vePk, veDestination, veVersionId) '; _stmtList.add_11rb$(element_169); var element_170 = ' CREATE INDEX index_VerbEntityReplicate_veDestination_vePending ON VerbEntityReplicate (veDestination, vePending) '; _stmtList.add_11rb$(element_170); var element_171 = ' CREATE TRIGGER ch_ins_62 AFTER INSERT ON VerbEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 62 AS chTableId, NEW.verbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 62 AND chEntityPk = NEW.verbUid); END '; _stmtList.add_11rb$(element_171); var element_172 = ' CREATE TRIGGER ch_upd_62 AFTER UPDATE ON VerbEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 62 AS chTableId, NEW.verbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 62 AND chEntityPk = NEW.verbUid); END '; _stmtList.add_11rb$(element_172); var element_173 = ' CREATE TRIGGER ch_del_62 AFTER DELETE ON VerbEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 62 AS chTableId, OLD.verbUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 62 AND chEntityPk = OLD.verbUid); END '; _stmtList.add_11rb$(element_173); var element_174 = 'CREATE VIEW VerbEntity_ReceiveView AS SELECT VerbEntity.*, VerbEntityReplicate.* FROM VerbEntity LEFT JOIN VerbEntityReplicate ON VerbEntityReplicate.vePk = VerbEntity.verbUid '; _stmtList.add_11rb$(element_174); var element_175 = ' CREATE TRIGGER verbentity_remote_insert_ins INSTEAD OF INSERT ON VerbEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO VerbEntity(verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES (NEW.verbUid, NEW.urlId, NEW.verbInActive, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.verbLct) /*psql ON CONFLICT (verbUid) DO UPDATE SET urlId = EXCLUDED.urlId, verbInActive = EXCLUDED.verbInActive, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, verbLct = EXCLUDED.verbLct */; END '; _stmtList.add_11rb$(element_175); var element_176 = ' CREATE TABLE IF NOT EXISTS XObjectEntityReplicate ( xoePk INTEGER NOT NULL, xoeVersionId INTEGER NOT NULL DEFAULT 0, xoeDestination INTEGER NOT NULL, xoePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (xoePk, xoeDestination)) '; _stmtList.add_11rb$(element_176); var element_177 = ' CREATE INDEX index_XObjectEntityReplicate_xoePk_xoeDestination_xoeVersionId ON XObjectEntityReplicate (xoePk, xoeDestination, xoeVersionId) '; _stmtList.add_11rb$(element_177); var element_178 = ' CREATE INDEX index_XObjectEntityReplicate_xoeDestination_xoePending ON XObjectEntityReplicate (xoeDestination, xoePending) '; _stmtList.add_11rb$(element_178); var element_179 = ' CREATE TRIGGER ch_ins_64 AFTER INSERT ON XObjectEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 64 AS chTableId, NEW.xObjectUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 64 AND chEntityPk = NEW.xObjectUid); END '; _stmtList.add_11rb$(element_179); var element_180 = ' CREATE TRIGGER ch_upd_64 AFTER UPDATE ON XObjectEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 64 AS chTableId, NEW.xObjectUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 64 AND chEntityPk = NEW.xObjectUid); END '; _stmtList.add_11rb$(element_180); var element_181 = ' CREATE TRIGGER ch_del_64 AFTER DELETE ON XObjectEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 64 AS chTableId, OLD.xObjectUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 64 AND chEntityPk = OLD.xObjectUid); END '; _stmtList.add_11rb$(element_181); var element_182 = 'CREATE VIEW XObjectEntity_ReceiveView AS SELECT XObjectEntity.*, XObjectEntityReplicate.* FROM XObjectEntity LEFT JOIN XObjectEntityReplicate ON XObjectEntityReplicate.xoePk = XObjectEntity.xObjectUid '; _stmtList.add_11rb$(element_182); var element_183 = ' CREATE TRIGGER xobjectentity_remote_insert_ins INSTEAD OF INSERT ON XObjectEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO XObjectEntity(xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES (NEW.xObjectUid, NEW.objectType, NEW.objectId, NEW.definitionType, NEW.interactionType, NEW.correctResponsePattern, NEW.objectContentEntryUid, NEW.xObjectMasterChangeSeqNum, NEW.xObjectocalChangeSeqNum, NEW.xObjectLastChangedBy, NEW.xObjectLct) /*psql ON CONFLICT (xObjectUid) DO UPDATE SET objectType = EXCLUDED.objectType, objectId = EXCLUDED.objectId, definitionType = EXCLUDED.definitionType, interactionType = EXCLUDED.interactionType, correctResponsePattern = EXCLUDED.correctResponsePattern, objectContentEntryUid = EXCLUDED.objectContentEntryUid, xObjectMasterChangeSeqNum = EXCLUDED.xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum = EXCLUDED.xObjectocalChangeSeqNum, xObjectLastChangedBy = EXCLUDED.xObjectLastChangedBy, xObjectLct = EXCLUDED.xObjectLct */; END '; _stmtList.add_11rb$(element_183); var element_184 = ' CREATE TABLE IF NOT EXISTS StatementEntityReplicate ( sePk INTEGER NOT NULL, seVersionId INTEGER NOT NULL DEFAULT 0, seDestination INTEGER NOT NULL, sePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (sePk, seDestination)) '; _stmtList.add_11rb$(element_184); var element_185 = ' CREATE INDEX index_StatementEntityReplicate_sePk_seDestination_seVersionId ON StatementEntityReplicate (sePk, seDestination, seVersionId) '; _stmtList.add_11rb$(element_185); var element_186 = ' CREATE INDEX index_StatementEntityReplicate_seDestination_sePending ON StatementEntityReplicate (seDestination, sePending) '; _stmtList.add_11rb$(element_186); var element_187 = ' CREATE TRIGGER ch_ins_60 AFTER INSERT ON StatementEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 60 AS chTableId, NEW.statementUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 60 AND chEntityPk = NEW.statementUid); END '; _stmtList.add_11rb$(element_187); var element_188 = ' CREATE TRIGGER ch_upd_60 AFTER UPDATE ON StatementEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 60 AS chTableId, NEW.statementUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 60 AND chEntityPk = NEW.statementUid); END '; _stmtList.add_11rb$(element_188); var element_189 = ' CREATE TRIGGER ch_del_60 AFTER DELETE ON StatementEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 60 AS chTableId, OLD.statementUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 60 AND chEntityPk = OLD.statementUid); END '; _stmtList.add_11rb$(element_189); var element_190 = 'CREATE VIEW StatementEntity_ReceiveView AS SELECT StatementEntity.*, StatementEntityReplicate.* FROM StatementEntity LEFT JOIN StatementEntityReplicate ON StatementEntityReplicate.sePk = StatementEntity.statementUid '; _stmtList.add_11rb$(element_190); var element_191 = ' CREATE TRIGGER statemententity_remote_insert_ins INSTEAD OF INSERT ON StatementEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO StatementEntity(statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid) VALUES (NEW.statementUid, NEW.statementId, NEW.statementPersonUid, NEW.statementVerbUid, NEW.xObjectUid, NEW.subStatementActorUid, NEW.substatementVerbUid, NEW.subStatementObjectUid, NEW.agentUid, NEW.instructorUid, NEW.authorityUid, NEW.teamUid, NEW.resultCompletion, NEW.resultSuccess, NEW.resultScoreScaled, NEW.resultScoreRaw, NEW.resultScoreMin, NEW.resultScoreMax, NEW.resultDuration, NEW.resultResponse, NEW.timestamp, NEW.stored, NEW.contextRegistration, NEW.contextPlatform, NEW.contextStatementId, NEW.fullStatement, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.statementLct, NEW.extensionProgress, NEW.contentEntryRoot, NEW.statementContentEntryUid, NEW.statementLearnerGroupUid, NEW.statementClazzUid) /*psql ON CONFLICT (statementUid) DO UPDATE SET statementId = EXCLUDED.statementId, statementPersonUid = EXCLUDED.statementPersonUid, statementVerbUid = EXCLUDED.statementVerbUid, xObjectUid = EXCLUDED.xObjectUid, subStatementActorUid = EXCLUDED.subStatementActorUid, substatementVerbUid = EXCLUDED.substatementVerbUid, subStatementObjectUid = EXCLUDED.subStatementObjectUid, agentUid = EXCLUDED.agentUid, instructorUid = EXCLUDED.instructorUid, authorityUid = EXCLUDED.authorityUid, teamUid = EXCLUDED.teamUid, resultCompletion = EXCLUDED.resultCompletion, resultSuccess = EXCLUDED.resultSuccess, resultScoreScaled = EXCLUDED.resultScoreScaled, resultScoreRaw = EXCLUDED.resultScoreRaw, resultScoreMin = EXCLUDED.resultScoreMin, resultScoreMax = EXCLUDED.resultScoreMax, resultDuration = EXCLUDED.resultDuration, resultResponse = EXCLUDED.resultResponse, timestamp = EXCLUDED.timestamp, stored = EXCLUDED.stored, contextRegistration = EXCLUDED.contextRegistration, contextPlatform = EXCLUDED.contextPlatform, contextStatementId = EXCLUDED.contextStatementId, fullStatement = EXCLUDED.fullStatement, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, statementLct = EXCLUDED.statementLct, extensionProgress = EXCLUDED.extensionProgress, contentEntryRoot = EXCLUDED.contentEntryRoot, statementContentEntryUid = EXCLUDED.statementContentEntryUid, statementLearnerGroupUid = EXCLUDED.statementLearnerGroupUid, statementClazzUid = EXCLUDED.statementClazzUid */; END '; _stmtList.add_11rb$(element_191); var element_192 = ' CREATE TABLE IF NOT EXISTS ContextXObjectStatementJoinReplicate ( cxosjPk INTEGER NOT NULL, cxosjVersionId INTEGER NOT NULL DEFAULT 0, cxosjDestination INTEGER NOT NULL, cxosjPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (cxosjPk, cxosjDestination)) '; _stmtList.add_11rb$(element_192); var element_193 = ' CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjPk_cxosjDestination_cxosjVersionId ON ContextXObjectStatementJoinReplicate (cxosjPk, cxosjDestination, cxosjVersionId) '; _stmtList.add_11rb$(element_193); var element_194 = ' CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjDestination_cxosjPending ON ContextXObjectStatementJoinReplicate (cxosjDestination, cxosjPending) '; _stmtList.add_11rb$(element_194); var element_195 = ' CREATE TRIGGER ch_ins_66 AFTER INSERT ON ContextXObjectStatementJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 66 AS chTableId, NEW.contextXObjectStatementJoinUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 66 AND chEntityPk = NEW.contextXObjectStatementJoinUid); END '; _stmtList.add_11rb$(element_195); var element_196 = ' CREATE TRIGGER ch_upd_66 AFTER UPDATE ON ContextXObjectStatementJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 66 AS chTableId, NEW.contextXObjectStatementJoinUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 66 AND chEntityPk = NEW.contextXObjectStatementJoinUid); END '; _stmtList.add_11rb$(element_196); var element_197 = ' CREATE TRIGGER ch_del_66 AFTER DELETE ON ContextXObjectStatementJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 66 AS chTableId, OLD.contextXObjectStatementJoinUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 66 AND chEntityPk = OLD.contextXObjectStatementJoinUid); END '; _stmtList.add_11rb$(element_197); var element_198 = 'CREATE VIEW ContextXObjectStatementJoin_ReceiveView AS SELECT ContextXObjectStatementJoin.*, ContextXObjectStatementJoinReplicate.* FROM ContextXObjectStatementJoin LEFT JOIN ContextXObjectStatementJoinReplicate ON ContextXObjectStatementJoinReplicate.cxosjPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid '; _stmtList.add_11rb$(element_198); var element_199 = ' CREATE TRIGGER contextxobjectstatementjoin_remote_insert_ins INSTEAD OF INSERT ON ContextXObjectStatementJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContextXObjectStatementJoin(contextXObjectStatementJoinUid, contextActivityFlag, contextStatementUid, contextXObjectUid, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, contextXObjectLct) VALUES (NEW.contextXObjectStatementJoinUid, NEW.contextActivityFlag, NEW.contextStatementUid, NEW.contextXObjectUid, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.contextXObjectLct) /*psql ON CONFLICT (contextXObjectStatementJoinUid) DO UPDATE SET contextActivityFlag = EXCLUDED.contextActivityFlag, contextStatementUid = EXCLUDED.contextStatementUid, contextXObjectUid = EXCLUDED.contextXObjectUid, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, contextXObjectLct = EXCLUDED.contextXObjectLct */; END '; _stmtList.add_11rb$(element_199); var element_200 = ' CREATE TABLE IF NOT EXISTS AgentEntityReplicate ( aePk INTEGER NOT NULL, aeVersionId INTEGER NOT NULL DEFAULT 0, aeDestination INTEGER NOT NULL, aePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (aePk, aeDestination)) '; _stmtList.add_11rb$(element_200); var element_201 = ' CREATE INDEX index_AgentEntityReplicate_aePk_aeDestination_aeVersionId ON AgentEntityReplicate (aePk, aeDestination, aeVersionId) '; _stmtList.add_11rb$(element_201); var element_202 = ' CREATE INDEX index_AgentEntityReplicate_aeDestination_aePending ON AgentEntityReplicate (aeDestination, aePending) '; _stmtList.add_11rb$(element_202); var element_203 = ' CREATE TRIGGER ch_ins_68 AFTER INSERT ON AgentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 68 AS chTableId, NEW.agentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 68 AND chEntityPk = NEW.agentUid); END '; _stmtList.add_11rb$(element_203); var element_204 = ' CREATE TRIGGER ch_upd_68 AFTER UPDATE ON AgentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 68 AS chTableId, NEW.agentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 68 AND chEntityPk = NEW.agentUid); END '; _stmtList.add_11rb$(element_204); var element_205 = ' CREATE TRIGGER ch_del_68 AFTER DELETE ON AgentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 68 AS chTableId, OLD.agentUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 68 AND chEntityPk = OLD.agentUid); END '; _stmtList.add_11rb$(element_205); var element_206 = 'CREATE VIEW AgentEntity_ReceiveView AS SELECT AgentEntity.*, AgentEntityReplicate.* FROM AgentEntity LEFT JOIN AgentEntityReplicate ON AgentEntityReplicate.aePk = AgentEntity.agentUid '; _stmtList.add_11rb$(element_206); var element_207 = ' CREATE TRIGGER agententity_remote_insert_ins INSTEAD OF INSERT ON AgentEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO AgentEntity(agentUid, agentMbox, agentMbox_sha1sum, agentOpenid, agentAccountName, agentHomePage, agentPersonUid, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, agentLct) VALUES (NEW.agentUid, NEW.agentMbox, NEW.agentMbox_sha1sum, NEW.agentOpenid, NEW.agentAccountName, NEW.agentHomePage, NEW.agentPersonUid, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.agentLct) /*psql ON CONFLICT (agentUid) DO UPDATE SET agentMbox = EXCLUDED.agentMbox, agentMbox_sha1sum = EXCLUDED.agentMbox_sha1sum, agentOpenid = EXCLUDED.agentOpenid, agentAccountName = EXCLUDED.agentAccountName, agentHomePage = EXCLUDED.agentHomePage, agentPersonUid = EXCLUDED.agentPersonUid, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, agentLct = EXCLUDED.agentLct*/; END '; _stmtList.add_11rb$(element_207); var element_208 = ' CREATE TABLE IF NOT EXISTS StateEntityReplicate ( sePk INTEGER NOT NULL, seVersionId INTEGER NOT NULL DEFAULT 0, seDestination INTEGER NOT NULL, sePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (sePk, seDestination)) '; _stmtList.add_11rb$(element_208); var element_209 = ' CREATE INDEX index_StateEntityReplicate_sePk_seDestination_seVersionId ON StateEntityReplicate (sePk, seDestination, seVersionId) '; _stmtList.add_11rb$(element_209); var element_210 = ' CREATE INDEX index_StateEntityReplicate_seDestination_sePending ON StateEntityReplicate (seDestination, sePending) '; _stmtList.add_11rb$(element_210); var element_211 = ' CREATE TRIGGER ch_ins_70 AFTER INSERT ON StateEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 70 AS chTableId, NEW.stateUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 70 AND chEntityPk = NEW.stateUid); END '; _stmtList.add_11rb$(element_211); var element_212 = ' CREATE TRIGGER ch_upd_70 AFTER UPDATE ON StateEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 70 AS chTableId, NEW.stateUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 70 AND chEntityPk = NEW.stateUid); END '; _stmtList.add_11rb$(element_212); var element_213 = ' CREATE TRIGGER ch_del_70 AFTER DELETE ON StateEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 70 AS chTableId, OLD.stateUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 70 AND chEntityPk = OLD.stateUid); END '; _stmtList.add_11rb$(element_213); var element_214 = 'CREATE VIEW StateEntity_ReceiveView AS SELECT StateEntity.*, StateEntityReplicate.* FROM StateEntity LEFT JOIN StateEntityReplicate ON StateEntityReplicate.sePk = StateEntity.stateUid '; _stmtList.add_11rb$(element_214); var element_215 = ' CREATE TRIGGER stateentity_remote_insert_ins INSTEAD OF INSERT ON StateEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO StateEntity(stateUid, stateId, agentUid, activityId, registration, isIsactive, timestamp, stateMasterChangeSeqNum, stateLocalChangeSeqNum, stateLastChangedBy, stateLct) VALUES (NEW.stateUid, NEW.stateId, NEW.agentUid, NEW.activityId, NEW.registration, NEW.isIsactive, NEW.timestamp, NEW.stateMasterChangeSeqNum, NEW.stateLocalChangeSeqNum, NEW.stateLastChangedBy, NEW.stateLct) /*psql ON CONFLICT (stateUid) DO UPDATE SET stateId = EXCLUDED.stateId, agentUid = EXCLUDED.agentUid, activityId = EXCLUDED.activityId, registration = EXCLUDED.registration, isIsactive = EXCLUDED.isIsactive, timestamp = EXCLUDED.timestamp, stateMasterChangeSeqNum = EXCLUDED.stateMasterChangeSeqNum, stateLocalChangeSeqNum = EXCLUDED.stateLocalChangeSeqNum, stateLastChangedBy = EXCLUDED.stateLastChangedBy, stateLct = EXCLUDED.stateLct */; END '; _stmtList.add_11rb$(element_215); var element_216 = ' CREATE TABLE IF NOT EXISTS StateContentEntityReplicate ( scePk INTEGER NOT NULL, sceVersionId INTEGER NOT NULL DEFAULT 0, sceDestination INTEGER NOT NULL, scePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (scePk, sceDestination)) '; _stmtList.add_11rb$(element_216); var element_217 = ' CREATE INDEX index_StateContentEntityReplicate_scePk_sceDestination_sceVersionId ON StateContentEntityReplicate (scePk, sceDestination, sceVersionId) '; _stmtList.add_11rb$(element_217); var element_218 = ' CREATE INDEX index_StateContentEntityReplicate_sceDestination_scePending ON StateContentEntityReplicate (sceDestination, scePending) '; _stmtList.add_11rb$(element_218); var element_219 = ' CREATE TRIGGER ch_ins_72 AFTER INSERT ON StateContentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 72 AS chTableId, NEW.stateContentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 72 AND chEntityPk = NEW.stateContentUid); END '; _stmtList.add_11rb$(element_219); var element_220 = ' CREATE TRIGGER ch_upd_72 AFTER UPDATE ON StateContentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 72 AS chTableId, NEW.stateContentUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 72 AND chEntityPk = NEW.stateContentUid); END '; _stmtList.add_11rb$(element_220); var element_221 = ' CREATE TRIGGER ch_del_72 AFTER DELETE ON StateContentEntity BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 72 AS chTableId, OLD.stateContentUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 72 AND chEntityPk = OLD.stateContentUid); END '; _stmtList.add_11rb$(element_221); var element_222 = 'CREATE VIEW StateContentEntity_ReceiveView AS SELECT StateContentEntity.*, StateContentEntityReplicate.* FROM StateContentEntity LEFT JOIN StateContentEntityReplicate ON StateContentEntityReplicate.scePk = StateContentEntity.stateContentUid '; _stmtList.add_11rb$(element_222); var element_223 = ' CREATE TRIGGER statecontententity_remote_insert_ins INSTEAD OF INSERT ON StateContentEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO StateContentEntity(stateContentUid, stateContentStateUid, stateContentKey, stateContentValue, isIsactive, stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum, stateContentLastChangedBy, stateContentLct) VALUES (NEW.stateContentUid, NEW.stateContentStateUid, NEW.stateContentKey, NEW.stateContentValue, NEW.isIsactive, NEW.stateContentMasterChangeSeqNum, NEW.stateContentLocalChangeSeqNum, NEW.stateContentLastChangedBy, NEW.stateContentLct) /*psql ON CONFLICT (stateContentUid) DO UPDATE SET stateContentStateUid = EXCLUDED.stateContentStateUid, stateContentKey = EXCLUDED.stateContentKey, stateContentValue = EXCLUDED.stateContentValue, isIsactive = EXCLUDED.isIsactive, stateContentMasterChangeSeqNum = EXCLUDED.stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum = EXCLUDED.stateContentLocalChangeSeqNum, stateContentLastChangedBy = EXCLUDED.stateContentLastChangedBy, stateContentLct = EXCLUDED.stateContentLct */; END '; _stmtList.add_11rb$(element_223); var element_224 = ' CREATE TABLE IF NOT EXISTS XLangMapEntryReplicate ( xlmePk INTEGER NOT NULL, xlmeVersionId INTEGER NOT NULL DEFAULT 0, xlmeDestination INTEGER NOT NULL, xlmePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (xlmePk, xlmeDestination)) '; _stmtList.add_11rb$(element_224); var element_225 = ' CREATE INDEX index_XLangMapEntryReplicate_xlmePk_xlmeDestination_xlmeVersionId ON XLangMapEntryReplicate (xlmePk, xlmeDestination, xlmeVersionId) '; _stmtList.add_11rb$(element_225); var element_226 = ' CREATE INDEX index_XLangMapEntryReplicate_xlmeDestination_xlmePending ON XLangMapEntryReplicate (xlmeDestination, xlmePending) '; _stmtList.add_11rb$(element_226); var element_227 = ' CREATE TRIGGER ch_ins_74 AFTER INSERT ON XLangMapEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 74 AS chTableId, NEW.statementLangMapUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 74 AND chEntityPk = NEW.statementLangMapUid); END '; _stmtList.add_11rb$(element_227); var element_228 = ' CREATE TRIGGER ch_upd_74 AFTER UPDATE ON XLangMapEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 74 AS chTableId, NEW.statementLangMapUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 74 AND chEntityPk = NEW.statementLangMapUid); END '; _stmtList.add_11rb$(element_228); var element_229 = ' CREATE TRIGGER ch_del_74 AFTER DELETE ON XLangMapEntry BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 74 AS chTableId, OLD.statementLangMapUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 74 AND chEntityPk = OLD.statementLangMapUid); END '; _stmtList.add_11rb$(element_229); var element_230 = 'CREATE VIEW XLangMapEntry_ReceiveView AS SELECT XLangMapEntry.*, XLangMapEntryReplicate.* FROM XLangMapEntry LEFT JOIN XLangMapEntryReplicate ON XLangMapEntryReplicate.xlmePk = XLangMapEntry.statementLangMapUid '; _stmtList.add_11rb$(element_230); var element_231 = ' CREATE TRIGGER xlangmapentry_remote_insert_ins INSTEAD OF INSERT ON XLangMapEntry_ReceiveView FOR EACH ROW BEGIN REPLACE INTO XLangMapEntry(verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct, statementLangMapUid) VALUES (NEW.verbLangMapUid, NEW.objectLangMapUid, NEW.languageLangMapUid, NEW.languageVariantLangMapUid, NEW.valueLangMap, NEW.statementLangMapMasterCsn, NEW.statementLangMapLocalCsn, NEW.statementLangMapLcb, NEW.statementLangMapLct, NEW.statementLangMapUid) /*psql ON CONFLICT (statementLangMapUid) DO UPDATE SET verbLangMapUid = EXCLUDED.verbLangMapUid, objectLangMapUid = EXCLUDED.objectLangMapUid, languageLangMapUid = EXCLUDED.languageLangMapUid, languageVariantLangMapUid = EXCLUDED.languageVariantLangMapUid, valueLangMap = EXCLUDED.valueLangMap, statementLangMapMasterCsn = EXCLUDED.statementLangMapMasterCsn, statementLangMapLocalCsn = EXCLUDED.statementLangMapLocalCsn, statementLangMapLcb = EXCLUDED.statementLangMapLcb, statementLangMapLct = EXCLUDED.statementLangMapLct */; END '; _stmtList.add_11rb$(element_231); var element_232 = ' CREATE TABLE IF NOT EXISTS SchoolReplicate ( schoolPk INTEGER NOT NULL, schoolVersionId INTEGER NOT NULL DEFAULT 0, schoolDestination INTEGER NOT NULL, schoolPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (schoolPk, schoolDestination)) '; _stmtList.add_11rb$(element_232); var element_233 = ' CREATE INDEX index_SchoolReplicate_schoolPk_schoolDestination_schoolVersionId ON SchoolReplicate (schoolPk, schoolDestination, schoolVersionId) '; _stmtList.add_11rb$(element_233); var element_234 = ' CREATE INDEX index_SchoolReplicate_schoolDestination_schoolPending ON SchoolReplicate (schoolDestination, schoolPending) '; _stmtList.add_11rb$(element_234); var element_235 = ' CREATE TRIGGER ch_ins_164 AFTER INSERT ON School BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 164 AS chTableId, NEW.schoolUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 164 AND chEntityPk = NEW.schoolUid); END '; _stmtList.add_11rb$(element_235); var element_236 = ' CREATE TRIGGER ch_upd_164 AFTER UPDATE ON School BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 164 AS chTableId, NEW.schoolUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 164 AND chEntityPk = NEW.schoolUid); END '; _stmtList.add_11rb$(element_236); var element_237 = ' CREATE TRIGGER ch_del_164 AFTER DELETE ON School BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 164 AS chTableId, OLD.schoolUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 164 AND chEntityPk = OLD.schoolUid); END '; _stmtList.add_11rb$(element_237); var element_238 = 'CREATE VIEW School_ReceiveView AS SELECT School.*, SchoolReplicate.* FROM School LEFT JOIN SchoolReplicate ON SchoolReplicate.schoolPk = School.schoolUid '; _stmtList.add_11rb$(element_238); var element_239 = ' CREATE TRIGGER school_remote_insert_ins INSTEAD OF INSERT ON School_ReceiveView FOR EACH ROW BEGIN REPLACE INTO School(schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone) VALUES (NEW.schoolUid, NEW.schoolName, NEW.schoolDesc, NEW.schoolAddress, NEW.schoolActive, NEW.schoolPhoneNumber, NEW.schoolGender, NEW.schoolHolidayCalendarUid, NEW.schoolFeatures, NEW.schoolLocationLong, NEW.schoolLocationLatt, NEW.schoolEmailAddress, NEW.schoolTeachersPersonGroupUid, NEW.schoolStudentsPersonGroupUid, NEW.schoolPendingStudentsPersonGroupUid, NEW.schoolCode, NEW.schoolMasterChangeSeqNum, NEW.schoolLocalChangeSeqNum, NEW.schoolLastChangedBy, NEW.schoolLct, NEW.schoolTimeZone) /*psql ON CONFLICT (schoolUid) DO UPDATE SET schoolName = EXCLUDED.schoolName, schoolDesc = EXCLUDED.schoolDesc, schoolAddress = EXCLUDED.schoolAddress, schoolActive = EXCLUDED.schoolActive, schoolPhoneNumber = EXCLUDED.schoolPhoneNumber, schoolGender = EXCLUDED.schoolGender, schoolHolidayCalendarUid = EXCLUDED.schoolHolidayCalendarUid, schoolFeatures = EXCLUDED.schoolFeatures, schoolLocationLong = EXCLUDED.schoolLocationLong, schoolLocationLatt = EXCLUDED.schoolLocationLatt, schoolEmailAddress = EXCLUDED.schoolEmailAddress, schoolTeachersPersonGroupUid = EXCLUDED.schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid = EXCLUDED.schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid = EXCLUDED.schoolPendingStudentsPersonGroupUid, schoolCode = EXCLUDED.schoolCode, schoolMasterChangeSeqNum = EXCLUDED.schoolMasterChangeSeqNum, schoolLocalChangeSeqNum = EXCLUDED.schoolLocalChangeSeqNum, schoolLastChangedBy = EXCLUDED.schoolLastChangedBy, schoolLct = EXCLUDED.schoolLct, schoolTimeZone = EXCLUDED.schoolTimeZone */; END '; _stmtList.add_11rb$(element_239); var element_240 = ' CREATE TABLE IF NOT EXISTS SchoolMemberReplicate ( smPk INTEGER NOT NULL, smVersionId INTEGER NOT NULL DEFAULT 0, smDestination INTEGER NOT NULL, smPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (smPk, smDestination)) '; _stmtList.add_11rb$(element_240); var element_241 = ' CREATE INDEX index_SchoolMemberReplicate_smPk_smDestination_smVersionId ON SchoolMemberReplicate (smPk, smDestination, smVersionId) '; _stmtList.add_11rb$(element_241); var element_242 = ' CREATE INDEX index_SchoolMemberReplicate_smDestination_smPending ON SchoolMemberReplicate (smDestination, smPending) '; _stmtList.add_11rb$(element_242); var element_243 = ' CREATE TRIGGER ch_ins_200 AFTER INSERT ON SchoolMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 200 AS chTableId, NEW.schoolMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 200 AND chEntityPk = NEW.schoolMemberUid); END '; _stmtList.add_11rb$(element_243); var element_244 = ' CREATE TRIGGER ch_upd_200 AFTER UPDATE ON SchoolMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 200 AS chTableId, NEW.schoolMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 200 AND chEntityPk = NEW.schoolMemberUid); END '; _stmtList.add_11rb$(element_244); var element_245 = ' CREATE TRIGGER ch_del_200 AFTER DELETE ON SchoolMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 200 AS chTableId, OLD.schoolMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 200 AND chEntityPk = OLD.schoolMemberUid); END '; _stmtList.add_11rb$(element_245); var element_246 = 'CREATE VIEW SchoolMember_ReceiveView AS SELECT SchoolMember.*, SchoolMemberReplicate.* FROM SchoolMember LEFT JOIN SchoolMemberReplicate ON SchoolMemberReplicate.smPk = SchoolMember.schoolMemberUid '; _stmtList.add_11rb$(element_246); var element_247 = ' CREATE TRIGGER schoolmember_remote_insert_ins INSTEAD OF INSERT ON SchoolMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO SchoolMember(schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct) VALUES (NEW.schoolMemberUid, NEW.schoolMemberPersonUid, NEW.schoolMemberSchoolUid, NEW.schoolMemberJoinDate, NEW.schoolMemberLeftDate, NEW.schoolMemberRole, NEW.schoolMemberActive, NEW.schoolMemberLocalChangeSeqNum, NEW.schoolMemberMasterChangeSeqNum, NEW.schoolMemberLastChangedBy, NEW.schoolMemberLct) /*psql ON CONFLICT (schoolMemberUid) DO UPDATE SET schoolMemberPersonUid = EXCLUDED.schoolMemberPersonUid, schoolMemberSchoolUid = EXCLUDED.schoolMemberSchoolUid, schoolMemberJoinDate = EXCLUDED.schoolMemberJoinDate, schoolMemberLeftDate = EXCLUDED.schoolMemberLeftDate, schoolMemberRole = EXCLUDED.schoolMemberRole, schoolMemberActive = EXCLUDED.schoolMemberActive, schoolMemberLocalChangeSeqNum = EXCLUDED.schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum = EXCLUDED.schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy = EXCLUDED.schoolMemberLastChangedBy, schoolMemberLct = EXCLUDED.schoolMemberLct */; END '; _stmtList.add_11rb$(element_247); var element_248 = ' CREATE TABLE IF NOT EXISTS CommentsReplicate ( commentsPk INTEGER NOT NULL, commentsVersionId INTEGER NOT NULL DEFAULT 0, commentsDestination INTEGER NOT NULL, commentsPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (commentsPk, commentsDestination)) '; _stmtList.add_11rb$(element_248); var element_249 = ' CREATE INDEX index_CommentsReplicate_commentsPk_commentsDestination_commentsVersionId ON CommentsReplicate (commentsPk, commentsDestination, commentsVersionId) '; _stmtList.add_11rb$(element_249); var element_250 = ' CREATE INDEX index_CommentsReplicate_commentsDestination_commentsPending ON CommentsReplicate (commentsDestination, commentsPending) '; _stmtList.add_11rb$(element_250); var element_251 = ' CREATE TRIGGER ch_ins_208 AFTER INSERT ON Comments BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 208 AS chTableId, NEW.commentsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 208 AND chEntityPk = NEW.commentsUid); END '; _stmtList.add_11rb$(element_251); var element_252 = ' CREATE TRIGGER ch_upd_208 AFTER UPDATE ON Comments BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 208 AS chTableId, NEW.commentsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 208 AND chEntityPk = NEW.commentsUid); END '; _stmtList.add_11rb$(element_252); var element_253 = ' CREATE TRIGGER ch_del_208 AFTER DELETE ON Comments BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 208 AS chTableId, OLD.commentsUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 208 AND chEntityPk = OLD.commentsUid); END '; _stmtList.add_11rb$(element_253); var element_254 = 'CREATE VIEW Comments_ReceiveView AS SELECT Comments.*, CommentsReplicate.* FROM Comments LEFT JOIN CommentsReplicate ON CommentsReplicate.commentsPk = Comments.commentsUid '; _stmtList.add_11rb$(element_254); var element_255 = ' CREATE TRIGGER comments_remote_insert_ins INSTEAD OF INSERT ON Comments_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Comments(commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES (NEW.commentsUid, NEW.commentsText, NEW.commentsEntityType, NEW.commentsEntityUid, NEW.commentsPublic, NEW.commentsStatus, NEW.commentsPersonUid, NEW.commentsToPersonUid, NEW.commentsFlagged, NEW.commentsInActive, NEW.commentsDateTimeAdded, NEW.commentsDateTimeUpdated, NEW.commentsMCSN, NEW.commentsLCSN, NEW.commentsLCB, NEW.commentsLct) /*psql ON CONFLICT (commentsUid) DO UPDATE SET commentsText = EXCLUDED.commentsText, commentsEntityType = EXCLUDED.commentsEntityType, commentsEntityUid = EXCLUDED.commentsEntityUid, commentsPublic = EXCLUDED.commentsPublic, commentsStatus = EXCLUDED.commentsStatus, commentsPersonUid = EXCLUDED.commentsPersonUid, commentsToPersonUid = EXCLUDED.commentsToPersonUid, commentsFlagged = EXCLUDED.commentsFlagged, commentsInActive = EXCLUDED.commentsInActive, commentsDateTimeAdded = EXCLUDED.commentsDateTimeAdded, commentsDateTimeUpdated = EXCLUDED.commentsDateTimeUpdated, commentsMCSN = EXCLUDED.commentsMCSN, commentsLCSN = EXCLUDED.commentsLCSN, commentsLCB = EXCLUDED.commentsLCB, commentsLct = EXCLUDED.commentsLct */; END '; _stmtList.add_11rb$(element_255); var element_256 = ' CREATE TABLE IF NOT EXISTS ReportReplicate ( reportPk INTEGER NOT NULL, reportVersionId INTEGER NOT NULL DEFAULT 0, reportDestination INTEGER NOT NULL, reportPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (reportPk, reportDestination)) '; _stmtList.add_11rb$(element_256); var element_257 = ' CREATE INDEX index_ReportReplicate_reportPk_reportDestination_reportVersionId ON ReportReplicate (reportPk, reportDestination, reportVersionId) '; _stmtList.add_11rb$(element_257); var element_258 = ' CREATE INDEX index_ReportReplicate_reportDestination_reportPending ON ReportReplicate (reportDestination, reportPending) '; _stmtList.add_11rb$(element_258); var element_259 = ' CREATE TRIGGER ch_ins_101 AFTER INSERT ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, NEW.reportUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = NEW.reportUid); END '; _stmtList.add_11rb$(element_259); var element_260 = ' CREATE TRIGGER ch_upd_101 AFTER UPDATE ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, NEW.reportUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = NEW.reportUid); END '; _stmtList.add_11rb$(element_260); var element_261 = ' CREATE TRIGGER ch_del_101 AFTER DELETE ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, OLD.reportUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = OLD.reportUid); END '; _stmtList.add_11rb$(element_261); var element_262 = 'CREATE VIEW Report_ReceiveView AS SELECT Report.*, ReportReplicate.* FROM Report LEFT JOIN ReportReplicate ON ReportReplicate.reportPk = Report.reportUid '; _stmtList.add_11rb$(element_262); var element_263 = ' CREATE TRIGGER report_remote_insert_ins INSTEAD OF INSERT ON Report_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Report(reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct) VALUES (NEW.reportUid, NEW.reportOwnerUid, NEW.xAxis, NEW.reportDateRangeSelection, NEW.fromDate, NEW.fromRelTo, NEW.fromRelOffSet, NEW.fromRelUnit, NEW.toDate, NEW.toRelTo, NEW.toRelOffSet, NEW.toRelUnit, NEW.reportTitle, NEW.reportDescription, NEW.reportSeries, NEW.reportInactive, NEW.isTemplate, NEW.priority, NEW.reportTitleId, NEW.reportDescId, NEW.reportMasterChangeSeqNum, NEW.reportLocalChangeSeqNum, NEW.reportLastChangedBy, NEW.reportLct) /*psql ON CONFLICT (reportUid) DO UPDATE SET reportOwnerUid = EXCLUDED.reportOwnerUid, xAxis = EXCLUDED.xAxis, reportDateRangeSelection = EXCLUDED.reportDateRangeSelection, fromDate = EXCLUDED.fromDate, fromRelTo = EXCLUDED.fromRelTo, fromRelOffSet = EXCLUDED.fromRelOffSet, fromRelUnit = EXCLUDED.fromRelUnit, toDate = EXCLUDED.toDate, toRelTo = EXCLUDED.toRelTo, toRelOffSet = EXCLUDED.toRelOffSet, toRelUnit = EXCLUDED.toRelUnit, reportTitle = EXCLUDED.reportTitle, reportDescription = EXCLUDED.reportDescription, reportSeries = EXCLUDED.reportSeries, reportInactive = EXCLUDED.reportInactive, isTemplate = EXCLUDED.isTemplate, priority = EXCLUDED.priority, reportTitleId = EXCLUDED.reportTitleId, reportDescId = EXCLUDED.reportDescId, reportMasterChangeSeqNum = EXCLUDED.reportMasterChangeSeqNum, reportLocalChangeSeqNum = EXCLUDED.reportLocalChangeSeqNum, reportLastChangedBy = EXCLUDED.reportLastChangedBy, reportLct = EXCLUDED.reportLct */; END '; _stmtList.add_11rb$(element_263); var element_264 = ' CREATE TABLE IF NOT EXISTS SiteReplicate ( sitePk INTEGER NOT NULL, siteVersionId INTEGER NOT NULL DEFAULT 0, siteDestination INTEGER NOT NULL, sitePending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (sitePk, siteDestination)) '; _stmtList.add_11rb$(element_264); var element_265 = ' CREATE INDEX index_SiteReplicate_sitePk_siteDestination_siteVersionId ON SiteReplicate (sitePk, siteDestination, siteVersionId) '; _stmtList.add_11rb$(element_265); var element_266 = ' CREATE INDEX index_SiteReplicate_siteDestination_sitePending ON SiteReplicate (siteDestination, sitePending) '; _stmtList.add_11rb$(element_266); var element_267 = ' CREATE TRIGGER ch_ins_189 AFTER INSERT ON Site BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 189 AS chTableId, NEW.siteUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 189 AND chEntityPk = NEW.siteUid); END '; _stmtList.add_11rb$(element_267); var element_268 = ' CREATE TRIGGER ch_upd_189 AFTER UPDATE ON Site BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 189 AS chTableId, NEW.siteUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 189 AND chEntityPk = NEW.siteUid); END '; _stmtList.add_11rb$(element_268); var element_269 = ' CREATE TRIGGER ch_del_189 AFTER DELETE ON Site BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 189 AS chTableId, OLD.siteUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 189 AND chEntityPk = OLD.siteUid); END '; _stmtList.add_11rb$(element_269); var element_270 = 'CREATE VIEW Site_ReceiveView AS SELECT Site.*, SiteReplicate.* FROM Site LEFT JOIN SiteReplicate ON SiteReplicate.sitePk = Site.siteUid '; _stmtList.add_11rb$(element_270); var element_271 = ' CREATE TRIGGER site_remote_insert_ins INSTEAD OF INSERT ON Site_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Site(siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES (NEW.siteUid, NEW.sitePcsn, NEW.siteLcsn, NEW.siteLcb, NEW.siteLct, NEW.siteName, NEW.guestLogin, NEW.registrationAllowed, NEW.authSalt) /*psql ON CONFLICT (siteUid) DO UPDATE SET sitePcsn = EXCLUDED.sitePcsn, siteLcsn = EXCLUDED.siteLcsn, siteLcb = EXCLUDED.siteLcb, siteLct = EXCLUDED.siteLct, siteName = EXCLUDED.siteName, guestLogin = EXCLUDED.guestLogin, registrationAllowed = EXCLUDED.registrationAllowed, authSalt = EXCLUDED.authSalt*/; END '; _stmtList.add_11rb$(element_271); var element_272 = ' CREATE TABLE IF NOT EXISTS LearnerGroupReplicate ( lgPk INTEGER NOT NULL, lgVersionId INTEGER NOT NULL DEFAULT 0, lgDestination INTEGER NOT NULL, lgPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (lgPk, lgDestination)) '; _stmtList.add_11rb$(element_272); var element_273 = ' CREATE INDEX index_LearnerGroupReplicate_lgPk_lgDestination_lgVersionId ON LearnerGroupReplicate (lgPk, lgDestination, lgVersionId) '; _stmtList.add_11rb$(element_273); var element_274 = ' CREATE INDEX index_LearnerGroupReplicate_lgDestination_lgPending ON LearnerGroupReplicate (lgDestination, lgPending) '; _stmtList.add_11rb$(element_274); var element_275 = ' CREATE TRIGGER ch_ins_301 AFTER INSERT ON LearnerGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 301 AS chTableId, NEW.learnerGroupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 301 AND chEntityPk = NEW.learnerGroupUid); END '; _stmtList.add_11rb$(element_275); var element_276 = ' CREATE TRIGGER ch_upd_301 AFTER UPDATE ON LearnerGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 301 AS chTableId, NEW.learnerGroupUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 301 AND chEntityPk = NEW.learnerGroupUid); END '; _stmtList.add_11rb$(element_276); var element_277 = ' CREATE TRIGGER ch_del_301 AFTER DELETE ON LearnerGroup BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 301 AS chTableId, OLD.learnerGroupUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 301 AND chEntityPk = OLD.learnerGroupUid); END '; _stmtList.add_11rb$(element_277); var element_278 = 'CREATE VIEW LearnerGroup_ReceiveView AS SELECT LearnerGroup.*, LearnerGroupReplicate.* FROM LearnerGroup LEFT JOIN LearnerGroupReplicate ON LearnerGroupReplicate.lgPk = LearnerGroup.learnerGroupUid '; _stmtList.add_11rb$(element_278); var element_279 = ' CREATE TRIGGER learnergroup_remote_insert_ins INSTEAD OF INSERT ON LearnerGroup_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LearnerGroup(learnerGroupUid, learnerGroupName, learnerGroupDescription, learnerGroupActive, learnerGroupMCSN, learnerGroupCSN, learnerGroupLCB, learnerGroupLct) VALUES (NEW.learnerGroupUid, NEW.learnerGroupName, NEW.learnerGroupDescription, NEW.learnerGroupActive, NEW.learnerGroupMCSN, NEW.learnerGroupCSN, NEW.learnerGroupLCB, NEW.learnerGroupLct) /*psql ON CONFLICT (learnerGroupUid) DO UPDATE SET learnerGroupName = EXCLUDED.learnerGroupName, learnerGroupDescription = EXCLUDED.learnerGroupDescription, learnerGroupActive = EXCLUDED.learnerGroupActive, learnerGroupMCSN = EXCLUDED.learnerGroupMCSN, learnerGroupCSN = EXCLUDED.learnerGroupCSN, learnerGroupLCB = EXCLUDED.learnerGroupLCB, learnerGroupLct = EXCLUDED.learnerGroupLct */; END '; _stmtList.add_11rb$(element_279); var element_280 = ' CREATE TABLE IF NOT EXISTS LearnerGroupMemberReplicate ( lgmPk INTEGER NOT NULL, lgmVersionId INTEGER NOT NULL DEFAULT 0, lgmDestination INTEGER NOT NULL, lgmPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (lgmPk, lgmDestination)) '; _stmtList.add_11rb$(element_280); var element_281 = ' CREATE INDEX index_LearnerGroupMemberReplicate_lgmPk_lgmDestination_lgmVersionId ON LearnerGroupMemberReplicate (lgmPk, lgmDestination, lgmVersionId) '; _stmtList.add_11rb$(element_281); var element_282 = ' CREATE INDEX index_LearnerGroupMemberReplicate_lgmDestination_lgmPending ON LearnerGroupMemberReplicate (lgmDestination, lgmPending) '; _stmtList.add_11rb$(element_282); var element_283 = ' CREATE TRIGGER ch_ins_300 AFTER INSERT ON LearnerGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 300 AS chTableId, NEW.learnerGroupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 300 AND chEntityPk = NEW.learnerGroupMemberUid); END '; _stmtList.add_11rb$(element_283); var element_284 = ' CREATE TRIGGER ch_upd_300 AFTER UPDATE ON LearnerGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 300 AS chTableId, NEW.learnerGroupMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 300 AND chEntityPk = NEW.learnerGroupMemberUid); END '; _stmtList.add_11rb$(element_284); var element_285 = ' CREATE TRIGGER ch_del_300 AFTER DELETE ON LearnerGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 300 AS chTableId, OLD.learnerGroupMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 300 AND chEntityPk = OLD.learnerGroupMemberUid); END '; _stmtList.add_11rb$(element_285); var element_286 = 'CREATE VIEW LearnerGroupMember_ReceiveView AS SELECT LearnerGroupMember.*, LearnerGroupMemberReplicate.* FROM LearnerGroupMember LEFT JOIN LearnerGroupMemberReplicate ON LearnerGroupMemberReplicate.lgmPk = LearnerGroupMember.learnerGroupMemberUid '; _stmtList.add_11rb$(element_286); var element_287 = ' CREATE TRIGGER learnergroupmember_remote_insert_ins INSTEAD OF INSERT ON LearnerGroupMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO LearnerGroupMember(learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct) VALUES (NEW.learnerGroupMemberUid, NEW.learnerGroupMemberPersonUid, NEW.learnerGroupMemberLgUid, NEW.learnerGroupMemberRole, NEW.learnerGroupMemberActive, NEW.learnerGroupMemberMCSN, NEW.learnerGroupMemberCSN, NEW.learnerGroupMemberLCB, NEW.learnerGroupMemberLct) /*psql ON CONFLICT (learnerGroupMemberUid) DO UPDATE SET learnerGroupMemberPersonUid = EXCLUDED.learnerGroupMemberPersonUid, learnerGroupMemberLgUid = EXCLUDED.learnerGroupMemberLgUid, learnerGroupMemberRole = EXCLUDED.learnerGroupMemberRole, learnerGroupMemberActive = EXCLUDED.learnerGroupMemberActive, learnerGroupMemberMCSN = EXCLUDED.learnerGroupMemberMCSN, learnerGroupMemberCSN = EXCLUDED.learnerGroupMemberCSN, learnerGroupMemberLCB = EXCLUDED.learnerGroupMemberLCB, learnerGroupMemberLct = EXCLUDED.learnerGroupMemberLct */; END '; _stmtList.add_11rb$(element_287); var element_288 = ' CREATE TABLE IF NOT EXISTS GroupLearningSessionReplicate ( glsPk INTEGER NOT NULL, glsVersionId INTEGER NOT NULL DEFAULT 0, glsDestination INTEGER NOT NULL, glsPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (glsPk, glsDestination)) '; _stmtList.add_11rb$(element_288); var element_289 = ' CREATE INDEX index_GroupLearningSessionReplicate_glsPk_glsDestination_glsVersionId ON GroupLearningSessionReplicate (glsPk, glsDestination, glsVersionId) '; _stmtList.add_11rb$(element_289); var element_290 = ' CREATE INDEX index_GroupLearningSessionReplicate_glsDestination_glsPending ON GroupLearningSessionReplicate (glsDestination, glsPending) '; _stmtList.add_11rb$(element_290); var element_291 = ' CREATE TRIGGER ch_ins_302 AFTER INSERT ON GroupLearningSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 302 AS chTableId, NEW.groupLearningSessionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 302 AND chEntityPk = NEW.groupLearningSessionUid); END '; _stmtList.add_11rb$(element_291); var element_292 = ' CREATE TRIGGER ch_upd_302 AFTER UPDATE ON GroupLearningSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 302 AS chTableId, NEW.groupLearningSessionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 302 AND chEntityPk = NEW.groupLearningSessionUid); END '; _stmtList.add_11rb$(element_292); var element_293 = ' CREATE TRIGGER ch_del_302 AFTER DELETE ON GroupLearningSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 302 AS chTableId, OLD.groupLearningSessionUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 302 AND chEntityPk = OLD.groupLearningSessionUid); END '; _stmtList.add_11rb$(element_293); var element_294 = 'CREATE VIEW GroupLearningSession_ReceiveView AS SELECT GroupLearningSession.*, GroupLearningSessionReplicate.* FROM GroupLearningSession LEFT JOIN GroupLearningSessionReplicate ON GroupLearningSessionReplicate.glsPk = GroupLearningSession.groupLearningSessionUid '; _stmtList.add_11rb$(element_294); var element_295 = ' CREATE TRIGGER grouplearningsession_remote_insert_ins INSTEAD OF INSERT ON GroupLearningSession_ReceiveView FOR EACH ROW BEGIN REPLACE INTO GroupLearningSession(groupLearningSessionUid, groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid, groupLearningSessionInactive, groupLearningSessionMCSN, groupLearningSessionCSN, groupLearningSessionLCB, groupLearningSessionLct) VALUES (NEW.groupLearningSessionUid, NEW.groupLearningSessionContentUid, NEW.groupLearningSessionLearnerGroupUid, NEW.groupLearningSessionInactive, NEW.groupLearningSessionMCSN, NEW.groupLearningSessionCSN, NEW.groupLearningSessionLCB, NEW.groupLearningSessionLct) /*psql ON CONFLICT (groupLearningSessionUid) DO UPDATE SET groupLearningSessionContentUid = EXCLUDED.groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid = EXCLUDED.groupLearningSessionLearnerGroupUid, groupLearningSessionInactive = EXCLUDED.groupLearningSessionInactive, groupLearningSessionMCSN = EXCLUDED.groupLearningSessionMCSN, groupLearningSessionCSN = EXCLUDED.groupLearningSessionCSN, groupLearningSessionLCB = EXCLUDED.groupLearningSessionLCB, groupLearningSessionLct = EXCLUDED.groupLearningSessionLct */; END '; _stmtList.add_11rb$(element_295); var element_296 = ' CREATE TABLE IF NOT EXISTS SiteTermsReplicate ( stPk INTEGER NOT NULL, stVersionId INTEGER NOT NULL DEFAULT 0, stDestination INTEGER NOT NULL, stPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (stPk, stDestination)) '; _stmtList.add_11rb$(element_296); var element_297 = ' CREATE INDEX index_SiteTermsReplicate_stPk_stDestination_stVersionId ON SiteTermsReplicate (stPk, stDestination, stVersionId) '; _stmtList.add_11rb$(element_297); var element_298 = ' CREATE INDEX index_SiteTermsReplicate_stDestination_stPending ON SiteTermsReplicate (stDestination, stPending) '; _stmtList.add_11rb$(element_298); var element_299 = ' CREATE TRIGGER ch_ins_272 AFTER INSERT ON SiteTerms BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 272 AS chTableId, NEW.sTermsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 272 AND chEntityPk = NEW.sTermsUid); END '; _stmtList.add_11rb$(element_299); var element_300 = ' CREATE TRIGGER ch_upd_272 AFTER UPDATE ON SiteTerms BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 272 AS chTableId, NEW.sTermsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 272 AND chEntityPk = NEW.sTermsUid); END '; _stmtList.add_11rb$(element_300); var element_301 = ' CREATE TRIGGER ch_del_272 AFTER DELETE ON SiteTerms BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 272 AS chTableId, OLD.sTermsUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 272 AND chEntityPk = OLD.sTermsUid); END '; _stmtList.add_11rb$(element_301); var element_302 = 'CREATE VIEW SiteTerms_ReceiveView AS SELECT SiteTerms.*, SiteTermsReplicate.* FROM SiteTerms LEFT JOIN SiteTermsReplicate ON SiteTermsReplicate.stPk = SiteTerms.sTermsUid '; _stmtList.add_11rb$(element_302); var element_303 = ' CREATE TRIGGER siteterms_remote_insert_ins INSTEAD OF INSERT ON SiteTerms_ReceiveView FOR EACH ROW BEGIN REPLACE INTO SiteTerms(sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct) VALUES (NEW.sTermsUid, NEW.termsHtml, NEW.sTermsLang, NEW.sTermsLangUid, NEW.sTermsActive, NEW.sTermsLastChangedBy, NEW.sTermsPrimaryCsn, NEW.sTermsLocalCsn, NEW.sTermsLct) /*psql ON CONFLICT (sTermsUid) DO UPDATE SET termsHtml = EXCLUDED.termsHtml, sTermsLang = EXCLUDED.sTermsLang, sTermsLangUid = EXCLUDED.sTermsLangUid, sTermsActive = EXCLUDED.sTermsActive, sTermsLastChangedBy = EXCLUDED.sTermsLastChangedBy, sTermsPrimaryCsn = EXCLUDED.sTermsPrimaryCsn, sTermsLocalCsn = EXCLUDED.sTermsLocalCsn, sTermsLct = EXCLUDED.sTermsLct */; END '; _stmtList.add_11rb$(element_303); var element_304 = ' CREATE TABLE IF NOT EXISTS ClazzContentJoinReplicate ( ccjPk INTEGER NOT NULL, ccjVersionId INTEGER NOT NULL DEFAULT 0, ccjDestination INTEGER NOT NULL, ccjPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (ccjPk, ccjDestination)) '; _stmtList.add_11rb$(element_304); var element_305 = ' CREATE INDEX index_ClazzContentJoinReplicate_ccjPk_ccjDestination_ccjVersionId ON ClazzContentJoinReplicate (ccjPk, ccjDestination, ccjVersionId) '; _stmtList.add_11rb$(element_305); var element_306 = ' CREATE INDEX index_ClazzContentJoinReplicate_ccjDestination_ccjPending ON ClazzContentJoinReplicate (ccjDestination, ccjPending) '; _stmtList.add_11rb$(element_306); var element_307 = ' CREATE TRIGGER ch_ins_134 AFTER INSERT ON ClazzContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 134 AS chTableId, NEW.ccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 134 AND chEntityPk = NEW.ccjUid); END '; _stmtList.add_11rb$(element_307); var element_308 = ' CREATE TRIGGER ch_upd_134 AFTER UPDATE ON ClazzContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 134 AS chTableId, NEW.ccjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 134 AND chEntityPk = NEW.ccjUid); END '; _stmtList.add_11rb$(element_308); var element_309 = ' CREATE TRIGGER ch_del_134 AFTER DELETE ON ClazzContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 134 AS chTableId, OLD.ccjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 134 AND chEntityPk = OLD.ccjUid); END '; _stmtList.add_11rb$(element_309); var element_310 = 'CREATE VIEW ClazzContentJoin_ReceiveView AS SELECT ClazzContentJoin.*, ClazzContentJoinReplicate.* FROM ClazzContentJoin LEFT JOIN ClazzContentJoinReplicate ON ClazzContentJoinReplicate.ccjPk = ClazzContentJoin.ccjUid '; _stmtList.add_11rb$(element_310); var element_311 = ' CREATE TRIGGER clazzcontentjoin_remote_insert_ins INSTEAD OF INSERT ON ClazzContentJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzContentJoin(ccjUid, ccjContentEntryUid, ccjClazzUid, ccjActive, ccjLocalChangeSeqNum, ccjMasterChangeSeqNum, ccjLastChangedBy, ccjLct) VALUES (NEW.ccjUid, NEW.ccjContentEntryUid, NEW.ccjClazzUid, NEW.ccjActive, NEW.ccjLocalChangeSeqNum, NEW.ccjMasterChangeSeqNum, NEW.ccjLastChangedBy, NEW.ccjLct) /*psql ON CONFLICT (ccjUid) DO UPDATE SET ccjContentEntryUid = EXCLUDED.ccjContentEntryUid, ccjClazzUid = EXCLUDED.ccjClazzUid, ccjActive = EXCLUDED.ccjActive, ccjLocalChangeSeqNum = EXCLUDED.ccjLocalChangeSeqNum, ccjMasterChangeSeqNum = EXCLUDED.ccjMasterChangeSeqNum, ccjLastChangedBy = EXCLUDED.ccjLastChangedBy, ccjLct = EXCLUDED.ccjLct */; END '; _stmtList.add_11rb$(element_311); var element_312 = ' CREATE TABLE IF NOT EXISTS PersonParentJoinReplicate ( ppjPk INTEGER NOT NULL, ppjVersionId INTEGER NOT NULL DEFAULT 0, ppjDestination INTEGER NOT NULL, ppjPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (ppjPk, ppjDestination)) '; _stmtList.add_11rb$(element_312); var element_313 = ' CREATE INDEX index_PersonParentJoinReplicate_ppjPk_ppjDestination_ppjVersionId ON PersonParentJoinReplicate (ppjPk, ppjDestination, ppjVersionId) '; _stmtList.add_11rb$(element_313); var element_314 = ' CREATE INDEX index_PersonParentJoinReplicate_ppjDestination_ppjPending ON PersonParentJoinReplicate (ppjDestination, ppjPending) '; _stmtList.add_11rb$(element_314); var element_315 = ' CREATE TRIGGER ch_ins_512 AFTER INSERT ON PersonParentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 512 AS chTableId, NEW.ppjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 512 AND chEntityPk = NEW.ppjUid); END '; _stmtList.add_11rb$(element_315); var element_316 = ' CREATE TRIGGER ch_upd_512 AFTER UPDATE ON PersonParentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 512 AS chTableId, NEW.ppjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 512 AND chEntityPk = NEW.ppjUid); END '; _stmtList.add_11rb$(element_316); var element_317 = ' CREATE TRIGGER ch_del_512 AFTER DELETE ON PersonParentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 512 AS chTableId, OLD.ppjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 512 AND chEntityPk = OLD.ppjUid); END '; _stmtList.add_11rb$(element_317); var element_318 = 'CREATE VIEW PersonParentJoin_ReceiveView AS SELECT PersonParentJoin.*, PersonParentJoinReplicate.* FROM PersonParentJoin LEFT JOIN PersonParentJoinReplicate ON PersonParentJoinReplicate.ppjPk = PersonParentJoin.ppjUid '; _stmtList.add_11rb$(element_318); var element_319 = ' CREATE TRIGGER personparentjoin_remote_insert_ins INSTEAD OF INSERT ON PersonParentJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonParentJoin(ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr) VALUES (NEW.ppjUid, NEW.ppjPcsn, NEW.ppjLcsn, NEW.ppjLcb, NEW.ppjLct, NEW.ppjParentPersonUid, NEW.ppjMinorPersonUid, NEW.ppjRelationship, NEW.ppjEmail, NEW.ppjPhone, NEW.ppjInactive, NEW.ppjStatus, NEW.ppjApprovalTiemstamp, NEW.ppjApprovalIpAddr) /*psql ON CONFLICT (ppjUid) DO UPDATE SET ppjPcsn = EXCLUDED.ppjPcsn, ppjLcsn = EXCLUDED.ppjLcsn, ppjLcb = EXCLUDED.ppjLcb, ppjLct = EXCLUDED.ppjLct, ppjParentPersonUid = EXCLUDED.ppjParentPersonUid, ppjMinorPersonUid = EXCLUDED.ppjMinorPersonUid, ppjRelationship = EXCLUDED.ppjRelationship, ppjEmail = EXCLUDED.ppjEmail, ppjPhone = EXCLUDED.ppjPhone, ppjInactive = EXCLUDED.ppjInactive, ppjStatus = EXCLUDED.ppjStatus, ppjApprovalTiemstamp = EXCLUDED.ppjApprovalTiemstamp, ppjApprovalIpAddr = EXCLUDED.ppjApprovalIpAddr */; END '; _stmtList.add_11rb$(element_319); var element_320 = ' CREATE TABLE IF NOT EXISTS ScopedGrantReplicate ( sgPk INTEGER NOT NULL, sgVersionId INTEGER NOT NULL DEFAULT 0, sgDestination INTEGER NOT NULL, sgPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (sgPk, sgDestination)) '; _stmtList.add_11rb$(element_320); var element_321 = ' CREATE INDEX index_ScopedGrantReplicate_sgPk_sgDestination_sgVersionId ON ScopedGrantReplicate (sgPk, sgDestination, sgVersionId) '; _stmtList.add_11rb$(element_321); var element_322 = ' CREATE INDEX index_ScopedGrantReplicate_sgDestination_sgPending ON ScopedGrantReplicate (sgDestination, sgPending) '; _stmtList.add_11rb$(element_322); var element_323 = ' CREATE TRIGGER ch_ins_48 AFTER INSERT ON ScopedGrant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 48 AS chTableId, NEW.sgUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 48 AND chEntityPk = NEW.sgUid); END '; _stmtList.add_11rb$(element_323); var element_324 = ' CREATE TRIGGER ch_upd_48 AFTER UPDATE ON ScopedGrant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 48 AS chTableId, NEW.sgUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 48 AND chEntityPk = NEW.sgUid); END '; _stmtList.add_11rb$(element_324); var element_325 = ' CREATE TRIGGER ch_del_48 AFTER DELETE ON ScopedGrant BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 48 AS chTableId, OLD.sgUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 48 AND chEntityPk = OLD.sgUid); END '; _stmtList.add_11rb$(element_325); var element_326 = 'CREATE VIEW ScopedGrant_ReceiveView AS SELECT ScopedGrant.*, ScopedGrantReplicate.* FROM ScopedGrant LEFT JOIN ScopedGrantReplicate ON ScopedGrantReplicate.sgPk = ScopedGrant.sgUid '; _stmtList.add_11rb$(element_326); var element_327 = ' CREATE TRIGGER sg_remote_insert_ins INSTEAD OF INSERT ON ScopedGrant_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ScopedGrant(sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags) VALUES (NEW.sgUid, NEW.sgPcsn, NEW.sgLcsn, NEW.sgLcb, NEW.sgLct, NEW.sgTableId, NEW.sgEntityUid, NEW.sgPermissions, NEW.sgGroupUid, NEW.sgIndex, NEW.sgFlags) /*psql ON CONFLICT(sgUid) DO UPDATE SET sgLct = EXCLUDED.sgLct, sgPermissions = EXCLUDED.sgPermissions */ ; END '; _stmtList.add_11rb$(element_327); var element_328 = ' CREATE TABLE IF NOT EXISTS ErrorReportReplicate ( erPk INTEGER NOT NULL, erVersionId INTEGER NOT NULL DEFAULT 0, erDestination INTEGER NOT NULL, erPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (erPk, erDestination)) '; _stmtList.add_11rb$(element_328); var element_329 = ' CREATE INDEX index_ErrorReportReplicate_erPk_erDestination_erVersionId ON ErrorReportReplicate (erPk, erDestination, erVersionId) '; _stmtList.add_11rb$(element_329); var element_330 = ' CREATE INDEX index_ErrorReportReplicate_erDestination_erPending ON ErrorReportReplicate (erDestination, erPending) '; _stmtList.add_11rb$(element_330); var element_331 = ' CREATE TRIGGER ch_ins_419 AFTER INSERT ON ErrorReport BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 419 AS chTableId, NEW.errUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 419 AND chEntityPk = NEW.errUid); END '; _stmtList.add_11rb$(element_331); var element_332 = ' CREATE TRIGGER ch_upd_419 AFTER UPDATE ON ErrorReport BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 419 AS chTableId, NEW.errUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 419 AND chEntityPk = NEW.errUid); END '; _stmtList.add_11rb$(element_332); var element_333 = ' CREATE TRIGGER ch_del_419 AFTER DELETE ON ErrorReport BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 419 AS chTableId, OLD.errUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 419 AND chEntityPk = OLD.errUid); END '; _stmtList.add_11rb$(element_333); var element_334 = 'CREATE VIEW ErrorReport_ReceiveView AS SELECT ErrorReport.*, ErrorReportReplicate.* FROM ErrorReport LEFT JOIN ErrorReportReplicate ON ErrorReportReplicate.erPk = ErrorReport.errUid '; _stmtList.add_11rb$(element_334); var element_335 = ' CREATE TRIGGER errorreport_remote_insert_ins INSTEAD OF INSERT ON ErrorReport_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ErrorReport(errUid, errPcsn, errLcsn, errLcb, errLct, severity, timestamp, presenterUri, appVersion, versionCode, errorCode, operatingSys, osVersion, stackTrace, message) VALUES (NEW.errUid, NEW.errPcsn, NEW.errLcsn, NEW.errLcb, NEW.errLct, NEW.severity, NEW.timestamp, NEW.presenterUri, NEW.appVersion, NEW.versionCode, NEW.errorCode, NEW.operatingSys, NEW.osVersion, NEW.stackTrace, NEW.message) /*psql ON CONFLICT (errUid) DO UPDATE SET errPcsn = EXCLUDED.errPcsn, errLcsn = EXCLUDED.errLcsn, errLcb = EXCLUDED.errLcb, errLct = EXCLUDED.errLct, severity = EXCLUDED.severity, timestamp = EXCLUDED.timestamp, presenterUri = EXCLUDED.presenterUri, appVersion = EXCLUDED.appVersion, versionCode = EXCLUDED.versionCode, errorCode = EXCLUDED.errorCode, operatingSys = EXCLUDED.operatingSys, osVersion = EXCLUDED.osVersion, stackTrace = EXCLUDED.stackTrace, message = EXCLUDED.message */; END '; _stmtList.add_11rb$(element_335); var element_336 = ' CREATE TABLE IF NOT EXISTS ClazzAssignmentReplicate ( caPk INTEGER NOT NULL, caVersionId INTEGER NOT NULL DEFAULT 0, caDestination INTEGER NOT NULL, caPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (caPk, caDestination)) '; _stmtList.add_11rb$(element_336); var element_337 = ' CREATE INDEX index_ClazzAssignmentReplicate_caPk_caDestination_caVersionId ON ClazzAssignmentReplicate (caPk, caDestination, caVersionId) '; _stmtList.add_11rb$(element_337); var element_338 = ' CREATE INDEX index_ClazzAssignmentReplicate_caDestination_caPending ON ClazzAssignmentReplicate (caDestination, caPending) '; _stmtList.add_11rb$(element_338); var element_339 = ' CREATE TRIGGER ch_ins_520 AFTER INSERT ON ClazzAssignment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 520 AS chTableId, NEW.caUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 520 AND chEntityPk = NEW.caUid); END '; _stmtList.add_11rb$(element_339); var element_340 = ' CREATE TRIGGER ch_upd_520 AFTER UPDATE ON ClazzAssignment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 520 AS chTableId, NEW.caUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 520 AND chEntityPk = NEW.caUid); END '; _stmtList.add_11rb$(element_340); var element_341 = ' CREATE TRIGGER ch_del_520 AFTER DELETE ON ClazzAssignment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 520 AS chTableId, OLD.caUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 520 AND chEntityPk = OLD.caUid); END '; _stmtList.add_11rb$(element_341); var element_342 = 'CREATE VIEW ClazzAssignment_ReceiveView AS SELECT ClazzAssignment.*, ClazzAssignmentReplicate.* FROM ClazzAssignment LEFT JOIN ClazzAssignmentReplicate ON ClazzAssignmentReplicate.caPk = ClazzAssignment.caUid '; _stmtList.add_11rb$(element_342); var element_343 = ' CREATE TRIGGER clazzassignment_remote_insert_ins INSTEAD OF INSERT ON ClazzAssignment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzAssignment(caUid, caTitle, caDescription, caDeadlineDate, caStartDate, caLateSubmissionType, caLateSubmissionPenalty, caGracePeriodDate, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES (NEW.caUid, NEW.caTitle, NEW.caDescription, NEW.caDeadlineDate, NEW.caStartDate, NEW.caLateSubmissionType, NEW.caLateSubmissionPenalty, NEW.caGracePeriodDate, NEW.caActive, NEW.caClassCommentEnabled, NEW.caPrivateCommentsEnabled, NEW.caClazzUid, NEW.caLocalChangeSeqNum, NEW.caMasterChangeSeqNum, NEW.caLastChangedBy, NEW.caLct) /*psql ON CONFLICT (caUid) DO UPDATE SET caTitle = EXCLUDED.caTitle, caDescription = EXCLUDED.caDescription, caDeadlineDate = EXCLUDED.caDeadlineDate, caStartDate = EXCLUDED.caStartDate, caLateSubmissionType = EXCLUDED.caLateSubmissionType, caLateSubmissionPenalty = EXCLUDED.caLateSubmissionPenalty, caGracePeriodDate = EXCLUDED.caGracePeriodDate, caActive = EXCLUDED.caActive, caClassCommentEnabled = EXCLUDED.caClassCommentEnabled, caPrivateCommentsEnabled = EXCLUDED.caPrivateCommentsEnabled, caClazzUid = EXCLUDED.caClazzUid, caLocalChangeSeqNum = EXCLUDED.caLocalChangeSeqNum, caMasterChangeSeqNum = EXCLUDED.caMasterChangeSeqNum, caLastChangedBy = EXCLUDED.caLastChangedBy, caLct = EXCLUDED.caLct */; END '; _stmtList.add_11rb$(element_343); var element_344 = ' CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoinReplicate ( cacjPk INTEGER NOT NULL, cacjVersionId INTEGER NOT NULL DEFAULT 0, cacjDestination INTEGER NOT NULL, cacjPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (cacjPk, cacjDestination)) '; _stmtList.add_11rb$(element_344); var element_345 = ' CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjPk_cacjDestination_cacjVersionId ON ClazzAssignmentContentJoinReplicate (cacjPk, cacjDestination, cacjVersionId) '; _stmtList.add_11rb$(element_345); var element_346 = ' CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjDestination_cacjPending ON ClazzAssignmentContentJoinReplicate (cacjDestination, cacjPending) '; _stmtList.add_11rb$(element_346); var element_347 = ' CREATE TRIGGER ch_ins_521 AFTER INSERT ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, NEW.cacjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = NEW.cacjUid); END '; _stmtList.add_11rb$(element_347); var element_348 = ' CREATE TRIGGER ch_upd_521 AFTER UPDATE ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, NEW.cacjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = NEW.cacjUid); END '; _stmtList.add_11rb$(element_348); var element_349 = ' CREATE TRIGGER ch_del_521 AFTER DELETE ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, OLD.cacjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = OLD.cacjUid); END '; _stmtList.add_11rb$(element_349); var element_350 = 'CREATE VIEW ClazzAssignmentContentJoin_ReceiveView AS SELECT ClazzAssignmentContentJoin.*, ClazzAssignmentContentJoinReplicate.* FROM ClazzAssignmentContentJoin LEFT JOIN ClazzAssignmentContentJoinReplicate ON ClazzAssignmentContentJoinReplicate.cacjPk = ClazzAssignmentContentJoin.cacjUid '; _stmtList.add_11rb$(element_350); var element_351 = ' CREATE TRIGGER clazzassignmentcontentjoin_remote_insert_ins INSTEAD OF INSERT ON ClazzAssignmentContentJoin_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzAssignmentContentJoin(cacjUid, cacjContentUid, cacjAssignmentUid, cacjActive, cacjMCSN, cacjLCSN, cacjLCB, cacjLct) VALUES (NEW.cacjUid, NEW.cacjContentUid, NEW.cacjAssignmentUid, NEW.cacjActive, NEW.cacjMCSN, NEW.cacjLCSN, NEW.cacjLCB, NEW.cacjLct) /*psql ON CONFLICT (cacjUid) DO UPDATE SET cacjContentUid = EXCLUDED.cacjContentUid, cacjAssignmentUid = EXCLUDED.cacjAssignmentUid, cacjActive = EXCLUDED.cacjActive, cacjMCSN = EXCLUDED.cacjMCSN, cacjLCSN = EXCLUDED.cacjLCSN, cacjLCB = EXCLUDED.cacjLCB, cacjLct = EXCLUDED.cacjLct */; END '; _stmtList.add_11rb$(element_351); var element_352 = ' CREATE TABLE IF NOT EXISTS PersonAuth2Replicate ( paPk INTEGER NOT NULL, paVersionId INTEGER NOT NULL DEFAULT 0, paDestination INTEGER NOT NULL, paPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (paPk, paDestination)) '; _stmtList.add_11rb$(element_352); var element_353 = ' CREATE INDEX index_PersonAuth2Replicate_paPk_paDestination_paVersionId ON PersonAuth2Replicate (paPk, paDestination, paVersionId) '; _stmtList.add_11rb$(element_353); var element_354 = ' CREATE INDEX index_PersonAuth2Replicate_paDestination_paPending ON PersonAuth2Replicate (paDestination, paPending) '; _stmtList.add_11rb$(element_354); var element_355 = ' CREATE TRIGGER ch_ins_678 AFTER INSERT ON PersonAuth2 BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 678 AS chTableId, NEW.pauthUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 678 AND chEntityPk = NEW.pauthUid); END '; _stmtList.add_11rb$(element_355); var element_356 = ' CREATE TRIGGER ch_upd_678 AFTER UPDATE ON PersonAuth2 BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 678 AS chTableId, NEW.pauthUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 678 AND chEntityPk = NEW.pauthUid); END '; _stmtList.add_11rb$(element_356); var element_357 = ' CREATE TRIGGER ch_del_678 AFTER DELETE ON PersonAuth2 BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 678 AS chTableId, OLD.pauthUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 678 AND chEntityPk = OLD.pauthUid); END '; _stmtList.add_11rb$(element_357); var element_358 = 'CREATE VIEW PersonAuth2_ReceiveView AS SELECT PersonAuth2.*, PersonAuth2Replicate.* FROM PersonAuth2 LEFT JOIN PersonAuth2Replicate ON PersonAuth2Replicate.paPk = PersonAuth2.pauthUid '; _stmtList.add_11rb$(element_358); var element_359 = ' CREATE TRIGGER personauth2_remote_insert_ins INSTEAD OF INSERT ON PersonAuth2_ReceiveView FOR EACH ROW BEGIN REPLACE INTO PersonAuth2(pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES (NEW.pauthUid, NEW.pauthMechanism, NEW.pauthAuth, NEW.pauthLcsn, NEW.pauthPcsn, NEW.pauthLcb, NEW.pauthLct) /*psql ON CONFLICT (pauthUid) DO UPDATE SET pauthMechanism = EXCLUDED.pauthMechanism, pauthAuth = EXCLUDED.pauthAuth, pauthLcsn = EXCLUDED.pauthLcsn, pauthPcsn = EXCLUDED.pauthPcsn, pauthLcb = EXCLUDED.pauthLcb, pauthLct = EXCLUDED.pauthLct */; END '; _stmtList.add_11rb$(element_359); var element_360 = ' CREATE TABLE IF NOT EXISTS UserSessionReplicate ( usPk INTEGER NOT NULL, usVersionId INTEGER NOT NULL DEFAULT 0, usDestination INTEGER NOT NULL, usPending INTEGER NOT NULL DEFAULT 1, PRIMARY KEY (usPk, usDestination)) '; _stmtList.add_11rb$(element_360); var element_361 = ' CREATE INDEX index_UserSessionReplicate_usPk_usDestination_usVersionId ON UserSessionReplicate (usPk, usDestination, usVersionId) '; _stmtList.add_11rb$(element_361); var element_362 = ' CREATE INDEX index_UserSessionReplicate_usDestination_usPending ON UserSessionReplicate (usDestination, usPending) '; _stmtList.add_11rb$(element_362); var element_363 = ' CREATE TRIGGER ch_ins_679 AFTER INSERT ON UserSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 679 AS chTableId, NEW.usUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 679 AND chEntityPk = NEW.usUid); END '; _stmtList.add_11rb$(element_363); var element_364 = ' CREATE TRIGGER ch_upd_679 AFTER UPDATE ON UserSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 679 AS chTableId, NEW.usUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 679 AND chEntityPk = NEW.usUid); END '; _stmtList.add_11rb$(element_364); var element_365 = ' CREATE TRIGGER ch_del_679 AFTER DELETE ON UserSession BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 679 AS chTableId, OLD.usUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 679 AND chEntityPk = OLD.usUid); END '; _stmtList.add_11rb$(element_365); var element_366 = 'CREATE VIEW UserSession_ReceiveView AS SELECT UserSession.*, UserSessionReplicate.* FROM UserSession LEFT JOIN UserSessionReplicate ON UserSessionReplicate.usPk = UserSession.usUid '; _stmtList.add_11rb$(element_366); var element_367 = ' CREATE TRIGGER usersession_remote_ins_ins INSTEAD OF INSERT ON UserSession_ReceiveView FOR EACH ROW BEGIN REPLACE INTO UserSession(usUid, usPcsn, usLcsn, usLcb, usLct, usPersonUid, usClientNodeId, usStartTime, usEndTime, usStatus, usReason, usAuth, usSessionType) VALUES (NEW.usUid, NEW.usPcsn, NEW.usLcsn, NEW.usLcb, NEW.usLct, NEW.usPersonUid, NEW.usClientNodeId, NEW.usStartTime, NEW.usEndTime, NEW.usStatus, NEW.usReason, NEW.usAuth, NEW.usSessionType) /*postgres ON CONFLICT (usUid) DO UPDATE SET usStatus = EXCLUDED.usStatus, usEndTime = EXCLUDED.usEndTime, usReason = EXCLUDED.usReason */ ; END '; _stmtList.add_11rb$(element_367); } else { var element_368 = 'UPDATE ClazzLog SET clazzLogLastChangedTime = ' + systemTimeInMillis().toString() + ' WHERE clazzLogLastChangedTime = 0'; _stmtList.add_11rb$(element_368); var element_369 = 'UPDATE ClazzLogAttendanceRecord SET clazzLogAttendanceRecordLastChangedTime = ' + systemTimeInMillis().toString() + ' WHERE clazzLogAttendanceRecordLastChangedTime = 0'; _stmtList.add_11rb$(element_369); var element_370 = 'UPDATE Schedule SET scheduleLastChangedTime = ' + systemTimeInMillis().toString() + ' WHERE scheduleLastChangedTime = 0'; _stmtList.add_11rb$(element_370); var element_371 = 'UPDATE HolidayCalendar SET umCalendarLct = ' + systemTimeInMillis().toString() + ' WHERE umCalendarLct = 0'; _stmtList.add_11rb$(element_371); var element_372 = 'UPDATE Holiday SET holLct = ' + systemTimeInMillis().toString() + ' WHERE holLct = 0'; _stmtList.add_11rb$(element_372); var element_373 = 'UPDATE Person SET personLct = ' + systemTimeInMillis().toString() + ' WHERE personLct = 0'; _stmtList.add_11rb$(element_373); var element_374 = 'UPDATE Clazz SET clazzLct = ' + systemTimeInMillis().toString() + ' WHERE clazzLct = 0'; _stmtList.add_11rb$(element_374); var element_375 = 'UPDATE ClazzEnrolment SET clazzEnrolmentLct = ' + systemTimeInMillis().toString() + ' WHERE clazzEnrolmentLct = 0'; _stmtList.add_11rb$(element_375); var element_376 = 'UPDATE LeavingReason SET leavingReasonLct = ' + systemTimeInMillis().toString() + ' WHERE leavingReasonLct = 0'; _stmtList.add_11rb$(element_376); var element_377 = 'UPDATE ContentEntry SET contentEntryLct = ' + systemTimeInMillis().toString() + ' WHERE contentEntryLct = 0'; _stmtList.add_11rb$(element_377); var element_378 = 'UPDATE ContentEntryContentCategoryJoin SET ceccjLct = ' + systemTimeInMillis().toString() + ' WHERE ceccjLct = 0'; _stmtList.add_11rb$(element_378); var element_379 = 'UPDATE ContentEntryParentChildJoin SET cepcjLct = ' + systemTimeInMillis().toString() + ' WHERE cepcjLct = 0'; _stmtList.add_11rb$(element_379); var element_380 = 'UPDATE ContentEntryRelatedEntryJoin SET cerejLct = ' + systemTimeInMillis().toString() + ' WHERE cerejLct = 0'; _stmtList.add_11rb$(element_380); var element_381 = 'UPDATE ContentCategorySchema SET contentCategorySchemaLct = ' + systemTimeInMillis().toString() + ' WHERE contentCategorySchemaLct = 0'; _stmtList.add_11rb$(element_381); var element_382 = 'UPDATE ContentCategory SET contentCategoryLct = ' + systemTimeInMillis().toString() + ' WHERE contentCategoryLct = 0'; _stmtList.add_11rb$(element_382); var element_383 = 'UPDATE Language SET langLct = ' + systemTimeInMillis().toString() + ' WHERE langLct = 0'; _stmtList.add_11rb$(element_383); var element_384 = 'UPDATE LanguageVariant SET langVariantLct = ' + systemTimeInMillis().toString() + ' WHERE langVariantLct = 0'; _stmtList.add_11rb$(element_384); var element_385 = 'UPDATE PersonGroup SET groupLct = ' + systemTimeInMillis().toString() + ' WHERE groupLct = 0'; _stmtList.add_11rb$(element_385); var element_386 = 'UPDATE PersonGroupMember SET groupMemberLct = ' + systemTimeInMillis().toString() + ' WHERE groupMemberLct = 0'; _stmtList.add_11rb$(element_386); var element_387 = 'UPDATE PersonPicture SET personPictureLct = ' + systemTimeInMillis().toString() + ' WHERE personPictureLct = 0'; _stmtList.add_11rb$(element_387); var element_388 = 'UPDATE Container SET cntLct = ' + systemTimeInMillis().toString() + ' WHERE cntLct = 0'; _stmtList.add_11rb$(element_388); var element_389 = 'UPDATE VerbEntity SET verbLct = ' + systemTimeInMillis().toString() + ' WHERE verbLct = 0'; _stmtList.add_11rb$(element_389); var element_390 = 'UPDATE XObjectEntity SET xObjectLct = ' + systemTimeInMillis().toString() + ' WHERE xObjectLct = 0'; _stmtList.add_11rb$(element_390); var element_391 = 'UPDATE StatementEntity SET statementLct = ' + systemTimeInMillis().toString() + ' WHERE statementLct = 0'; _stmtList.add_11rb$(element_391); var element_392 = 'UPDATE ContextXObjectStatementJoin SET contextXObjectLct = ' + systemTimeInMillis().toString() + ' WHERE contextXObjectLct = 0'; _stmtList.add_11rb$(element_392); var element_393 = 'UPDATE AgentEntity SET agentLct = ' + systemTimeInMillis().toString() + ' WHERE agentLct = 0'; _stmtList.add_11rb$(element_393); var element_394 = 'UPDATE StateEntity SET stateLct = ' + systemTimeInMillis().toString() + ' WHERE stateLct = 0'; _stmtList.add_11rb$(element_394); var element_395 = 'UPDATE StateContentEntity SET stateContentLct = ' + systemTimeInMillis().toString() + ' WHERE stateContentLct = 0'; _stmtList.add_11rb$(element_395); var element_396 = 'UPDATE XLangMapEntry SET statementLangMapLct = ' + systemTimeInMillis().toString() + ' WHERE statementLangMapLct = 0'; _stmtList.add_11rb$(element_396); var element_397 = 'UPDATE School SET schoolLct = ' + systemTimeInMillis().toString() + ' WHERE schoolLct = 0'; _stmtList.add_11rb$(element_397); var element_398 = 'UPDATE SchoolMember SET schoolMemberLct = ' + systemTimeInMillis().toString() + ' WHERE schoolMemberLct = 0'; _stmtList.add_11rb$(element_398); var element_399 = 'UPDATE Comments SET commentsLct = ' + systemTimeInMillis().toString() + ' WHERE commentsLct = 0'; _stmtList.add_11rb$(element_399); var element_400 = 'UPDATE Report SET reportLct = ' + systemTimeInMillis().toString() + ' WHERE reportLct = 0'; _stmtList.add_11rb$(element_400); var element_401 = 'UPDATE Site SET siteLct = ' + systemTimeInMillis().toString() + ' WHERE siteLct = 0'; _stmtList.add_11rb$(element_401); var element_402 = 'UPDATE LearnerGroup SET learnerGroupLct = ' + systemTimeInMillis().toString() + ' WHERE learnerGroupLct = 0'; _stmtList.add_11rb$(element_402); var element_403 = 'UPDATE LearnerGroupMember SET learnerGroupMemberLct = ' + systemTimeInMillis().toString() + ' WHERE learnerGroupMemberLct = 0'; _stmtList.add_11rb$(element_403); var element_404 = 'UPDATE GroupLearningSession SET groupLearningSessionLct = ' + systemTimeInMillis().toString() + ' WHERE groupLearningSessionLct = 0'; _stmtList.add_11rb$(element_404); var element_405 = 'UPDATE SiteTerms SET sTermsLct = ' + systemTimeInMillis().toString() + ' WHERE sTermsLct = 0'; _stmtList.add_11rb$(element_405); var element_406 = 'UPDATE ClazzContentJoin SET ccjLct = ' + systemTimeInMillis().toString() + ' WHERE ccjLct = 0'; _stmtList.add_11rb$(element_406); var element_407 = 'UPDATE PersonParentJoin SET ppjLct = ' + systemTimeInMillis().toString() + ' WHERE ppjLct = 0'; _stmtList.add_11rb$(element_407); var element_408 = 'UPDATE ScopedGrant SET sgLct = ' + systemTimeInMillis().toString() + ' WHERE sgLct = 0'; _stmtList.add_11rb$(element_408); var element_409 = 'UPDATE ErrorReport SET errLct = ' + systemTimeInMillis().toString() + ' WHERE errLct = 0'; _stmtList.add_11rb$(element_409); var element_410 = 'UPDATE ClazzAssignment SET caLct = ' + systemTimeInMillis().toString() + ' WHERE caLct = 0'; _stmtList.add_11rb$(element_410); var element_411 = 'UPDATE ClazzAssignmentContentJoin SET cacjLct = ' + systemTimeInMillis().toString() + ' WHERE cacjLct = 0'; _stmtList.add_11rb$(element_411); var element_412 = 'UPDATE PersonAuth2 SET pauthLct = ' + systemTimeInMillis().toString() + ' WHERE pauthLct = 0'; _stmtList.add_11rb$(element_412); var element_413 = 'UPDATE UserSession SET usLct = ' + systemTimeInMillis().toString() + ' WHERE usLct = 0'; _stmtList.add_11rb$(element_413); var element_414 = ' CREATE TABLE IF NOT EXISTS ClazzLogReplicate ( clPk BIGINT NOT NULL, clVersionId BIGINT NOT NULL DEFAULT 0, clDestination BIGINT NOT NULL, clPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (clPk, clDestination)) '; _stmtList.add_11rb$(element_414); var element_415 = ' CREATE INDEX index_ClazzLogReplicate_clPk_clDestination_clVersionId ON ClazzLogReplicate (clPk, clDestination, clVersionId) '; _stmtList.add_11rb$(element_415); var element_416 = ' CREATE INDEX index_ClazzLogReplicate_clDestination_clPending ON ClazzLogReplicate (clDestination, clPending) '; _stmtList.add_11rb$(element_416); var element_417 = ' CREATE OR REPLACE FUNCTION ch_upd_14_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (14, NEW.clazzLogUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_417); var element_418 = ' CREATE TRIGGER ch_upd_14_trig AFTER UPDATE OR INSERT ON ClazzLog FOR EACH ROW EXECUTE PROCEDURE ch_upd_14_fn(); '; _stmtList.add_11rb$(element_418); var element_419 = ' CREATE OR REPLACE FUNCTION ch_del_14_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (14, OLD.clazzLogUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_419); var element_420 = ' CREATE TRIGGER ch_del_14_trig AFTER DELETE ON ClazzLog FOR EACH ROW EXECUTE PROCEDURE ch_del_14_fn(); '; _stmtList.add_11rb$(element_420); var element_421 = 'CREATE VIEW ClazzLog_ReceiveView AS SELECT ClazzLog.*, ClazzLogReplicate.* FROM ClazzLog LEFT JOIN ClazzLogReplicate ON ClazzLogReplicate.clPk = ClazzLog.clazzLogUid '; _stmtList.add_11rb$(element_421); var element_422 = "CREATE OR REPLACE FUNCTION clazzlog_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzLog(clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime) VALUES (NEW.clazzLogUid, NEW.clazzLogClazzUid, NEW.logDate, NEW.timeRecorded, NEW.clazzLogDone, NEW.cancellationNote, NEW.clazzLogCancelled, NEW.clazzLogNumPresent, NEW.clazzLogNumAbsent, NEW.clazzLogNumPartial, NEW.clazzLogScheduleUid, NEW.clazzLogStatusFlag, NEW.clazzLogMSQN, NEW.clazzLogLCSN, NEW.clazzLogLCB, NEW.clazzLogLastChangedTime) ON CONFLICT (clazzLogUid) DO UPDATE SET clazzLogClazzUid = EXCLUDED.clazzLogClazzUid, logDate = EXCLUDED.logDate, timeRecorded = EXCLUDED.timeRecorded, clazzLogDone = EXCLUDED.clazzLogDone, cancellationNote = EXCLUDED.cancellationNote, clazzLogCancelled = EXCLUDED.clazzLogCancelled, clazzLogNumPresent = EXCLUDED.clazzLogNumPresent, clazzLogNumAbsent = EXCLUDED.clazzLogNumAbsent, clazzLogNumPartial = EXCLUDED.clazzLogNumPartial, clazzLogScheduleUid = EXCLUDED.clazzLogScheduleUid, clazzLogStatusFlag = EXCLUDED.clazzLogStatusFlag, clazzLogMSQN = EXCLUDED.clazzLogMSQN, clazzLogLCSN = EXCLUDED.clazzLogLCSN, clazzLogLCB = EXCLUDED.clazzLogLCB, clazzLogLastChangedTime = EXCLUDED.clazzLogLastChangedTime ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_422); var element_423 = ' CREATE TRIGGER clazzlog_remote_insert_trig INSTEAD OF INSERT ON ClazzLog_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzlog_remote_insert_fn() '; _stmtList.add_11rb$(element_423); var element_424 = ' CREATE TABLE IF NOT EXISTS ClazzLogAttendanceRecordReplicate ( clarPk BIGINT NOT NULL, clarVersionId BIGINT NOT NULL DEFAULT 0, clarDestination BIGINT NOT NULL, clarPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (clarPk, clarDestination)) '; _stmtList.add_11rb$(element_424); var element_425 = ' CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarPk_clarDestination_clarVersionId ON ClazzLogAttendanceRecordReplicate (clarPk, clarDestination, clarVersionId) '; _stmtList.add_11rb$(element_425); var element_426 = ' CREATE INDEX index_ClazzLogAttendanceRecordReplicate_clarDestination_clarPending ON ClazzLogAttendanceRecordReplicate (clarDestination, clarPending) '; _stmtList.add_11rb$(element_426); var element_427 = ' CREATE OR REPLACE FUNCTION ch_upd_15_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (15, NEW.clazzLogAttendanceRecordUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_427); var element_428 = ' CREATE TRIGGER ch_upd_15_trig AFTER UPDATE OR INSERT ON ClazzLogAttendanceRecord FOR EACH ROW EXECUTE PROCEDURE ch_upd_15_fn(); '; _stmtList.add_11rb$(element_428); var element_429 = ' CREATE OR REPLACE FUNCTION ch_del_15_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (15, OLD.clazzLogAttendanceRecordUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_429); var element_430 = ' CREATE TRIGGER ch_del_15_trig AFTER DELETE ON ClazzLogAttendanceRecord FOR EACH ROW EXECUTE PROCEDURE ch_del_15_fn(); '; _stmtList.add_11rb$(element_430); var element_431 = 'CREATE VIEW ClazzLogAttendanceRecord_ReceiveView AS SELECT ClazzLogAttendanceRecord.*, ClazzLogAttendanceRecordReplicate.* FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLogAttendanceRecordReplicate ON ClazzLogAttendanceRecordReplicate.clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid '; _stmtList.add_11rb$(element_431); var element_432 = "CREATE OR REPLACE FUNCTION clazzlogattendancerecord_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzLogAttendanceRecord(clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES (NEW.clazzLogAttendanceRecordUid, NEW.clazzLogAttendanceRecordClazzLogUid, NEW.clazzLogAttendanceRecordPersonUid, NEW.attendanceStatus, NEW.clazzLogAttendanceRecordMasterChangeSeqNum, NEW.clazzLogAttendanceRecordLocalChangeSeqNum, NEW.clazzLogAttendanceRecordLastChangedBy, NEW.clazzLogAttendanceRecordLastChangedTime) ON CONFLICT (clazzLogAttendanceRecordUid) DO UPDATE SET clazzLogAttendanceRecordClazzLogUid = EXCLUDED.clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid = EXCLUDED.clazzLogAttendanceRecordPersonUid, attendanceStatus = EXCLUDED.attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy = EXCLUDED.clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime = EXCLUDED.clazzLogAttendanceRecordLastChangedTime ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_432); var element_433 = ' CREATE TRIGGER clazzlogattendancerecord_remote_insert_trig INSTEAD OF INSERT ON ClazzLogAttendanceRecord_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzlogattendancerecord_remote_insert_fn() '; _stmtList.add_11rb$(element_433); var element_434 = ' CREATE TABLE IF NOT EXISTS ScheduleReplicate ( schedulePk BIGINT NOT NULL, scheduleVersionId BIGINT NOT NULL DEFAULT 0, scheduleDestination BIGINT NOT NULL, schedulePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (schedulePk, scheduleDestination)) '; _stmtList.add_11rb$(element_434); var element_435 = ' CREATE INDEX index_ScheduleReplicate_schedulePk_scheduleDestination_scheduleVersionId ON ScheduleReplicate (schedulePk, scheduleDestination, scheduleVersionId) '; _stmtList.add_11rb$(element_435); var element_436 = ' CREATE INDEX index_ScheduleReplicate_scheduleDestination_schedulePending ON ScheduleReplicate (scheduleDestination, schedulePending) '; _stmtList.add_11rb$(element_436); var element_437 = ' CREATE OR REPLACE FUNCTION ch_upd_21_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (21, NEW.scheduleUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_437); var element_438 = ' CREATE TRIGGER ch_upd_21_trig AFTER UPDATE OR INSERT ON Schedule FOR EACH ROW EXECUTE PROCEDURE ch_upd_21_fn(); '; _stmtList.add_11rb$(element_438); var element_439 = ' CREATE OR REPLACE FUNCTION ch_del_21_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (21, OLD.scheduleUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_439); var element_440 = ' CREATE TRIGGER ch_del_21_trig AFTER DELETE ON Schedule FOR EACH ROW EXECUTE PROCEDURE ch_del_21_fn(); '; _stmtList.add_11rb$(element_440); var element_441 = 'CREATE VIEW Schedule_ReceiveView AS SELECT Schedule.*, ScheduleReplicate.* FROM Schedule LEFT JOIN ScheduleReplicate ON ScheduleReplicate.schedulePk = Schedule.scheduleUid '; _stmtList.add_11rb$(element_441); var element_442 = "CREATE OR REPLACE FUNCTION schedule_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Schedule(scheduleUid, sceduleStartTime, scheduleEndTime, scheduleDay, scheduleMonth, scheduleFrequency, umCalendarUid, scheduleClazzUid, scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum, scheduleLastChangedBy, scheduleLastChangedTime, scheduleActive) VALUES (NEW.scheduleUid, NEW.sceduleStartTime, NEW.scheduleEndTime, NEW.scheduleDay, NEW.scheduleMonth, NEW.scheduleFrequency, NEW.umCalendarUid, NEW.scheduleClazzUid, NEW.scheduleMasterChangeSeqNum, NEW.scheduleLocalChangeSeqNum, NEW.scheduleLastChangedBy, NEW.scheduleLastChangedTime, NEW.scheduleActive) ON CONFLICT (scheduleUid) DO UPDATE SET sceduleStartTime = EXCLUDED.sceduleStartTime, scheduleEndTime = EXCLUDED.scheduleEndTime, scheduleDay = EXCLUDED.scheduleDay, scheduleMonth = EXCLUDED.scheduleMonth, scheduleFrequency = EXCLUDED.scheduleFrequency, umCalendarUid = EXCLUDED.umCalendarUid, scheduleClazzUid = EXCLUDED.scheduleClazzUid, scheduleMasterChangeSeqNum = EXCLUDED.scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum = EXCLUDED.scheduleLocalChangeSeqNum, scheduleLastChangedBy = EXCLUDED.scheduleLastChangedBy, scheduleLastChangedTime = EXCLUDED.scheduleLastChangedTime, scheduleActive = EXCLUDED.scheduleActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_442); var element_443 = ' CREATE TRIGGER schedule_remote_insert_trig INSTEAD OF INSERT ON Schedule_ReceiveView FOR EACH ROW EXECUTE PROCEDURE schedule_remote_insert_fn() '; _stmtList.add_11rb$(element_443); var element_444 = ' CREATE TABLE IF NOT EXISTS HolidayCalendarReplicate ( hcPk BIGINT NOT NULL, hcVersionId BIGINT NOT NULL DEFAULT 0, hcDestination BIGINT NOT NULL, hcPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (hcPk, hcDestination)) '; _stmtList.add_11rb$(element_444); var element_445 = ' CREATE INDEX index_HolidayCalendarReplicate_hcPk_hcDestination_hcVersionId ON HolidayCalendarReplicate (hcPk, hcDestination, hcVersionId) '; _stmtList.add_11rb$(element_445); var element_446 = ' CREATE INDEX index_HolidayCalendarReplicate_hcDestination_hcPending ON HolidayCalendarReplicate (hcDestination, hcPending) '; _stmtList.add_11rb$(element_446); var element_447 = ' CREATE OR REPLACE FUNCTION ch_upd_28_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (28, NEW.umCalendarUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_447); var element_448 = ' CREATE TRIGGER ch_upd_28_trig AFTER UPDATE OR INSERT ON HolidayCalendar FOR EACH ROW EXECUTE PROCEDURE ch_upd_28_fn(); '; _stmtList.add_11rb$(element_448); var element_449 = ' CREATE OR REPLACE FUNCTION ch_del_28_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (28, OLD.umCalendarUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_449); var element_450 = ' CREATE TRIGGER ch_del_28_trig AFTER DELETE ON HolidayCalendar FOR EACH ROW EXECUTE PROCEDURE ch_del_28_fn(); '; _stmtList.add_11rb$(element_450); var element_451 = 'CREATE VIEW HolidayCalendar_ReceiveView AS SELECT HolidayCalendar.*, HolidayCalendarReplicate.* FROM HolidayCalendar LEFT JOIN HolidayCalendarReplicate ON HolidayCalendarReplicate.hcPk = HolidayCalendar.umCalendarUid '; _stmtList.add_11rb$(element_451); var element_452 = "CREATE OR REPLACE FUNCTION holidaycalendar_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO HolidayCalendar(umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct) VALUES (NEW.umCalendarUid, NEW.umCalendarName, NEW.umCalendarCategory, NEW.umCalendarActive, NEW.umCalendarMasterChangeSeqNum, NEW.umCalendarLocalChangeSeqNum, NEW.umCalendarLastChangedBy, NEW.umCalendarLct) ON CONFLICT (umCalendarUid) DO UPDATE SET umCalendarName = EXCLUDED.umCalendarName, umCalendarCategory = EXCLUDED.umCalendarCategory, umCalendarActive = EXCLUDED.umCalendarActive, umCalendarMasterChangeSeqNum = EXCLUDED.umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum = EXCLUDED.umCalendarLocalChangeSeqNum, umCalendarLastChangedBy = EXCLUDED.umCalendarLastChangedBy, umCalendarLct = EXCLUDED.umCalendarLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_452); var element_453 = ' CREATE TRIGGER holidaycalendar_remote_insert_trig INSTEAD OF INSERT ON HolidayCalendar_ReceiveView FOR EACH ROW EXECUTE PROCEDURE holidaycalendar_remote_insert_fn() '; _stmtList.add_11rb$(element_453); var element_454 = ' CREATE TABLE IF NOT EXISTS HolidayReplicate ( holidayPk BIGINT NOT NULL, holidayVersionId BIGINT NOT NULL DEFAULT 0, holidayDestination BIGINT NOT NULL, holidayPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (holidayPk, holidayDestination)) '; _stmtList.add_11rb$(element_454); var element_455 = ' CREATE INDEX index_HolidayReplicate_holidayPk_holidayDestination_holidayVersionId ON HolidayReplicate (holidayPk, holidayDestination, holidayVersionId) '; _stmtList.add_11rb$(element_455); var element_456 = ' CREATE INDEX index_HolidayReplicate_holidayDestination_holidayPending ON HolidayReplicate (holidayDestination, holidayPending) '; _stmtList.add_11rb$(element_456); var element_457 = ' CREATE OR REPLACE FUNCTION ch_upd_99_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (99, NEW.holUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_457); var element_458 = ' CREATE TRIGGER ch_upd_99_trig AFTER UPDATE OR INSERT ON Holiday FOR EACH ROW EXECUTE PROCEDURE ch_upd_99_fn(); '; _stmtList.add_11rb$(element_458); var element_459 = ' CREATE OR REPLACE FUNCTION ch_del_99_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (99, OLD.holUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_459); var element_460 = ' CREATE TRIGGER ch_del_99_trig AFTER DELETE ON Holiday FOR EACH ROW EXECUTE PROCEDURE ch_del_99_fn(); '; _stmtList.add_11rb$(element_460); var element_461 = 'CREATE VIEW Holiday_ReceiveView AS SELECT Holiday.*, HolidayReplicate.* FROM Holiday LEFT JOIN HolidayReplicate ON HolidayReplicate.holidayPk = Holiday.holUid '; _stmtList.add_11rb$(element_461); var element_462 = "CREATE OR REPLACE FUNCTION holiday_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Holiday(holUid, holMasterCsn, holLocalCsn, holLastModBy, holLct, holActive, holHolidayCalendarUid, holStartTime, holEndTime, holName) VALUES (NEW.holUid, NEW.holMasterCsn, NEW.holLocalCsn, NEW.holLastModBy, NEW.holLct, NEW.holActive, NEW.holHolidayCalendarUid, NEW.holStartTime, NEW.holEndTime, NEW.holName) ON CONFLICT (holUid) DO UPDATE SET holMasterCsn = EXCLUDED.holMasterCsn, holLocalCsn = EXCLUDED.holLocalCsn, holLastModBy = EXCLUDED.holLastModBy, holLct = EXCLUDED.holLct, holActive = EXCLUDED.holActive, holHolidayCalendarUid = EXCLUDED.holHolidayCalendarUid, holStartTime = EXCLUDED.holStartTime, holEndTime = EXCLUDED.holEndTime, holName = EXCLUDED.holName ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_462); var element_463 = ' CREATE TRIGGER holiday_remote_insert_trig INSTEAD OF INSERT ON Holiday_ReceiveView FOR EACH ROW EXECUTE PROCEDURE holiday_remote_insert_fn() '; _stmtList.add_11rb$(element_463); var element_464 = ' CREATE TABLE IF NOT EXISTS PersonReplicate ( personPk BIGINT NOT NULL, personVersionId BIGINT NOT NULL DEFAULT 0, personDestination BIGINT NOT NULL, personPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (personPk, personDestination)) '; _stmtList.add_11rb$(element_464); var element_465 = ' CREATE INDEX index_PersonReplicate_personPk_personDestination_personVersionId ON PersonReplicate (personPk, personDestination, personVersionId) '; _stmtList.add_11rb$(element_465); var element_466 = ' CREATE INDEX index_PersonReplicate_personDestination_personPending ON PersonReplicate (personDestination, personPending) '; _stmtList.add_11rb$(element_466); var element_467 = ' CREATE OR REPLACE FUNCTION ch_upd_9_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (9, NEW.personUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_467); var element_468 = ' CREATE TRIGGER ch_upd_9_trig AFTER UPDATE OR INSERT ON Person FOR EACH ROW EXECUTE PROCEDURE ch_upd_9_fn(); '; _stmtList.add_11rb$(element_468); var element_469 = ' CREATE OR REPLACE FUNCTION ch_del_9_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (9, OLD.personUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_469); var element_470 = ' CREATE TRIGGER ch_del_9_trig AFTER DELETE ON Person FOR EACH ROW EXECUTE PROCEDURE ch_del_9_fn(); '; _stmtList.add_11rb$(element_470); var element_471 = 'CREATE VIEW Person_ReceiveView AS SELECT Person.*, PersonReplicate.* FROM Person LEFT JOIN PersonReplicate ON PersonReplicate.personPk = Person.personUid '; _stmtList.add_11rb$(element_471); var element_472 = "CREATE OR REPLACE FUNCTION person_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Person(personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType) VALUES (NEW.personUid, NEW.username, NEW.firstNames, NEW.lastName, NEW.emailAddr, NEW.phoneNum, NEW.gender, NEW.active, NEW.admin, NEW.personNotes, NEW.fatherName, NEW.fatherNumber, NEW.motherName, NEW.motherNum, NEW.dateOfBirth, NEW.personAddress, NEW.personOrgId, NEW.personGroupUid, NEW.personMasterChangeSeqNum, NEW.personLocalChangeSeqNum, NEW.personLastChangedBy, NEW.personLct, NEW.personCountry, NEW.personType) ON CONFLICT (personUid) DO UPDATE SET username = EXCLUDED.username, firstNames = EXCLUDED.firstNames, lastName = EXCLUDED.lastName, emailAddr = EXCLUDED.emailAddr, phoneNum = EXCLUDED.phoneNum, gender = EXCLUDED.gender, active = EXCLUDED.active, admin = EXCLUDED.admin, personNotes = EXCLUDED.personNotes, fatherName = EXCLUDED.fatherName, fatherNumber = EXCLUDED.fatherNumber, motherName = EXCLUDED.motherName, motherNum = EXCLUDED.motherNum, dateOfBirth = EXCLUDED.dateOfBirth, personAddress = EXCLUDED.personAddress, personOrgId = EXCLUDED.personOrgId, personGroupUid = EXCLUDED.personGroupUid, personMasterChangeSeqNum = EXCLUDED.personMasterChangeSeqNum, personLocalChangeSeqNum = EXCLUDED.personLocalChangeSeqNum, personLastChangedBy = EXCLUDED.personLastChangedBy, personLct = EXCLUDED.personLct, personCountry = EXCLUDED.personCountry, personType = EXCLUDED.personType ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_472); var element_473 = ' CREATE TRIGGER person_remote_insert_trig INSTEAD OF INSERT ON Person_ReceiveView FOR EACH ROW EXECUTE PROCEDURE person_remote_insert_fn() '; _stmtList.add_11rb$(element_473); var element_474 = ' CREATE TABLE IF NOT EXISTS ClazzReplicate ( clazzPk BIGINT NOT NULL, clazzVersionId BIGINT NOT NULL DEFAULT 0, clazzDestination BIGINT NOT NULL, clazzPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (clazzPk, clazzDestination)) '; _stmtList.add_11rb$(element_474); var element_475 = ' CREATE INDEX index_ClazzReplicate_clazzPk_clazzDestination_clazzVersionId ON ClazzReplicate (clazzPk, clazzDestination, clazzVersionId) '; _stmtList.add_11rb$(element_475); var element_476 = ' CREATE INDEX index_ClazzReplicate_clazzDestination_clazzPending ON ClazzReplicate (clazzDestination, clazzPending) '; _stmtList.add_11rb$(element_476); var element_477 = ' CREATE OR REPLACE FUNCTION ch_upd_6_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (6, NEW.clazzUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_477); var element_478 = ' CREATE TRIGGER ch_upd_6_trig AFTER UPDATE OR INSERT ON Clazz FOR EACH ROW EXECUTE PROCEDURE ch_upd_6_fn(); '; _stmtList.add_11rb$(element_478); var element_479 = ' CREATE OR REPLACE FUNCTION ch_del_6_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (6, OLD.clazzUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_479); var element_480 = ' CREATE TRIGGER ch_del_6_trig AFTER DELETE ON Clazz FOR EACH ROW EXECUTE PROCEDURE ch_del_6_fn(); '; _stmtList.add_11rb$(element_480); var element_481 = 'CREATE VIEW Clazz_ReceiveView AS SELECT Clazz.*, ClazzReplicate.* FROM Clazz LEFT JOIN ClazzReplicate ON ClazzReplicate.clazzPk = Clazz.clazzUid '; _stmtList.add_11rb$(element_481); var element_482 = "CREATE OR REPLACE FUNCTION clazz_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Clazz(clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES (NEW.clazzUid, NEW.clazzName, NEW.clazzDesc, NEW.attendanceAverage, NEW.clazzHolidayUMCalendarUid, NEW.clazzScheuleUMCalendarUid, NEW.isClazzActive, NEW.clazzLocationUid, NEW.clazzStartTime, NEW.clazzEndTime, NEW.clazzFeatures, NEW.clazzSchoolUid, NEW.clazzMasterChangeSeqNum, NEW.clazzLocalChangeSeqNum, NEW.clazzLastChangedBy, NEW.clazzLct, NEW.clazzTimeZone, NEW.clazzStudentsPersonGroupUid, NEW.clazzTeachersPersonGroupUid, NEW.clazzPendingStudentsPersonGroupUid, NEW.clazzParentsPersonGroupUid, NEW.clazzCode) ON CONFLICT (clazzUid) DO UPDATE SET clazzName = EXCLUDED.clazzName, clazzDesc = EXCLUDED.clazzDesc, attendanceAverage = EXCLUDED.attendanceAverage, clazzHolidayUMCalendarUid = EXCLUDED.clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid = EXCLUDED.clazzScheuleUMCalendarUid, isClazzActive = EXCLUDED.isClazzActive, clazzLocationUid = EXCLUDED.clazzLocationUid, clazzStartTime = EXCLUDED.clazzStartTime, clazzEndTime = EXCLUDED.clazzEndTime, clazzFeatures = EXCLUDED.clazzFeatures, clazzSchoolUid = EXCLUDED.clazzSchoolUid, clazzMasterChangeSeqNum = EXCLUDED.clazzMasterChangeSeqNum, clazzLocalChangeSeqNum = EXCLUDED.clazzLocalChangeSeqNum, clazzLastChangedBy = EXCLUDED.clazzLastChangedBy, clazzLct = EXCLUDED.clazzLct, clazzTimeZone = EXCLUDED.clazzTimeZone, clazzStudentsPersonGroupUid = EXCLUDED.clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid = EXCLUDED.clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid = EXCLUDED.clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid = EXCLUDED.clazzParentsPersonGroupUid, clazzCode = EXCLUDED.clazzCode ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_482); var element_483 = ' CREATE TRIGGER clazz_remote_insert_trig INSTEAD OF INSERT ON Clazz_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazz_remote_insert_fn() '; _stmtList.add_11rb$(element_483); var element_484 = ' CREATE TABLE IF NOT EXISTS ClazzEnrolmentReplicate ( cePk BIGINT NOT NULL, ceVersionId BIGINT NOT NULL DEFAULT 0, ceDestination BIGINT NOT NULL, cePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cePk, ceDestination)) '; _stmtList.add_11rb$(element_484); var element_485 = ' CREATE INDEX index_ClazzEnrolmentReplicate_cePk_ceDestination_ceVersionId ON ClazzEnrolmentReplicate (cePk, ceDestination, ceVersionId) '; _stmtList.add_11rb$(element_485); var element_486 = ' CREATE INDEX index_ClazzEnrolmentReplicate_ceDestination_cePending ON ClazzEnrolmentReplicate (ceDestination, cePending) '; _stmtList.add_11rb$(element_486); var element_487 = ' CREATE OR REPLACE FUNCTION ch_upd_65_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (65, NEW.clazzEnrolmentUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_487); var element_488 = ' CREATE TRIGGER ch_upd_65_trig AFTER UPDATE OR INSERT ON ClazzEnrolment FOR EACH ROW EXECUTE PROCEDURE ch_upd_65_fn(); '; _stmtList.add_11rb$(element_488); var element_489 = ' CREATE OR REPLACE FUNCTION ch_del_65_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (65, OLD.clazzEnrolmentUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_489); var element_490 = ' CREATE TRIGGER ch_del_65_trig AFTER DELETE ON ClazzEnrolment FOR EACH ROW EXECUTE PROCEDURE ch_del_65_fn(); '; _stmtList.add_11rb$(element_490); var element_491 = 'CREATE VIEW ClazzEnrolment_ReceiveView AS SELECT ClazzEnrolment.*, ClazzEnrolmentReplicate.* FROM ClazzEnrolment LEFT JOIN ClazzEnrolmentReplicate ON ClazzEnrolmentReplicate.cePk = ClazzEnrolment.clazzEnrolmentUid '; _stmtList.add_11rb$(element_491); var element_492 = "CREATE OR REPLACE FUNCTION clazzenrolment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzEnrolment(clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct) VALUES (NEW.clazzEnrolmentUid, NEW.clazzEnrolmentPersonUid, NEW.clazzEnrolmentClazzUid, NEW.clazzEnrolmentDateJoined, NEW.clazzEnrolmentDateLeft, NEW.clazzEnrolmentRole, NEW.clazzEnrolmentAttendancePercentage, NEW.clazzEnrolmentActive, NEW.clazzEnrolmentLeavingReasonUid, NEW.clazzEnrolmentOutcome, NEW.clazzEnrolmentLocalChangeSeqNum, NEW.clazzEnrolmentMasterChangeSeqNum, NEW.clazzEnrolmentLastChangedBy, NEW.clazzEnrolmentLct) ON CONFLICT (clazzEnrolmentUid) DO UPDATE SET clazzEnrolmentPersonUid = EXCLUDED.clazzEnrolmentPersonUid, clazzEnrolmentClazzUid = EXCLUDED.clazzEnrolmentClazzUid, clazzEnrolmentDateJoined = EXCLUDED.clazzEnrolmentDateJoined, clazzEnrolmentDateLeft = EXCLUDED.clazzEnrolmentDateLeft, clazzEnrolmentRole = EXCLUDED.clazzEnrolmentRole, clazzEnrolmentAttendancePercentage = EXCLUDED.clazzEnrolmentAttendancePercentage, clazzEnrolmentActive = EXCLUDED.clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid = EXCLUDED.clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome = EXCLUDED.clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum = EXCLUDED.clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum = EXCLUDED.clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy = EXCLUDED.clazzEnrolmentLastChangedBy, clazzEnrolmentLct = EXCLUDED.clazzEnrolmentLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_492); var element_493 = ' CREATE TRIGGER clazzenrolment_remote_insert_trig INSTEAD OF INSERT ON ClazzEnrolment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzenrolment_remote_insert_fn() '; _stmtList.add_11rb$(element_493); var element_494 = ' CREATE TABLE IF NOT EXISTS LeavingReasonReplicate ( lrPk BIGINT NOT NULL, lrVersionId BIGINT NOT NULL DEFAULT 0, lrDestination BIGINT NOT NULL, lrPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lrPk, lrDestination)) '; _stmtList.add_11rb$(element_494); var element_495 = ' CREATE INDEX index_LeavingReasonReplicate_lrPk_lrDestination_lrVersionId ON LeavingReasonReplicate (lrPk, lrDestination, lrVersionId) '; _stmtList.add_11rb$(element_495); var element_496 = ' CREATE INDEX index_LeavingReasonReplicate_lrDestination_lrPending ON LeavingReasonReplicate (lrDestination, lrPending) '; _stmtList.add_11rb$(element_496); var element_497 = ' CREATE OR REPLACE FUNCTION ch_upd_410_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (410, NEW.leavingReasonUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_497); var element_498 = ' CREATE TRIGGER ch_upd_410_trig AFTER UPDATE OR INSERT ON LeavingReason FOR EACH ROW EXECUTE PROCEDURE ch_upd_410_fn(); '; _stmtList.add_11rb$(element_498); var element_499 = ' CREATE OR REPLACE FUNCTION ch_del_410_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (410, OLD.leavingReasonUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_499); var element_500 = ' CREATE TRIGGER ch_del_410_trig AFTER DELETE ON LeavingReason FOR EACH ROW EXECUTE PROCEDURE ch_del_410_fn(); '; _stmtList.add_11rb$(element_500); var element_501 = 'CREATE VIEW LeavingReason_ReceiveView AS SELECT LeavingReason.*, LeavingReasonReplicate.* FROM LeavingReason LEFT JOIN LeavingReasonReplicate ON LeavingReasonReplicate.lrPk = LeavingReason.leavingReasonUid '; _stmtList.add_11rb$(element_501); var element_502 = "CREATE OR REPLACE FUNCTION leavingreason_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LeavingReason(leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct) VALUES (NEW.leavingReasonUid, NEW.leavingReasonTitle, NEW.leavingReasonMCSN, NEW.leavingReasonCSN, NEW.leavingReasonLCB, NEW.leavingReasonLct) ON CONFLICT (leavingReasonUid) DO UPDATE SET leavingReasonTitle = EXCLUDED.leavingReasonTitle, leavingReasonMCSN = EXCLUDED.leavingReasonMCSN, leavingReasonCSN = EXCLUDED.leavingReasonCSN, leavingReasonLCB = EXCLUDED.leavingReasonLCB, leavingReasonLct = EXCLUDED.leavingReasonLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_502); var element_503 = ' CREATE TRIGGER leavingreason_remote_insert_trig INSTEAD OF INSERT ON LeavingReason_ReceiveView FOR EACH ROW EXECUTE PROCEDURE leavingreason_remote_insert_fn() '; _stmtList.add_11rb$(element_503); var element_504 = ' CREATE TABLE IF NOT EXISTS ContentEntryReplicate ( cePk BIGINT NOT NULL, ceVersionId BIGINT NOT NULL DEFAULT 0, ceDestination BIGINT NOT NULL, cePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cePk, ceDestination)) '; _stmtList.add_11rb$(element_504); var element_505 = ' CREATE INDEX index_ContentEntryReplicate_cePk_ceDestination_ceVersionId ON ContentEntryReplicate (cePk, ceDestination, ceVersionId) '; _stmtList.add_11rb$(element_505); var element_506 = ' CREATE INDEX index_ContentEntryReplicate_ceDestination_cePending ON ContentEntryReplicate (ceDestination, cePending) '; _stmtList.add_11rb$(element_506); var element_507 = ' CREATE OR REPLACE FUNCTION ch_upd_42_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (42, NEW.contentEntryUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_507); var element_508 = ' CREATE TRIGGER ch_upd_42_trig AFTER UPDATE OR INSERT ON ContentEntry FOR EACH ROW EXECUTE PROCEDURE ch_upd_42_fn(); '; _stmtList.add_11rb$(element_508); var element_509 = ' CREATE OR REPLACE FUNCTION ch_del_42_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (42, OLD.contentEntryUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_509); var element_510 = ' CREATE TRIGGER ch_del_42_trig AFTER DELETE ON ContentEntry FOR EACH ROW EXECUTE PROCEDURE ch_del_42_fn(); '; _stmtList.add_11rb$(element_510); var element_511 = 'CREATE VIEW ContentEntry_ReceiveView AS SELECT ContentEntry.*, ContentEntryReplicate.* FROM ContentEntry LEFT JOIN ContentEntryReplicate ON ContentEntryReplicate.cePk = ContentEntry.contentEntryUid '; _stmtList.add_11rb$(element_511); var element_512 = "CREATE OR REPLACE FUNCTION contententry_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntry(contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct) VALUES (NEW.contentEntryUid, NEW.title, NEW.description, NEW.entryId, NEW.author, NEW.publisher, NEW.licenseType, NEW.licenseName, NEW.licenseUrl, NEW.sourceUrl, NEW.thumbnailUrl, NEW.lastModified, NEW.primaryLanguageUid, NEW.languageVariantUid, NEW.contentFlags, NEW.leaf, NEW.publik, NEW.ceInactive, NEW.completionCriteria, NEW.minScore, NEW.contentTypeFlag, NEW.contentOwner, NEW.contentEntryLocalChangeSeqNum, NEW.contentEntryMasterChangeSeqNum, NEW.contentEntryLastChangedBy, NEW.contentEntryLct) ON CONFLICT (contentEntryUid) DO UPDATE SET title = EXCLUDED.title, description = EXCLUDED.description, entryId = EXCLUDED.entryId, author = EXCLUDED.author, publisher = EXCLUDED.publisher, licenseType = EXCLUDED.licenseType, licenseName = EXCLUDED.licenseName, licenseUrl = EXCLUDED.licenseUrl, sourceUrl = EXCLUDED.sourceUrl, thumbnailUrl = EXCLUDED.thumbnailUrl, lastModified = EXCLUDED.lastModified, primaryLanguageUid = EXCLUDED.primaryLanguageUid, languageVariantUid = EXCLUDED.languageVariantUid, contentFlags = EXCLUDED.contentFlags, leaf = EXCLUDED.leaf, publik = EXCLUDED.publik, ceInactive = EXCLUDED.ceInactive, completionCriteria = EXCLUDED.completionCriteria, minScore = EXCLUDED.minScore, contentTypeFlag = EXCLUDED.contentTypeFlag, contentOwner = EXCLUDED.contentOwner, contentEntryLocalChangeSeqNum = EXCLUDED.contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum = EXCLUDED.contentEntryMasterChangeSeqNum, contentEntryLastChangedBy = EXCLUDED.contentEntryLastChangedBy, contentEntryLct = EXCLUDED.contentEntryLct; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_512); var element_513 = ' CREATE TRIGGER contententry_remote_insert_trig INSTEAD OF INSERT ON ContentEntry_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententry_remote_insert_fn() '; _stmtList.add_11rb$(element_513); var element_514 = ' CREATE TABLE IF NOT EXISTS ContentEntryContentCategoryJoinReplicate ( ceccjPk BIGINT NOT NULL, ceccjVersionId BIGINT NOT NULL DEFAULT 0, ceccjDestination BIGINT NOT NULL, ceccjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ceccjPk, ceccjDestination)) '; _stmtList.add_11rb$(element_514); var element_515 = ' CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjPk_ceccjDestination_ceccjVersionId ON ContentEntryContentCategoryJoinReplicate (ceccjPk, ceccjDestination, ceccjVersionId) '; _stmtList.add_11rb$(element_515); var element_516 = ' CREATE INDEX index_ContentEntryContentCategoryJoinReplicate_ceccjDestination_ceccjPending ON ContentEntryContentCategoryJoinReplicate (ceccjDestination, ceccjPending) '; _stmtList.add_11rb$(element_516); var element_517 = ' CREATE OR REPLACE FUNCTION ch_upd_3_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (3, NEW.ceccjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_517); var element_518 = ' CREATE TRIGGER ch_upd_3_trig AFTER UPDATE OR INSERT ON ContentEntryContentCategoryJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_3_fn(); '; _stmtList.add_11rb$(element_518); var element_519 = ' CREATE OR REPLACE FUNCTION ch_del_3_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (3, OLD.ceccjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_519); var element_520 = ' CREATE TRIGGER ch_del_3_trig AFTER DELETE ON ContentEntryContentCategoryJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_3_fn(); '; _stmtList.add_11rb$(element_520); var element_521 = 'CREATE VIEW ContentEntryContentCategoryJoin_ReceiveView AS SELECT ContentEntryContentCategoryJoin.*, ContentEntryContentCategoryJoinReplicate.* FROM ContentEntryContentCategoryJoin LEFT JOIN ContentEntryContentCategoryJoinReplicate ON ContentEntryContentCategoryJoinReplicate.ceccjPk = ContentEntryContentCategoryJoin.ceccjUid '; _stmtList.add_11rb$(element_521); var element_522 = "CREATE OR REPLACE FUNCTION contententrycontentcategoryjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryContentCategoryJoin(ceccjUid, ceccjContentEntryUid, ceccjContentCategoryUid, ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum, ceccjLastChangedBy, ceccjLct) VALUES (NEW.ceccjUid, NEW.ceccjContentEntryUid, NEW.ceccjContentCategoryUid, NEW.ceccjLocalChangeSeqNum, NEW.ceccjMasterChangeSeqNum, NEW.ceccjLastChangedBy, NEW.ceccjLct) ON CONFLICT (ceccjUid) DO UPDATE SET ceccjContentEntryUid = EXCLUDED.ceccjContentEntryUid, ceccjContentCategoryUid = EXCLUDED.ceccjContentCategoryUid, ceccjLocalChangeSeqNum = EXCLUDED.ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum = EXCLUDED.ceccjMasterChangeSeqNum, ceccjLastChangedBy = EXCLUDED.ceccjLastChangedBy, ceccjLct = EXCLUDED.ceccjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_522); var element_523 = ' CREATE TRIGGER contententrycontentcategoryjoin_remote_insert_trig INSTEAD OF INSERT ON ContentEntryContentCategoryJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententrycontentcategoryjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_523); var element_524 = ' CREATE TABLE IF NOT EXISTS ContentEntryParentChildJoinReplicate ( cepcjPk BIGINT NOT NULL, cepcjVersionId BIGINT NOT NULL DEFAULT 0, cepcjDestination BIGINT NOT NULL, cepcjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cepcjPk, cepcjDestination)) '; _stmtList.add_11rb$(element_524); var element_525 = ' CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjPk_cepcjDestination_cepcjVersionId ON ContentEntryParentChildJoinReplicate (cepcjPk, cepcjDestination, cepcjVersionId) '; _stmtList.add_11rb$(element_525); var element_526 = ' CREATE INDEX index_ContentEntryParentChildJoinReplicate_cepcjDestination_cepcjPending ON ContentEntryParentChildJoinReplicate (cepcjDestination, cepcjPending) '; _stmtList.add_11rb$(element_526); var element_527 = ' CREATE OR REPLACE FUNCTION ch_upd_7_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (7, NEW.cepcjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_527); var element_528 = ' CREATE TRIGGER ch_upd_7_trig AFTER UPDATE OR INSERT ON ContentEntryParentChildJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_7_fn(); '; _stmtList.add_11rb$(element_528); var element_529 = ' CREATE OR REPLACE FUNCTION ch_del_7_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (7, OLD.cepcjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_529); var element_530 = ' CREATE TRIGGER ch_del_7_trig AFTER DELETE ON ContentEntryParentChildJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_7_fn(); '; _stmtList.add_11rb$(element_530); var element_531 = 'CREATE VIEW ContentEntryParentChildJoin_ReceiveView AS SELECT ContentEntryParentChildJoin.*, ContentEntryParentChildJoinReplicate.* FROM ContentEntryParentChildJoin LEFT JOIN ContentEntryParentChildJoinReplicate ON ContentEntryParentChildJoinReplicate.cepcjPk = ContentEntryParentChildJoin.cepcjUid '; _stmtList.add_11rb$(element_531); var element_532 = "CREATE OR REPLACE FUNCTION contententryparentchildjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryParentChildJoin(cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex, cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct) VALUES (NEW.cepcjParentContentEntryUid, NEW.cepcjChildContentEntryUid, NEW.childIndex, NEW.cepcjUid, NEW.cepcjLocalChangeSeqNum, NEW.cepcjMasterChangeSeqNum, NEW.cepcjLastChangedBy, NEW.cepcjLct) ON CONFLICT (cepcjUid) DO UPDATE SET cepcjParentContentEntryUid = EXCLUDED.cepcjParentContentEntryUid, cepcjChildContentEntryUid = EXCLUDED.cepcjChildContentEntryUid, childIndex = EXCLUDED.childIndex, cepcjLocalChangeSeqNum = EXCLUDED.cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum = EXCLUDED.cepcjMasterChangeSeqNum, cepcjLastChangedBy = EXCLUDED.cepcjLastChangedBy, cepcjLct = EXCLUDED.cepcjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_532); var element_533 = ' CREATE TRIGGER contententryparentchildjoin_remote_insert_trig INSTEAD OF INSERT ON ContentEntryParentChildJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententryparentchildjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_533); var element_534 = ' CREATE TABLE IF NOT EXISTS ContentEntryRelatedEntryJoinReplicate ( cerejPk BIGINT NOT NULL, cerejVersionId BIGINT NOT NULL DEFAULT 0, cerejDestination BIGINT NOT NULL, cerejPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cerejPk, cerejDestination)) '; _stmtList.add_11rb$(element_534); var element_535 = ' CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejPk_cerejDestination_cerejVersionId ON ContentEntryRelatedEntryJoinReplicate (cerejPk, cerejDestination, cerejVersionId) '; _stmtList.add_11rb$(element_535); var element_536 = ' CREATE INDEX index_ContentEntryRelatedEntryJoinReplicate_cerejDestination_cerejPending ON ContentEntryRelatedEntryJoinReplicate (cerejDestination, cerejPending) '; _stmtList.add_11rb$(element_536); var element_537 = ' CREATE OR REPLACE FUNCTION ch_upd_8_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (8, NEW.cerejUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_537); var element_538 = ' CREATE TRIGGER ch_upd_8_trig AFTER UPDATE OR INSERT ON ContentEntryRelatedEntryJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_8_fn(); '; _stmtList.add_11rb$(element_538); var element_539 = ' CREATE OR REPLACE FUNCTION ch_del_8_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (8, OLD.cerejUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_539); var element_540 = ' CREATE TRIGGER ch_del_8_trig AFTER DELETE ON ContentEntryRelatedEntryJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_8_fn(); '; _stmtList.add_11rb$(element_540); var element_541 = 'CREATE VIEW ContentEntryRelatedEntryJoin_ReceiveView AS SELECT ContentEntryRelatedEntryJoin.*, ContentEntryRelatedEntryJoinReplicate.* FROM ContentEntryRelatedEntryJoin LEFT JOIN ContentEntryRelatedEntryJoinReplicate ON ContentEntryRelatedEntryJoinReplicate.cerejPk = ContentEntryRelatedEntryJoin.cerejUid '; _stmtList.add_11rb$(element_541); var element_542 = "CREATE OR REPLACE FUNCTION contententryrelatedentryjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryRelatedEntryJoin(cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct) VALUES (NEW.cerejUid, NEW.cerejContentEntryUid, NEW.cerejRelatedEntryUid, NEW.cerejLastChangedBy, NEW.relType, NEW.comment, NEW.cerejRelLanguageUid, NEW.cerejLocalChangeSeqNum, NEW.cerejMasterChangeSeqNum, NEW.cerejLct) ON CONFLICT (cerejUid) DO UPDATE SET cerejContentEntryUid = EXCLUDED.cerejContentEntryUid, cerejRelatedEntryUid = EXCLUDED.cerejRelatedEntryUid, cerejLastChangedBy = EXCLUDED.cerejLastChangedBy, relType = EXCLUDED.relType, comment = EXCLUDED.comment, cerejRelLanguageUid = EXCLUDED.cerejRelLanguageUid, cerejLocalChangeSeqNum = EXCLUDED.cerejLocalChangeSeqNum, cerejMasterChangeSeqNum = EXCLUDED.cerejMasterChangeSeqNum, cerejLct = EXCLUDED.cerejLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_542); var element_543 = ' CREATE TRIGGER contententryrelatedentryjoin_remote_insert_trig INSTEAD OF INSERT ON ContentEntryRelatedEntryJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contententryrelatedentryjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_543); var element_544 = ' CREATE TABLE IF NOT EXISTS ContentCategorySchemaReplicate ( ccsPk BIGINT NOT NULL, ccsVersionId BIGINT NOT NULL DEFAULT 0, ccsDestination BIGINT NOT NULL, ccsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ccsPk, ccsDestination)) '; _stmtList.add_11rb$(element_544); var element_545 = ' CREATE INDEX index_ContentCategorySchemaReplicate_ccsPk_ccsDestination_ccsVersionId ON ContentCategorySchemaReplicate (ccsPk, ccsDestination, ccsVersionId) '; _stmtList.add_11rb$(element_545); var element_546 = ' CREATE INDEX index_ContentCategorySchemaReplicate_ccsDestination_ccsPending ON ContentCategorySchemaReplicate (ccsDestination, ccsPending) '; _stmtList.add_11rb$(element_546); var element_547 = ' CREATE OR REPLACE FUNCTION ch_upd_2_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (2, NEW.contentCategorySchemaUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_547); var element_548 = ' CREATE TRIGGER ch_upd_2_trig AFTER UPDATE OR INSERT ON ContentCategorySchema FOR EACH ROW EXECUTE PROCEDURE ch_upd_2_fn(); '; _stmtList.add_11rb$(element_548); var element_549 = ' CREATE OR REPLACE FUNCTION ch_del_2_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (2, OLD.contentCategorySchemaUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_549); var element_550 = ' CREATE TRIGGER ch_del_2_trig AFTER DELETE ON ContentCategorySchema FOR EACH ROW EXECUTE PROCEDURE ch_del_2_fn(); '; _stmtList.add_11rb$(element_550); var element_551 = 'CREATE VIEW ContentCategorySchema_ReceiveView AS SELECT ContentCategorySchema.*, ContentCategorySchemaReplicate.* FROM ContentCategorySchema LEFT JOIN ContentCategorySchemaReplicate ON ContentCategorySchemaReplicate.ccsPk = ContentCategorySchema.contentCategorySchemaUid '; _stmtList.add_11rb$(element_551); var element_552 = "CREATE OR REPLACE FUNCTION contentcategoryschema_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentCategorySchema(contentCategorySchemaUid, schemaName, schemaUrl, contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy, contentCategorySchemaLct) VALUES (NEW.contentCategorySchemaUid, NEW.schemaName, NEW.schemaUrl, NEW.contentCategorySchemaLocalChangeSeqNum, NEW.contentCategorySchemaMasterChangeSeqNum, NEW.contentCategorySchemaLastChangedBy, NEW.contentCategorySchemaLct) ON CONFLICT (contentCategorySchemaUid) DO UPDATE SET schemaName = EXCLUDED.schemaName, schemaUrl = EXCLUDED.schemaUrl, contentCategorySchemaLocalChangeSeqNum = EXCLUDED.contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum = EXCLUDED.contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy = EXCLUDED.contentCategorySchemaLastChangedBy, contentCategorySchemaLct = EXCLUDED.contentCategorySchemaLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_552); var element_553 = ' CREATE TRIGGER contentcategoryschema_remote_insert_trig INSTEAD OF INSERT ON ContentCategorySchema_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contentcategoryschema_remote_insert_fn() '; _stmtList.add_11rb$(element_553); var element_554 = ' CREATE TABLE IF NOT EXISTS ContentCategoryReplicate ( ccPk BIGINT NOT NULL, ccVersionId BIGINT NOT NULL DEFAULT 0, ccDestination BIGINT NOT NULL, ccPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ccPk, ccDestination)) '; _stmtList.add_11rb$(element_554); var element_555 = ' CREATE INDEX index_ContentCategoryReplicate_ccPk_ccDestination_ccVersionId ON ContentCategoryReplicate (ccPk, ccDestination, ccVersionId) '; _stmtList.add_11rb$(element_555); var element_556 = ' CREATE INDEX index_ContentCategoryReplicate_ccDestination_ccPending ON ContentCategoryReplicate (ccDestination, ccPending) '; _stmtList.add_11rb$(element_556); var element_557 = ' CREATE OR REPLACE FUNCTION ch_upd_1_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (1, NEW.contentCategoryUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_557); var element_558 = ' CREATE TRIGGER ch_upd_1_trig AFTER UPDATE OR INSERT ON ContentCategory FOR EACH ROW EXECUTE PROCEDURE ch_upd_1_fn(); '; _stmtList.add_11rb$(element_558); var element_559 = ' CREATE OR REPLACE FUNCTION ch_del_1_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (1, OLD.contentCategoryUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_559); var element_560 = ' CREATE TRIGGER ch_del_1_trig AFTER DELETE ON ContentCategory FOR EACH ROW EXECUTE PROCEDURE ch_del_1_fn(); '; _stmtList.add_11rb$(element_560); var element_561 = 'CREATE VIEW ContentCategory_ReceiveView AS SELECT ContentCategory.*, ContentCategoryReplicate.* FROM ContentCategory LEFT JOIN ContentCategoryReplicate ON ContentCategoryReplicate.ccPk = ContentCategory.contentCategoryUid '; _stmtList.add_11rb$(element_561); var element_562 = "CREATE OR REPLACE FUNCTION contentcategory_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentCategory(contentCategoryUid, ctnCatContentCategorySchemaUid, name, contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy, contentCategoryLct) VALUES (NEW.contentCategoryUid, NEW.ctnCatContentCategorySchemaUid, NEW.name, NEW.contentCategoryLocalChangeSeqNum, NEW.contentCategoryMasterChangeSeqNum, NEW.contentCategoryLastChangedBy, NEW.contentCategoryLct) ON CONFLICT (contentCategoryUid) DO UPDATE SET ctnCatContentCategorySchemaUid = EXCLUDED.ctnCatContentCategorySchemaUid, name = EXCLUDED.name, contentCategoryLocalChangeSeqNum = EXCLUDED.contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum = EXCLUDED.contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy = EXCLUDED.contentCategoryLastChangedBy, contentCategoryLct = EXCLUDED.contentCategoryLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_562); var element_563 = ' CREATE TRIGGER contentcategory_remote_insert_trig INSTEAD OF INSERT ON ContentCategory_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contentcategory_remote_insert_fn() '; _stmtList.add_11rb$(element_563); var element_564 = ' CREATE TABLE IF NOT EXISTS LanguageReplicate ( languagePk BIGINT NOT NULL, languageVersionId BIGINT NOT NULL DEFAULT 0, languageDestination BIGINT NOT NULL, languagePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (languagePk, languageDestination)) '; _stmtList.add_11rb$(element_564); var element_565 = ' CREATE INDEX index_LanguageReplicate_languagePk_languageDestination_languageVersionId ON LanguageReplicate (languagePk, languageDestination, languageVersionId) '; _stmtList.add_11rb$(element_565); var element_566 = ' CREATE INDEX index_LanguageReplicate_languageDestination_languagePending ON LanguageReplicate (languageDestination, languagePending) '; _stmtList.add_11rb$(element_566); var element_567 = ' CREATE OR REPLACE FUNCTION ch_upd_13_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (13, NEW.langUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_567); var element_568 = ' CREATE TRIGGER ch_upd_13_trig AFTER UPDATE OR INSERT ON Language FOR EACH ROW EXECUTE PROCEDURE ch_upd_13_fn(); '; _stmtList.add_11rb$(element_568); var element_569 = ' CREATE OR REPLACE FUNCTION ch_del_13_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (13, OLD.langUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_569); var element_570 = ' CREATE TRIGGER ch_del_13_trig AFTER DELETE ON Language FOR EACH ROW EXECUTE PROCEDURE ch_del_13_fn(); '; _stmtList.add_11rb$(element_570); var element_571 = 'CREATE VIEW Language_ReceiveView AS SELECT Language.*, LanguageReplicate.* FROM Language LEFT JOIN LanguageReplicate ON LanguageReplicate.languagePk = Language.langUid '; _stmtList.add_11rb$(element_571); var element_572 = "CREATE OR REPLACE FUNCTION language_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Language(langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct) VALUES (NEW.langUid, NEW.name, NEW.iso_639_1_standard, NEW.iso_639_2_standard, NEW.iso_639_3_standard, NEW.Language_Type, NEW.languageActive, NEW.langLocalChangeSeqNum, NEW.langMasterChangeSeqNum, NEW.langLastChangedBy, NEW.langLct) ON CONFLICT (langUid) DO UPDATE SET name = EXCLUDED.name, iso_639_1_standard = EXCLUDED.iso_639_1_standard, iso_639_2_standard = EXCLUDED.iso_639_2_standard, iso_639_3_standard = EXCLUDED.iso_639_3_standard, Language_Type = EXCLUDED.Language_Type, languageActive = EXCLUDED.languageActive, langLocalChangeSeqNum = EXCLUDED.langLocalChangeSeqNum, langMasterChangeSeqNum = EXCLUDED.langMasterChangeSeqNum, langLastChangedBy = EXCLUDED.langLastChangedBy, langLct = EXCLUDED.langLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_572); var element_573 = ' CREATE TRIGGER language_remote_insert_trig INSTEAD OF INSERT ON Language_ReceiveView FOR EACH ROW EXECUTE PROCEDURE language_remote_insert_fn() '; _stmtList.add_11rb$(element_573); var element_574 = ' CREATE TABLE IF NOT EXISTS LanguageVariantReplicate ( lvPk BIGINT NOT NULL, lvVersionId BIGINT NOT NULL DEFAULT 0, lvDestination BIGINT NOT NULL, lvPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lvPk, lvDestination)) '; _stmtList.add_11rb$(element_574); var element_575 = ' CREATE INDEX index_LanguageVariantReplicate_lvPk_lvDestination_lvVersionId ON LanguageVariantReplicate (lvPk, lvDestination, lvVersionId) '; _stmtList.add_11rb$(element_575); var element_576 = ' CREATE INDEX index_LanguageVariantReplicate_lvDestination_lvPending ON LanguageVariantReplicate (lvDestination, lvPending) '; _stmtList.add_11rb$(element_576); var element_577 = ' CREATE OR REPLACE FUNCTION ch_upd_10_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (10, NEW.langVariantUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_577); var element_578 = ' CREATE TRIGGER ch_upd_10_trig AFTER UPDATE OR INSERT ON LanguageVariant FOR EACH ROW EXECUTE PROCEDURE ch_upd_10_fn(); '; _stmtList.add_11rb$(element_578); var element_579 = ' CREATE OR REPLACE FUNCTION ch_del_10_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (10, OLD.langVariantUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_579); var element_580 = ' CREATE TRIGGER ch_del_10_trig AFTER DELETE ON LanguageVariant FOR EACH ROW EXECUTE PROCEDURE ch_del_10_fn(); '; _stmtList.add_11rb$(element_580); var element_581 = 'CREATE VIEW LanguageVariant_ReceiveView AS SELECT LanguageVariant.*, LanguageVariantReplicate.* FROM LanguageVariant LEFT JOIN LanguageVariantReplicate ON LanguageVariantReplicate.lvPk = LanguageVariant.langVariantUid '; _stmtList.add_11rb$(element_581); var element_582 = "CREATE OR REPLACE FUNCTION languagevariant_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LanguageVariant(langVariantUid, langUid, countryCode, name, langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum, langVariantLastChangedBy, langVariantLct) VALUES (NEW.langVariantUid, NEW.langUid, NEW.countryCode, NEW.name, NEW.langVariantLocalChangeSeqNum, NEW.langVariantMasterChangeSeqNum, NEW.langVariantLastChangedBy, NEW.langVariantLct) ON CONFLICT (langVariantUid) DO UPDATE SET langUid = EXCLUDED.langUid, countryCode = EXCLUDED.countryCode, name = EXCLUDED.name, langVariantLocalChangeSeqNum = EXCLUDED.langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum = EXCLUDED.langVariantMasterChangeSeqNum, langVariantLastChangedBy = EXCLUDED.langVariantLastChangedBy, langVariantLct = EXCLUDED.langVariantLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_582); var element_583 = ' CREATE TRIGGER languagevariant_remote_insert_trig INSTEAD OF INSERT ON LanguageVariant_ReceiveView FOR EACH ROW EXECUTE PROCEDURE languagevariant_remote_insert_fn() '; _stmtList.add_11rb$(element_583); var element_584 = ' CREATE TABLE IF NOT EXISTS PersonGroupReplicate ( pgPk BIGINT NOT NULL, pgVersionId BIGINT NOT NULL DEFAULT 0, pgDestination BIGINT NOT NULL, pgPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (pgPk, pgDestination)) '; _stmtList.add_11rb$(element_584); var element_585 = ' CREATE INDEX index_PersonGroupReplicate_pgPk_pgDestination_pgVersionId ON PersonGroupReplicate (pgPk, pgDestination, pgVersionId) '; _stmtList.add_11rb$(element_585); var element_586 = ' CREATE INDEX index_PersonGroupReplicate_pgDestination_pgPending ON PersonGroupReplicate (pgDestination, pgPending) '; _stmtList.add_11rb$(element_586); var element_587 = ' CREATE OR REPLACE FUNCTION ch_upd_43_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (43, NEW.groupUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_587); var element_588 = ' CREATE TRIGGER ch_upd_43_trig AFTER UPDATE OR INSERT ON PersonGroup FOR EACH ROW EXECUTE PROCEDURE ch_upd_43_fn(); '; _stmtList.add_11rb$(element_588); var element_589 = ' CREATE OR REPLACE FUNCTION ch_del_43_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (43, OLD.groupUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_589); var element_590 = ' CREATE TRIGGER ch_del_43_trig AFTER DELETE ON PersonGroup FOR EACH ROW EXECUTE PROCEDURE ch_del_43_fn(); '; _stmtList.add_11rb$(element_590); var element_591 = 'CREATE VIEW PersonGroup_ReceiveView AS SELECT PersonGroup.*, PersonGroupReplicate.* FROM PersonGroup LEFT JOIN PersonGroupReplicate ON PersonGroupReplicate.pgPk = PersonGroup.groupUid '; _stmtList.add_11rb$(element_591); var element_592 = "CREATE OR REPLACE FUNCTION persongroup_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonGroup(groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag) VALUES (NEW.groupUid, NEW.groupMasterCsn, NEW.groupLocalCsn, NEW.groupLastChangedBy, NEW.groupLct, NEW.groupName, NEW.groupActive, NEW.personGroupFlag) ON CONFLICT (groupUid) DO UPDATE SET groupMasterCsn = EXCLUDED.groupMasterCsn, groupLocalCsn = EXCLUDED.groupLocalCsn, groupLastChangedBy = EXCLUDED.groupLastChangedBy, groupLct = EXCLUDED.groupLct, groupName = EXCLUDED.groupName, groupActive = EXCLUDED.groupActive, personGroupFlag = EXCLUDED.personGroupFlag ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_592); var element_593 = ' CREATE TRIGGER persongroup_remote_insert_trig INSTEAD OF INSERT ON PersonGroup_ReceiveView FOR EACH ROW EXECUTE PROCEDURE persongroup_remote_insert_fn() '; _stmtList.add_11rb$(element_593); var element_594 = ' CREATE TABLE IF NOT EXISTS PersonGroupMemberReplicate ( pgmPk BIGINT NOT NULL, pgmVersionId BIGINT NOT NULL DEFAULT 0, pgmDestination BIGINT NOT NULL, pgmPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (pgmPk, pgmDestination)) '; _stmtList.add_11rb$(element_594); var element_595 = ' CREATE INDEX index_PersonGroupMemberReplicate_pgmPk_pgmDestination_pgmVersionId ON PersonGroupMemberReplicate (pgmPk, pgmDestination, pgmVersionId) '; _stmtList.add_11rb$(element_595); var element_596 = ' CREATE INDEX index_PersonGroupMemberReplicate_pgmDestination_pgmPending ON PersonGroupMemberReplicate (pgmDestination, pgmPending) '; _stmtList.add_11rb$(element_596); var element_597 = ' CREATE OR REPLACE FUNCTION ch_upd_44_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (44, NEW.groupMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_597); var element_598 = ' CREATE TRIGGER ch_upd_44_trig AFTER UPDATE OR INSERT ON PersonGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_44_fn(); '; _stmtList.add_11rb$(element_598); var element_599 = ' CREATE OR REPLACE FUNCTION ch_del_44_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (44, OLD.groupMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_599); var element_600 = ' CREATE TRIGGER ch_del_44_trig AFTER DELETE ON PersonGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_del_44_fn(); '; _stmtList.add_11rb$(element_600); var element_601 = 'CREATE VIEW PersonGroupMember_ReceiveView AS SELECT PersonGroupMember.*, PersonGroupMemberReplicate.* FROM PersonGroupMember LEFT JOIN PersonGroupMemberReplicate ON PersonGroupMemberReplicate.pgmPk = PersonGroupMember.groupMemberUid '; _stmtList.add_11rb$(element_601); var element_602 = "CREATE OR REPLACE FUNCTION persongroupmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonGroupMember(groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct) VALUES (NEW.groupMemberUid, NEW.groupMemberActive, NEW.groupMemberPersonUid, NEW.groupMemberGroupUid, NEW.groupMemberMasterCsn, NEW.groupMemberLocalCsn, NEW.groupMemberLastChangedBy, NEW.groupMemberLct) ON CONFLICT (groupMemberUid) DO UPDATE SET groupMemberActive = EXCLUDED.groupMemberActive, groupMemberPersonUid = EXCLUDED.groupMemberPersonUid, groupMemberGroupUid = EXCLUDED.groupMemberGroupUid, groupMemberMasterCsn = EXCLUDED.groupMemberMasterCsn, groupMemberLocalCsn = EXCLUDED.groupMemberLocalCsn, groupMemberLastChangedBy = EXCLUDED.groupMemberLastChangedBy, groupMemberLct = EXCLUDED.groupMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_602); var element_603 = ' CREATE TRIGGER persongroupmember_remote_insert_trig INSTEAD OF INSERT ON PersonGroupMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE persongroupmember_remote_insert_fn() '; _stmtList.add_11rb$(element_603); var element_604 = ' CREATE TABLE IF NOT EXISTS PersonPictureReplicate ( ppPk BIGINT NOT NULL, ppVersionId BIGINT NOT NULL DEFAULT 0, ppDestination BIGINT NOT NULL, ppPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ppPk, ppDestination)) '; _stmtList.add_11rb$(element_604); var element_605 = ' CREATE INDEX index_PersonPictureReplicate_ppPk_ppDestination_ppVersionId ON PersonPictureReplicate (ppPk, ppDestination, ppVersionId) '; _stmtList.add_11rb$(element_605); var element_606 = ' CREATE INDEX index_PersonPictureReplicate_ppDestination_ppPending ON PersonPictureReplicate (ppDestination, ppPending) '; _stmtList.add_11rb$(element_606); var element_607 = ' CREATE OR REPLACE FUNCTION ch_upd_50_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (50, NEW.personPictureUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_607); var element_608 = ' CREATE TRIGGER ch_upd_50_trig AFTER UPDATE OR INSERT ON PersonPicture FOR EACH ROW EXECUTE PROCEDURE ch_upd_50_fn(); '; _stmtList.add_11rb$(element_608); var element_609 = ' CREATE OR REPLACE FUNCTION ch_del_50_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (50, OLD.personPictureUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_609); var element_610 = ' CREATE TRIGGER ch_del_50_trig AFTER DELETE ON PersonPicture FOR EACH ROW EXECUTE PROCEDURE ch_del_50_fn(); '; _stmtList.add_11rb$(element_610); var element_611 = 'CREATE VIEW PersonPicture_ReceiveView AS SELECT PersonPicture.*, PersonPictureReplicate.* FROM PersonPicture LEFT JOIN PersonPictureReplicate ON PersonPictureReplicate.ppPk = PersonPicture.personPictureUid '; _stmtList.add_11rb$(element_611); var element_612 = "CREATE OR REPLACE FUNCTION personpicture_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonPicture(personPictureUid, personPicturePersonUid, personPictureMasterCsn, personPictureLocalCsn, personPictureLastChangedBy, personPictureLct, personPictureUri, personPictureMd5, fileSize, picTimestamp, mimeType, personPictureActive) VALUES (NEW.personPictureUid, NEW.personPicturePersonUid, NEW.personPictureMasterCsn, NEW.personPictureLocalCsn, NEW.personPictureLastChangedBy, NEW.personPictureLct, NEW.personPictureUri, NEW.personPictureMd5, NEW.fileSize, NEW.picTimestamp, NEW.mimeType, NEW.personPictureActive) ON CONFLICT (personPictureUid) DO UPDATE SET personPicturePersonUid = EXCLUDED.personPicturePersonUid, personPictureMasterCsn = EXCLUDED.personPictureMasterCsn, personPictureLocalCsn = EXCLUDED.personPictureLocalCsn, personPictureLastChangedBy = EXCLUDED.personPictureLastChangedBy, personPictureLct = EXCLUDED.personPictureLct, personPictureUri = EXCLUDED.personPictureUri, personPictureMd5 = EXCLUDED.personPictureMd5, fileSize = EXCLUDED.fileSize, picTimestamp = EXCLUDED.picTimestamp, mimeType = EXCLUDED.mimeType, personPictureActive = EXCLUDED.personPictureActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_612); var element_613 = ' CREATE TRIGGER personpicture_remote_insert_trig INSTEAD OF INSERT ON PersonPicture_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personpicture_remote_insert_fn() '; _stmtList.add_11rb$(element_613); var element_614 = ' CREATE TABLE IF NOT EXISTS ContainerReplicate ( containerPk BIGINT NOT NULL, containerVersionId BIGINT NOT NULL DEFAULT 0, containerDestination BIGINT NOT NULL, containerPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (containerPk, containerDestination)) '; _stmtList.add_11rb$(element_614); var element_615 = ' CREATE INDEX index_ContainerReplicate_containerPk_containerDestination_containerVersionId ON ContainerReplicate (containerPk, containerDestination, containerVersionId) '; _stmtList.add_11rb$(element_615); var element_616 = ' CREATE INDEX index_ContainerReplicate_containerDestination_containerPending ON ContainerReplicate (containerDestination, containerPending) '; _stmtList.add_11rb$(element_616); var element_617 = ' CREATE OR REPLACE FUNCTION ch_upd_51_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (51, NEW.containerUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_617); var element_618 = ' CREATE TRIGGER ch_upd_51_trig AFTER UPDATE OR INSERT ON Container FOR EACH ROW EXECUTE PROCEDURE ch_upd_51_fn(); '; _stmtList.add_11rb$(element_618); var element_619 = ' CREATE OR REPLACE FUNCTION ch_del_51_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (51, OLD.containerUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_619); var element_620 = ' CREATE TRIGGER ch_del_51_trig AFTER DELETE ON Container FOR EACH ROW EXECUTE PROCEDURE ch_del_51_fn(); '; _stmtList.add_11rb$(element_620); var element_621 = 'CREATE VIEW Container_ReceiveView AS SELECT Container.*, ContainerReplicate.* FROM Container LEFT JOIN ContainerReplicate ON ContainerReplicate.containerPk = Container.containerUid '; _stmtList.add_11rb$(element_621); var element_622 = "CREATE OR REPLACE FUNCTION container_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Container(containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) VALUES (NEW.containerUid, NEW.cntLocalCsn, NEW.cntMasterCsn, NEW.cntLastModBy, NEW.cntLct, NEW.fileSize, NEW.containerContentEntryUid, NEW.cntLastModified, NEW.mimeType, NEW.remarks, NEW.mobileOptimized, NEW.cntNumEntries) ON CONFLICT (containerUid) DO UPDATE SET cntLocalCsn = EXCLUDED.cntLocalCsn, cntMasterCsn = EXCLUDED.cntMasterCsn, cntLastModBy = EXCLUDED.cntLastModBy, cntLct = EXCLUDED.cntLct, fileSize = EXCLUDED.fileSize, containerContentEntryUid = EXCLUDED.containerContentEntryUid, cntLastModified = EXCLUDED.cntLastModified, mimeType = EXCLUDED.mimeType, remarks = EXCLUDED.remarks, mobileOptimized = EXCLUDED.mobileOptimized, cntNumEntries = EXCLUDED.cntNumEntries ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_622); var element_623 = ' CREATE TRIGGER container_remote_insert_trig INSTEAD OF INSERT ON Container_ReceiveView FOR EACH ROW EXECUTE PROCEDURE container_remote_insert_fn() '; _stmtList.add_11rb$(element_623); var element_624 = ' CREATE TABLE IF NOT EXISTS VerbEntityReplicate ( vePk BIGINT NOT NULL, veVersionId BIGINT NOT NULL DEFAULT 0, veDestination BIGINT NOT NULL, vePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (vePk, veDestination)) '; _stmtList.add_11rb$(element_624); var element_625 = ' CREATE INDEX index_VerbEntityReplicate_vePk_veDestination_veVersionId ON VerbEntityReplicate (vePk, veDestination, veVersionId) '; _stmtList.add_11rb$(element_625); var element_626 = ' CREATE INDEX index_VerbEntityReplicate_veDestination_vePending ON VerbEntityReplicate (veDestination, vePending) '; _stmtList.add_11rb$(element_626); var element_627 = ' CREATE OR REPLACE FUNCTION ch_upd_62_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (62, NEW.verbUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_627); var element_628 = ' CREATE TRIGGER ch_upd_62_trig AFTER UPDATE OR INSERT ON VerbEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_62_fn(); '; _stmtList.add_11rb$(element_628); var element_629 = ' CREATE OR REPLACE FUNCTION ch_del_62_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (62, OLD.verbUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_629); var element_630 = ' CREATE TRIGGER ch_del_62_trig AFTER DELETE ON VerbEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_62_fn(); '; _stmtList.add_11rb$(element_630); var element_631 = 'CREATE VIEW VerbEntity_ReceiveView AS SELECT VerbEntity.*, VerbEntityReplicate.* FROM VerbEntity LEFT JOIN VerbEntityReplicate ON VerbEntityReplicate.vePk = VerbEntity.verbUid '; _stmtList.add_11rb$(element_631); var element_632 = "CREATE OR REPLACE FUNCTION verbentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO VerbEntity(verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct) VALUES (NEW.verbUid, NEW.urlId, NEW.verbInActive, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.verbLct) ON CONFLICT (verbUid) DO UPDATE SET urlId = EXCLUDED.urlId, verbInActive = EXCLUDED.verbInActive, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, verbLct = EXCLUDED.verbLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_632); var element_633 = ' CREATE TRIGGER verbentity_remote_insert_trig INSTEAD OF INSERT ON VerbEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE verbentity_remote_insert_fn() '; _stmtList.add_11rb$(element_633); var element_634 = ' CREATE TABLE IF NOT EXISTS XObjectEntityReplicate ( xoePk BIGINT NOT NULL, xoeVersionId BIGINT NOT NULL DEFAULT 0, xoeDestination BIGINT NOT NULL, xoePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (xoePk, xoeDestination)) '; _stmtList.add_11rb$(element_634); var element_635 = ' CREATE INDEX index_XObjectEntityReplicate_xoePk_xoeDestination_xoeVersionId ON XObjectEntityReplicate (xoePk, xoeDestination, xoeVersionId) '; _stmtList.add_11rb$(element_635); var element_636 = ' CREATE INDEX index_XObjectEntityReplicate_xoeDestination_xoePending ON XObjectEntityReplicate (xoeDestination, xoePending) '; _stmtList.add_11rb$(element_636); var element_637 = ' CREATE OR REPLACE FUNCTION ch_upd_64_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (64, NEW.xObjectUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_637); var element_638 = ' CREATE TRIGGER ch_upd_64_trig AFTER UPDATE OR INSERT ON XObjectEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_64_fn(); '; _stmtList.add_11rb$(element_638); var element_639 = ' CREATE OR REPLACE FUNCTION ch_del_64_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (64, OLD.xObjectUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_639); var element_640 = ' CREATE TRIGGER ch_del_64_trig AFTER DELETE ON XObjectEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_64_fn(); '; _stmtList.add_11rb$(element_640); var element_641 = 'CREATE VIEW XObjectEntity_ReceiveView AS SELECT XObjectEntity.*, XObjectEntityReplicate.* FROM XObjectEntity LEFT JOIN XObjectEntityReplicate ON XObjectEntityReplicate.xoePk = XObjectEntity.xObjectUid '; _stmtList.add_11rb$(element_641); var element_642 = "CREATE OR REPLACE FUNCTION xobjectentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO XObjectEntity(xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES (NEW.xObjectUid, NEW.objectType, NEW.objectId, NEW.definitionType, NEW.interactionType, NEW.correctResponsePattern, NEW.objectContentEntryUid, NEW.xObjectMasterChangeSeqNum, NEW.xObjectocalChangeSeqNum, NEW.xObjectLastChangedBy, NEW.xObjectLct) ON CONFLICT (xObjectUid) DO UPDATE SET objectType = EXCLUDED.objectType, objectId = EXCLUDED.objectId, definitionType = EXCLUDED.definitionType, interactionType = EXCLUDED.interactionType, correctResponsePattern = EXCLUDED.correctResponsePattern, objectContentEntryUid = EXCLUDED.objectContentEntryUid, xObjectMasterChangeSeqNum = EXCLUDED.xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum = EXCLUDED.xObjectocalChangeSeqNum, xObjectLastChangedBy = EXCLUDED.xObjectLastChangedBy, xObjectLct = EXCLUDED.xObjectLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_642); var element_643 = ' CREATE TRIGGER xobjectentity_remote_insert_trig INSTEAD OF INSERT ON XObjectEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE xobjectentity_remote_insert_fn() '; _stmtList.add_11rb$(element_643); var element_644 = ' CREATE TABLE IF NOT EXISTS StatementEntityReplicate ( sePk BIGINT NOT NULL, seVersionId BIGINT NOT NULL DEFAULT 0, seDestination BIGINT NOT NULL, sePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sePk, seDestination)) '; _stmtList.add_11rb$(element_644); var element_645 = ' CREATE INDEX index_StatementEntityReplicate_sePk_seDestination_seVersionId ON StatementEntityReplicate (sePk, seDestination, seVersionId) '; _stmtList.add_11rb$(element_645); var element_646 = ' CREATE INDEX index_StatementEntityReplicate_seDestination_sePending ON StatementEntityReplicate (seDestination, sePending) '; _stmtList.add_11rb$(element_646); var element_647 = ' CREATE OR REPLACE FUNCTION ch_upd_60_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (60, NEW.statementUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_647); var element_648 = ' CREATE TRIGGER ch_upd_60_trig AFTER UPDATE OR INSERT ON StatementEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_60_fn(); '; _stmtList.add_11rb$(element_648); var element_649 = ' CREATE OR REPLACE FUNCTION ch_del_60_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (60, OLD.statementUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_649); var element_650 = ' CREATE TRIGGER ch_del_60_trig AFTER DELETE ON StatementEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_60_fn(); '; _stmtList.add_11rb$(element_650); var element_651 = 'CREATE VIEW StatementEntity_ReceiveView AS SELECT StatementEntity.*, StatementEntityReplicate.* FROM StatementEntity LEFT JOIN StatementEntityReplicate ON StatementEntityReplicate.sePk = StatementEntity.statementUid '; _stmtList.add_11rb$(element_651); var element_652 = "CREATE OR REPLACE FUNCTION statemententity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO StatementEntity(statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid) VALUES (NEW.statementUid, NEW.statementId, NEW.statementPersonUid, NEW.statementVerbUid, NEW.xObjectUid, NEW.subStatementActorUid, NEW.substatementVerbUid, NEW.subStatementObjectUid, NEW.agentUid, NEW.instructorUid, NEW.authorityUid, NEW.teamUid, NEW.resultCompletion, NEW.resultSuccess, NEW.resultScoreScaled, NEW.resultScoreRaw, NEW.resultScoreMin, NEW.resultScoreMax, NEW.resultDuration, NEW.resultResponse, NEW.timestamp, NEW.stored, NEW.contextRegistration, NEW.contextPlatform, NEW.contextStatementId, NEW.fullStatement, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.statementLct, NEW.extensionProgress, NEW.contentEntryRoot, NEW.statementContentEntryUid, NEW.statementLearnerGroupUid, NEW.statementClazzUid) ON CONFLICT (statementUid) DO UPDATE SET statementId = EXCLUDED.statementId, statementPersonUid = EXCLUDED.statementPersonUid, statementVerbUid = EXCLUDED.statementVerbUid, xObjectUid = EXCLUDED.xObjectUid, subStatementActorUid = EXCLUDED.subStatementActorUid, substatementVerbUid = EXCLUDED.substatementVerbUid, subStatementObjectUid = EXCLUDED.subStatementObjectUid, agentUid = EXCLUDED.agentUid, instructorUid = EXCLUDED.instructorUid, authorityUid = EXCLUDED.authorityUid, teamUid = EXCLUDED.teamUid, resultCompletion = EXCLUDED.resultCompletion, resultSuccess = EXCLUDED.resultSuccess, resultScoreScaled = EXCLUDED.resultScoreScaled, resultScoreRaw = EXCLUDED.resultScoreRaw, resultScoreMin = EXCLUDED.resultScoreMin, resultScoreMax = EXCLUDED.resultScoreMax, resultDuration = EXCLUDED.resultDuration, resultResponse = EXCLUDED.resultResponse, timestamp = EXCLUDED.timestamp, stored = EXCLUDED.stored, contextRegistration = EXCLUDED.contextRegistration, contextPlatform = EXCLUDED.contextPlatform, contextStatementId = EXCLUDED.contextStatementId, fullStatement = EXCLUDED.fullStatement, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, statementLct = EXCLUDED.statementLct, extensionProgress = EXCLUDED.extensionProgress, contentEntryRoot = EXCLUDED.contentEntryRoot, statementContentEntryUid = EXCLUDED.statementContentEntryUid, statementLearnerGroupUid = EXCLUDED.statementLearnerGroupUid, statementClazzUid = EXCLUDED.statementClazzUid ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_652); var element_653 = ' CREATE TRIGGER statemententity_remote_insert_trig INSTEAD OF INSERT ON StatementEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE statemententity_remote_insert_fn() '; _stmtList.add_11rb$(element_653); var element_654 = ' CREATE TABLE IF NOT EXISTS ContextXObjectStatementJoinReplicate ( cxosjPk BIGINT NOT NULL, cxosjVersionId BIGINT NOT NULL DEFAULT 0, cxosjDestination BIGINT NOT NULL, cxosjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cxosjPk, cxosjDestination)) '; _stmtList.add_11rb$(element_654); var element_655 = ' CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjPk_cxosjDestination_cxosjVersionId ON ContextXObjectStatementJoinReplicate (cxosjPk, cxosjDestination, cxosjVersionId) '; _stmtList.add_11rb$(element_655); var element_656 = ' CREATE INDEX index_ContextXObjectStatementJoinReplicate_cxosjDestination_cxosjPending ON ContextXObjectStatementJoinReplicate (cxosjDestination, cxosjPending) '; _stmtList.add_11rb$(element_656); var element_657 = ' CREATE OR REPLACE FUNCTION ch_upd_66_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (66, NEW.contextXObjectStatementJoinUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_657); var element_658 = ' CREATE TRIGGER ch_upd_66_trig AFTER UPDATE OR INSERT ON ContextXObjectStatementJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_66_fn(); '; _stmtList.add_11rb$(element_658); var element_659 = ' CREATE OR REPLACE FUNCTION ch_del_66_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (66, OLD.contextXObjectStatementJoinUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_659); var element_660 = ' CREATE TRIGGER ch_del_66_trig AFTER DELETE ON ContextXObjectStatementJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_66_fn(); '; _stmtList.add_11rb$(element_660); var element_661 = 'CREATE VIEW ContextXObjectStatementJoin_ReceiveView AS SELECT ContextXObjectStatementJoin.*, ContextXObjectStatementJoinReplicate.* FROM ContextXObjectStatementJoin LEFT JOIN ContextXObjectStatementJoinReplicate ON ContextXObjectStatementJoinReplicate.cxosjPk = ContextXObjectStatementJoin.contextXObjectStatementJoinUid '; _stmtList.add_11rb$(element_661); var element_662 = "CREATE OR REPLACE FUNCTION contextxobjectstatementjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContextXObjectStatementJoin(contextXObjectStatementJoinUid, contextActivityFlag, contextStatementUid, contextXObjectUid, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, contextXObjectLct) VALUES (NEW.contextXObjectStatementJoinUid, NEW.contextActivityFlag, NEW.contextStatementUid, NEW.contextXObjectUid, NEW.verbMasterChangeSeqNum, NEW.verbLocalChangeSeqNum, NEW.verbLastChangedBy, NEW.contextXObjectLct) ON CONFLICT (contextXObjectStatementJoinUid) DO UPDATE SET contextActivityFlag = EXCLUDED.contextActivityFlag, contextStatementUid = EXCLUDED.contextStatementUid, contextXObjectUid = EXCLUDED.contextXObjectUid, verbMasterChangeSeqNum = EXCLUDED.verbMasterChangeSeqNum, verbLocalChangeSeqNum = EXCLUDED.verbLocalChangeSeqNum, verbLastChangedBy = EXCLUDED.verbLastChangedBy, contextXObjectLct = EXCLUDED.contextXObjectLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_662); var element_663 = ' CREATE TRIGGER contextxobjectstatementjoin_remote_insert_trig INSTEAD OF INSERT ON ContextXObjectStatementJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE contextxobjectstatementjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_663); var element_664 = ' CREATE TABLE IF NOT EXISTS AgentEntityReplicate ( aePk BIGINT NOT NULL, aeVersionId BIGINT NOT NULL DEFAULT 0, aeDestination BIGINT NOT NULL, aePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (aePk, aeDestination)) '; _stmtList.add_11rb$(element_664); var element_665 = ' CREATE INDEX index_AgentEntityReplicate_aePk_aeDestination_aeVersionId ON AgentEntityReplicate (aePk, aeDestination, aeVersionId) '; _stmtList.add_11rb$(element_665); var element_666 = ' CREATE INDEX index_AgentEntityReplicate_aeDestination_aePending ON AgentEntityReplicate (aeDestination, aePending) '; _stmtList.add_11rb$(element_666); var element_667 = ' CREATE OR REPLACE FUNCTION ch_upd_68_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (68, NEW.agentUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_667); var element_668 = ' CREATE TRIGGER ch_upd_68_trig AFTER UPDATE OR INSERT ON AgentEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_68_fn(); '; _stmtList.add_11rb$(element_668); var element_669 = ' CREATE OR REPLACE FUNCTION ch_del_68_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (68, OLD.agentUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_669); var element_670 = ' CREATE TRIGGER ch_del_68_trig AFTER DELETE ON AgentEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_68_fn(); '; _stmtList.add_11rb$(element_670); var element_671 = 'CREATE VIEW AgentEntity_ReceiveView AS SELECT AgentEntity.*, AgentEntityReplicate.* FROM AgentEntity LEFT JOIN AgentEntityReplicate ON AgentEntityReplicate.aePk = AgentEntity.agentUid '; _stmtList.add_11rb$(element_671); var element_672 = "CREATE OR REPLACE FUNCTION agententity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO AgentEntity(agentUid, agentMbox, agentMbox_sha1sum, agentOpenid, agentAccountName, agentHomePage, agentPersonUid, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, agentLct) VALUES (NEW.agentUid, NEW.agentMbox, NEW.agentMbox_sha1sum, NEW.agentOpenid, NEW.agentAccountName, NEW.agentHomePage, NEW.agentPersonUid, NEW.statementMasterChangeSeqNum, NEW.statementLocalChangeSeqNum, NEW.statementLastChangedBy, NEW.agentLct) ON CONFLICT (agentUid) DO UPDATE SET agentMbox = EXCLUDED.agentMbox, agentMbox_sha1sum = EXCLUDED.agentMbox_sha1sum, agentOpenid = EXCLUDED.agentOpenid, agentAccountName = EXCLUDED.agentAccountName, agentHomePage = EXCLUDED.agentHomePage, agentPersonUid = EXCLUDED.agentPersonUid, statementMasterChangeSeqNum = EXCLUDED.statementMasterChangeSeqNum, statementLocalChangeSeqNum = EXCLUDED.statementLocalChangeSeqNum, statementLastChangedBy = EXCLUDED.statementLastChangedBy, agentLct = EXCLUDED.agentLct; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_672); var element_673 = ' CREATE TRIGGER agententity_remote_insert_trig INSTEAD OF INSERT ON AgentEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE agententity_remote_insert_fn() '; _stmtList.add_11rb$(element_673); var element_674 = ' CREATE TABLE IF NOT EXISTS StateEntityReplicate ( sePk BIGINT NOT NULL, seVersionId BIGINT NOT NULL DEFAULT 0, seDestination BIGINT NOT NULL, sePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sePk, seDestination)) '; _stmtList.add_11rb$(element_674); var element_675 = ' CREATE INDEX index_StateEntityReplicate_sePk_seDestination_seVersionId ON StateEntityReplicate (sePk, seDestination, seVersionId) '; _stmtList.add_11rb$(element_675); var element_676 = ' CREATE INDEX index_StateEntityReplicate_seDestination_sePending ON StateEntityReplicate (seDestination, sePending) '; _stmtList.add_11rb$(element_676); var element_677 = ' CREATE OR REPLACE FUNCTION ch_upd_70_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (70, NEW.stateUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_677); var element_678 = ' CREATE TRIGGER ch_upd_70_trig AFTER UPDATE OR INSERT ON StateEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_70_fn(); '; _stmtList.add_11rb$(element_678); var element_679 = ' CREATE OR REPLACE FUNCTION ch_del_70_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (70, OLD.stateUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_679); var element_680 = ' CREATE TRIGGER ch_del_70_trig AFTER DELETE ON StateEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_70_fn(); '; _stmtList.add_11rb$(element_680); var element_681 = 'CREATE VIEW StateEntity_ReceiveView AS SELECT StateEntity.*, StateEntityReplicate.* FROM StateEntity LEFT JOIN StateEntityReplicate ON StateEntityReplicate.sePk = StateEntity.stateUid '; _stmtList.add_11rb$(element_681); var element_682 = "CREATE OR REPLACE FUNCTION stateentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO StateEntity(stateUid, stateId, agentUid, activityId, registration, isIsactive, timestamp, stateMasterChangeSeqNum, stateLocalChangeSeqNum, stateLastChangedBy, stateLct) VALUES (NEW.stateUid, NEW.stateId, NEW.agentUid, NEW.activityId, NEW.registration, NEW.isIsactive, NEW.timestamp, NEW.stateMasterChangeSeqNum, NEW.stateLocalChangeSeqNum, NEW.stateLastChangedBy, NEW.stateLct) ON CONFLICT (stateUid) DO UPDATE SET stateId = EXCLUDED.stateId, agentUid = EXCLUDED.agentUid, activityId = EXCLUDED.activityId, registration = EXCLUDED.registration, isIsactive = EXCLUDED.isIsactive, timestamp = EXCLUDED.timestamp, stateMasterChangeSeqNum = EXCLUDED.stateMasterChangeSeqNum, stateLocalChangeSeqNum = EXCLUDED.stateLocalChangeSeqNum, stateLastChangedBy = EXCLUDED.stateLastChangedBy, stateLct = EXCLUDED.stateLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_682); var element_683 = ' CREATE TRIGGER stateentity_remote_insert_trig INSTEAD OF INSERT ON StateEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE stateentity_remote_insert_fn() '; _stmtList.add_11rb$(element_683); var element_684 = ' CREATE TABLE IF NOT EXISTS StateContentEntityReplicate ( scePk BIGINT NOT NULL, sceVersionId BIGINT NOT NULL DEFAULT 0, sceDestination BIGINT NOT NULL, scePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (scePk, sceDestination)) '; _stmtList.add_11rb$(element_684); var element_685 = ' CREATE INDEX index_StateContentEntityReplicate_scePk_sceDestination_sceVersionId ON StateContentEntityReplicate (scePk, sceDestination, sceVersionId) '; _stmtList.add_11rb$(element_685); var element_686 = ' CREATE INDEX index_StateContentEntityReplicate_sceDestination_scePending ON StateContentEntityReplicate (sceDestination, scePending) '; _stmtList.add_11rb$(element_686); var element_687 = ' CREATE OR REPLACE FUNCTION ch_upd_72_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (72, NEW.stateContentUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_687); var element_688 = ' CREATE TRIGGER ch_upd_72_trig AFTER UPDATE OR INSERT ON StateContentEntity FOR EACH ROW EXECUTE PROCEDURE ch_upd_72_fn(); '; _stmtList.add_11rb$(element_688); var element_689 = ' CREATE OR REPLACE FUNCTION ch_del_72_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (72, OLD.stateContentUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_689); var element_690 = ' CREATE TRIGGER ch_del_72_trig AFTER DELETE ON StateContentEntity FOR EACH ROW EXECUTE PROCEDURE ch_del_72_fn(); '; _stmtList.add_11rb$(element_690); var element_691 = 'CREATE VIEW StateContentEntity_ReceiveView AS SELECT StateContentEntity.*, StateContentEntityReplicate.* FROM StateContentEntity LEFT JOIN StateContentEntityReplicate ON StateContentEntityReplicate.scePk = StateContentEntity.stateContentUid '; _stmtList.add_11rb$(element_691); var element_692 = "CREATE OR REPLACE FUNCTION statecontententity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO StateContentEntity(stateContentUid, stateContentStateUid, stateContentKey, stateContentValue, isIsactive, stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum, stateContentLastChangedBy, stateContentLct) VALUES (NEW.stateContentUid, NEW.stateContentStateUid, NEW.stateContentKey, NEW.stateContentValue, NEW.isIsactive, NEW.stateContentMasterChangeSeqNum, NEW.stateContentLocalChangeSeqNum, NEW.stateContentLastChangedBy, NEW.stateContentLct) ON CONFLICT (stateContentUid) DO UPDATE SET stateContentStateUid = EXCLUDED.stateContentStateUid, stateContentKey = EXCLUDED.stateContentKey, stateContentValue = EXCLUDED.stateContentValue, isIsactive = EXCLUDED.isIsactive, stateContentMasterChangeSeqNum = EXCLUDED.stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum = EXCLUDED.stateContentLocalChangeSeqNum, stateContentLastChangedBy = EXCLUDED.stateContentLastChangedBy, stateContentLct = EXCLUDED.stateContentLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_692); var element_693 = ' CREATE TRIGGER statecontententity_remote_insert_trig INSTEAD OF INSERT ON StateContentEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE statecontententity_remote_insert_fn() '; _stmtList.add_11rb$(element_693); var element_694 = ' CREATE TABLE IF NOT EXISTS XLangMapEntryReplicate ( xlmePk BIGINT NOT NULL, xlmeVersionId BIGINT NOT NULL DEFAULT 0, xlmeDestination BIGINT NOT NULL, xlmePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (xlmePk, xlmeDestination)) '; _stmtList.add_11rb$(element_694); var element_695 = ' CREATE INDEX index_XLangMapEntryReplicate_xlmePk_xlmeDestination_xlmeVersionId ON XLangMapEntryReplicate (xlmePk, xlmeDestination, xlmeVersionId) '; _stmtList.add_11rb$(element_695); var element_696 = ' CREATE INDEX index_XLangMapEntryReplicate_xlmeDestination_xlmePending ON XLangMapEntryReplicate (xlmeDestination, xlmePending) '; _stmtList.add_11rb$(element_696); var element_697 = ' CREATE OR REPLACE FUNCTION ch_upd_74_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (74, NEW.statementLangMapUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_697); var element_698 = ' CREATE TRIGGER ch_upd_74_trig AFTER UPDATE OR INSERT ON XLangMapEntry FOR EACH ROW EXECUTE PROCEDURE ch_upd_74_fn(); '; _stmtList.add_11rb$(element_698); var element_699 = ' CREATE OR REPLACE FUNCTION ch_del_74_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (74, OLD.statementLangMapUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_699); var element_700 = ' CREATE TRIGGER ch_del_74_trig AFTER DELETE ON XLangMapEntry FOR EACH ROW EXECUTE PROCEDURE ch_del_74_fn(); '; _stmtList.add_11rb$(element_700); var element_701 = 'CREATE VIEW XLangMapEntry_ReceiveView AS SELECT XLangMapEntry.*, XLangMapEntryReplicate.* FROM XLangMapEntry LEFT JOIN XLangMapEntryReplicate ON XLangMapEntryReplicate.xlmePk = XLangMapEntry.statementLangMapUid '; _stmtList.add_11rb$(element_701); var element_702 = "CREATE OR REPLACE FUNCTION xlangmapentry_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO XLangMapEntry(verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct, statementLangMapUid) VALUES (NEW.verbLangMapUid, NEW.objectLangMapUid, NEW.languageLangMapUid, NEW.languageVariantLangMapUid, NEW.valueLangMap, NEW.statementLangMapMasterCsn, NEW.statementLangMapLocalCsn, NEW.statementLangMapLcb, NEW.statementLangMapLct, NEW.statementLangMapUid) ON CONFLICT (statementLangMapUid) DO UPDATE SET verbLangMapUid = EXCLUDED.verbLangMapUid, objectLangMapUid = EXCLUDED.objectLangMapUid, languageLangMapUid = EXCLUDED.languageLangMapUid, languageVariantLangMapUid = EXCLUDED.languageVariantLangMapUid, valueLangMap = EXCLUDED.valueLangMap, statementLangMapMasterCsn = EXCLUDED.statementLangMapMasterCsn, statementLangMapLocalCsn = EXCLUDED.statementLangMapLocalCsn, statementLangMapLcb = EXCLUDED.statementLangMapLcb, statementLangMapLct = EXCLUDED.statementLangMapLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_702); var element_703 = ' CREATE TRIGGER xlangmapentry_remote_insert_trig INSTEAD OF INSERT ON XLangMapEntry_ReceiveView FOR EACH ROW EXECUTE PROCEDURE xlangmapentry_remote_insert_fn() '; _stmtList.add_11rb$(element_703); var element_704 = ' CREATE TABLE IF NOT EXISTS SchoolReplicate ( schoolPk BIGINT NOT NULL, schoolVersionId BIGINT NOT NULL DEFAULT 0, schoolDestination BIGINT NOT NULL, schoolPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (schoolPk, schoolDestination)) '; _stmtList.add_11rb$(element_704); var element_705 = ' CREATE INDEX index_SchoolReplicate_schoolPk_schoolDestination_schoolVersionId ON SchoolReplicate (schoolPk, schoolDestination, schoolVersionId) '; _stmtList.add_11rb$(element_705); var element_706 = ' CREATE INDEX index_SchoolReplicate_schoolDestination_schoolPending ON SchoolReplicate (schoolDestination, schoolPending) '; _stmtList.add_11rb$(element_706); var element_707 = ' CREATE OR REPLACE FUNCTION ch_upd_164_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (164, NEW.schoolUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_707); var element_708 = ' CREATE TRIGGER ch_upd_164_trig AFTER UPDATE OR INSERT ON School FOR EACH ROW EXECUTE PROCEDURE ch_upd_164_fn(); '; _stmtList.add_11rb$(element_708); var element_709 = ' CREATE OR REPLACE FUNCTION ch_del_164_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (164, OLD.schoolUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_709); var element_710 = ' CREATE TRIGGER ch_del_164_trig AFTER DELETE ON School FOR EACH ROW EXECUTE PROCEDURE ch_del_164_fn(); '; _stmtList.add_11rb$(element_710); var element_711 = 'CREATE VIEW School_ReceiveView AS SELECT School.*, SchoolReplicate.* FROM School LEFT JOIN SchoolReplicate ON SchoolReplicate.schoolPk = School.schoolUid '; _stmtList.add_11rb$(element_711); var element_712 = "CREATE OR REPLACE FUNCTION school_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO School(schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone) VALUES (NEW.schoolUid, NEW.schoolName, NEW.schoolDesc, NEW.schoolAddress, NEW.schoolActive, NEW.schoolPhoneNumber, NEW.schoolGender, NEW.schoolHolidayCalendarUid, NEW.schoolFeatures, NEW.schoolLocationLong, NEW.schoolLocationLatt, NEW.schoolEmailAddress, NEW.schoolTeachersPersonGroupUid, NEW.schoolStudentsPersonGroupUid, NEW.schoolPendingStudentsPersonGroupUid, NEW.schoolCode, NEW.schoolMasterChangeSeqNum, NEW.schoolLocalChangeSeqNum, NEW.schoolLastChangedBy, NEW.schoolLct, NEW.schoolTimeZone) ON CONFLICT (schoolUid) DO UPDATE SET schoolName = EXCLUDED.schoolName, schoolDesc = EXCLUDED.schoolDesc, schoolAddress = EXCLUDED.schoolAddress, schoolActive = EXCLUDED.schoolActive, schoolPhoneNumber = EXCLUDED.schoolPhoneNumber, schoolGender = EXCLUDED.schoolGender, schoolHolidayCalendarUid = EXCLUDED.schoolHolidayCalendarUid, schoolFeatures = EXCLUDED.schoolFeatures, schoolLocationLong = EXCLUDED.schoolLocationLong, schoolLocationLatt = EXCLUDED.schoolLocationLatt, schoolEmailAddress = EXCLUDED.schoolEmailAddress, schoolTeachersPersonGroupUid = EXCLUDED.schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid = EXCLUDED.schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid = EXCLUDED.schoolPendingStudentsPersonGroupUid, schoolCode = EXCLUDED.schoolCode, schoolMasterChangeSeqNum = EXCLUDED.schoolMasterChangeSeqNum, schoolLocalChangeSeqNum = EXCLUDED.schoolLocalChangeSeqNum, schoolLastChangedBy = EXCLUDED.schoolLastChangedBy, schoolLct = EXCLUDED.schoolLct, schoolTimeZone = EXCLUDED.schoolTimeZone ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_712); var element_713 = ' CREATE TRIGGER school_remote_insert_trig INSTEAD OF INSERT ON School_ReceiveView FOR EACH ROW EXECUTE PROCEDURE school_remote_insert_fn() '; _stmtList.add_11rb$(element_713); var element_714 = ' CREATE TABLE IF NOT EXISTS SchoolMemberReplicate ( smPk BIGINT NOT NULL, smVersionId BIGINT NOT NULL DEFAULT 0, smDestination BIGINT NOT NULL, smPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (smPk, smDestination)) '; _stmtList.add_11rb$(element_714); var element_715 = ' CREATE INDEX index_SchoolMemberReplicate_smPk_smDestination_smVersionId ON SchoolMemberReplicate (smPk, smDestination, smVersionId) '; _stmtList.add_11rb$(element_715); var element_716 = ' CREATE INDEX index_SchoolMemberReplicate_smDestination_smPending ON SchoolMemberReplicate (smDestination, smPending) '; _stmtList.add_11rb$(element_716); var element_717 = ' CREATE OR REPLACE FUNCTION ch_upd_200_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (200, NEW.schoolMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_717); var element_718 = ' CREATE TRIGGER ch_upd_200_trig AFTER UPDATE OR INSERT ON SchoolMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_200_fn(); '; _stmtList.add_11rb$(element_718); var element_719 = ' CREATE OR REPLACE FUNCTION ch_del_200_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (200, OLD.schoolMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_719); var element_720 = ' CREATE TRIGGER ch_del_200_trig AFTER DELETE ON SchoolMember FOR EACH ROW EXECUTE PROCEDURE ch_del_200_fn(); '; _stmtList.add_11rb$(element_720); var element_721 = 'CREATE VIEW SchoolMember_ReceiveView AS SELECT SchoolMember.*, SchoolMemberReplicate.* FROM SchoolMember LEFT JOIN SchoolMemberReplicate ON SchoolMemberReplicate.smPk = SchoolMember.schoolMemberUid '; _stmtList.add_11rb$(element_721); var element_722 = "CREATE OR REPLACE FUNCTION schoolmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO SchoolMember(schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct) VALUES (NEW.schoolMemberUid, NEW.schoolMemberPersonUid, NEW.schoolMemberSchoolUid, NEW.schoolMemberJoinDate, NEW.schoolMemberLeftDate, NEW.schoolMemberRole, NEW.schoolMemberActive, NEW.schoolMemberLocalChangeSeqNum, NEW.schoolMemberMasterChangeSeqNum, NEW.schoolMemberLastChangedBy, NEW.schoolMemberLct) ON CONFLICT (schoolMemberUid) DO UPDATE SET schoolMemberPersonUid = EXCLUDED.schoolMemberPersonUid, schoolMemberSchoolUid = EXCLUDED.schoolMemberSchoolUid, schoolMemberJoinDate = EXCLUDED.schoolMemberJoinDate, schoolMemberLeftDate = EXCLUDED.schoolMemberLeftDate, schoolMemberRole = EXCLUDED.schoolMemberRole, schoolMemberActive = EXCLUDED.schoolMemberActive, schoolMemberLocalChangeSeqNum = EXCLUDED.schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum = EXCLUDED.schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy = EXCLUDED.schoolMemberLastChangedBy, schoolMemberLct = EXCLUDED.schoolMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_722); var element_723 = ' CREATE TRIGGER schoolmember_remote_insert_trig INSTEAD OF INSERT ON SchoolMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE schoolmember_remote_insert_fn() '; _stmtList.add_11rb$(element_723); var element_724 = ' CREATE TABLE IF NOT EXISTS CommentsReplicate ( commentsPk BIGINT NOT NULL, commentsVersionId BIGINT NOT NULL DEFAULT 0, commentsDestination BIGINT NOT NULL, commentsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (commentsPk, commentsDestination)) '; _stmtList.add_11rb$(element_724); var element_725 = ' CREATE INDEX index_CommentsReplicate_commentsPk_commentsDestination_commentsVersionId ON CommentsReplicate (commentsPk, commentsDestination, commentsVersionId) '; _stmtList.add_11rb$(element_725); var element_726 = ' CREATE INDEX index_CommentsReplicate_commentsDestination_commentsPending ON CommentsReplicate (commentsDestination, commentsPending) '; _stmtList.add_11rb$(element_726); var element_727 = ' CREATE OR REPLACE FUNCTION ch_upd_208_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (208, NEW.commentsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_727); var element_728 = ' CREATE TRIGGER ch_upd_208_trig AFTER UPDATE OR INSERT ON Comments FOR EACH ROW EXECUTE PROCEDURE ch_upd_208_fn(); '; _stmtList.add_11rb$(element_728); var element_729 = ' CREATE OR REPLACE FUNCTION ch_del_208_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (208, OLD.commentsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_729); var element_730 = ' CREATE TRIGGER ch_del_208_trig AFTER DELETE ON Comments FOR EACH ROW EXECUTE PROCEDURE ch_del_208_fn(); '; _stmtList.add_11rb$(element_730); var element_731 = 'CREATE VIEW Comments_ReceiveView AS SELECT Comments.*, CommentsReplicate.* FROM Comments LEFT JOIN CommentsReplicate ON CommentsReplicate.commentsPk = Comments.commentsUid '; _stmtList.add_11rb$(element_731); var element_732 = "CREATE OR REPLACE FUNCTION comments_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Comments(commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES (NEW.commentsUid, NEW.commentsText, NEW.commentsEntityType, NEW.commentsEntityUid, NEW.commentsPublic, NEW.commentsStatus, NEW.commentsPersonUid, NEW.commentsToPersonUid, NEW.commentsFlagged, NEW.commentsInActive, NEW.commentsDateTimeAdded, NEW.commentsDateTimeUpdated, NEW.commentsMCSN, NEW.commentsLCSN, NEW.commentsLCB, NEW.commentsLct) ON CONFLICT (commentsUid) DO UPDATE SET commentsText = EXCLUDED.commentsText, commentsEntityType = EXCLUDED.commentsEntityType, commentsEntityUid = EXCLUDED.commentsEntityUid, commentsPublic = EXCLUDED.commentsPublic, commentsStatus = EXCLUDED.commentsStatus, commentsPersonUid = EXCLUDED.commentsPersonUid, commentsToPersonUid = EXCLUDED.commentsToPersonUid, commentsFlagged = EXCLUDED.commentsFlagged, commentsInActive = EXCLUDED.commentsInActive, commentsDateTimeAdded = EXCLUDED.commentsDateTimeAdded, commentsDateTimeUpdated = EXCLUDED.commentsDateTimeUpdated, commentsMCSN = EXCLUDED.commentsMCSN, commentsLCSN = EXCLUDED.commentsLCSN, commentsLCB = EXCLUDED.commentsLCB, commentsLct = EXCLUDED.commentsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_732); var element_733 = ' CREATE TRIGGER comments_remote_insert_trig INSTEAD OF INSERT ON Comments_ReceiveView FOR EACH ROW EXECUTE PROCEDURE comments_remote_insert_fn() '; _stmtList.add_11rb$(element_733); var element_734 = ' CREATE TABLE IF NOT EXISTS ReportReplicate ( reportPk BIGINT NOT NULL, reportVersionId BIGINT NOT NULL DEFAULT 0, reportDestination BIGINT NOT NULL, reportPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (reportPk, reportDestination)) '; _stmtList.add_11rb$(element_734); var element_735 = ' CREATE INDEX index_ReportReplicate_reportPk_reportDestination_reportVersionId ON ReportReplicate (reportPk, reportDestination, reportVersionId) '; _stmtList.add_11rb$(element_735); var element_736 = ' CREATE INDEX index_ReportReplicate_reportDestination_reportPending ON ReportReplicate (reportDestination, reportPending) '; _stmtList.add_11rb$(element_736); var element_737 = ' CREATE OR REPLACE FUNCTION ch_upd_101_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (101, NEW.reportUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_737); var element_738 = ' CREATE TRIGGER ch_upd_101_trig AFTER UPDATE OR INSERT ON Report FOR EACH ROW EXECUTE PROCEDURE ch_upd_101_fn(); '; _stmtList.add_11rb$(element_738); var element_739 = ' CREATE OR REPLACE FUNCTION ch_del_101_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (101, OLD.reportUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_739); var element_740 = ' CREATE TRIGGER ch_del_101_trig AFTER DELETE ON Report FOR EACH ROW EXECUTE PROCEDURE ch_del_101_fn(); '; _stmtList.add_11rb$(element_740); var element_741 = 'CREATE VIEW Report_ReceiveView AS SELECT Report.*, ReportReplicate.* FROM Report LEFT JOIN ReportReplicate ON ReportReplicate.reportPk = Report.reportUid '; _stmtList.add_11rb$(element_741); var element_742 = ' CREATE TABLE IF NOT EXISTS SiteReplicate ( sitePk BIGINT NOT NULL, siteVersionId BIGINT NOT NULL DEFAULT 0, siteDestination BIGINT NOT NULL, sitePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sitePk, siteDestination)) '; _stmtList.add_11rb$(element_742); var element_743 = ' CREATE INDEX index_SiteReplicate_sitePk_siteDestination_siteVersionId ON SiteReplicate (sitePk, siteDestination, siteVersionId) '; _stmtList.add_11rb$(element_743); var element_744 = ' CREATE INDEX index_SiteReplicate_siteDestination_sitePending ON SiteReplicate (siteDestination, sitePending) '; _stmtList.add_11rb$(element_744); var element_745 = ' CREATE OR REPLACE FUNCTION ch_upd_189_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (189, NEW.siteUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_745); var element_746 = ' CREATE TRIGGER ch_upd_189_trig AFTER UPDATE OR INSERT ON Site FOR EACH ROW EXECUTE PROCEDURE ch_upd_189_fn(); '; _stmtList.add_11rb$(element_746); var element_747 = ' CREATE OR REPLACE FUNCTION ch_del_189_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (189, OLD.siteUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_747); var element_748 = ' CREATE TRIGGER ch_del_189_trig AFTER DELETE ON Site FOR EACH ROW EXECUTE PROCEDURE ch_del_189_fn(); '; _stmtList.add_11rb$(element_748); var element_749 = 'CREATE VIEW Site_ReceiveView AS SELECT Site.*, SiteReplicate.* FROM Site LEFT JOIN SiteReplicate ON SiteReplicate.sitePk = Site.siteUid '; _stmtList.add_11rb$(element_749); var element_750 = "CREATE OR REPLACE FUNCTION site_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Site(siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt) VALUES (NEW.siteUid, NEW.sitePcsn, NEW.siteLcsn, NEW.siteLcb, NEW.siteLct, NEW.siteName, NEW.guestLogin, NEW.registrationAllowed, NEW.authSalt) ON CONFLICT (siteUid) DO UPDATE SET sitePcsn = EXCLUDED.sitePcsn, siteLcsn = EXCLUDED.siteLcsn, siteLcb = EXCLUDED.siteLcb, siteLct = EXCLUDED.siteLct, siteName = EXCLUDED.siteName, guestLogin = EXCLUDED.guestLogin, registrationAllowed = EXCLUDED.registrationAllowed, authSalt = EXCLUDED.authSalt; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_750); var element_751 = ' CREATE TRIGGER site_remote_insert_trig INSTEAD OF INSERT ON Site_ReceiveView FOR EACH ROW EXECUTE PROCEDURE site_remote_insert_fn() '; _stmtList.add_11rb$(element_751); var element_752 = ' CREATE TABLE IF NOT EXISTS LearnerGroupReplicate ( lgPk BIGINT NOT NULL, lgVersionId BIGINT NOT NULL DEFAULT 0, lgDestination BIGINT NOT NULL, lgPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lgPk, lgDestination)) '; _stmtList.add_11rb$(element_752); var element_753 = ' CREATE INDEX index_LearnerGroupReplicate_lgPk_lgDestination_lgVersionId ON LearnerGroupReplicate (lgPk, lgDestination, lgVersionId) '; _stmtList.add_11rb$(element_753); var element_754 = ' CREATE INDEX index_LearnerGroupReplicate_lgDestination_lgPending ON LearnerGroupReplicate (lgDestination, lgPending) '; _stmtList.add_11rb$(element_754); var element_755 = ' CREATE OR REPLACE FUNCTION ch_upd_301_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (301, NEW.learnerGroupUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_755); var element_756 = ' CREATE TRIGGER ch_upd_301_trig AFTER UPDATE OR INSERT ON LearnerGroup FOR EACH ROW EXECUTE PROCEDURE ch_upd_301_fn(); '; _stmtList.add_11rb$(element_756); var element_757 = ' CREATE OR REPLACE FUNCTION ch_del_301_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (301, OLD.learnerGroupUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_757); var element_758 = ' CREATE TRIGGER ch_del_301_trig AFTER DELETE ON LearnerGroup FOR EACH ROW EXECUTE PROCEDURE ch_del_301_fn(); '; _stmtList.add_11rb$(element_758); var element_759 = 'CREATE VIEW LearnerGroup_ReceiveView AS SELECT LearnerGroup.*, LearnerGroupReplicate.* FROM LearnerGroup LEFT JOIN LearnerGroupReplicate ON LearnerGroupReplicate.lgPk = LearnerGroup.learnerGroupUid '; _stmtList.add_11rb$(element_759); var element_760 = "CREATE OR REPLACE FUNCTION learnergroup_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LearnerGroup(learnerGroupUid, learnerGroupName, learnerGroupDescription, learnerGroupActive, learnerGroupMCSN, learnerGroupCSN, learnerGroupLCB, learnerGroupLct) VALUES (NEW.learnerGroupUid, NEW.learnerGroupName, NEW.learnerGroupDescription, NEW.learnerGroupActive, NEW.learnerGroupMCSN, NEW.learnerGroupCSN, NEW.learnerGroupLCB, NEW.learnerGroupLct) ON CONFLICT (learnerGroupUid) DO UPDATE SET learnerGroupName = EXCLUDED.learnerGroupName, learnerGroupDescription = EXCLUDED.learnerGroupDescription, learnerGroupActive = EXCLUDED.learnerGroupActive, learnerGroupMCSN = EXCLUDED.learnerGroupMCSN, learnerGroupCSN = EXCLUDED.learnerGroupCSN, learnerGroupLCB = EXCLUDED.learnerGroupLCB, learnerGroupLct = EXCLUDED.learnerGroupLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_760); var element_761 = ' CREATE TRIGGER learnergroup_remote_insert_trig INSTEAD OF INSERT ON LearnerGroup_ReceiveView FOR EACH ROW EXECUTE PROCEDURE learnergroup_remote_insert_fn() '; _stmtList.add_11rb$(element_761); var element_762 = ' CREATE TABLE IF NOT EXISTS LearnerGroupMemberReplicate ( lgmPk BIGINT NOT NULL, lgmVersionId BIGINT NOT NULL DEFAULT 0, lgmDestination BIGINT NOT NULL, lgmPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (lgmPk, lgmDestination)) '; _stmtList.add_11rb$(element_762); var element_763 = ' CREATE INDEX index_LearnerGroupMemberReplicate_lgmPk_lgmDestination_lgmVersionId ON LearnerGroupMemberReplicate (lgmPk, lgmDestination, lgmVersionId) '; _stmtList.add_11rb$(element_763); var element_764 = ' CREATE INDEX index_LearnerGroupMemberReplicate_lgmDestination_lgmPending ON LearnerGroupMemberReplicate (lgmDestination, lgmPending) '; _stmtList.add_11rb$(element_764); var element_765 = ' CREATE OR REPLACE FUNCTION ch_upd_300_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (300, NEW.learnerGroupMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_765); var element_766 = ' CREATE TRIGGER ch_upd_300_trig AFTER UPDATE OR INSERT ON LearnerGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_300_fn(); '; _stmtList.add_11rb$(element_766); var element_767 = ' CREATE OR REPLACE FUNCTION ch_del_300_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (300, OLD.learnerGroupMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_767); var element_768 = ' CREATE TRIGGER ch_del_300_trig AFTER DELETE ON LearnerGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_del_300_fn(); '; _stmtList.add_11rb$(element_768); var element_769 = 'CREATE VIEW LearnerGroupMember_ReceiveView AS SELECT LearnerGroupMember.*, LearnerGroupMemberReplicate.* FROM LearnerGroupMember LEFT JOIN LearnerGroupMemberReplicate ON LearnerGroupMemberReplicate.lgmPk = LearnerGroupMember.learnerGroupMemberUid '; _stmtList.add_11rb$(element_769); var element_770 = "CREATE OR REPLACE FUNCTION learnergroupmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO LearnerGroupMember(learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct) VALUES (NEW.learnerGroupMemberUid, NEW.learnerGroupMemberPersonUid, NEW.learnerGroupMemberLgUid, NEW.learnerGroupMemberRole, NEW.learnerGroupMemberActive, NEW.learnerGroupMemberMCSN, NEW.learnerGroupMemberCSN, NEW.learnerGroupMemberLCB, NEW.learnerGroupMemberLct) ON CONFLICT (learnerGroupMemberUid) DO UPDATE SET learnerGroupMemberPersonUid = EXCLUDED.learnerGroupMemberPersonUid, learnerGroupMemberLgUid = EXCLUDED.learnerGroupMemberLgUid, learnerGroupMemberRole = EXCLUDED.learnerGroupMemberRole, learnerGroupMemberActive = EXCLUDED.learnerGroupMemberActive, learnerGroupMemberMCSN = EXCLUDED.learnerGroupMemberMCSN, learnerGroupMemberCSN = EXCLUDED.learnerGroupMemberCSN, learnerGroupMemberLCB = EXCLUDED.learnerGroupMemberLCB, learnerGroupMemberLct = EXCLUDED.learnerGroupMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_770); var element_771 = ' CREATE TRIGGER learnergroupmember_remote_insert_trig INSTEAD OF INSERT ON LearnerGroupMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE learnergroupmember_remote_insert_fn() '; _stmtList.add_11rb$(element_771); var element_772 = ' CREATE TABLE IF NOT EXISTS GroupLearningSessionReplicate ( glsPk BIGINT NOT NULL, glsVersionId BIGINT NOT NULL DEFAULT 0, glsDestination BIGINT NOT NULL, glsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (glsPk, glsDestination)) '; _stmtList.add_11rb$(element_772); var element_773 = ' CREATE INDEX index_GroupLearningSessionReplicate_glsPk_glsDestination_glsVersionId ON GroupLearningSessionReplicate (glsPk, glsDestination, glsVersionId) '; _stmtList.add_11rb$(element_773); var element_774 = ' CREATE INDEX index_GroupLearningSessionReplicate_glsDestination_glsPending ON GroupLearningSessionReplicate (glsDestination, glsPending) '; _stmtList.add_11rb$(element_774); var element_775 = ' CREATE OR REPLACE FUNCTION ch_upd_302_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (302, NEW.groupLearningSessionUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_775); var element_776 = ' CREATE TRIGGER ch_upd_302_trig AFTER UPDATE OR INSERT ON GroupLearningSession FOR EACH ROW EXECUTE PROCEDURE ch_upd_302_fn(); '; _stmtList.add_11rb$(element_776); var element_777 = ' CREATE OR REPLACE FUNCTION ch_del_302_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (302, OLD.groupLearningSessionUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_777); var element_778 = ' CREATE TRIGGER ch_del_302_trig AFTER DELETE ON GroupLearningSession FOR EACH ROW EXECUTE PROCEDURE ch_del_302_fn(); '; _stmtList.add_11rb$(element_778); var element_779 = 'CREATE VIEW GroupLearningSession_ReceiveView AS SELECT GroupLearningSession.*, GroupLearningSessionReplicate.* FROM GroupLearningSession LEFT JOIN GroupLearningSessionReplicate ON GroupLearningSessionReplicate.glsPk = GroupLearningSession.groupLearningSessionUid '; _stmtList.add_11rb$(element_779); var element_780 = "CREATE OR REPLACE FUNCTION grouplearningsession_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO GroupLearningSession(groupLearningSessionUid, groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid, groupLearningSessionInactive, groupLearningSessionMCSN, groupLearningSessionCSN, groupLearningSessionLCB, groupLearningSessionLct) VALUES (NEW.groupLearningSessionUid, NEW.groupLearningSessionContentUid, NEW.groupLearningSessionLearnerGroupUid, NEW.groupLearningSessionInactive, NEW.groupLearningSessionMCSN, NEW.groupLearningSessionCSN, NEW.groupLearningSessionLCB, NEW.groupLearningSessionLct) ON CONFLICT (groupLearningSessionUid) DO UPDATE SET groupLearningSessionContentUid = EXCLUDED.groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid = EXCLUDED.groupLearningSessionLearnerGroupUid, groupLearningSessionInactive = EXCLUDED.groupLearningSessionInactive, groupLearningSessionMCSN = EXCLUDED.groupLearningSessionMCSN, groupLearningSessionCSN = EXCLUDED.groupLearningSessionCSN, groupLearningSessionLCB = EXCLUDED.groupLearningSessionLCB, groupLearningSessionLct = EXCLUDED.groupLearningSessionLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_780); var element_781 = ' CREATE TRIGGER grouplearningsession_remote_insert_trig INSTEAD OF INSERT ON GroupLearningSession_ReceiveView FOR EACH ROW EXECUTE PROCEDURE grouplearningsession_remote_insert_fn() '; _stmtList.add_11rb$(element_781); var element_782 = ' CREATE TABLE IF NOT EXISTS SiteTermsReplicate ( stPk BIGINT NOT NULL, stVersionId BIGINT NOT NULL DEFAULT 0, stDestination BIGINT NOT NULL, stPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (stPk, stDestination)) '; _stmtList.add_11rb$(element_782); var element_783 = ' CREATE INDEX index_SiteTermsReplicate_stPk_stDestination_stVersionId ON SiteTermsReplicate (stPk, stDestination, stVersionId) '; _stmtList.add_11rb$(element_783); var element_784 = ' CREATE INDEX index_SiteTermsReplicate_stDestination_stPending ON SiteTermsReplicate (stDestination, stPending) '; _stmtList.add_11rb$(element_784); var element_785 = ' CREATE OR REPLACE FUNCTION ch_upd_272_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (272, NEW.sTermsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_785); var element_786 = ' CREATE TRIGGER ch_upd_272_trig AFTER UPDATE OR INSERT ON SiteTerms FOR EACH ROW EXECUTE PROCEDURE ch_upd_272_fn(); '; _stmtList.add_11rb$(element_786); var element_787 = ' CREATE OR REPLACE FUNCTION ch_del_272_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (272, OLD.sTermsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_787); var element_788 = ' CREATE TRIGGER ch_del_272_trig AFTER DELETE ON SiteTerms FOR EACH ROW EXECUTE PROCEDURE ch_del_272_fn(); '; _stmtList.add_11rb$(element_788); var element_789 = 'CREATE VIEW SiteTerms_ReceiveView AS SELECT SiteTerms.*, SiteTermsReplicate.* FROM SiteTerms LEFT JOIN SiteTermsReplicate ON SiteTermsReplicate.stPk = SiteTerms.sTermsUid '; _stmtList.add_11rb$(element_789); var element_790 = "CREATE OR REPLACE FUNCTION siteterms_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO SiteTerms(sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct) VALUES (NEW.sTermsUid, NEW.termsHtml, NEW.sTermsLang, NEW.sTermsLangUid, NEW.sTermsActive, NEW.sTermsLastChangedBy, NEW.sTermsPrimaryCsn, NEW.sTermsLocalCsn, NEW.sTermsLct) ON CONFLICT (sTermsUid) DO UPDATE SET termsHtml = EXCLUDED.termsHtml, sTermsLang = EXCLUDED.sTermsLang, sTermsLangUid = EXCLUDED.sTermsLangUid, sTermsActive = EXCLUDED.sTermsActive, sTermsLastChangedBy = EXCLUDED.sTermsLastChangedBy, sTermsPrimaryCsn = EXCLUDED.sTermsPrimaryCsn, sTermsLocalCsn = EXCLUDED.sTermsLocalCsn, sTermsLct = EXCLUDED.sTermsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_790); var element_791 = ' CREATE TRIGGER siteterms_remote_insert_trig INSTEAD OF INSERT ON SiteTerms_ReceiveView FOR EACH ROW EXECUTE PROCEDURE siteterms_remote_insert_fn() '; _stmtList.add_11rb$(element_791); var element_792 = ' CREATE TABLE IF NOT EXISTS ClazzContentJoinReplicate ( ccjPk BIGINT NOT NULL, ccjVersionId BIGINT NOT NULL DEFAULT 0, ccjDestination BIGINT NOT NULL, ccjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ccjPk, ccjDestination)) '; _stmtList.add_11rb$(element_792); var element_793 = ' CREATE INDEX index_ClazzContentJoinReplicate_ccjPk_ccjDestination_ccjVersionId ON ClazzContentJoinReplicate (ccjPk, ccjDestination, ccjVersionId) '; _stmtList.add_11rb$(element_793); var element_794 = ' CREATE INDEX index_ClazzContentJoinReplicate_ccjDestination_ccjPending ON ClazzContentJoinReplicate (ccjDestination, ccjPending) '; _stmtList.add_11rb$(element_794); var element_795 = ' CREATE OR REPLACE FUNCTION ch_upd_134_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (134, NEW.ccjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_795); var element_796 = ' CREATE TRIGGER ch_upd_134_trig AFTER UPDATE OR INSERT ON ClazzContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_134_fn(); '; _stmtList.add_11rb$(element_796); var element_797 = ' CREATE OR REPLACE FUNCTION ch_del_134_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (134, OLD.ccjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_797); var element_798 = ' CREATE TRIGGER ch_del_134_trig AFTER DELETE ON ClazzContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_134_fn(); '; _stmtList.add_11rb$(element_798); var element_799 = 'CREATE VIEW ClazzContentJoin_ReceiveView AS SELECT ClazzContentJoin.*, ClazzContentJoinReplicate.* FROM ClazzContentJoin LEFT JOIN ClazzContentJoinReplicate ON ClazzContentJoinReplicate.ccjPk = ClazzContentJoin.ccjUid '; _stmtList.add_11rb$(element_799); var element_800 = "CREATE OR REPLACE FUNCTION clazzcontentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzContentJoin(ccjUid, ccjContentEntryUid, ccjClazzUid, ccjActive, ccjLocalChangeSeqNum, ccjMasterChangeSeqNum, ccjLastChangedBy, ccjLct) VALUES (NEW.ccjUid, NEW.ccjContentEntryUid, NEW.ccjClazzUid, NEW.ccjActive, NEW.ccjLocalChangeSeqNum, NEW.ccjMasterChangeSeqNum, NEW.ccjLastChangedBy, NEW.ccjLct) ON CONFLICT (ccjUid) DO UPDATE SET ccjContentEntryUid = EXCLUDED.ccjContentEntryUid, ccjClazzUid = EXCLUDED.ccjClazzUid, ccjActive = EXCLUDED.ccjActive, ccjLocalChangeSeqNum = EXCLUDED.ccjLocalChangeSeqNum, ccjMasterChangeSeqNum = EXCLUDED.ccjMasterChangeSeqNum, ccjLastChangedBy = EXCLUDED.ccjLastChangedBy, ccjLct = EXCLUDED.ccjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_800); var element_801 = ' CREATE TRIGGER clazzcontentjoin_remote_insert_trig INSTEAD OF INSERT ON ClazzContentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzcontentjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_801); var element_802 = ' CREATE TABLE IF NOT EXISTS PersonParentJoinReplicate ( ppjPk BIGINT NOT NULL, ppjVersionId BIGINT NOT NULL DEFAULT 0, ppjDestination BIGINT NOT NULL, ppjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ppjPk, ppjDestination)) '; _stmtList.add_11rb$(element_802); var element_803 = ' CREATE INDEX index_PersonParentJoinReplicate_ppjPk_ppjDestination_ppjVersionId ON PersonParentJoinReplicate (ppjPk, ppjDestination, ppjVersionId) '; _stmtList.add_11rb$(element_803); var element_804 = ' CREATE INDEX index_PersonParentJoinReplicate_ppjDestination_ppjPending ON PersonParentJoinReplicate (ppjDestination, ppjPending) '; _stmtList.add_11rb$(element_804); var element_805 = ' CREATE OR REPLACE FUNCTION ch_upd_512_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (512, NEW.ppjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_805); var element_806 = ' CREATE TRIGGER ch_upd_512_trig AFTER UPDATE OR INSERT ON PersonParentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_512_fn(); '; _stmtList.add_11rb$(element_806); var element_807 = ' CREATE OR REPLACE FUNCTION ch_del_512_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (512, OLD.ppjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_807); var element_808 = ' CREATE TRIGGER ch_del_512_trig AFTER DELETE ON PersonParentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_512_fn(); '; _stmtList.add_11rb$(element_808); var element_809 = 'CREATE VIEW PersonParentJoin_ReceiveView AS SELECT PersonParentJoin.*, PersonParentJoinReplicate.* FROM PersonParentJoin LEFT JOIN PersonParentJoinReplicate ON PersonParentJoinReplicate.ppjPk = PersonParentJoin.ppjUid '; _stmtList.add_11rb$(element_809); var element_810 = "CREATE OR REPLACE FUNCTION personparentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonParentJoin(ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr) VALUES (NEW.ppjUid, NEW.ppjPcsn, NEW.ppjLcsn, NEW.ppjLcb, NEW.ppjLct, NEW.ppjParentPersonUid, NEW.ppjMinorPersonUid, NEW.ppjRelationship, NEW.ppjEmail, NEW.ppjPhone, NEW.ppjInactive, NEW.ppjStatus, NEW.ppjApprovalTiemstamp, NEW.ppjApprovalIpAddr) ON CONFLICT (ppjUid) DO UPDATE SET ppjPcsn = EXCLUDED.ppjPcsn, ppjLcsn = EXCLUDED.ppjLcsn, ppjLcb = EXCLUDED.ppjLcb, ppjLct = EXCLUDED.ppjLct, ppjParentPersonUid = EXCLUDED.ppjParentPersonUid, ppjMinorPersonUid = EXCLUDED.ppjMinorPersonUid, ppjRelationship = EXCLUDED.ppjRelationship, ppjEmail = EXCLUDED.ppjEmail, ppjPhone = EXCLUDED.ppjPhone, ppjInactive = EXCLUDED.ppjInactive, ppjStatus = EXCLUDED.ppjStatus, ppjApprovalTiemstamp = EXCLUDED.ppjApprovalTiemstamp, ppjApprovalIpAddr = EXCLUDED.ppjApprovalIpAddr ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_810); var element_811 = ' CREATE TRIGGER personparentjoin_remote_insert_trig INSTEAD OF INSERT ON PersonParentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personparentjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_811); var element_812 = ' CREATE TABLE IF NOT EXISTS ScopedGrantReplicate ( sgPk BIGINT NOT NULL, sgVersionId BIGINT NOT NULL DEFAULT 0, sgDestination BIGINT NOT NULL, sgPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (sgPk, sgDestination)) '; _stmtList.add_11rb$(element_812); var element_813 = ' CREATE INDEX index_ScopedGrantReplicate_sgPk_sgDestination_sgVersionId ON ScopedGrantReplicate (sgPk, sgDestination, sgVersionId) '; _stmtList.add_11rb$(element_813); var element_814 = ' CREATE INDEX index_ScopedGrantReplicate_sgDestination_sgPending ON ScopedGrantReplicate (sgDestination, sgPending) '; _stmtList.add_11rb$(element_814); var element_815 = ' CREATE OR REPLACE FUNCTION ch_upd_48_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (48, NEW.sgUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_815); var element_816 = ' CREATE TRIGGER ch_upd_48_trig AFTER UPDATE OR INSERT ON ScopedGrant FOR EACH ROW EXECUTE PROCEDURE ch_upd_48_fn(); '; _stmtList.add_11rb$(element_816); var element_817 = ' CREATE OR REPLACE FUNCTION ch_del_48_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (48, OLD.sgUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_817); var element_818 = ' CREATE TRIGGER ch_del_48_trig AFTER DELETE ON ScopedGrant FOR EACH ROW EXECUTE PROCEDURE ch_del_48_fn(); '; _stmtList.add_11rb$(element_818); var element_819 = 'CREATE VIEW ScopedGrant_ReceiveView AS SELECT ScopedGrant.*, ScopedGrantReplicate.* FROM ScopedGrant LEFT JOIN ScopedGrantReplicate ON ScopedGrantReplicate.sgPk = ScopedGrant.sgUid '; _stmtList.add_11rb$(element_819); var element_820 = "CREATE OR REPLACE FUNCTION sg_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ScopedGrant(sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags) VALUES (NEW.sgUid, NEW.sgPcsn, NEW.sgLcsn, NEW.sgLcb, NEW.sgLct, NEW.sgTableId, NEW.sgEntityUid, NEW.sgPermissions, NEW.sgGroupUid, NEW.sgIndex, NEW.sgFlags) ON CONFLICT(sgUid) DO UPDATE SET sgLct = EXCLUDED.sgLct, sgPermissions = EXCLUDED.sgPermissions ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_820); var element_821 = ' CREATE TRIGGER sg_remote_insert_trig INSTEAD OF INSERT ON ScopedGrant_ReceiveView FOR EACH ROW EXECUTE PROCEDURE sg_remote_insert_fn() '; _stmtList.add_11rb$(element_821); var element_822 = ' CREATE TABLE IF NOT EXISTS ErrorReportReplicate ( erPk BIGINT NOT NULL, erVersionId BIGINT NOT NULL DEFAULT 0, erDestination BIGINT NOT NULL, erPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (erPk, erDestination)) '; _stmtList.add_11rb$(element_822); var element_823 = ' CREATE INDEX index_ErrorReportReplicate_erPk_erDestination_erVersionId ON ErrorReportReplicate (erPk, erDestination, erVersionId) '; _stmtList.add_11rb$(element_823); var element_824 = ' CREATE INDEX index_ErrorReportReplicate_erDestination_erPending ON ErrorReportReplicate (erDestination, erPending) '; _stmtList.add_11rb$(element_824); var element_825 = ' CREATE OR REPLACE FUNCTION ch_upd_419_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (419, NEW.errUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_825); var element_826 = ' CREATE TRIGGER ch_upd_419_trig AFTER UPDATE OR INSERT ON ErrorReport FOR EACH ROW EXECUTE PROCEDURE ch_upd_419_fn(); '; _stmtList.add_11rb$(element_826); var element_827 = ' CREATE OR REPLACE FUNCTION ch_del_419_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (419, OLD.errUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_827); var element_828 = ' CREATE TRIGGER ch_del_419_trig AFTER DELETE ON ErrorReport FOR EACH ROW EXECUTE PROCEDURE ch_del_419_fn(); '; _stmtList.add_11rb$(element_828); var element_829 = 'CREATE VIEW ErrorReport_ReceiveView AS SELECT ErrorReport.*, ErrorReportReplicate.* FROM ErrorReport LEFT JOIN ErrorReportReplicate ON ErrorReportReplicate.erPk = ErrorReport.errUid '; _stmtList.add_11rb$(element_829); var element_830 = "CREATE OR REPLACE FUNCTION errorreport_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ErrorReport(errUid, errPcsn, errLcsn, errLcb, errLct, severity, timestamp, presenterUri, appVersion, versionCode, errorCode, operatingSys, osVersion, stackTrace, message) VALUES (NEW.errUid, NEW.errPcsn, NEW.errLcsn, NEW.errLcb, NEW.errLct, NEW.severity, NEW.timestamp, NEW.presenterUri, NEW.appVersion, NEW.versionCode, NEW.errorCode, NEW.operatingSys, NEW.osVersion, NEW.stackTrace, NEW.message) ON CONFLICT (errUid) DO UPDATE SET errPcsn = EXCLUDED.errPcsn, errLcsn = EXCLUDED.errLcsn, errLcb = EXCLUDED.errLcb, errLct = EXCLUDED.errLct, severity = EXCLUDED.severity, timestamp = EXCLUDED.timestamp, presenterUri = EXCLUDED.presenterUri, appVersion = EXCLUDED.appVersion, versionCode = EXCLUDED.versionCode, errorCode = EXCLUDED.errorCode, operatingSys = EXCLUDED.operatingSys, osVersion = EXCLUDED.osVersion, stackTrace = EXCLUDED.stackTrace, message = EXCLUDED.message ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_830); var element_831 = ' CREATE TRIGGER errorreport_remote_insert_trig INSTEAD OF INSERT ON ErrorReport_ReceiveView FOR EACH ROW EXECUTE PROCEDURE errorreport_remote_insert_fn() '; _stmtList.add_11rb$(element_831); var element_832 = ' CREATE TABLE IF NOT EXISTS ClazzAssignmentReplicate ( caPk BIGINT NOT NULL, caVersionId BIGINT NOT NULL DEFAULT 0, caDestination BIGINT NOT NULL, caPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (caPk, caDestination)) '; _stmtList.add_11rb$(element_832); var element_833 = ' CREATE INDEX index_ClazzAssignmentReplicate_caPk_caDestination_caVersionId ON ClazzAssignmentReplicate (caPk, caDestination, caVersionId) '; _stmtList.add_11rb$(element_833); var element_834 = ' CREATE INDEX index_ClazzAssignmentReplicate_caDestination_caPending ON ClazzAssignmentReplicate (caDestination, caPending) '; _stmtList.add_11rb$(element_834); var element_835 = ' CREATE OR REPLACE FUNCTION ch_upd_520_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (520, NEW.caUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_835); var element_836 = ' CREATE TRIGGER ch_upd_520_trig AFTER UPDATE OR INSERT ON ClazzAssignment FOR EACH ROW EXECUTE PROCEDURE ch_upd_520_fn(); '; _stmtList.add_11rb$(element_836); var element_837 = ' CREATE OR REPLACE FUNCTION ch_del_520_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (520, OLD.caUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_837); var element_838 = ' CREATE TRIGGER ch_del_520_trig AFTER DELETE ON ClazzAssignment FOR EACH ROW EXECUTE PROCEDURE ch_del_520_fn(); '; _stmtList.add_11rb$(element_838); var element_839 = 'CREATE VIEW ClazzAssignment_ReceiveView AS SELECT ClazzAssignment.*, ClazzAssignmentReplicate.* FROM ClazzAssignment LEFT JOIN ClazzAssignmentReplicate ON ClazzAssignmentReplicate.caPk = ClazzAssignment.caUid '; _stmtList.add_11rb$(element_839); var element_840 = "CREATE OR REPLACE FUNCTION clazzassignment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzAssignment(caUid, caTitle, caDescription, caDeadlineDate, caStartDate, caLateSubmissionType, caLateSubmissionPenalty, caGracePeriodDate, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES (NEW.caUid, NEW.caTitle, NEW.caDescription, NEW.caDeadlineDate, NEW.caStartDate, NEW.caLateSubmissionType, NEW.caLateSubmissionPenalty, NEW.caGracePeriodDate, NEW.caActive, NEW.caClassCommentEnabled, NEW.caPrivateCommentsEnabled, NEW.caClazzUid, NEW.caLocalChangeSeqNum, NEW.caMasterChangeSeqNum, NEW.caLastChangedBy, NEW.caLct) ON CONFLICT (caUid) DO UPDATE SET caTitle = EXCLUDED.caTitle, caDescription = EXCLUDED.caDescription, caDeadlineDate = EXCLUDED.caDeadlineDate, caStartDate = EXCLUDED.caStartDate, caLateSubmissionType = EXCLUDED.caLateSubmissionType, caLateSubmissionPenalty = EXCLUDED.caLateSubmissionPenalty, caGracePeriodDate = EXCLUDED.caGracePeriodDate, caActive = EXCLUDED.caActive, caClassCommentEnabled = EXCLUDED.caClassCommentEnabled, caPrivateCommentsEnabled = EXCLUDED.caPrivateCommentsEnabled, caClazzUid = EXCLUDED.caClazzUid, caLocalChangeSeqNum = EXCLUDED.caLocalChangeSeqNum, caMasterChangeSeqNum = EXCLUDED.caMasterChangeSeqNum, caLastChangedBy = EXCLUDED.caLastChangedBy, caLct = EXCLUDED.caLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_840); var element_841 = ' CREATE TRIGGER clazzassignment_remote_insert_trig INSTEAD OF INSERT ON ClazzAssignment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzassignment_remote_insert_fn() '; _stmtList.add_11rb$(element_841); var element_842 = ' CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoinReplicate ( cacjPk BIGINT NOT NULL, cacjVersionId BIGINT NOT NULL DEFAULT 0, cacjDestination BIGINT NOT NULL, cacjPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cacjPk, cacjDestination)) '; _stmtList.add_11rb$(element_842); var element_843 = ' CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjPk_cacjDestination_cacjVersionId ON ClazzAssignmentContentJoinReplicate (cacjPk, cacjDestination, cacjVersionId) '; _stmtList.add_11rb$(element_843); var element_844 = ' CREATE INDEX index_ClazzAssignmentContentJoinReplicate_cacjDestination_cacjPending ON ClazzAssignmentContentJoinReplicate (cacjDestination, cacjPending) '; _stmtList.add_11rb$(element_844); var element_845 = ' CREATE OR REPLACE FUNCTION ch_upd_521_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (521, NEW.cacjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_845); var element_846 = ' CREATE TRIGGER ch_upd_521_trig AFTER UPDATE OR INSERT ON ClazzAssignmentContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_521_fn(); '; _stmtList.add_11rb$(element_846); var element_847 = ' CREATE OR REPLACE FUNCTION ch_del_521_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (521, OLD.cacjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_847); var element_848 = ' CREATE TRIGGER ch_del_521_trig AFTER DELETE ON ClazzAssignmentContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_521_fn(); '; _stmtList.add_11rb$(element_848); var element_849 = 'CREATE VIEW ClazzAssignmentContentJoin_ReceiveView AS SELECT ClazzAssignmentContentJoin.*, ClazzAssignmentContentJoinReplicate.* FROM ClazzAssignmentContentJoin LEFT JOIN ClazzAssignmentContentJoinReplicate ON ClazzAssignmentContentJoinReplicate.cacjPk = ClazzAssignmentContentJoin.cacjUid '; _stmtList.add_11rb$(element_849); var element_850 = "CREATE OR REPLACE FUNCTION clazzassignmentcontentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzAssignmentContentJoin(cacjUid, cacjContentUid, cacjAssignmentUid, cacjActive, cacjMCSN, cacjLCSN, cacjLCB, cacjLct) VALUES (NEW.cacjUid, NEW.cacjContentUid, NEW.cacjAssignmentUid, NEW.cacjActive, NEW.cacjMCSN, NEW.cacjLCSN, NEW.cacjLCB, NEW.cacjLct) ON CONFLICT (cacjUid) DO UPDATE SET cacjContentUid = EXCLUDED.cacjContentUid, cacjAssignmentUid = EXCLUDED.cacjAssignmentUid, cacjActive = EXCLUDED.cacjActive, cacjMCSN = EXCLUDED.cacjMCSN, cacjLCSN = EXCLUDED.cacjLCSN, cacjLCB = EXCLUDED.cacjLCB, cacjLct = EXCLUDED.cacjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_850); var element_851 = ' CREATE TRIGGER clazzassignmentcontentjoin_remote_insert_trig INSTEAD OF INSERT ON ClazzAssignmentContentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzassignmentcontentjoin_remote_insert_fn() '; _stmtList.add_11rb$(element_851); var element_852 = ' CREATE TABLE IF NOT EXISTS PersonAuth2Replicate ( paPk BIGINT NOT NULL, paVersionId BIGINT NOT NULL DEFAULT 0, paDestination BIGINT NOT NULL, paPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (paPk, paDestination)) '; _stmtList.add_11rb$(element_852); var element_853 = ' CREATE INDEX index_PersonAuth2Replicate_paPk_paDestination_paVersionId ON PersonAuth2Replicate (paPk, paDestination, paVersionId) '; _stmtList.add_11rb$(element_853); var element_854 = ' CREATE INDEX index_PersonAuth2Replicate_paDestination_paPending ON PersonAuth2Replicate (paDestination, paPending) '; _stmtList.add_11rb$(element_854); var element_855 = ' CREATE OR REPLACE FUNCTION ch_upd_678_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (678, NEW.pauthUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_855); var element_856 = ' CREATE TRIGGER ch_upd_678_trig AFTER UPDATE OR INSERT ON PersonAuth2 FOR EACH ROW EXECUTE PROCEDURE ch_upd_678_fn(); '; _stmtList.add_11rb$(element_856); var element_857 = ' CREATE OR REPLACE FUNCTION ch_del_678_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (678, OLD.pauthUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_857); var element_858 = ' CREATE TRIGGER ch_del_678_trig AFTER DELETE ON PersonAuth2 FOR EACH ROW EXECUTE PROCEDURE ch_del_678_fn(); '; _stmtList.add_11rb$(element_858); var element_859 = 'CREATE VIEW PersonAuth2_ReceiveView AS SELECT PersonAuth2.*, PersonAuth2Replicate.* FROM PersonAuth2 LEFT JOIN PersonAuth2Replicate ON PersonAuth2Replicate.paPk = PersonAuth2.pauthUid '; _stmtList.add_11rb$(element_859); var element_860 = "CREATE OR REPLACE FUNCTION personauth2_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonAuth2(pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES (NEW.pauthUid, NEW.pauthMechanism, NEW.pauthAuth, NEW.pauthLcsn, NEW.pauthPcsn, NEW.pauthLcb, NEW.pauthLct) ON CONFLICT (pauthUid) DO UPDATE SET pauthMechanism = EXCLUDED.pauthMechanism, pauthAuth = EXCLUDED.pauthAuth, pauthLcsn = EXCLUDED.pauthLcsn, pauthPcsn = EXCLUDED.pauthPcsn, pauthLcb = EXCLUDED.pauthLcb, pauthLct = EXCLUDED.pauthLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_860); var element_861 = ' CREATE TRIGGER personauth2_remote_insert_trig INSTEAD OF INSERT ON PersonAuth2_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personauth2_remote_insert_fn() '; _stmtList.add_11rb$(element_861); var element_862 = ' CREATE TABLE IF NOT EXISTS UserSessionReplicate ( usPk BIGINT NOT NULL, usVersionId BIGINT NOT NULL DEFAULT 0, usDestination BIGINT NOT NULL, usPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (usPk, usDestination)) '; _stmtList.add_11rb$(element_862); var element_863 = ' CREATE INDEX index_UserSessionReplicate_usPk_usDestination_usVersionId ON UserSessionReplicate (usPk, usDestination, usVersionId) '; _stmtList.add_11rb$(element_863); var element_864 = ' CREATE INDEX index_UserSessionReplicate_usDestination_usPending ON UserSessionReplicate (usDestination, usPending) '; _stmtList.add_11rb$(element_864); var element_865 = ' CREATE OR REPLACE FUNCTION ch_upd_679_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (679, NEW.usUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_865); var element_866 = ' CREATE TRIGGER ch_upd_679_trig AFTER UPDATE OR INSERT ON UserSession FOR EACH ROW EXECUTE PROCEDURE ch_upd_679_fn(); '; _stmtList.add_11rb$(element_866); var element_867 = ' CREATE OR REPLACE FUNCTION ch_del_679_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (679, OLD.usUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; _stmtList.add_11rb$(element_867); var element_868 = ' CREATE TRIGGER ch_del_679_trig AFTER DELETE ON UserSession FOR EACH ROW EXECUTE PROCEDURE ch_del_679_fn(); '; _stmtList.add_11rb$(element_868); var element_869 = 'CREATE VIEW UserSession_ReceiveView AS SELECT UserSession.*, UserSessionReplicate.* FROM UserSession LEFT JOIN UserSessionReplicate ON UserSessionReplicate.usPk = UserSession.usUid '; _stmtList.add_11rb$(element_869); var element_870 = "CREATE OR REPLACE FUNCTION usersession_remote_ins_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO UserSession(usUid, usPcsn, usLcsn, usLcb, usLct, usPersonUid, usClientNodeId, usStartTime, usEndTime, usStatus, usReason, usAuth, usSessionType) VALUES (NEW.usUid, NEW.usPcsn, NEW.usLcsn, NEW.usLcb, NEW.usLct, NEW.usPersonUid, NEW.usClientNodeId, NEW.usStartTime, NEW.usEndTime, NEW.usStatus, NEW.usReason, NEW.usAuth, NEW.usSessionType) /*postgres ON CONFLICT (usUid) DO UPDATE SET usStatus = EXCLUDED.usStatus, usEndTime = EXCLUDED.usEndTime, usReason = EXCLUDED.usReason */ ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; _stmtList.add_11rb$(element_870); var element_871 = ' CREATE TRIGGER usersession_remote_ins_trig INSTEAD OF INSERT ON UserSession_ReceiveView FOR EACH ROW EXECUTE PROCEDURE usersession_remote_ins_fn() '; _stmtList.add_11rb$(element_871); } execSqlBatch(db, copyToArray(_stmtList)); } function UmAppDatabaseReplicationMigration91_92$lambda(db) { db.execSQL_61zpoe$('ALTER TABLE DoorNode ADD COLUMN rel INTEGER NOT NULL DEFAULT 2'); db.execSQL_61zpoe$('ALTER TABLE Person ADD COLUMN personType INTEGER NOT NULL DEFAULT 0'); db.execSQL_61zpoe$('DROP TABLE ChangeLog'); db.execSQL_61zpoe$('DROP TABLE SyncResult'); db.execSQL_61zpoe$('DROP TABLE TableSyncStatus'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ClazzLog_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ClazzLogAttendanceRecord_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS Schedule_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS DateRange_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS HolidayCalendar_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS Holiday_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ScheduledCheck_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS AuditLog_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS CustomField_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS CustomFieldValue_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS CustomFieldValueOption_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS Person_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS Clazz_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ClazzEnrolment_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS LeavingReason_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS PersonCustomFieldValue_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ContentEntry_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ContentEntryContentCategoryJoin_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ContentEntryParentChildJoin_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ContentEntryRelatedEntryJoin_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ContentCategorySchema_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ContentCategory_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS Language_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS LanguageVariant_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS Role_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS EntityRole_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS PersonGroup_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS PersonGroupMember_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS PersonPicture_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS Container_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS VerbEntity_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS XObjectEntity_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS StatementEntity_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ContextXObjectStatementJoin_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS AgentEntity_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS StateEntity_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS StateContentEntity_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS XLangMapEntry_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS School_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS SchoolMember_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS Comments_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS Report_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS Site_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS LearnerGroup_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS LearnerGroupMember_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS GroupLearningSession_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS SiteTerms_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ClazzContentJoin_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS PersonParentJoin_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ScopedGrant_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ErrorReport_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ClazzAssignment_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS ClazzAssignmentContentJoin_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS PersonAuth2_trk'); db.execSQL_61zpoe$('DROP TABLE IF EXISTS UserSession_trk'); if (dbType(db) === 1) { dropOldSqliteTriggers(db); db.execSQL_61zpoe$('CREATE TABLE IF NOT EXISTS ReplicationStatus ( tableId INTEGER NOT NULL , priority INTEGER NOT NULL , nodeId INTEGER NOT NULL , lastRemoteChangeTime INTEGER NOT NULL , lastFetchReplicationCompleteTime INTEGER NOT NULL , lastLocalChangeTime INTEGER NOT NULL , lastSendReplicationCompleteTime INTEGER NOT NULL , repStatusId INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'); db.execSQL_61zpoe$('CREATE UNIQUE INDEX table_node_idx ON ReplicationStatus (tableId, nodeId)'); db.execSQL_61zpoe$('CREATE TABLE IF NOT EXISTS ChangeLog ( chTableId INTEGER NOT NULL , chEntityPk INTEGER NOT NULL , chType INTEGER NOT NULL , PRIMARY KEY (chTableId, chEntityPk) )'); } else { dropOldPostgresTriggers(db); dropOldPostgresFunctions(db); db.execSQL_61zpoe$('CREATE TABLE IF NOT EXISTS ChangeLog ( chTableId INTEGER NOT NULL , chEntityPk BIGINT NOT NULL , chType INTEGER NOT NULL , PRIMARY KEY (chTableId, chEntityPk) )'); db.execSQL_61zpoe$('CREATE TABLE IF NOT EXISTS ReplicationStatus ( tableId INTEGER NOT NULL , priority INTEGER NOT NULL , nodeId BIGINT NOT NULL , lastRemoteChangeTime BIGINT NOT NULL , lastFetchReplicationCompleteTime BIGINT NOT NULL , lastLocalChangeTime BIGINT NOT NULL , lastSendReplicationCompleteTime BIGINT NOT NULL , repStatusId SERIAL PRIMARY KEY NOT NULL )'); db.execSQL_61zpoe$('CREATE UNIQUE INDEX table_node_idx ON ReplicationStatus (tableId, nodeId)'); db.execSQL_61zpoe$('ALTER TABLE DoorNode ALTER COLUMN nodeId TYPE BIGINT'); db.execSQL_61zpoe$('ALTER TABLE SyncNode ALTER COLUMN nodeClientId TYPE BIGINT'); db.execSQL_61zpoe$('ALTER TABLE UserSession ALTER COLUMN usClientNodeId TYPE BIGINT'); } addReplicationEntities(db); return Unit; } var UmAppDatabaseReplicationMigration91_92; function BaseDao() { } BaseDao.$metadata$ = {kind: Kind_INTERFACE, simpleName: 'BaseDao', interfaces: []}; var ClazzAssignmentContentJoinDaoCommon_instance = null; var ClazzAssignmentDaoCommon_instance = null; function Coroutine$deactivateByUids($receiver_0, uidList_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$tmp$ = void 0; this.local$$receiver = $receiver_0; this.local$uidList = uidList_0; this.local$changeTime = changeTime_0; } Coroutine$deactivateByUids.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deactivateByUids.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deactivateByUids.prototype.constructor = Coroutine$deactivateByUids; Coroutine$deactivateByUids.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$tmp$ = this.local$uidList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var element = this.local$tmp$.next(); this.state_0 = 3; this.result_0 = this.local$$receiver.updateActiveByUid_zaz62j$(element, false, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function deactivateByUids($receiver_0, uidList_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$deactivateByUids($receiver_0, uidList_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } var ClazzDaoCommon_instance = null; var ClazzEnrolmentDaoCommon_instance = null; var ContainerDaoCommon_instance = null; var ContainerEntryFileCommon_instance = null; var ContentEntryDaoCommon_instance = null; var ContextXObjectStatementJoinDaoCommon_instance = null; var CourseBlockDaoCommon_instance = null; function Coroutine$deactivateByUids_0($receiver_0, uidList_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$tmp$ = void 0; this.local$$receiver = $receiver_0; this.local$uidList = uidList_0; this.local$changeTime = changeTime_0; } Coroutine$deactivateByUids_0.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deactivateByUids_0.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deactivateByUids_0.prototype.constructor = Coroutine$deactivateByUids_0; Coroutine$deactivateByUids_0.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$tmp$ = this.local$uidList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var element = this.local$tmp$.next(); this.state_0 = 3; this.result_0 = this.local$$receiver.updateActiveByUid_zaz62j$(element, false, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function deactivateByUids_0($receiver_0, uidList_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$deactivateByUids_0($receiver_0, uidList_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$deactivateByUids_1($receiver_0, uidList_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$tmp$ = void 0; this.local$$receiver = $receiver_0; this.local$uidList = uidList_0; this.local$changeTime = changeTime_0; } Coroutine$deactivateByUids_1.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deactivateByUids_1.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deactivateByUids_1.prototype.constructor = Coroutine$deactivateByUids_1; Coroutine$deactivateByUids_1.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$tmp$ = this.local$uidList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var element = this.local$tmp$.next(); this.state_0 = 3; this.result_0 = this.local$$receiver.updateActiveByUid_zaz62j$(element, false, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function deactivateByUids_1($receiver_0, uidList_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$deactivateByUids_1($receiver_0, uidList_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } function Coroutine$deactivateByUids_2($receiver_0, uidList_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$tmp$ = void 0; this.local$$receiver = $receiver_0; this.local$uidList = uidList_0; this.local$changeTime = changeTime_0; } Coroutine$deactivateByUids_2.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deactivateByUids_2.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deactivateByUids_2.prototype.constructor = Coroutine$deactivateByUids_2; Coroutine$deactivateByUids_2.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$tmp$ = this.local$uidList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var element = this.local$tmp$.next(); this.state_0 = 3; this.result_0 = this.local$$receiver.updateActiveByUid_zaz62j$(element, false, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function deactivateByUids_2($receiver_0, uidList_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$deactivateByUids_2($receiver_0, uidList_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } var EntityRoleCommon_instance = null; function deactivateByUids_3($receiver, uidList, changeTime, continuation) { var tmp$; tmp$ = uidList.iterator(); while (tmp$.hasNext()) { var element = tmp$.next(); $receiver.updateActiveByUid_zaz62j$(element, false, changeTime); } } var LanguageDaoCommon_instance = null; var NetworkNodeDaoCommon_instance = null; function OneToManyJoinDao() { } OneToManyJoinDao.$metadata$ = {kind: Kind_INTERFACE, simpleName: 'OneToManyJoinDao', interfaces: []}; function PersonAuthDaoCommon() { PersonAuthDaoCommon_instance = this; this.ENCRYPTED_PASS_PREFIX = 'e:'; this.PLAIN_PASS_PREFIX = 'p:'; } PersonAuthDaoCommon.prototype.encryptThisPassword_61zpoe$ = function (originalPassword) { return encryptPassword(originalPassword); }; PersonAuthDaoCommon.prototype.authenticateThisEncryptedPassword_jyasbz$ = function (providedPassword, encryptedPassword) { return equals(this.encryptThisPassword_61zpoe$(providedPassword), encryptedPassword); }; PersonAuthDaoCommon.$metadata$ = {kind: Kind_OBJECT, simpleName: 'PersonAuthDaoCommon', interfaces: []}; var PersonAuthDaoCommon_instance = null; function PersonAuthDaoCommon_getInstance() { if (PersonAuthDaoCommon_instance === null) { new PersonAuthDaoCommon(); } return PersonAuthDaoCommon_instance; } var PersonDaoCommon_instance = null; var ReportDaoCommon_instance = null; function Coroutine$deactivateByUids_3($receiver_0, uidList_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$tmp$ = void 0; this.local$$receiver = $receiver_0; this.local$uidList = uidList_0; this.local$changeTime = changeTime_0; } Coroutine$deactivateByUids_3.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deactivateByUids_3.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deactivateByUids_3.prototype.constructor = Coroutine$deactivateByUids_3; Coroutine$deactivateByUids_3.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$tmp$ = this.local$uidList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var element = this.local$tmp$.next(); this.state_0 = 3; this.result_0 = this.local$$receiver.updateScheduleActivated_zaz62j$(element, false, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function deactivateByUids_4($receiver_0, uidList_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$deactivateByUids_3($receiver_0, uidList_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } var SchoolDaoCommon_instance = null; var SchoolMemberDaoCommon_instance = null; var ScopedGrantDaoCommon_instance = null; var ScrapeQueueItemDaoCommon_instance = null; function Coroutine$deactivateByUids_4($receiver_0, uidList_0, changeTime_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.local$tmp$ = void 0; this.local$$receiver = $receiver_0; this.local$uidList = uidList_0; this.local$changeTime = changeTime_0; } Coroutine$deactivateByUids_4.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$deactivateByUids_4.prototype = Object.create(CoroutineImpl.prototype); Coroutine$deactivateByUids_4.prototype.constructor = Coroutine$deactivateByUids_4; Coroutine$deactivateByUids_4.prototype.doResume = function () { do try { switch (this.state_0) { case 0: this.local$tmp$ = this.local$uidList.iterator(); this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (!this.local$tmp$.hasNext()) { this.state_0 = 4; continue; } var element = this.local$tmp$.next(); this.state_0 = 3; this.result_0 = this.local$$receiver.updateActiveByUid_zaz62j$(element, false, this.local$changeTime, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return; default: this.state_0 = 1; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 1) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function deactivateByUids_5($receiver_0, uidList_0, changeTime_0, continuation_0, suspended) { var instance = new Coroutine$deactivateByUids_4($receiver_0, uidList_0, changeTime_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } var StatementDaoCommon_instance = null; function getResults($receiver, sqlStr, paramsList, continuation) { return $receiver.getResults_j49vja$(new SimpleDoorQuery(sqlStr, paramsList), continuation); } var UserSessionDaoCommon_instance = null; function MIGRATION_92_93$lambda(db) { if (dbType(db) === 1) { return listOf(['ALTER TABLE SyncNode RENAME to SyncNode_OLD', 'CREATE TABLE IF NOT EXISTS SyncNode ( nodeClientId INTEGER PRIMARY KEY NOT NULL)', 'INSERT INTO SyncNode (nodeClientId) SELECT nodeClientId FROM SyncNode_OLD', 'DROP TABLE SyncNode_OLD']); } else { return listOf_0('ALTER TABLE SyncNode DROP COLUMN master'); } } var MIGRATION_92_93; function MIGRATION_93_94$lambda(db) { if (dbType(db) === 1) { return listOf(['CREATE VIEW IF NOT EXISTS ClazzLogAttendanceRecord_ReceiveView AS SELECT ClazzLogAttendanceRecord.*, ClazzLogAttendanceRecordReplicate.* FROM ClazzLogAttendanceRecord LEFT JOIN ClazzLogAttendanceRecordReplicate ON ClazzLogAttendanceRecordReplicate.clarPk = ClazzLogAttendanceRecord.clazzLogAttendanceRecordUid ', 'DROP TRIGGER IF EXISTS clazzlogattendancerecord_remote_insert_ins', 'CREATE TRIGGER clazzlogattendancerecord_remote_insert_ins INSTEAD OF INSERT ON ClazzLogAttendanceRecord_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzLogAttendanceRecord(clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES (NEW.clazzLogAttendanceRecordUid, NEW.clazzLogAttendanceRecordClazzLogUid, NEW.clazzLogAttendanceRecordPersonUid, NEW.attendanceStatus, NEW.clazzLogAttendanceRecordMasterChangeSeqNum, NEW.clazzLogAttendanceRecordLocalChangeSeqNum, NEW.clazzLogAttendanceRecordLastChangedBy, NEW.clazzLogAttendanceRecordLastChangedTime) /*psql ON CONFLICT (clazzLogAttendanceRecordUid) DO UPDATE SET clazzLogAttendanceRecordClazzLogUid = EXCLUDED.clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid = EXCLUDED.clazzLogAttendanceRecordPersonUid, attendanceStatus = EXCLUDED.attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy = EXCLUDED.clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime = EXCLUDED.clazzLogAttendanceRecordLastChangedTime */; END']); } else { return listOf(["CREATE OR REPLACE FUNCTION clazzlogattendancerecord_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzLogAttendanceRecord(clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime) VALUES (NEW.clazzLogAttendanceRecordUid, NEW.clazzLogAttendanceRecordClazzLogUid, NEW.clazzLogAttendanceRecordPersonUid, NEW.attendanceStatus, NEW.clazzLogAttendanceRecordMasterChangeSeqNum, NEW.clazzLogAttendanceRecordLocalChangeSeqNum, NEW.clazzLogAttendanceRecordLastChangedBy, NEW.clazzLogAttendanceRecordLastChangedTime) ON CONFLICT (clazzLogAttendanceRecordUid) DO UPDATE SET clazzLogAttendanceRecordClazzLogUid = EXCLUDED.clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid = EXCLUDED.clazzLogAttendanceRecordPersonUid, attendanceStatus = EXCLUDED.attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum = EXCLUDED.clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy = EXCLUDED.clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime = EXCLUDED.clazzLogAttendanceRecordLastChangedTime ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql", 'DROP TRIGGER IF EXISTS clazzlogattendancerecord_remote_insert_trig ON ClazzLogAttendanceRecord_ReceiveView', ' CREATE TRIGGER clazzlogattendancerecord_remote_insert_trig INSTEAD OF INSERT ON ClazzLogAttendanceRecord_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzlogattendancerecord_remote_insert_fn() ']); } } var MIGRATION_93_94; function MIGRATION_94_95$lambda(db) { if (dbType(db) === 1) { return listOf(['DROP TRIGGER IF EXISTS ATTUPD_PersonPicture', 'DROP TABLE IF EXISTS ZombieAttachmentData', 'CREATE TABLE IF NOT EXISTS ZombieAttachmentData ( zaTableId INTEGER NOT NULL , zaPrimaryKey INTEGER NOT NULL , zaMd5 TEXT , zaUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )', trimMargin('\n |\n | CREATE TRIGGER ATTUPD_PersonPicture\n | AFTER UPDATE ON PersonPicture FOR EACH ROW WHEN\n | OLD.personPictureMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaTableId, zaPrimaryKey, zaMd5) \n | SELECT 50 AS zaTableId, OLD.personPictureUid AS zaPrimaryKey, OLD.personPictureMd5 AS zaMd5\n | FROM PersonPicture \n | WHERE PersonPicture.personPictureUid = OLD.personPictureUid\n | AND (SELECT COUNT(*) \n | FROM PersonPicture\n | WHERE personPictureMd5 = OLD.personPictureMd5) = 0\n | ; \n | END\n | \n ')]); } else { return listOf(['DROP TRIGGER IF EXISTS attach_PersonPicture_trig ON PersonPicture', 'DROP TABLE IF EXISTS ZombieAttachmentData', 'CREATE TABLE IF NOT EXISTS ZombieAttachmentData ( zaTableId INTEGER NOT NULL , zaPrimaryKey BIGINT NOT NULL , zaMd5 TEXT , zaUid BIGSERIAL PRIMARY KEY NOT NULL )', trimMargin('\n | CREATE OR REPLACE FUNCTION attach_PersonPicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaTableId, zaPrimaryKey, zaMd5) \n | SELECT 50 AS zaTableId, OLD.personPictureUid AS zaPrimaryKey, OLD.personPictureMd5 AS zaMd5\n | FROM PersonPicture \n | WHERE PersonPicture.personPictureUid = OLD.personPictureUid\n | AND (SELECT COUNT(*) \n | FROM PersonPicture\n | WHERE personPictureMd5 = OLD.personPictureMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n '), trimMargin('\n |CREATE TRIGGER attach_PersonPicture_trig\n |AFTER UPDATE ON PersonPicture\n |FOR EACH ROW WHEN (OLD.personPictureMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_PersonPicture_fn();\n ')]); } } var MIGRATION_94_95; function MIGRATION_95_96$lambda(db) { if (dbType(db) === 2) { return listOf(['DROP VIEW PersonAuth2_receiveview', 'ALTER TABLE PersonAuth2 ALTER COLUMN pauthLcb TYPE BIGINT', 'CREATE VIEW PersonAuth2_ReceiveView AS SELECT PersonAuth2.*, PersonAuth2Replicate.* FROM PersonAuth2 LEFT JOIN PersonAuth2Replicate ON PersonAuth2Replicate.paPk = PersonAuth2.pauthUid', "CREATE OR REPLACE FUNCTION personauth2_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO PersonAuth2(pauthUid, pauthMechanism, pauthAuth, pauthLcsn, pauthPcsn, pauthLcb, pauthLct) VALUES (NEW.pauthUid, NEW.pauthMechanism, NEW.pauthAuth, NEW.pauthLcsn, NEW.pauthPcsn, NEW.pauthLcb, NEW.pauthLct) ON CONFLICT (pauthUid) DO UPDATE SET pauthMechanism = EXCLUDED.pauthMechanism, pauthAuth = EXCLUDED.pauthAuth, pauthLcsn = EXCLUDED.pauthLcsn, pauthPcsn = EXCLUDED.pauthPcsn, pauthLcb = EXCLUDED.pauthLcb, pauthLct = EXCLUDED.pauthLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql", 'CREATE TRIGGER personauth2_remote_insert_trig INSTEAD OF INSERT ON PersonAuth2_ReceiveView FOR EACH ROW EXECUTE PROCEDURE personauth2_remote_insert_fn()']); } else { return emptyList(); } } var MIGRATION_95_96; function MIGRATION_96_97$lambda(db) { if (dbType(db) === 1) { return listOf(['DROP TABLE ZombieAttachmentData', 'CREATE TABLE ZombieAttachmentData ( zaUri TEXT , zaUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )', 'DROP TRIGGER IF EXISTS ATTUPD_PersonPicture', trimMargin('\n |\n | CREATE TRIGGER ATTUPD_PersonPicture\n | AFTER UPDATE ON PersonPicture FOR EACH ROW WHEN\n | OLD.personPictureMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.personPictureUri AS zaUri\n | FROM PersonPicture \n | WHERE PersonPicture.personPictureUid = OLD.personPictureUid\n | AND (SELECT COUNT(*) \n | FROM PersonPicture\n | WHERE personPictureMd5 = OLD.personPictureMd5) = 0\n | ; \n | END\n | \n ')]); } else { return listOf(['DROP TABLE IF EXISTS ZombieAttachmentData', 'CREATE TABLE IF NOT EXISTS ZombieAttachmentData ( zaUri TEXT , zaUid SERIAL PRIMARY KEY NOT NULL )', trimMargin('\n | CREATE OR REPLACE FUNCTION attach_PersonPicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.personPictureUri AS zaUri\n | FROM PersonPicture \n | WHERE PersonPicture.personPictureUid = OLD.personPictureUid\n | AND (SELECT COUNT(*) \n | FROM PersonPicture\n | WHERE personPictureMd5 = OLD.personPictureMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n ')]); } } var MIGRATION_96_97; function MIGRATION_97_98$lambda(db) { if (dbType(db) === 2) { fixTincan(db); return emptyList(); } else { return emptyList(); } } var MIGRATION_97_98; function MIGRATION_98_99$lambda(db) { if (dbType(db) === 2) { return listOf_0('ALTER TABLE ContentJobItem ALTER COLUMN cjiFinishTime TYPE BIGINT'); } else { return emptyList(); } } var MIGRATION_98_99; function MIGRATION_99_100$lambda(db) { return listOf(['\n UPDATE ContainerEntry\n SET ceCefUid = \n (SELECT CefOuter.cefUid\n FROM ContainerEntryFile CefOuter\n WHERE CefOuter.cefMd5 = \n\t\t (SELECT CefInner.cefMd5\n\t\t\t\t FROM ContainerEntryFile CefInner\n\t\t\t\t WHERE CefInner.cefUid = ContainerEntry.ceCefUid)\n\t\tORDER BY CefOuter.cefUid\n LIMIT 1)\n ', '\nDELETE FROM ContainerEntryFile \n WHERE ContainerEntryFile.cefUid != \n (SELECT CefInner.cefUid \n FROM ContainerEntryFile CefInner\n WHERE CefInner.cefMd5 = ContainerEntryFile.cefMd5\n ORDER BY CefInner.cefUid\n LIMIT 1)\n ']); } var MIGRATION_99_100; function MIGRATION_100_101$lambda(db) { if (dbType(db) === 1) { return listOf(['CREATE VIEW IF NOT EXISTS Container_ReceiveView AS SELECT Container.*, ContainerReplicate.* FROM Container LEFT JOIN ContainerReplicate ON ContainerReplicate.containerPk = Container.containerUid ', 'DROP TRIGGER IF EXISTS container_remote_insert_ins', 'CREATE TRIGGER container_remote_insert_ins INSTEAD OF INSERT ON Container_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Container(containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) SELECT NEW.containerUid, NEW.cntLocalCsn, NEW.cntMasterCsn, NEW.cntLastModBy, NEW.cntLct, NEW.fileSize, NEW.containerContentEntryUid, NEW.cntLastModified, NEW.mimeType, NEW.remarks, NEW.mobileOptimized, NEW.cntNumEntries WHERE NEW.cntLct > (SELECT COALESCE( (SELECT ContainerInt.cntLct FROM Container ContainerInt WHERE ContainerInt.containerUid = NEW.containerUid), 0)) /*psql ON CONFLICT (containerUid) DO UPDATE SET cntLocalCsn = EXCLUDED.cntLocalCsn, cntMasterCsn = EXCLUDED.cntMasterCsn, cntLastModBy = EXCLUDED.cntLastModBy, cntLct = EXCLUDED.cntLct, fileSize = EXCLUDED.fileSize, containerContentEntryUid = EXCLUDED.containerContentEntryUid, cntLastModified = EXCLUDED.cntLastModified, mimeType = EXCLUDED.mimeType, remarks = EXCLUDED.remarks, mobileOptimized = EXCLUDED.mobileOptimized, cntNumEntries = EXCLUDED.cntNumEntries */; END ']); } else { return listOf_0("CREATE OR REPLACE FUNCTION container_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Container(containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries) SELECT NEW.containerUid, NEW.cntLocalCsn, NEW.cntMasterCsn, NEW.cntLastModBy, NEW.cntLct, NEW.fileSize, NEW.containerContentEntryUid, NEW.cntLastModified, NEW.mimeType, NEW.remarks, NEW.mobileOptimized, NEW.cntNumEntries WHERE NEW.cntLct > (SELECT COALESCE( (SELECT ContainerInt.cntLct FROM Container ContainerInt WHERE ContainerInt.containerUid = NEW.containerUid), 0)) ON CONFLICT (containerUid) DO UPDATE SET cntLocalCsn = EXCLUDED.cntLocalCsn, cntMasterCsn = EXCLUDED.cntMasterCsn, cntLastModBy = EXCLUDED.cntLastModBy, cntLct = EXCLUDED.cntLct, fileSize = EXCLUDED.fileSize, containerContentEntryUid = EXCLUDED.containerContentEntryUid, cntLastModified = EXCLUDED.cntLastModified, mimeType = EXCLUDED.mimeType, remarks = EXCLUDED.remarks, mobileOptimized = EXCLUDED.mobileOptimized, cntNumEntries = EXCLUDED.cntNumEntries ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"); } } var MIGRATION_100_101; function MIGRATION_101_102$lambda(db) { if (dbType(db) === 1) { var triggerNames = listOf(['ContentJobItem_InsertTrigger', 'ContentJobItem_UpdateRecursiveTotals', 'ContentJobItem_UpdateRecursiveStatus', 'ContentJobItem_UpdateParents', 'ContentJobItem_UpdateStatusParent']); var destination = ArrayList_init_0(collectionSizeOrDefault(triggerNames, 10)); var tmp$; tmp$ = triggerNames.iterator(); while (tmp$.hasNext()) { var item = tmp$.next(); destination.add_11rb$('DROP TRIGGER IF EXISTS ' + item); } return plus(destination, listOf([' CREATE TRIGGER ContentJobItem_InsertTrigger AFTER INSERT ON ContentJobItem BEGIN UPDATE ContentJobItem SET cjiRecursiveProgress = NEW.cjiItemProgress, cjiRecursiveTotal = NEW.cjiItemTotal WHERE ContentJobItem.cjiUid = NEW.cjiUid; END; ', ' CREATE TRIGGER ContentJobItem_UpdateRecursiveTotals AFTER UPDATE ON ContentJobItem FOR EACH ROW WHEN ( NEW.cjiItemProgress != OLD.cjiItemProgress OR NEW.cjiItemTotal != OLD.cjiItemTotal) BEGIN UPDATE ContentJobItem SET cjiRecursiveProgress = (cjiRecursiveProgress + (NEW.cjiItemProgress - OLD.cjiItemProgress)), cjiRecursiveTotal = (cjiRecursiveTotal + (NEW.cjiItemTotal - OLD.cjiItemTotal)) WHERE ContentJobItem.cjiUid = NEW.cjiUid; END; ', ' CREATE TRIGGER ContentJobItem_UpdateRecursiveStatus AFTER UPDATE ON ContentJobItem FOR EACH ROW WHEN (NEW.cjiStatus != OLD.cjiStatus) BEGIN UPDATE ContentJobItem SET cjiRecursiveStatus = (CASE WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 24) THEN 24 WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 25) THEN 25 WHEN(SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus ) = (SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 28) THEN 28 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 12) THEN 12 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE (status = 25 OR status = 23)) THEN 23 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 5) THEN 5 ELSE 4 END) WHERE contentJobItem.cjiUid = NEW.cjiUid; END; ', ' CREATE TRIGGER ContentJobItem_UpdateParents AFTER UPDATE ON ContentJobItem FOR EACH ROW WHEN ( NEW.cjiParentCjiUid != 0 AND (NEW.cjiRecursiveProgress != OLD.cjiRecursiveProgress OR NEW.cjiRecursiveTotal != OLD.cjiRecursiveTotal)) BEGIN UPDATE ContentJobItem SET cjiRecursiveProgress = (cjiRecursiveProgress + (NEW.cjiRecursiveProgress - OLD.cjiRecursiveProgress)), cjiRecursiveTotal = (cjiRecursiveTotal + (NEW.cjiRecursiveTotal - OLD.cjiRecursiveTotal)) WHERE ContentJobItem.cjiUid = NEW.cjiParentCjiUid; END; ', ' CREATE TRIGGER ContentJobItem_UpdateStatusParent AFTER UPDATE ON ContentJobItem FOR EACH ROW WHEN ( NEW.cjiParentCjiUid != 0 AND (New.cjiRecursiveStatus != OLD.cjiRecursiveStatus)) BEGIN UPDATE ContentJobItem SET cjiRecursiveStatus = (CASE WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 24) THEN 24 WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 25) THEN 25 WHEN(SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus ) = (SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 28) THEN 28 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 12) THEN 12 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE (status = 25 OR status = 23)) THEN 23 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 5) THEN 5 ELSE 4 END) WHERE ContentJobItem.cjiUid = NEW.cjiParentCjiUid; END; '])); } else { var triggerNames_0 = listOf(['contentjobiteminsert_trig', 'contentjobitem_updaterecursivetotals_trig', 'contentjobitem_updateparents_trig', 'contentjobitem_updatestatus_trig', 'contentjobitem_updatestatusparents_trig']); var destination_0 = ArrayList_init_0(collectionSizeOrDefault(triggerNames_0, 10)); var tmp$_0; tmp$_0 = triggerNames_0.iterator(); while (tmp$_0.hasNext()) { var item_0 = tmp$_0.next(); destination_0.add_11rb$('DROP TRIGGER IF EXISTS ' + item_0 + ' ON ContentJobItem'); } return plus(destination_0, listOf([' CREATE OR REPLACE FUNCTION contentjobiteminsert_fn() RETURNS TRIGGER AS $$ BEGIN UPDATE ContentJobItem SET cjiRecursiveProgress = NEW.cjiItemProgress, cjiRecursiveTotal = NEW.cjiItemTotal WHERE ContentJobItem.cjiUid = NEW.cjiUid; RETURN NEW; END $$ LANGUAGE plpgsql ', ' CREATE TRIGGER contentjobiteminsert_trig AFTER INSERT ON ContentJobItem FOR EACH ROW EXECUTE PROCEDURE contentjobiteminsert_fn() ', ' CREATE OR REPLACE FUNCTION contentjobitem_updaterecursivetotals_fn() RETURNS TRIGGER AS $$ BEGIN UPDATE ContentJobItem SET cjiRecursiveProgress = (cjiRecursiveProgress + (NEW.cjiItemProgress - OLD.cjiItemProgress)), cjiRecursiveTotal = (cjiRecursiveTotal + (NEW.cjiItemTotal - OLD.cjiItemTotal)) WHERE (NEW.cjiItemProgress != OLD.cjiItemProgress OR NEW.cjiItemTotal != OLD.cjiItemTotal) AND ContentJobItem.cjiUid = NEW.cjiUid; RETURN NEW; END $$ LANGUAGE plpgsql ', ' CREATE TRIGGER contentjobitem_updaterecursivetotals_trig AFTER UPDATE ON ContentJobItem FOR EACH ROW EXECUTE PROCEDURE contentjobitem_updaterecursivetotals_fn(); ', ' CREATE OR REPLACE FUNCTION contentjobitem_updateparents_fn() RETURNS TRIGGER AS $$ BEGIN UPDATE ContentJobItem SET cjiRecursiveProgress = (cjiRecursiveProgress + (NEW.cjiRecursiveProgress - OLD.cjiRecursiveProgress)), cjiRecursiveTotal = (cjiRecursiveTotal + (NEW.cjiRecursiveTotal - OLD.cjiRecursiveTotal)) WHERE (NEW.cjiRecursiveProgress != OLD.cjiRecursiveProgress OR NEW.cjiRecursiveTotal != OLD.cjiRecursiveTotal) AND ContentJobItem.cjiUid = NEW.cjiParentCjiUid AND NEW.cjiParentCjiUid != 0; RETURN NEW; END $$ LANGUAGE plpgsql ', ' CREATE TRIGGER contentjobitem_updateparents_trig AFTER UPDATE ON ContentJobItem FOR EACH ROW EXECUTE PROCEDURE contentjobitem_updateparents_fn(); ', ' CREATE OR REPLACE FUNCTION contentjobitem_updatestatus_fn() RETURNS TRIGGER AS $$ BEGIN UPDATE ContentJobItem SET cjiRecursiveStatus = (CASE WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 24) THEN 24 WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 25) THEN 25 WHEN(SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus ) = (SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 28) THEN 28 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 12) THEN 12 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE (status = 25 OR status = 23)) THEN 23 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiUid) AS JobStatus WHERE status = 5) THEN 5 ELSE 4 END) WHERE contentJobItem.cjiUid = NEW.cjiUid AND NEW.cjiStatus != OLD.cjiStatus; RETURN NEW; END $$ LANGUAGE plpgsql ', ' CREATE TRIGGER contentjobitem_updatestatus_trig AFTER UPDATE ON ContentJobItem FOR EACH ROW EXECUTE PROCEDURE contentjobitem_updatestatus_fn(); ', ' CREATE OR REPLACE FUNCTION contentjobitem_updatestatusparents_fn() RETURNS TRIGGER AS $$ BEGIN UPDATE ContentJobItem SET cjiRecursiveStatus = (CASE WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 24) THEN 24 WHEN (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus ) = (SELECT Count(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 25) THEN 25 WHEN(SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus ) = (SELECT COUNT(*) FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 28) THEN 28 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 12) THEN 12 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE (status = 25 OR status = 23)) THEN 23 WHEN EXISTS (SELECT status FROM (SELECT cjiRecursiveStatus AS status FROM ContentJobItem WHERE cjiParentCjiUid = NEW.cjiParentCjiUid UNION SELECT cjiStatus AS status FROM ContentJobItem WHERE cjiUid = NEW.cjiParentCjiUid) AS JobStatus WHERE status = 5) THEN 5 ELSE 4 END) WHERE NEW.cjiParentCjiUid != 0 AND NEW.cjiRecursiveStatus != OLD.cjiRecursiveStatus AND ContentJobItem.cjiUid = NEW.cjiParentCjiUid; RETURN NEW; END $$ LANGUAGE plpgsql ', ' CREATE TRIGGER contentjobitem_updatestatusparents_trig AFTER UPDATE ON ContentJobItem FOR EACH ROW EXECUTE PROCEDURE contentjobitem_updatestatusparents_fn(); '])); } } var MIGRATION_101_102; function MIGRATION_102_103$lambda(db) { var stmtList = ArrayList_init(); if (dbType(db) === 1) { var element = 'CREATE TABLE IF NOT EXISTS Chat ( chatStartDate INTEGER NOT NULL , chatTitle TEXT , chatGroup INTEGER NOT NULL , chatLct INTEGER NOT NULL , chatUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element); var element_0 = 'CREATE TABLE IF NOT EXISTS ChatReplicate ( chatPk INTEGER NOT NULL , chatVersionId INTEGER NOT NULL DEFAULT 0 , chatDestination INTEGER NOT NULL , chatPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (chatPk, chatDestination) )'; stmtList.add_11rb$(element_0); var element_1 = 'CREATE INDEX index_ChatReplicate_chatPk_chatDestination_chatVersionId ON ChatReplicate (chatPk, chatDestination, chatVersionId)'; stmtList.add_11rb$(element_1); var element_2 = 'CREATE INDEX index_ChatReplicate_chatDestination_chatPending ON ChatReplicate (chatDestination, chatPending)'; stmtList.add_11rb$(element_2); var element_3 = 'CREATE TABLE IF NOT EXISTS ChatMember ( chatMemberChatUid INTEGER NOT NULL , chatMemberPersonUid INTEGER NOT NULL , chatMemberJoinedDate INTEGER NOT NULL , chatMemberLeftDate INTEGER NOT NULL , chatMemberLct INTEGER NOT NULL , chatMemberUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_3); var element_4 = 'CREATE TABLE IF NOT EXISTS ChatMemberReplicate ( chatMemberPk INTEGER NOT NULL , chatMemberVersionId INTEGER NOT NULL DEFAULT 0 , chatMemberDestination INTEGER NOT NULL , chatMemberPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (chatMemberPk, chatMemberDestination) )'; stmtList.add_11rb$(element_4); var element_5 = 'CREATE INDEX index_ChatMemberReplicate_chatMemberPk_chatMemberDestination_chatMemberVersionId ON ChatMemberReplicate (chatMemberPk, chatMemberDestination, chatMemberVersionId)'; stmtList.add_11rb$(element_5); var element_6 = 'CREATE INDEX index_ChatMemberReplicate_chatMemberDestination_chatMemberPending ON ChatMemberReplicate (chatMemberDestination, chatMemberPending)'; stmtList.add_11rb$(element_6); var element_7 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentMark ( camAssignmentUid INTEGER NOT NULL , camSubmitterUid INTEGER NOT NULL , camMark REAL NOT NULL , camPenalty INTEGER NOT NULL , camLct INTEGER NOT NULL , camUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_7); var element_8 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentMarkReplicate ( camPk INTEGER NOT NULL , camVersionId INTEGER NOT NULL DEFAULT 0 , camDestination INTEGER NOT NULL , camPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (camPk, camDestination) )'; stmtList.add_11rb$(element_8); var element_9 = 'CREATE INDEX index_CourseAssignmentMarkReplicate_camPk_camDestination_camVersionId ON CourseAssignmentMarkReplicate (camPk, camDestination, camVersionId)'; stmtList.add_11rb$(element_9); var element_10 = 'CREATE INDEX index_CourseAssignmentMarkReplicate_camDestination_camPending ON CourseAssignmentMarkReplicate (camDestination, camPending)'; stmtList.add_11rb$(element_10); var element_11 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmission ( casAssignmentUid INTEGER NOT NULL , casSubmitterUid INTEGER NOT NULL , casSubmitterPersonUid INTEGER NOT NULL , casText TEXT , casType INTEGER NOT NULL , casTimestamp INTEGER NOT NULL , casUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_11); var element_12 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachment ( casaSubmissionUid INTEGER NOT NULL , casaMimeType TEXT , casaUri TEXT , casaMd5 TEXT , casaSize INTEGER NOT NULL , casaTimestamp INTEGER NOT NULL , casaUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_12); var element_13 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachmentReplicate ( casaPk INTEGER NOT NULL , casaVersionId INTEGER NOT NULL DEFAULT 0 , casaDestination INTEGER NOT NULL , casaPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (casaPk, casaDestination) )'; stmtList.add_11rb$(element_13); var element_14 = 'CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaPk_casaDestination_casaVersionId ON CourseAssignmentSubmissionAttachmentReplicate (casaPk, casaDestination, casaVersionId)'; stmtList.add_11rb$(element_14); var element_15 = 'CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaDestination_casaPending ON CourseAssignmentSubmissionAttachmentReplicate (casaDestination, casaPending)'; stmtList.add_11rb$(element_15); var element_16 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionReplicate ( casPk INTEGER NOT NULL , casVersionId INTEGER NOT NULL DEFAULT 0 , casDestination INTEGER NOT NULL , casPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (casPk, casDestination) )'; stmtList.add_11rb$(element_16); var element_17 = 'CREATE INDEX index_CourseAssignmentSubmissionReplicate_casPk_casDestination_casVersionId ON CourseAssignmentSubmissionReplicate (casPk, casDestination, casVersionId)'; stmtList.add_11rb$(element_17); var element_18 = 'CREATE INDEX index_CourseAssignmentSubmissionReplicate_casDestination_casPending ON CourseAssignmentSubmissionReplicate (casDestination, casPending)'; stmtList.add_11rb$(element_18); var element_19 = 'CREATE TABLE IF NOT EXISTS CourseBlock ( cbType INTEGER NOT NULL , cbIndentLevel INTEGER NOT NULL , cbModuleParentBlockUid INTEGER NOT NULL , cbTitle TEXT , cbDescription TEXT , cbCompletionCriteria INTEGER NOT NULL , cbHideUntilDate INTEGER NOT NULL , cbDeadlineDate INTEGER NOT NULL , cbLateSubmissionPenalty INTEGER NOT NULL , cbGracePeriodDate INTEGER NOT NULL , cbMaxPoints INTEGER NOT NULL , cbMinPoints INTEGER NOT NULL , cbIndex INTEGER NOT NULL , cbClazzUid INTEGER NOT NULL , cbActive INTEGER NOT NULL , cbHidden INTEGER NOT NULL , cbEntityUid INTEGER NOT NULL , cbLct INTEGER NOT NULL , cbUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_19); var element_20 = 'CREATE INDEX index_CourseBlock_cbClazzUid ON CourseBlock (cbClazzUid)'; stmtList.add_11rb$(element_20); var element_21 = 'CREATE TABLE IF NOT EXISTS CourseBlockReplicate ( cbPk INTEGER NOT NULL , cbVersionId INTEGER NOT NULL DEFAULT 0 , cbDestination INTEGER NOT NULL , cbPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cbPk, cbDestination) )'; stmtList.add_11rb$(element_21); var element_22 = 'CREATE INDEX index_CourseBlockReplicate_cbPk_cbDestination_cbVersionId ON CourseBlockReplicate (cbPk, cbDestination, cbVersionId)'; stmtList.add_11rb$(element_22); var element_23 = 'CREATE INDEX index_CourseBlockReplicate_cbDestination_cbPending ON CourseBlockReplicate (cbDestination, cbPending)'; stmtList.add_11rb$(element_23); var element_24 = 'CREATE TABLE IF NOT EXISTS CourseDiscussion ( courseDiscussionTitle TEXT , courseDiscussionDesc TEXT , courseDiscussionClazzUid INTEGER NOT NULL , courseDiscussionActive INTEGER NOT NULL , courseDiscussionLct INTEGER NOT NULL , courseDiscussionUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_24); var element_25 = 'CREATE TABLE IF NOT EXISTS CourseDiscussionReplicate ( courseDiscussionPk INTEGER NOT NULL , courseDiscussionVersionId INTEGER NOT NULL DEFAULT 0 , courseDiscussionDestination INTEGER NOT NULL , courseDiscussionPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (courseDiscussionPk, courseDiscussionDestination) )'; stmtList.add_11rb$(element_25); var element_26 = 'CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionPk_courseDiscussionDestination_courseDiscussionVersionId ON CourseDiscussionReplicate (courseDiscussionPk, courseDiscussionDestination, courseDiscussionVersionId)'; stmtList.add_11rb$(element_26); var element_27 = 'CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionDestination_courseDiscussionPending ON CourseDiscussionReplicate (courseDiscussionDestination, courseDiscussionPending)'; stmtList.add_11rb$(element_27); var element_28 = 'CREATE TABLE IF NOT EXISTS CourseGroupMember ( cgmSetUid INTEGER NOT NULL , cgmGroupNumber INTEGER NOT NULL , cgmPersonUid INTEGER NOT NULL , cgmLct INTEGER NOT NULL , cgmUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_28); var element_29 = 'CREATE TABLE IF NOT EXISTS CourseGroupMemberReplicate ( cgmPk INTEGER NOT NULL , cgmVersionId INTEGER NOT NULL DEFAULT 0 , cgmDestination INTEGER NOT NULL , cgmPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cgmPk, cgmDestination) )'; stmtList.add_11rb$(element_29); var element_30 = 'CREATE INDEX index_CourseGroupMemberReplicate_cgmPk_cgmDestination_cgmVersionId ON CourseGroupMemberReplicate (cgmPk, cgmDestination, cgmVersionId)'; stmtList.add_11rb$(element_30); var element_31 = 'CREATE INDEX index_CourseGroupMemberReplicate_cgmDestination_cgmPending ON CourseGroupMemberReplicate (cgmDestination, cgmPending)'; stmtList.add_11rb$(element_31); var element_32 = 'CREATE TABLE IF NOT EXISTS CourseGroupSet ( cgsName TEXT , cgsTotalGroups INTEGER NOT NULL , cgsActive INTEGER NOT NULL , cgsClazzUid INTEGER NOT NULL , cgsLct INTEGER NOT NULL , cgsUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_32); var element_33 = 'CREATE INDEX index_CourseGroupSet_cgsClazzUid ON CourseGroupSet (cgsClazzUid)'; stmtList.add_11rb$(element_33); var element_34 = 'CREATE TABLE IF NOT EXISTS CourseGroupSetReplicate ( cgsPk INTEGER NOT NULL , cgsVersionId INTEGER NOT NULL DEFAULT 0 , cgsDestination INTEGER NOT NULL , cgsPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cgsPk, cgsDestination) )'; stmtList.add_11rb$(element_34); var element_35 = 'CREATE INDEX index_CourseGroupSetReplicate_cgsPk_cgsDestination_cgsVersionId ON CourseGroupSetReplicate (cgsPk, cgsDestination, cgsVersionId)'; stmtList.add_11rb$(element_35); var element_36 = 'CREATE INDEX index_CourseGroupSetReplicate_cgsDestination_cgsPending ON CourseGroupSetReplicate (cgsDestination, cgsPending)'; stmtList.add_11rb$(element_36); var element_37 = 'CREATE TABLE IF NOT EXISTS CoursePicture ( coursePictureClazzUid INTEGER NOT NULL , coursePictureMasterCsn INTEGER NOT NULL , coursePictureLocalCsn INTEGER NOT NULL , coursePictureLastChangedBy INTEGER NOT NULL , coursePictureLct INTEGER NOT NULL , coursePictureUri TEXT , coursePictureMd5 TEXT , coursePictureFileSize INTEGER NOT NULL , coursePictureTimestamp INTEGER NOT NULL , coursePictureMimeType TEXT , coursePictureActive INTEGER NOT NULL , coursePictureUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_37); var element_38 = 'CREATE TABLE IF NOT EXISTS CoursePictureReplicate ( cpPk INTEGER NOT NULL , cpVersionId INTEGER NOT NULL DEFAULT 0 , cpDestination INTEGER NOT NULL , cpPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (cpPk, cpDestination) )'; stmtList.add_11rb$(element_38); var element_39 = 'CREATE INDEX index_CoursePictureReplicate_cpPk_cpDestination_cpVersionId ON CoursePictureReplicate (cpPk, cpDestination, cpVersionId)'; stmtList.add_11rb$(element_39); var element_40 = 'CREATE INDEX index_CoursePictureReplicate_cpDestination_cpPending ON CoursePictureReplicate (cpDestination, cpPending)'; stmtList.add_11rb$(element_40); var element_41 = 'CREATE TABLE IF NOT EXISTS CourseTerminology ( ctTitle TEXT , ctTerminology TEXT , ctLct INTEGER NOT NULL , ctUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_41); var element_42 = 'CREATE TABLE IF NOT EXISTS CourseTerminologyReplicate ( ctPk INTEGER NOT NULL , ctVersionId INTEGER NOT NULL DEFAULT 0 , ctDestination INTEGER NOT NULL , ctPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (ctPk, ctDestination) )'; stmtList.add_11rb$(element_42); var element_43 = 'CREATE INDEX index_CourseTerminologyReplicate_ctPk_ctDestination_ctVersionId ON CourseTerminologyReplicate (ctPk, ctDestination, ctVersionId)'; stmtList.add_11rb$(element_43); var element_44 = 'CREATE INDEX index_CourseTerminologyReplicate_ctDestination_ctPending ON CourseTerminologyReplicate (ctDestination, ctPending)'; stmtList.add_11rb$(element_44); var element_45 = 'CREATE TABLE IF NOT EXISTS DiscussionPost ( discussionPostTitle TEXT , discussionPostMessage TEXT , discussionPostStartDate INTEGER NOT NULL , discussionPostDiscussionTopicUid INTEGER NOT NULL , discussionPostVisible INTEGER NOT NULL , discussionPostArchive INTEGER NOT NULL , discussionPostStartedPersonUid INTEGER NOT NULL , discussionPostClazzUid INTEGER NOT NULL , discussionPostLct INTEGER NOT NULL , discussionPostUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_45); var element_46 = 'CREATE TABLE IF NOT EXISTS DiscussionPostReplicate ( discussionPostPk INTEGER NOT NULL , discussionPostVersionId INTEGER NOT NULL DEFAULT 0 , discussionPostDestination INTEGER NOT NULL , discussionPostPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (discussionPostPk, discussionPostDestination) )'; stmtList.add_11rb$(element_46); var element_47 = 'CREATE INDEX index_DiscussionPostReplicate_discussionPostPk_discussionPostDestination_discussionPostVersionId ON DiscussionPostReplicate (discussionPostPk, discussionPostDestination, discussionPostVersionId)'; stmtList.add_11rb$(element_47); var element_48 = 'CREATE INDEX index_DiscussionPostReplicate_discussionPostDestination_discussionPostPending ON DiscussionPostReplicate (discussionPostDestination, discussionPostPending)'; stmtList.add_11rb$(element_48); var element_49 = 'CREATE TABLE IF NOT EXISTS DiscussionTopic ( discussionTopicTitle TEXT , discussionTopicDesc TEXT , discussionTopicStartDate INTEGER NOT NULL , discussionTopicCourseDiscussionUid INTEGER NOT NULL , discussionTopicVisible INTEGER NOT NULL , discussionTopicArchive INTEGER NOT NULL , discussionTopicIndex INTEGER NOT NULL , discussionTopicClazzUid INTEGER NOT NULL , discussionTopicLct INTEGER NOT NULL , discussionTopicUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_49); var element_50 = 'CREATE TABLE IF NOT EXISTS DiscussionTopicReplicate ( discussionTopicPk INTEGER NOT NULL , discussionTopicVersionId INTEGER NOT NULL DEFAULT 0 , discussionTopicDestination INTEGER NOT NULL , discussionTopicPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (discussionTopicPk, discussionTopicDestination) )'; stmtList.add_11rb$(element_50); var element_51 = 'CREATE INDEX index_DiscussionTopicReplicate_discussionTopicPk_discussionTopicDestination_discussionTopicVersionId ON DiscussionTopicReplicate (discussionTopicPk, discussionTopicDestination, discussionTopicVersionId)'; stmtList.add_11rb$(element_51); var element_52 = 'CREATE INDEX index_DiscussionTopicReplicate_discussionTopicDestination_discussionTopicPending ON DiscussionTopicReplicate (discussionTopicDestination, discussionTopicPending)'; stmtList.add_11rb$(element_52); var element_53 = 'CREATE TABLE IF NOT EXISTS Message ( messageSenderPersonUid INTEGER NOT NULL , messageTableId INTEGER NOT NULL , messageEntityUid INTEGER NOT NULL , messageText TEXT , messageTimestamp INTEGER NOT NULL , messageClazzUid INTEGER NOT NULL , messageLct INTEGER NOT NULL , messageUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_53); var element_54 = 'CREATE TABLE IF NOT EXISTS MessageRead ( messageReadPersonUid INTEGER NOT NULL , messageReadMessageUid INTEGER NOT NULL , messageReadEntityUid INTEGER NOT NULL , messageReadLct INTEGER NOT NULL , messageReadUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_54); var element_55 = 'CREATE TABLE IF NOT EXISTS MessageReadReplicate ( messageReadPk INTEGER NOT NULL , messageReadVersionId INTEGER NOT NULL DEFAULT 0 , messageReadDestination INTEGER NOT NULL , messageReadPending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (messageReadPk, messageReadDestination) )'; stmtList.add_11rb$(element_55); var element_56 = 'CREATE INDEX index_MessageReadReplicate_messageReadPk_messageReadDestination_messageReadVersionId ON MessageReadReplicate (messageReadPk, messageReadDestination, messageReadVersionId)'; stmtList.add_11rb$(element_56); var element_57 = 'CREATE INDEX index_MessageReadReplicate_messageReadDestination_messageReadPending ON MessageReadReplicate (messageReadDestination, messageReadPending)'; stmtList.add_11rb$(element_57); var element_58 = 'CREATE TABLE IF NOT EXISTS MessageReplicate ( messagePk INTEGER NOT NULL , messageVersionId INTEGER NOT NULL DEFAULT 0 , messageDestination INTEGER NOT NULL , messagePending INTEGER NOT NULL DEFAULT 1 , PRIMARY KEY (messagePk, messageDestination) )'; stmtList.add_11rb$(element_58); var element_59 = 'CREATE INDEX index_MessageReplicate_messagePk_messageDestination_messageVersionId ON MessageReplicate (messagePk, messageDestination, messageVersionId)'; stmtList.add_11rb$(element_59); var element_60 = 'CREATE INDEX index_MessageReplicate_messageDestination_messagePending ON MessageReplicate (messageDestination, messagePending)'; stmtList.add_11rb$(element_60); var element_61 = 'DROP TABLE ClazzAssignment'; stmtList.add_11rb$(element_61); var element_62 = 'CREATE TABLE IF NOT EXISTS ClazzAssignment ( caTitle TEXT , caDescription TEXT , caGroupUid INTEGER NOT NULL DEFAULT 0 , caActive INTEGER NOT NULL , caClassCommentEnabled INTEGER NOT NULL , caPrivateCommentsEnabled INTEGER NOT NULL DEFAULT 1 , caCompletionCriteria INTEGER NOT NULL DEFAULT 100 , caRequireFileSubmission INTEGER NOT NULL DEFAULT 1 , caFileType INTEGER NOT NULL DEFAULT 0 , caSizeLimit INTEGER NOT NULL DEFAULT 50 , caNumberOfFiles INTEGER NOT NULL DEFAULT 1 , caSubmissionPolicy INTEGER NOT NULL DEFAULT 1 , caMarkingType INTEGER NOT NULL DEFAULT 1 , caRequireTextSubmission INTEGER NOT NULL DEFAULT 1 , caTextLimitType INTEGER NOT NULL DEFAULT 1 , caTextLimit INTEGER NOT NULL DEFAULT 500 , caXObjectUid INTEGER NOT NULL DEFAULT 0 , caClazzUid INTEGER NOT NULL , caLocalChangeSeqNum INTEGER NOT NULL , caMasterChangeSeqNum INTEGER NOT NULL , caLastChangedBy INTEGER NOT NULL , caLct INTEGER NOT NULL , caUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_62); var element_63 = 'CREATE INDEX index_ClazzAssignment_caClazzUid ON ClazzAssignment (caClazzUid)'; stmtList.add_11rb$(element_63); var element_64 = 'DROP TABLE ClazzAssignmentContentJoin'; stmtList.add_11rb$(element_64); var element_65 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoin ( cacjContentUid INTEGER NOT NULL , cacjAssignmentUid INTEGER NOT NULL , cacjActive INTEGER NOT NULL , cacjWeight INTEGER NOT NULL DEFAULT 0 , cacjMCSN INTEGER NOT NULL , cacjLCSN INTEGER NOT NULL , cacjLCB INTEGER NOT NULL , cacjLct INTEGER NOT NULL , cacjUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_65); var element_66 = 'DROP TABLE ClazzAssignmentRollUp'; stmtList.add_11rb$(element_66); var element_67 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentRollUp ( cachePersonUid INTEGER NOT NULL , cacheContentEntryUid INTEGER NOT NULL , cacheClazzAssignmentUid INTEGER NOT NULL , cacheStudentScore INTEGER NOT NULL , cacheMaxScore INTEGER NOT NULL , cacheFinalWeightScoreWithPenalty REAL NOT NULL DEFAULT 0 , cacheWeight INTEGER NOT NULL DEFAULT 0 , cacheProgress INTEGER NOT NULL , cacheContentComplete INTEGER NOT NULL , cacheSuccess INTEGER NOT NULL , cachePenalty INTEGER NOT NULL , lastCsnChecked INTEGER NOT NULL , cacheUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_67); var element_68 = 'CREATE UNIQUE INDEX index_ClazzAssignmentRollUp_cachePersonUid_cacheContentEntryUid_cacheClazzAssignmentUid ON ClazzAssignmentRollUp (cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid)'; stmtList.add_11rb$(element_68); var element_69 = 'DROP TABLE Comments'; stmtList.add_11rb$(element_69); var element_70 = 'CREATE TABLE IF NOT EXISTS Comments ( commentsText TEXT , commentsEntityType INTEGER NOT NULL , commentsEntityUid INTEGER NOT NULL , commentsPublic INTEGER NOT NULL , commentsStatus INTEGER NOT NULL , commentsPersonUid INTEGER NOT NULL , commentsToPersonUid INTEGER NOT NULL , commentSubmitterUid INTEGER NOT NULL , commentsFlagged INTEGER NOT NULL , commentsInActive INTEGER NOT NULL , commentsDateTimeAdded INTEGER NOT NULL , commentsDateTimeUpdated INTEGER NOT NULL , commentsMCSN INTEGER NOT NULL , commentsLCSN INTEGER NOT NULL , commentsLCB INTEGER NOT NULL , commentsLct INTEGER NOT NULL , commentsUid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL )'; stmtList.add_11rb$(element_70); var element_71 = 'ALTER TABLE Clazz ADD COLUMN clazzEnrolmentPolicy INTEGER NOT NULL DEFAULT 102 '; stmtList.add_11rb$(element_71); var element_72 = 'ALTER TABLE Clazz ADD COLUMN clazzTerminologyUid INTEGER NOT NULL DEFAULT 25966'; stmtList.add_11rb$(element_72); var element_73 = 'ALTER TABLE XObjectEntity ADD COLUMN objectStatementRefUid INTEGER NOT NULL DEFAULT 0'; stmtList.add_11rb$(element_73); var element_74 = ' CREATE TRIGGER ch_ins_127 AFTER INSERT ON Chat BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 127 AS chTableId, NEW.chatUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 127 AND chEntityPk = NEW.chatUid); END '; stmtList.add_11rb$(element_74); var element_75 = ' CREATE TRIGGER ch_upd_127 AFTER UPDATE ON Chat BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 127 AS chTableId, NEW.chatUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 127 AND chEntityPk = NEW.chatUid); END '; stmtList.add_11rb$(element_75); var element_76 = ' CREATE TRIGGER ch_del_127 AFTER DELETE ON Chat BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 127 AS chTableId, OLD.chatUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 127 AND chEntityPk = OLD.chatUid); END '; stmtList.add_11rb$(element_76); var element_77 = 'CREATE VIEW Chat_ReceiveView AS SELECT Chat.*, ChatReplicate.* FROM Chat LEFT JOIN ChatReplicate ON ChatReplicate.chatPk = Chat.chatUid '; stmtList.add_11rb$(element_77); var element_78 = ' CREATE TRIGGER chat_remote_insert_ins INSTEAD OF INSERT ON Chat_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Chat(chatUid, chatStartDate, chatTitle, chatGroup, chatLct) VALUES(NEW.chatUid, NEW.chatStartDate, NEW.chatTitle, NEW.chatGroup, NEW.chatLct) /*psql ON CONFLICT (chatUid) DO UPDATE SET chatStartDate = EXCLUDED.chatStartDate, chatTitle = EXCLUDED.chatTitle, chatGroup = EXCLUDED.chatGroup, chatLct = EXCLUDED.chatLct */ ; END '; stmtList.add_11rb$(element_78); var element_79 = ' CREATE TRIGGER ch_ins_128 AFTER INSERT ON ChatMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 128 AS chTableId, NEW.chatMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 128 AND chEntityPk = NEW.chatMemberUid); END '; stmtList.add_11rb$(element_79); var element_80 = ' CREATE TRIGGER ch_upd_128 AFTER UPDATE ON ChatMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 128 AS chTableId, NEW.chatMemberUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 128 AND chEntityPk = NEW.chatMemberUid); END '; stmtList.add_11rb$(element_80); var element_81 = ' CREATE TRIGGER ch_del_128 AFTER DELETE ON ChatMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 128 AS chTableId, OLD.chatMemberUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 128 AND chEntityPk = OLD.chatMemberUid); END '; stmtList.add_11rb$(element_81); var element_82 = 'CREATE VIEW ChatMember_ReceiveView AS SELECT ChatMember.*, ChatMemberReplicate.* FROM ChatMember LEFT JOIN ChatMemberReplicate ON ChatMemberReplicate.chatMemberPk = ChatMember.chatMemberUid '; stmtList.add_11rb$(element_82); var element_83 = ' CREATE TRIGGER chatmember_remote_insert_ins INSTEAD OF INSERT ON ChatMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ChatMember(chatMemberUid, chatMemberChatUid, chatMemberPersonUid, chatMemberJoinedDate, chatMemberLeftDate, chatMemberLct) VALUES(NEW.chatMemberUid, NEW.chatMemberChatUid, NEW.chatMemberPersonUid, NEW.chatMemberJoinedDate, NEW.chatMemberLeftDate, NEW.chatMemberLct) /*psql ON CONFLICT (chatMemberUid) DO UPDATE SET chatMemberChatUid = EXCLUDED.chatMemberChatUid, chatMemberPersonUid = EXCLUDED.chatMemberPersonUid, chatMemberJoinedDate = EXCLUDED.chatMemberJoinedDate, chatMemberLeftDate = EXCLUDED.chatMemberLeftDate, chatMemberLct = EXCLUDED.chatMemberLct */ ; END '; stmtList.add_11rb$(element_83); var element_84 = ' CREATE TRIGGER ch_ins_523 AFTER INSERT ON CourseAssignmentMark BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 523 AS chTableId, NEW.camUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 523 AND chEntityPk = NEW.camUid); END '; stmtList.add_11rb$(element_84); var element_85 = ' CREATE TRIGGER ch_upd_523 AFTER UPDATE ON CourseAssignmentMark BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 523 AS chTableId, NEW.camUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 523 AND chEntityPk = NEW.camUid); END '; stmtList.add_11rb$(element_85); var element_86 = ' CREATE TRIGGER ch_del_523 AFTER DELETE ON CourseAssignmentMark BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 523 AS chTableId, OLD.camUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 523 AND chEntityPk = OLD.camUid); END '; stmtList.add_11rb$(element_86); var element_87 = 'CREATE VIEW CourseAssignmentMark_ReceiveView AS SELECT CourseAssignmentMark.*, CourseAssignmentMarkReplicate.* FROM CourseAssignmentMark LEFT JOIN CourseAssignmentMarkReplicate ON CourseAssignmentMarkReplicate.camPk = CourseAssignmentMark.camUid '; stmtList.add_11rb$(element_87); var element_88 = ' CREATE TRIGGER courseassignmentmark_remote_insert_ins INSTEAD OF INSERT ON CourseAssignmentMark_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseAssignmentMark(camUid, camAssignmentUid, camSubmitterUid, camMark, camPenalty, camLct) VALUES (NEW.camUid, NEW.camAssignmentUid, NEW.camSubmitterUid, NEW.camMark, NEW.camPenalty, NEW.camLct) /*psql ON CONFLICT (camUid) DO UPDATE SET camAssignmentUid = EXCLUDED.camAssignmentUid, camSubmitterUid = EXCLUDED.camSubmitterUid, camMark = EXCLUDED.camMark, camPenalty = EXCLUDED.camPenalty, camLct = EXCLUDED.camLct */; END '; stmtList.add_11rb$(element_88); var element_89 = ' CREATE TRIGGER ch_ins_522 AFTER INSERT ON CourseAssignmentSubmission BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 522 AS chTableId, NEW.casUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 522 AND chEntityPk = NEW.casUid); END '; stmtList.add_11rb$(element_89); var element_90 = ' CREATE TRIGGER ch_upd_522 AFTER UPDATE ON CourseAssignmentSubmission BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 522 AS chTableId, NEW.casUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 522 AND chEntityPk = NEW.casUid); END '; stmtList.add_11rb$(element_90); var element_91 = ' CREATE TRIGGER ch_del_522 AFTER DELETE ON CourseAssignmentSubmission BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 522 AS chTableId, OLD.casUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 522 AND chEntityPk = OLD.casUid); END '; stmtList.add_11rb$(element_91); var element_92 = 'CREATE VIEW CourseAssignmentSubmission_ReceiveView AS SELECT CourseAssignmentSubmission.*, CourseAssignmentSubmissionReplicate.* FROM CourseAssignmentSubmission LEFT JOIN CourseAssignmentSubmissionReplicate ON CourseAssignmentSubmissionReplicate.casPk = CourseAssignmentSubmission.casUid '; stmtList.add_11rb$(element_92); var element_93 = ' CREATE TRIGGER courseassignmentsubmission_remote_insert_ins INSTEAD OF INSERT ON CourseAssignmentSubmission_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseAssignmentSubmission(casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp) VALUES (NEW.casUid, NEW.casAssignmentUid, NEW.casSubmitterUid, NEW.casSubmitterPersonUid, NEW.casText, NEW.casType, NEW.casTimestamp) /*psql ON CONFLICT (casUid) DO UPDATE SET casAssignmentUid = EXCLUDED.casAssignmentUid, casSubmitterUid = EXCLUDED.casSubmitterUid, casSubmitterPersonUid = EXCLUDED.casSubmitterPersonUid, casText = EXCLUDED.casText, casType = EXCLUDED.casType, casTimestamp = EXCLUDED.casTimestamp */; END '; stmtList.add_11rb$(element_93); var element_94 = ' CREATE TRIGGER ch_ins_90 AFTER INSERT ON CourseAssignmentSubmissionAttachment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 90 AS chTableId, NEW.casaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 90 AND chEntityPk = NEW.casaUid); END '; stmtList.add_11rb$(element_94); var element_95 = ' CREATE TRIGGER ch_upd_90 AFTER UPDATE ON CourseAssignmentSubmissionAttachment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 90 AS chTableId, NEW.casaUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 90 AND chEntityPk = NEW.casaUid); END '; stmtList.add_11rb$(element_95); var element_96 = ' CREATE TRIGGER ch_del_90 AFTER DELETE ON CourseAssignmentSubmissionAttachment BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 90 AS chTableId, OLD.casaUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 90 AND chEntityPk = OLD.casaUid); END '; stmtList.add_11rb$(element_96); var element_97 = 'CREATE VIEW CourseAssignmentSubmissionAttachment_ReceiveView AS SELECT CourseAssignmentSubmissionAttachment.*, CourseAssignmentSubmissionAttachmentReplicate.* FROM CourseAssignmentSubmissionAttachment LEFT JOIN CourseAssignmentSubmissionAttachmentReplicate ON CourseAssignmentSubmissionAttachmentReplicate.casaPk = CourseAssignmentSubmissionAttachment.casaUid '; stmtList.add_11rb$(element_97); var element_98 = ' CREATE TRIGGER courseassignmentsubmissionattachment_remote_insert_ins INSTEAD OF INSERT ON CourseAssignmentSubmissionAttachment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseAssignmentSubmissionAttachment(casaUid, casaSubmissionUid, casaMimeType, casaUri, casaMd5, casaSize, casaTimestamp) VALUES (NEW.casaUid, NEW.casaSubmissionUid, NEW.casaMimeType, NEW.casaUri, NEW.casaMd5, NEW.casaSize, NEW.casaTimestamp) /*psql ON CONFLICT (casaUid) DO UPDATE SET casaSubmissionUid = EXCLUDED.casaSubmissionUid, casaMimeType = EXCLUDED.casaMimeType, casaUri = EXCLUDED.casaUri, casaMd5 = EXCLUDED.casaMd5, casaSize = EXCLUDED.casaSize, casaTimestamp = EXCLUDED.casaTimestamp */; END '; stmtList.add_11rb$(element_98); var element_99 = trimMargin('\n |\n | CREATE TRIGGER ATTUPD_CourseAssignmentSubmissionAttachment\n | AFTER UPDATE ON CourseAssignmentSubmissionAttachment FOR EACH ROW WHEN\n | OLD.casaMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.casaUri AS zaUri\n | FROM CourseAssignmentSubmissionAttachment \n | WHERE CourseAssignmentSubmissionAttachment.casaUid = OLD.casaUid\n | AND (SELECT COUNT(*) \n | FROM CourseAssignmentSubmissionAttachment\n | WHERE casaMd5 = OLD.casaMd5) = 0\n | ; \n | END\n | \n '); stmtList.add_11rb$(element_99); var element_100 = ' CREATE TRIGGER ch_ins_124 AFTER INSERT ON CourseBlock BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 124 AS chTableId, NEW.cbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 124 AND chEntityPk = NEW.cbUid); END '; stmtList.add_11rb$(element_100); var element_101 = ' CREATE TRIGGER ch_upd_124 AFTER UPDATE ON CourseBlock BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 124 AS chTableId, NEW.cbUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 124 AND chEntityPk = NEW.cbUid); END '; stmtList.add_11rb$(element_101); var element_102 = ' CREATE TRIGGER ch_del_124 AFTER DELETE ON CourseBlock BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 124 AS chTableId, OLD.cbUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 124 AND chEntityPk = OLD.cbUid); END '; stmtList.add_11rb$(element_102); var element_103 = 'CREATE VIEW CourseBlock_ReceiveView AS SELECT CourseBlock.*, CourseBlockReplicate.* FROM CourseBlock LEFT JOIN CourseBlockReplicate ON CourseBlockReplicate.cbPk = CourseBlock.cbUid '; stmtList.add_11rb$(element_103); var element_104 = ' CREATE TRIGGER courseblock_remote_insert_ins INSTEAD OF INSERT ON CourseBlock_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseBlock(cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints,cbMinPoints, cbIndex, cbClazzUid, cbActive,cbHidden, cbEntityUid, cbLct) VALUES (NEW.cbUid, NEW.cbType, NEW.cbIndentLevel, NEW.cbModuleParentBlockUid, NEW.cbTitle, NEW.cbDescription, NEW.cbCompletionCriteria, NEW.cbHideUntilDate, NEW.cbDeadlineDate, NEW.cbLateSubmissionPenalty, NEW.cbGracePeriodDate, NEW.cbMaxPoints,NEW.cbMinPoints, NEW.cbIndex, NEW.cbClazzUid,NEW.cbActive, NEW.cbHidden, NEW.cbEntityUid, NEW.cbLct) /*psql ON CONFLICT (cbUid) DO UPDATE SET cbType = EXCLUDED.cbType, cbIndentLevel = EXCLUDED.cbIndentLevel, cbModuleParentBlockUid = EXCLUDED.cbModuleParentBlockUid, cbTitle = EXCLUDED.cbTitle, cbDescription = EXCLUDED.cbDescription, cbCompletionCriteria = EXCLUDED.cbCompletionCriteria, cbHideUntilDate = EXCLUDED.cbHideUntilDate,cbDeadlineDate = EXCLUDED.cbDeadlineDate, cbLateSubmissionPenalty = EXCLUDED.cbLateSubmissionPenalty, cbGracePeriodDate= EXCLUDED.cbGracePeriodDate, cbMaxPoints = EXCLUDED.cbMaxPoints, cbMinPoints = EXCLUDED.cbMinPoints, cbIndex = EXCLUDED.cbIndex,cbClazzUid = EXCLUDED.cbClazzUid, cbActive = EXCLUDED.cbActive, cbHidden = EXCLUDED.cbHidden, cbEntityUid = EXCLUDED.cbEntityUid, cbLct = EXCLUDED.cbLct */; END '; stmtList.add_11rb$(element_104); var element_105 = ' CREATE TRIGGER ch_ins_130 AFTER INSERT ON CourseDiscussion BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 130 AS chTableId, NEW.courseDiscussionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 130 AND chEntityPk = NEW.courseDiscussionUid); END '; stmtList.add_11rb$(element_105); var element_106 = ' CREATE TRIGGER ch_upd_130 AFTER UPDATE ON CourseDiscussion BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 130 AS chTableId, NEW.courseDiscussionUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 130 AND chEntityPk = NEW.courseDiscussionUid); END '; stmtList.add_11rb$(element_106); var element_107 = ' CREATE TRIGGER ch_del_130 AFTER DELETE ON CourseDiscussion BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 130 AS chTableId, OLD.courseDiscussionUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 130 AND chEntityPk = OLD.courseDiscussionUid); END '; stmtList.add_11rb$(element_107); var element_108 = 'CREATE VIEW CourseDiscussion_ReceiveView AS SELECT CourseDiscussion.*, CourseDiscussionReplicate.* FROM CourseDiscussion LEFT JOIN CourseDiscussionReplicate ON CourseDiscussionReplicate.courseDiscussionPk = CourseDiscussion.courseDiscussionUid '; stmtList.add_11rb$(element_108); var element_109 = ' CREATE TRIGGER coursediscussion_remote_insert_ins INSTEAD OF INSERT ON CourseDiscussion_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseDiscussion(courseDiscussionUid, courseDiscussionActive, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionLct) VALUES(NEW.courseDiscussionUid, NEW.courseDiscussionActive, NEW.courseDiscussionTitle, NEW.courseDiscussionDesc, NEW.courseDiscussionClazzUid, NEW.courseDiscussionLct) /*psql ON CONFLICT (courseDiscussionUid) DO UPDATE SET courseDiscussionActive = EXCLUDED.courseDiscussionActive, courseDiscussionTitle = EXCLUDED.courseDiscussionTitle, courseDiscussionDesc = EXCLUDED.courseDiscussionDesc, courseDiscussionClazzUid = EXCLUDED.courseDiscussionClazzUid, courseDiscussionLct = EXCLUDED.courseDiscussionLct */ ; END '; stmtList.add_11rb$(element_109); var element_110 = ' CREATE TRIGGER ch_ins_243 AFTER INSERT ON CourseGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 243 AS chTableId, NEW.cgmUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 243 AND chEntityPk = NEW.cgmUid); END '; stmtList.add_11rb$(element_110); var element_111 = ' CREATE TRIGGER ch_upd_243 AFTER UPDATE ON CourseGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 243 AS chTableId, NEW.cgmUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 243 AND chEntityPk = NEW.cgmUid); END '; stmtList.add_11rb$(element_111); var element_112 = ' CREATE TRIGGER ch_del_243 AFTER DELETE ON CourseGroupMember BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 243 AS chTableId, OLD.cgmUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 243 AND chEntityPk = OLD.cgmUid); END '; stmtList.add_11rb$(element_112); var element_113 = 'CREATE VIEW CourseGroupMember_ReceiveView AS SELECT CourseGroupMember.*, CourseGroupMemberReplicate.* FROM CourseGroupMember LEFT JOIN CourseGroupMemberReplicate ON CourseGroupMemberReplicate.cgmPk = CourseGroupMember.cgmUid '; stmtList.add_11rb$(element_113); var element_114 = ' CREATE TRIGGER coursegroupmember_remote_insert_ins INSTEAD OF INSERT ON CourseGroupMember_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseGroupMember(cgmUid, cgmSetUid, cgmGroupNumber, cgmPersonUid, cgmLct) VALUES (NEW.cgmUid, NEW.cgmSetUid, NEW.cgmGroupNumber, NEW.cgmPersonUid, NEW.cgmLct) /*psql ON CONFLICT (cgmUid) DO UPDATE SET cgmSetUid = EXCLUDED.cgmSetUid, cgmGroupNumber = EXCLUDED.cgmGroupNumber, cgmPersonUid = EXCLUDED.cgmPersonUid, cgmLct = EXCLUDED.cgmLct */; END '; stmtList.add_11rb$(element_114); var element_115 = ' CREATE TRIGGER ch_ins_242 AFTER INSERT ON CourseGroupSet BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 242 AS chTableId, NEW.cgsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 242 AND chEntityPk = NEW.cgsUid); END '; stmtList.add_11rb$(element_115); var element_116 = ' CREATE TRIGGER ch_upd_242 AFTER UPDATE ON CourseGroupSet BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 242 AS chTableId, NEW.cgsUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 242 AND chEntityPk = NEW.cgsUid); END '; stmtList.add_11rb$(element_116); var element_117 = ' CREATE TRIGGER ch_del_242 AFTER DELETE ON CourseGroupSet BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 242 AS chTableId, OLD.cgsUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 242 AND chEntityPk = OLD.cgsUid); END '; stmtList.add_11rb$(element_117); var element_118 = 'CREATE VIEW CourseGroupSet_ReceiveView AS SELECT CourseGroupSet.*, CourseGroupSetReplicate.* FROM CourseGroupSet LEFT JOIN CourseGroupSetReplicate ON CourseGroupSetReplicate.cgsPk = CourseGroupSet.cgsUid '; stmtList.add_11rb$(element_118); var element_119 = ' CREATE TRIGGER coursegroupset_remote_insert_ins INSTEAD OF INSERT ON CourseGroupSet_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseGroupSet(cgsUid, cgsName, cgsTotalGroups, cgsActive, cgsClazzUid, cgsLct) VALUES (NEW.cgsUid, NEW.cgsName, NEW.cgsTotalGroups, NEW.cgsActive, NEW.cgsClazzUid, NEW.cgsLct) /*psql ON CONFLICT (cgsUid) DO UPDATE SET cgsName = EXCLUDED.cgsName, cgsTotalGroups = EXCLUDED.cgsTotalGroups, cgsActive = EXCLUDED.cgsActive, cgsClazzUid = EXCLUDED.cgsClazzUid, cgsLct = EXCLUDED.cgsLct */; END '; stmtList.add_11rb$(element_119); var element_120 = ' CREATE TRIGGER ch_ins_125 AFTER INSERT ON CoursePicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 125 AS chTableId, NEW.coursePictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 125 AND chEntityPk = NEW.coursePictureUid); END '; stmtList.add_11rb$(element_120); var element_121 = ' CREATE TRIGGER ch_upd_125 AFTER UPDATE ON CoursePicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 125 AS chTableId, NEW.coursePictureUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 125 AND chEntityPk = NEW.coursePictureUid); END '; stmtList.add_11rb$(element_121); var element_122 = ' CREATE TRIGGER ch_del_125 AFTER DELETE ON CoursePicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 125 AS chTableId, OLD.coursePictureUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 125 AND chEntityPk = OLD.coursePictureUid); END '; stmtList.add_11rb$(element_122); var element_123 = 'CREATE VIEW CoursePicture_ReceiveView AS SELECT CoursePicture.*, CoursePictureReplicate.* FROM CoursePicture LEFT JOIN CoursePictureReplicate ON CoursePictureReplicate.cpPk = CoursePicture.coursePictureUid '; stmtList.add_11rb$(element_123); var element_124 = ' CREATE TRIGGER coursepicture_remote_insert_ins INSTEAD OF INSERT ON CoursePicture_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CoursePicture(coursePictureUid, coursePictureClazzUid, coursePictureMasterCsn, coursePictureLocalCsn, coursePictureLastChangedBy, coursePictureLct, coursePictureUri, coursePictureMd5, coursePictureFileSize, coursePictureTimestamp, coursePictureMimeType, coursePictureActive) VALUES (NEW.coursePictureUid, NEW.coursePictureClazzUid, NEW.coursePictureMasterCsn, NEW.coursePictureLocalCsn, NEW.coursePictureLastChangedBy, NEW.coursePictureLct, NEW.coursePictureUri, NEW.coursePictureMd5, NEW.coursePictureFileSize, NEW.coursePictureTimestamp, NEW.coursePictureMimeType, NEW.coursePictureActive) /*psql ON CONFLICT (coursePictureUid) DO UPDATE SET coursePictureClazzUid = EXCLUDED.coursePictureClazzUid, coursePictureMasterCsn = EXCLUDED.coursePictureMasterCsn, coursePictureLocalCsn = EXCLUDED.coursePictureLocalCsn, coursePictureLastChangedBy = EXCLUDED.coursePictureLastChangedBy, coursePictureLct = EXCLUDED.coursePictureLct, coursePictureUri = EXCLUDED.coursePictureUri, coursePictureMd5 = EXCLUDED.coursePictureMd5, coursePictureFileSize = EXCLUDED.coursePictureFileSize, coursePictureTimestamp = EXCLUDED.coursePictureTimestamp, coursePictureMimeType = EXCLUDED.coursePictureMimeType, coursePictureActive = EXCLUDED.coursePictureActive */; END '; stmtList.add_11rb$(element_124); var element_125 = trimMargin('\n |\n | CREATE TRIGGER ATTUPD_CoursePicture\n | AFTER UPDATE ON CoursePicture FOR EACH ROW WHEN\n | OLD.coursePictureMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.coursePictureUri AS zaUri\n | FROM CoursePicture \n | WHERE CoursePicture.coursePictureUid = OLD.coursePictureUid\n | AND (SELECT COUNT(*) \n | FROM CoursePicture\n | WHERE coursePictureMd5 = OLD.coursePictureMd5) = 0\n | ; \n | END\n | \n '); stmtList.add_11rb$(element_125); var element_126 = ' CREATE TRIGGER ch_ins_450 AFTER INSERT ON CourseTerminology BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 450 AS chTableId, NEW.ctUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 450 AND chEntityPk = NEW.ctUid); END '; stmtList.add_11rb$(element_126); var element_127 = ' CREATE TRIGGER ch_upd_450 AFTER UPDATE ON CourseTerminology BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 450 AS chTableId, NEW.ctUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 450 AND chEntityPk = NEW.ctUid); END '; stmtList.add_11rb$(element_127); var element_128 = ' CREATE TRIGGER ch_del_450 AFTER DELETE ON CourseTerminology BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 450 AS chTableId, OLD.ctUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 450 AND chEntityPk = OLD.ctUid); END '; stmtList.add_11rb$(element_128); var element_129 = 'CREATE VIEW CourseTerminology_ReceiveView AS SELECT CourseTerminology.*, CourseTerminologyReplicate.* FROM CourseTerminology LEFT JOIN CourseTerminologyReplicate ON CourseTerminologyReplicate.ctPk = CourseTerminology.ctUid '; stmtList.add_11rb$(element_129); var element_130 = ' CREATE TRIGGER courseterminology_remote_insert_ins INSTEAD OF INSERT ON CourseTerminology_ReceiveView FOR EACH ROW BEGIN REPLACE INTO CourseTerminology(ctUid, ctTitle, ctTerminology, ctLct) VALUES (NEW.ctUid, NEW.ctTitle, NEW.ctTerminology, NEW.ctLct) /*psql ON CONFLICT (ctUid) DO UPDATE SET ctTitle = EXCLUDED.ctTitle, ctTerminology = EXCLUDED.ctTerminology, ctLct = EXCLUDED.ctLct */; END '; stmtList.add_11rb$(element_130); var element_131 = ' CREATE TRIGGER ch_ins_132 AFTER INSERT ON DiscussionPost BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 132 AS chTableId, NEW.discussionPostUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 132 AND chEntityPk = NEW.discussionPostUid); END '; stmtList.add_11rb$(element_131); var element_132 = ' CREATE TRIGGER ch_upd_132 AFTER UPDATE ON DiscussionPost BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 132 AS chTableId, NEW.discussionPostUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 132 AND chEntityPk = NEW.discussionPostUid); END '; stmtList.add_11rb$(element_132); var element_133 = ' CREATE TRIGGER ch_del_132 AFTER DELETE ON DiscussionPost BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 132 AS chTableId, OLD.discussionPostUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 132 AND chEntityPk = OLD.discussionPostUid); END '; stmtList.add_11rb$(element_133); var element_134 = 'CREATE VIEW DiscussionPost_ReceiveView AS SELECT DiscussionPost.*, DiscussionPostReplicate.* FROM DiscussionPost LEFT JOIN DiscussionPostReplicate ON DiscussionPostReplicate.discussionPostPk = DiscussionPost.discussionPostUid '; stmtList.add_11rb$(element_134); var element_135 = ' CREATE TRIGGER discussionpost_remote_insert_ins INSTEAD OF INSERT ON DiscussionPost_ReceiveView FOR EACH ROW BEGIN REPLACE INTO DiscussionPost(discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct) VALUES(NEW.discussionPostUid, NEW.discussionPostTitle, NEW.discussionPostMessage, NEW.discussionPostStartDate, NEW.discussionPostDiscussionTopicUid, NEW.discussionPostVisible, NEW.discussionPostArchive, NEW.discussionPostStartedPersonUid, NEW.discussionPostClazzUid, NEW.discussionPostLct) /*psql ON CONFLICT (discussionPostUid) DO UPDATE SET discussionPostTitle = EXCLUDED.discussionPostTitle , discussionPostMessage = EXCLUDED.discussionPostMessage , discussionPostStartDate = EXCLUDED.discussionPostStartDate , discussionPostDiscussionTopicUid = EXCLUDED.discussionPostDiscussionTopicUid, discussionPostVisible = EXCLUDED.discussionPostVisible , discussionPostArchive = EXCLUDED.discussionPostArchive , discussionPostStartedPersonUid = EXCLUDED.discussionPostStartedPersonUid , discussionPostClazzUid = EXCLUDED.discussionPostClazzUid, discussionPostLct = EXCLUDED.discussionPostLct */ ; END '; stmtList.add_11rb$(element_135); var element_136 = ' CREATE TRIGGER ch_ins_131 AFTER INSERT ON DiscussionTopic BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 131 AS chTableId, NEW.discussionTopicUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 131 AND chEntityPk = NEW.discussionTopicUid); END '; stmtList.add_11rb$(element_136); var element_137 = ' CREATE TRIGGER ch_upd_131 AFTER UPDATE ON DiscussionTopic BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 131 AS chTableId, NEW.discussionTopicUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 131 AND chEntityPk = NEW.discussionTopicUid); END '; stmtList.add_11rb$(element_137); var element_138 = ' CREATE TRIGGER ch_del_131 AFTER DELETE ON DiscussionTopic BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 131 AS chTableId, OLD.discussionTopicUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 131 AND chEntityPk = OLD.discussionTopicUid); END '; stmtList.add_11rb$(element_138); var element_139 = 'CREATE VIEW DiscussionTopic_ReceiveView AS SELECT DiscussionTopic.*, DiscussionTopicReplicate.* FROM DiscussionTopic LEFT JOIN DiscussionTopicReplicate ON DiscussionTopicReplicate.discussionTopicPk = DiscussionTopic.discussionTopicUid '; stmtList.add_11rb$(element_139); var element_140 = ' CREATE TRIGGER discussiontopic_remote_insert_ins INSTEAD OF INSERT ON DiscussionTopic_ReceiveView FOR EACH ROW BEGIN REPLACE INTO DiscussionTopic(discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(NEW.discussionTopicUid, NEW.discussionTopicTitle, NEW.discussionTopicDesc, NEW.discussionTopicStartDate, NEW.discussionTopicCourseDiscussionUid, NEW.discussionTopicVisible, NEW.discussionTopicArchive, NEW.discussionTopicIndex, NEW.discussionTopicClazzUid, NEW.discussionTopicLct) /*psql ON CONFLICT (discussionTopicUid) DO UPDATE SET discussionTopicTitle = EXCLUDED.discussionTopicTitle, discussionTopicDesc = EXCLUDED.discussionTopicDesc, discussionTopicStartDate = EXCLUDED.discussionTopicStartDate, discussionTopicCourseDiscussionUid = EXCLUDED.discussionTopicCourseDiscussionUid, discussionTopicVisible = EXCLUDED.discussionTopicVisible, discussionTopicArchive = EXCLUDED.discussionTopicArchive, discussionTopicIndex = EXCLUDED.discussionTopicIndex, discussionTopicClazzUid = EXCLUDED.discussionTopicClazzUid, discussionTopicLct = EXCLUDED.discussionTopicLct */ ; END '; stmtList.add_11rb$(element_140); var element_141 = ' CREATE TRIGGER ch_ins_126 AFTER INSERT ON Message BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 126 AS chTableId, NEW.messageUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 126 AND chEntityPk = NEW.messageUid); END '; stmtList.add_11rb$(element_141); var element_142 = ' CREATE TRIGGER ch_upd_126 AFTER UPDATE ON Message BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 126 AS chTableId, NEW.messageUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 126 AND chEntityPk = NEW.messageUid); END '; stmtList.add_11rb$(element_142); var element_143 = ' CREATE TRIGGER ch_del_126 AFTER DELETE ON Message BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 126 AS chTableId, OLD.messageUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 126 AND chEntityPk = OLD.messageUid); END '; stmtList.add_11rb$(element_143); var element_144 = 'CREATE VIEW Message_ReceiveView AS SELECT Message.*, MessageReplicate.* FROM Message LEFT JOIN MessageReplicate ON MessageReplicate.messagePk = Message.messageUid '; stmtList.add_11rb$(element_144); var element_145 = ' CREATE TRIGGER message_remote_insert_ins INSTEAD OF INSERT ON Message_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Message(messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct) VALUES(NEW.messageUid, NEW.messageSenderPersonUid, NEW.messageTableId, NEW.messageEntityUid, NEW.messageText, NEW.messageTimestamp, NEW.messageClazzUid, NEW.messageLct) /*psql ON CONFLICT (messageUid) DO UPDATE SET messageSenderPersonUid = EXCLUDED.messageSenderPersonUid, messageTableId = EXCLUDED.messageTableId, messageEntityUid = EXCLUDED.messageEntityUid, messageText = EXCLUDED.messageText, messageTimestamp = EXCLUDED.messageTimestamp, messageClazzUid = EXCLUDED.messageClazzUid, messageLct = EXCLUDED.messageLct */ ; END '; stmtList.add_11rb$(element_145); var element_146 = ' CREATE TRIGGER ch_ins_129 AFTER INSERT ON MessageRead BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 129 AS chTableId, NEW.messageReadUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 129 AND chEntityPk = NEW.messageReadUid); END '; stmtList.add_11rb$(element_146); var element_147 = ' CREATE TRIGGER ch_upd_129 AFTER UPDATE ON MessageRead BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 129 AS chTableId, NEW.messageReadUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 129 AND chEntityPk = NEW.messageReadUid); END '; stmtList.add_11rb$(element_147); var element_148 = ' CREATE TRIGGER ch_del_129 AFTER DELETE ON MessageRead BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 129 AS chTableId, OLD.messageReadUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 129 AND chEntityPk = OLD.messageReadUid); END '; stmtList.add_11rb$(element_148); var element_149 = 'CREATE VIEW MessageRead_ReceiveView AS SELECT MessageRead.*, MessageReadReplicate.* FROM MessageRead LEFT JOIN MessageReadReplicate ON MessageReadReplicate.messageReadPk = MessageRead.messageReadUid '; stmtList.add_11rb$(element_149); var element_150 = ' CREATE TRIGGER messageread_remote_insert_ins INSTEAD OF INSERT ON MessageRead_ReceiveView FOR EACH ROW BEGIN REPLACE INTO MessageRead(messageReadUid, messageReadPersonUid, messageReadMessageUid, messageReadEntityUid, messageReadLct) VALUES(NEW.messageReadUid, NEW.messageReadPersonUid, NEW.messageReadMessageUid, NEW.messageReadEntityUid, NEW.messageReadLct) /*psql ON CONFLICT (messageReadUid) DO UPDATE SET messageReadPersonUid = EXCLUDED.messageReadPersonUid, messageReadMessageUid = EXCLUDED.messageReadMessageUid, messageReadEntityUid = EXCLUDED.messageReadEntityUid, messageReadLct = EXCLUDED.messageReadLct */ ; END '; stmtList.add_11rb$(element_150); var element_151 = 'DROP VIEW IF EXISTS ClazzAssignment_ReceiveView'; stmtList.add_11rb$(element_151); var element_152 = 'DROP TRIGGER IF EXISTS clazzassignment_remote_insert_ins'; stmtList.add_11rb$(element_152); var element_153 = 'DROP TRIGGER IF EXISTS ch_ins_521'; stmtList.add_11rb$(element_153); var element_154 = 'DROP TRIGGER IF EXISTS ch_upd_521'; stmtList.add_11rb$(element_154); var element_155 = 'DROP TRIGGER IF EXISTS ch_del_521'; stmtList.add_11rb$(element_155); var element_156 = 'CREATE VIEW ClazzAssignment_ReceiveView AS SELECT ClazzAssignment.*, ClazzAssignmentReplicate.* FROM ClazzAssignment LEFT JOIN ClazzAssignmentReplicate ON ClazzAssignmentReplicate.caPk = ClazzAssignment.caUid '; stmtList.add_11rb$(element_156); var element_157 = ' CREATE TRIGGER clazzassignment_remote_insert_ins INSTEAD OF INSERT ON ClazzAssignment_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ClazzAssignment(caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES (NEW.caUid, NEW.caTitle, NEW.caDescription, NEW.caGroupUid, NEW.caActive, NEW.caClassCommentEnabled, NEW.caPrivateCommentsEnabled, NEW.caRequireFileSubmission, NEW.caFileType, NEW.caSizeLimit, NEW.caNumberOfFiles, NEW.caSubmissionPolicy, NEW.caMarkingType,NEW.caRequireTextSubmission, NEW.caTextLimitType, NEW.caTextLimit, NEW.caXObjectUid, NEW.caClazzUid, NEW.caLocalChangeSeqNum, NEW.caMasterChangeSeqNum, NEW.caLastChangedBy, NEW.caLct) /*psql ON CONFLICT (caUid) DO UPDATE SET caTitle = EXCLUDED.caTitle, caDescription = EXCLUDED.caDescription, caGroupUid = EXCLUDED.caGroupUid, caActive = EXCLUDED.caActive, caClassCommentEnabled = EXCLUDED.caClassCommentEnabled, caPrivateCommentsEnabled = EXCLUDED.caPrivateCommentsEnabled, caRequireFileSubmission = EXCLUDED.caRequireFileSubmission, caFileType = EXCLUDED.caFileType, caSizeLimit = EXCLUDED.caSizeLimit, caNumberOfFiles = EXCLUDED.caNumberOfFiles, caSubmissionPolicy = EXCLUDED.caSubmissionPolicy, caMarkingType = EXCLUDED.caMarkingType, caRequireTextSubmission = EXCLUDED.caRequireTextSubmission, caTextLimitType = EXCLUDED.caTextLimitType, caTextLimit = EXCLUDED.caTextLimit, caXObjectUid = EXCLUDED.caXObjectUid, caClazzUid = EXCLUDED.caClazzUid, caLocalChangeSeqNum = EXCLUDED.caLocalChangeSeqNum, caMasterChangeSeqNum = EXCLUDED.caMasterChangeSeqNum, caLastChangedBy = EXCLUDED.caLastChangedBy, caLct = EXCLUDED.caLct */; END '; stmtList.add_11rb$(element_157); var element_158 = ' CREATE TRIGGER ch_ins_521 AFTER INSERT ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, NEW.cacjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = NEW.cacjUid); END '; stmtList.add_11rb$(element_158); var element_159 = ' CREATE TRIGGER ch_upd_521 AFTER UPDATE ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, NEW.cacjUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = NEW.cacjUid); END '; stmtList.add_11rb$(element_159); var element_160 = ' CREATE TRIGGER ch_del_521 AFTER DELETE ON ClazzAssignmentContentJoin BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 521 AS chTableId, OLD.cacjUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 521 AND chEntityPk = OLD.cacjUid); END '; stmtList.add_11rb$(element_160); var element_161 = 'DROP VIEW IF EXISTS ClazzAssignmentContentJoin_ReceiveView'; stmtList.add_11rb$(element_161); var element_162 = 'DROP TRIGGER IF EXISTS clazzassignmentcontentjoin_remote_insert_ins'; stmtList.add_11rb$(element_162); var element_163 = 'DROP TRIGGER IF EXISTS ch_ins_522'; stmtList.add_11rb$(element_163); var element_164 = 'DROP TRIGGER IF EXISTS ch_upd_522'; stmtList.add_11rb$(element_164); var element_165 = 'DROP TRIGGER IF EXISTS ch_del_522'; stmtList.add_11rb$(element_165); var element_166 = 'DROP VIEW IF EXISTS Comments_ReceiveView'; stmtList.add_11rb$(element_166); var element_167 = 'DROP TRIGGER IF EXISTS comments_remote_insert_ins'; stmtList.add_11rb$(element_167); var element_168 = 'DROP TRIGGER IF EXISTS ch_ins_101'; stmtList.add_11rb$(element_168); var element_169 = 'DROP TRIGGER IF EXISTS ch_upd_101'; stmtList.add_11rb$(element_169); var element_170 = 'DROP TRIGGER IF EXISTS ch_del_101'; stmtList.add_11rb$(element_170); var element_171 = 'CREATE VIEW Comments_ReceiveView AS SELECT Comments.*, CommentsReplicate.* FROM Comments LEFT JOIN CommentsReplicate ON CommentsReplicate.commentsPk = Comments.commentsUid '; stmtList.add_11rb$(element_171); var element_172 = ' CREATE TRIGGER comments_remote_insert_ins INSTEAD OF INSERT ON Comments_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Comments(commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES (NEW.commentsUid, NEW.commentsText, NEW.commentsEntityType, NEW.commentsEntityUid, NEW.commentsPublic, NEW.commentsStatus, NEW.commentsPersonUid, NEW.commentsToPersonUid, NEW.commentSubmitterUid, NEW.commentsFlagged, NEW.commentsInActive, NEW.commentsDateTimeAdded, NEW.commentsDateTimeUpdated, NEW.commentsMCSN, NEW.commentsLCSN, NEW.commentsLCB, NEW.commentsLct) /*psql ON CONFLICT (commentsUid) DO UPDATE SET commentsText = EXCLUDED.commentsText, commentsEntityType = EXCLUDED.commentsEntityType, commentsEntityUid = EXCLUDED.commentsEntityUid, commentsPublic = EXCLUDED.commentsPublic, commentsStatus = EXCLUDED.commentsStatus, commentsPersonUid = EXCLUDED.commentsPersonUid, commentsToPersonUid = EXCLUDED.commentsToPersonUid, commentSubmitterUid = EXCLUDED.commentSubmitterUid, commentsFlagged = EXCLUDED.commentsFlagged, commentsInActive = EXCLUDED.commentsInActive, commentsDateTimeAdded = EXCLUDED.commentsDateTimeAdded, commentsDateTimeUpdated = EXCLUDED.commentsDateTimeUpdated, commentsMCSN = EXCLUDED.commentsMCSN, commentsLCSN = EXCLUDED.commentsLCSN, commentsLCB = EXCLUDED.commentsLCB, commentsLct = EXCLUDED.commentsLct */; END '; stmtList.add_11rb$(element_172); var element_173 = ' CREATE TRIGGER ch_ins_101 AFTER INSERT ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, NEW.reportUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = NEW.reportUid); END '; stmtList.add_11rb$(element_173); var element_174 = ' CREATE TRIGGER ch_upd_101 AFTER UPDATE ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, NEW.reportUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = NEW.reportUid); END '; stmtList.add_11rb$(element_174); var element_175 = ' CREATE TRIGGER ch_del_101 AFTER DELETE ON Report BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 101 AS chTableId, OLD.reportUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 101 AND chEntityPk = OLD.reportUid); END '; stmtList.add_11rb$(element_175); } else { var element_176 = 'CREATE TABLE IF NOT EXISTS Chat ( chatStartDate BIGINT NOT NULL , chatTitle TEXT , chatGroup BOOL NOT NULL , chatLct BIGINT NOT NULL , chatUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_176); var element_177 = 'CREATE TABLE IF NOT EXISTS ChatMember ( chatMemberChatUid BIGINT NOT NULL , chatMemberPersonUid BIGINT NOT NULL , chatMemberJoinedDate BIGINT NOT NULL , chatMemberLeftDate BIGINT NOT NULL , chatMemberLct BIGINT NOT NULL , chatMemberUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_177); var element_178 = 'CREATE TABLE IF NOT EXISTS ChatReplicate ( chatPk BIGINT NOT NULL , chatVersionId BIGINT NOT NULL DEFAULT 0 , chatDestination BIGINT NOT NULL , chatPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (chatPk, chatDestination) )'; stmtList.add_11rb$(element_178); var element_179 = 'CREATE INDEX index_ChatReplicate_chatPk_chatDestination_chatVersionId ON ChatReplicate (chatPk, chatDestination, chatVersionId)'; stmtList.add_11rb$(element_179); var element_180 = 'CREATE INDEX index_ChatReplicate_chatDestination_chatPending ON ChatReplicate (chatDestination, chatPending)'; stmtList.add_11rb$(element_180); var element_181 = 'CREATE TABLE IF NOT EXISTS ChatMemberReplicate ( chatMemberPk BIGINT NOT NULL , chatMemberVersionId BIGINT NOT NULL DEFAULT 0 , chatMemberDestination BIGINT NOT NULL , chatMemberPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (chatMemberPk, chatMemberDestination) )'; stmtList.add_11rb$(element_181); var element_182 = 'CREATE INDEX index_ChatMemberReplicate_chatMemberPk_chatMemberDestination_chatMemberVersionId ON ChatMemberReplicate (chatMemberPk, chatMemberDestination, chatMemberVersionId)'; stmtList.add_11rb$(element_182); var element_183 = 'CREATE INDEX index_ChatMemberReplicate_chatMemberDestination_chatMemberPending ON ChatMemberReplicate (chatMemberDestination, chatMemberPending)'; stmtList.add_11rb$(element_183); var element_184 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentMark ( camAssignmentUid BIGINT NOT NULL , camSubmitterUid BIGINT NOT NULL , camMark FLOAT NOT NULL , camPenalty INTEGER NOT NULL , camLct BIGINT NOT NULL , camUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_184); var element_185 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentMarkReplicate ( camPk BIGINT NOT NULL , camVersionId BIGINT NOT NULL DEFAULT 0 , camDestination BIGINT NOT NULL , camPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (camPk, camDestination) )'; stmtList.add_11rb$(element_185); var element_186 = 'CREATE INDEX index_CourseAssignmentMarkReplicate_camPk_camDestination_camVersionId ON CourseAssignmentMarkReplicate (camPk, camDestination, camVersionId)'; stmtList.add_11rb$(element_186); var element_187 = 'CREATE INDEX index_CourseAssignmentMarkReplicate_camDestination_camPending ON CourseAssignmentMarkReplicate (camDestination, camPending)'; stmtList.add_11rb$(element_187); var element_188 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmission ( casAssignmentUid BIGINT NOT NULL , casSubmitterUid BIGINT NOT NULL , casSubmitterPersonUid BIGINT NOT NULL , casText TEXT , casType INTEGER NOT NULL , casTimestamp BIGINT NOT NULL , casUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_188); var element_189 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachment ( casaSubmissionUid BIGINT NOT NULL , casaMimeType TEXT , casaUri TEXT , casaMd5 TEXT , casaSize INTEGER NOT NULL , casaTimestamp BIGINT NOT NULL , casaUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_189); var element_190 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionAttachmentReplicate ( casaPk BIGINT NOT NULL , casaVersionId BIGINT NOT NULL DEFAULT 0 , casaDestination BIGINT NOT NULL , casaPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (casaPk, casaDestination) )'; stmtList.add_11rb$(element_190); var element_191 = 'CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaPk_casaDestination_casaVersionId ON CourseAssignmentSubmissionAttachmentReplicate (casaPk, casaDestination, casaVersionId)'; stmtList.add_11rb$(element_191); var element_192 = 'CREATE INDEX index_CourseAssignmentSubmissionAttachmentReplicate_casaDestination_casaPending ON CourseAssignmentSubmissionAttachmentReplicate (casaDestination, casaPending)'; stmtList.add_11rb$(element_192); var element_193 = 'CREATE TABLE IF NOT EXISTS CourseAssignmentSubmissionReplicate ( casPk BIGINT NOT NULL , casVersionId BIGINT NOT NULL DEFAULT 0 , casDestination BIGINT NOT NULL , casPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (casPk, casDestination) )'; stmtList.add_11rb$(element_193); var element_194 = 'CREATE INDEX index_CourseAssignmentSubmissionReplicate_casPk_casDestination_casVersionId ON CourseAssignmentSubmissionReplicate (casPk, casDestination, casVersionId)'; stmtList.add_11rb$(element_194); var element_195 = 'CREATE INDEX index_CourseAssignmentSubmissionReplicate_casDestination_casPending ON CourseAssignmentSubmissionReplicate (casDestination, casPending)'; stmtList.add_11rb$(element_195); var element_196 = 'CREATE TABLE IF NOT EXISTS CourseBlock ( cbType INTEGER NOT NULL , cbIndentLevel INTEGER NOT NULL , cbModuleParentBlockUid BIGINT NOT NULL , cbTitle TEXT , cbDescription TEXT , cbCompletionCriteria INTEGER NOT NULL , cbHideUntilDate BIGINT NOT NULL , cbDeadlineDate BIGINT NOT NULL , cbLateSubmissionPenalty INTEGER NOT NULL , cbGracePeriodDate BIGINT NOT NULL , cbMaxPoints INTEGER NOT NULL , cbMinPoints INTEGER NOT NULL , cbIndex INTEGER NOT NULL , cbClazzUid BIGINT NOT NULL , cbActive BOOL NOT NULL , cbHidden BOOL NOT NULL , cbEntityUid BIGINT NOT NULL , cbLct BIGINT NOT NULL , cbUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_196); var element_197 = 'CREATE INDEX index_CourseBlock_cbClazzUid ON CourseBlock (cbClazzUid)'; stmtList.add_11rb$(element_197); var element_198 = 'CREATE TABLE IF NOT EXISTS CourseBlockReplicate ( cbPk BIGINT NOT NULL , cbVersionId BIGINT NOT NULL DEFAULT 0 , cbDestination BIGINT NOT NULL , cbPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cbPk, cbDestination) )'; stmtList.add_11rb$(element_198); var element_199 = 'CREATE INDEX index_CourseBlockReplicate_cbPk_cbDestination_cbVersionId ON CourseBlockReplicate (cbPk, cbDestination, cbVersionId)'; stmtList.add_11rb$(element_199); var element_200 = 'CREATE INDEX index_CourseBlockReplicate_cbDestination_cbPending ON CourseBlockReplicate (cbDestination, cbPending)'; stmtList.add_11rb$(element_200); var element_201 = 'CREATE TABLE IF NOT EXISTS CourseDiscussion ( courseDiscussionTitle TEXT , courseDiscussionDesc TEXT , courseDiscussionClazzUid BIGINT NOT NULL , courseDiscussionActive BOOL NOT NULL , courseDiscussionLct BIGINT NOT NULL , courseDiscussionUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_201); var element_202 = 'CREATE TABLE IF NOT EXISTS CourseDiscussionReplicate ( courseDiscussionPk BIGINT NOT NULL , courseDiscussionVersionId BIGINT NOT NULL DEFAULT 0 , courseDiscussionDestination BIGINT NOT NULL , courseDiscussionPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (courseDiscussionPk, courseDiscussionDestination) )'; stmtList.add_11rb$(element_202); var element_203 = 'CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionPk_courseDiscussionDestination_courseDiscussionVersionId ON CourseDiscussionReplicate (courseDiscussionPk, courseDiscussionDestination, courseDiscussionVersionId)'; stmtList.add_11rb$(element_203); var element_204 = 'CREATE INDEX index_CourseDiscussionReplicate_courseDiscussionDestination_courseDiscussionPending ON CourseDiscussionReplicate (courseDiscussionDestination, courseDiscussionPending)'; stmtList.add_11rb$(element_204); var element_205 = 'CREATE TABLE IF NOT EXISTS CourseGroupMember ( cgmSetUid BIGINT NOT NULL , cgmGroupNumber INTEGER NOT NULL , cgmPersonUid BIGINT NOT NULL , cgmLct BIGINT NOT NULL , cgmUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_205); var element_206 = 'CREATE TABLE IF NOT EXISTS CourseGroupMemberReplicate ( cgmPk BIGINT NOT NULL , cgmVersionId BIGINT NOT NULL DEFAULT 0 , cgmDestination BIGINT NOT NULL , cgmPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cgmPk, cgmDestination) )'; stmtList.add_11rb$(element_206); var element_207 = 'CREATE INDEX index_CourseGroupMemberReplicate_cgmPk_cgmDestination_cgmVersionId ON CourseGroupMemberReplicate (cgmPk, cgmDestination, cgmVersionId)'; stmtList.add_11rb$(element_207); var element_208 = 'CREATE INDEX index_CourseGroupMemberReplicate_cgmDestination_cgmPending ON CourseGroupMemberReplicate (cgmDestination, cgmPending)'; stmtList.add_11rb$(element_208); var element_209 = 'CREATE TABLE IF NOT EXISTS CourseGroupSet ( cgsName TEXT , cgsTotalGroups INTEGER NOT NULL , cgsActive BOOL NOT NULL , cgsClazzUid BIGINT NOT NULL , cgsLct BIGINT NOT NULL , cgsUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_209); var element_210 = 'CREATE INDEX index_CourseGroupSet_cgsClazzUid ON CourseGroupSet (cgsClazzUid)'; stmtList.add_11rb$(element_210); var element_211 = 'CREATE TABLE IF NOT EXISTS CourseGroupSetReplicate ( cgsPk BIGINT NOT NULL , cgsVersionId BIGINT NOT NULL DEFAULT 0 , cgsDestination BIGINT NOT NULL , cgsPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cgsPk, cgsDestination) )'; stmtList.add_11rb$(element_211); var element_212 = 'CREATE INDEX index_CourseGroupSetReplicate_cgsPk_cgsDestination_cgsVersionId ON CourseGroupSetReplicate (cgsPk, cgsDestination, cgsVersionId)'; stmtList.add_11rb$(element_212); var element_213 = 'CREATE INDEX index_CourseGroupSetReplicate_cgsDestination_cgsPending ON CourseGroupSetReplicate (cgsDestination, cgsPending)'; stmtList.add_11rb$(element_213); var element_214 = 'CREATE TABLE IF NOT EXISTS CoursePicture ( coursePictureClazzUid BIGINT NOT NULL , coursePictureMasterCsn BIGINT NOT NULL , coursePictureLocalCsn BIGINT NOT NULL , coursePictureLastChangedBy INTEGER NOT NULL , coursePictureLct BIGINT NOT NULL , coursePictureUri TEXT , coursePictureMd5 TEXT , coursePictureFileSize INTEGER NOT NULL , coursePictureTimestamp BIGINT NOT NULL , coursePictureMimeType TEXT , coursePictureActive BOOL NOT NULL , coursePictureUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_214); var element_215 = 'CREATE TABLE IF NOT EXISTS CoursePictureReplicate ( cpPk BIGINT NOT NULL , cpVersionId BIGINT NOT NULL DEFAULT 0 , cpDestination BIGINT NOT NULL , cpPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cpPk, cpDestination) )'; stmtList.add_11rb$(element_215); var element_216 = 'CREATE INDEX index_CoursePictureReplicate_cpPk_cpDestination_cpVersionId ON CoursePictureReplicate (cpPk, cpDestination, cpVersionId)'; stmtList.add_11rb$(element_216); var element_217 = 'CREATE INDEX index_CoursePictureReplicate_cpDestination_cpPending ON CoursePictureReplicate (cpDestination, cpPending)'; stmtList.add_11rb$(element_217); var element_218 = 'CREATE TABLE IF NOT EXISTS CourseTerminology ( ctTitle TEXT , ctTerminology TEXT , ctLct BIGINT NOT NULL , ctUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_218); var element_219 = 'CREATE TABLE IF NOT EXISTS CourseTerminologyReplicate ( ctPk BIGINT NOT NULL , ctVersionId BIGINT NOT NULL DEFAULT 0 , ctDestination BIGINT NOT NULL , ctPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (ctPk, ctDestination) )'; stmtList.add_11rb$(element_219); var element_220 = 'CREATE INDEX index_CourseTerminologyReplicate_ctPk_ctDestination_ctVersionId ON CourseTerminologyReplicate (ctPk, ctDestination, ctVersionId)'; stmtList.add_11rb$(element_220); var element_221 = 'CREATE INDEX index_CourseTerminologyReplicate_ctDestination_ctPending ON CourseTerminologyReplicate (ctDestination, ctPending)'; stmtList.add_11rb$(element_221); var element_222 = 'CREATE TABLE IF NOT EXISTS DiscussionPost ( discussionPostTitle TEXT , discussionPostMessage TEXT , discussionPostStartDate BIGINT NOT NULL , discussionPostDiscussionTopicUid BIGINT NOT NULL , discussionPostVisible BOOL NOT NULL , discussionPostArchive BOOL NOT NULL , discussionPostStartedPersonUid BIGINT NOT NULL , discussionPostClazzUid BIGINT NOT NULL , discussionPostLct BIGINT NOT NULL , discussionPostUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_222); var element_223 = 'CREATE TABLE IF NOT EXISTS DiscussionPostReplicate ( discussionPostPk BIGINT NOT NULL , discussionPostVersionId BIGINT NOT NULL DEFAULT 0 , discussionPostDestination BIGINT NOT NULL , discussionPostPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (discussionPostPk, discussionPostDestination) )'; stmtList.add_11rb$(element_223); var element_224 = 'CREATE INDEX index_DiscussionPostReplicate_discussionPostPk_discussionPostDestination_discussionPostVersionId ON DiscussionPostReplicate (discussionPostPk, discussionPostDestination, discussionPostVersionId)'; stmtList.add_11rb$(element_224); var element_225 = 'CREATE INDEX index_DiscussionPostReplicate_discussionPostDestination_discussionPostPending ON DiscussionPostReplicate (discussionPostDestination, discussionPostPending)'; stmtList.add_11rb$(element_225); var element_226 = 'CREATE TABLE IF NOT EXISTS DiscussionTopic ( discussionTopicTitle TEXT , discussionTopicDesc TEXT , discussionTopicStartDate BIGINT NOT NULL , discussionTopicCourseDiscussionUid BIGINT NOT NULL , discussionTopicVisible BOOL NOT NULL , discussionTopicArchive BOOL NOT NULL , discussionTopicIndex INTEGER NOT NULL , discussionTopicClazzUid BIGINT NOT NULL , discussionTopicLct BIGINT NOT NULL , discussionTopicUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_226); var element_227 = 'CREATE TABLE IF NOT EXISTS DiscussionTopicReplicate ( discussionTopicPk BIGINT NOT NULL , discussionTopicVersionId BIGINT NOT NULL DEFAULT 0 , discussionTopicDestination BIGINT NOT NULL , discussionTopicPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (discussionTopicPk, discussionTopicDestination) )'; stmtList.add_11rb$(element_227); var element_228 = 'CREATE INDEX index_DiscussionTopicReplicate_discussionTopicPk_discussionTopicDestination_discussionTopicVersionId ON DiscussionTopicReplicate (discussionTopicPk, discussionTopicDestination, discussionTopicVersionId)'; stmtList.add_11rb$(element_228); var element_229 = 'CREATE INDEX index_DiscussionTopicReplicate_discussionTopicDestination_discussionTopicPending ON DiscussionTopicReplicate (discussionTopicDestination, discussionTopicPending)'; stmtList.add_11rb$(element_229); var element_230 = 'CREATE TABLE IF NOT EXISTS Message ( messageSenderPersonUid BIGINT NOT NULL , messageTableId INTEGER NOT NULL , messageEntityUid BIGINT NOT NULL , messageText TEXT , messageTimestamp BIGINT NOT NULL , messageClazzUid BIGINT NOT NULL , messageLct BIGINT NOT NULL , messageUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_230); var element_231 = 'CREATE TABLE IF NOT EXISTS MessageRead ( messageReadPersonUid BIGINT NOT NULL , messageReadMessageUid BIGINT NOT NULL , messageReadEntityUid BIGINT NOT NULL , messageReadLct BIGINT NOT NULL , messageReadUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_231); var element_232 = 'CREATE TABLE IF NOT EXISTS MessageReadReplicate ( messageReadPk BIGINT NOT NULL , messageReadVersionId BIGINT NOT NULL DEFAULT 0 , messageReadDestination BIGINT NOT NULL , messageReadPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (messageReadPk, messageReadDestination) )'; stmtList.add_11rb$(element_232); var element_233 = 'CREATE INDEX index_MessageReadReplicate_messageReadPk_messageReadDestination_messageReadVersionId ON MessageReadReplicate (messageReadPk, messageReadDestination, messageReadVersionId)'; stmtList.add_11rb$(element_233); var element_234 = 'CREATE INDEX index_MessageReadReplicate_messageReadDestination_messageReadPending ON MessageReadReplicate (messageReadDestination, messageReadPending)'; stmtList.add_11rb$(element_234); var element_235 = 'CREATE TABLE IF NOT EXISTS MessageReplicate ( messagePk BIGINT NOT NULL , messageVersionId BIGINT NOT NULL DEFAULT 0 , messageDestination BIGINT NOT NULL , messagePending BOOL NOT NULL DEFAULT true, PRIMARY KEY (messagePk, messageDestination) )'; stmtList.add_11rb$(element_235); var element_236 = 'CREATE INDEX index_MessageReplicate_messagePk_messageDestination_messageVersionId ON MessageReplicate (messagePk, messageDestination, messageVersionId)'; stmtList.add_11rb$(element_236); var element_237 = 'CREATE INDEX index_MessageReplicate_messageDestination_messagePending ON MessageReplicate (messageDestination, messagePending)'; stmtList.add_11rb$(element_237); var element_238 = 'DROP VIEW ClazzAssignment_ReceiveView'; stmtList.add_11rb$(element_238); var element_239 = 'DROP TABLE ClazzAssignment'; stmtList.add_11rb$(element_239); var element_240 = 'CREATE TABLE IF NOT EXISTS ClazzAssignment ( caTitle TEXT , caDescription TEXT , caGroupUid BIGINT NOT NULL DEFAULT 0 , caActive BOOL NOT NULL , caClassCommentEnabled BOOL NOT NULL , caPrivateCommentsEnabled BOOL NOT NULL DEFAULT true, caCompletionCriteria INTEGER NOT NULL DEFAULT 100 , caRequireFileSubmission BOOL NOT NULL DEFAULT true, caFileType INTEGER NOT NULL DEFAULT 0 , caSizeLimit INTEGER NOT NULL DEFAULT 50 , caNumberOfFiles INTEGER NOT NULL DEFAULT 1 , caSubmissionPolicy INTEGER NOT NULL DEFAULT 1 , caMarkingType INTEGER NOT NULL DEFAULT 1 , caRequireTextSubmission BOOL NOT NULL DEFAULT true, caTextLimitType INTEGER NOT NULL DEFAULT 1 , caTextLimit INTEGER NOT NULL DEFAULT 500 , caXObjectUid BIGINT NOT NULL DEFAULT 0 , caClazzUid BIGINT NOT NULL , caLocalChangeSeqNum BIGINT NOT NULL , caMasterChangeSeqNum BIGINT NOT NULL , caLastChangedBy INTEGER NOT NULL , caLct BIGINT NOT NULL , caUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_240); var element_241 = 'CREATE INDEX index_ClazzAssignment_caClazzUid ON ClazzAssignment (caClazzUid)'; stmtList.add_11rb$(element_241); var element_242 = 'DROP VIEW ClazzAssignmentContentJoin_ReceiveView'; stmtList.add_11rb$(element_242); var element_243 = 'DROP TABLE ClazzAssignmentContentJoin'; stmtList.add_11rb$(element_243); var element_244 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentContentJoin ( cacjContentUid BIGINT NOT NULL , cacjAssignmentUid BIGINT NOT NULL , cacjActive BOOL NOT NULL , cacjWeight INTEGER NOT NULL DEFAULT 0 , cacjMCSN BIGINT NOT NULL , cacjLCSN BIGINT NOT NULL , cacjLCB INTEGER NOT NULL , cacjLct BIGINT NOT NULL , cacjUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_244); var element_245 = 'DROP TABLE ClazzAssignmentRollUp'; stmtList.add_11rb$(element_245); var element_246 = 'CREATE TABLE IF NOT EXISTS ClazzAssignmentRollUp ( cachePersonUid BIGINT NOT NULL , cacheContentEntryUid BIGINT NOT NULL , cacheClazzAssignmentUid BIGINT NOT NULL , cacheStudentScore INTEGER NOT NULL , cacheMaxScore INTEGER NOT NULL , cacheFinalWeightScoreWithPenalty FLOAT NOT NULL DEFAULT 0 , cacheWeight INTEGER NOT NULL DEFAULT 0 , cacheProgress INTEGER NOT NULL , cacheContentComplete BOOL NOT NULL , cacheSuccess SMALLINT NOT NULL , cachePenalty INTEGER NOT NULL , lastCsnChecked BIGINT NOT NULL , cacheUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_246); var element_247 = 'CREATE UNIQUE INDEX index_ClazzAssignmentRollUp_cachePersonUid_cacheContentEntryUid_cacheClazzAssignmentUid ON ClazzAssignmentRollUp (cachePersonUid, cacheContentEntryUid, cacheClazzAssignmentUid)'; stmtList.add_11rb$(element_247); var element_248 = 'DROP VIEW Comments_ReceiveView'; stmtList.add_11rb$(element_248); var element_249 = 'CREATE TABLE IF NOT EXISTS Comments ( commentsText TEXT , commentsEntityType INTEGER NOT NULL , commentsEntityUid BIGINT NOT NULL , commentsPublic BOOL NOT NULL , commentsStatus INTEGER NOT NULL , commentsPersonUid BIGINT NOT NULL , commentsToPersonUid BIGINT NOT NULL , commentSubmitterUid BIGINT NOT NULL , commentsFlagged BOOL NOT NULL , commentsInActive BOOL NOT NULL , commentsDateTimeAdded BIGINT NOT NULL , commentsDateTimeUpdated BIGINT NOT NULL , commentsMCSN BIGINT NOT NULL , commentsLCSN BIGINT NOT NULL , commentsLCB INTEGER NOT NULL , commentsLct BIGINT NOT NULL , commentsUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_249); var element_250 = 'ALTER TABLE Clazz ADD COLUMN clazzEnrolmentPolicy INTEGER NOT NULL DEFAULT 102 '; stmtList.add_11rb$(element_250); var element_251 = 'ALTER TABLE Clazz ADD COLUMN clazzTerminologyUid BIGINT NOT NULL DEFAULT 25966'; stmtList.add_11rb$(element_251); var element_252 = 'ALTER TABLE XObjectEntity ADD COLUMN objectStatementRefUid INTEGER NOT NULL DEFAULT 0'; stmtList.add_11rb$(element_252); var element_253 = ' CREATE OR REPLACE FUNCTION ch_upd_127_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (127, NEW.chatUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_253); var element_254 = ' CREATE TRIGGER ch_upd_127_trig AFTER UPDATE OR INSERT ON Chat FOR EACH ROW EXECUTE PROCEDURE ch_upd_127_fn(); '; stmtList.add_11rb$(element_254); var element_255 = ' CREATE OR REPLACE FUNCTION ch_del_127_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (127, OLD.chatUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_255); var element_256 = ' CREATE TRIGGER ch_del_127_trig AFTER DELETE ON Chat FOR EACH ROW EXECUTE PROCEDURE ch_del_127_fn(); '; stmtList.add_11rb$(element_256); var element_257 = 'CREATE VIEW Chat_ReceiveView AS SELECT Chat.*, ChatReplicate.* FROM Chat LEFT JOIN ChatReplicate ON ChatReplicate.chatPk = Chat.chatUid '; stmtList.add_11rb$(element_257); var element_258 = "CREATE OR REPLACE FUNCTION chat_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Chat(chatUid, chatStartDate, chatTitle, chatGroup, chatLct) VALUES(NEW.chatUid, NEW.chatStartDate, NEW.chatTitle, NEW.chatGroup, NEW.chatLct) ON CONFLICT (chatUid) DO UPDATE SET chatStartDate = EXCLUDED.chatStartDate, chatTitle = EXCLUDED.chatTitle, chatGroup = EXCLUDED.chatGroup, chatLct = EXCLUDED.chatLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_258); var element_259 = ' CREATE TRIGGER chat_remote_insert_trig INSTEAD OF INSERT ON Chat_ReceiveView FOR EACH ROW EXECUTE PROCEDURE chat_remote_insert_fn() '; stmtList.add_11rb$(element_259); var element_260 = ' CREATE OR REPLACE FUNCTION ch_upd_128_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (128, NEW.chatMemberUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_260); var element_261 = ' CREATE TRIGGER ch_upd_128_trig AFTER UPDATE OR INSERT ON ChatMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_128_fn(); '; stmtList.add_11rb$(element_261); var element_262 = ' CREATE OR REPLACE FUNCTION ch_del_128_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (128, OLD.chatMemberUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_262); var element_263 = ' CREATE TRIGGER ch_del_128_trig AFTER DELETE ON ChatMember FOR EACH ROW EXECUTE PROCEDURE ch_del_128_fn(); '; stmtList.add_11rb$(element_263); var element_264 = 'CREATE VIEW ChatMember_ReceiveView AS SELECT ChatMember.*, ChatMemberReplicate.* FROM ChatMember LEFT JOIN ChatMemberReplicate ON ChatMemberReplicate.chatMemberPk = ChatMember.chatMemberUid '; stmtList.add_11rb$(element_264); var element_265 = "CREATE OR REPLACE FUNCTION chatmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChatMember(chatMemberUid, chatMemberChatUid, chatMemberPersonUid, chatMemberJoinedDate, chatMemberLeftDate, chatMemberLct) VALUES(NEW.chatMemberUid, NEW.chatMemberChatUid, NEW.chatMemberPersonUid, NEW.chatMemberJoinedDate, NEW.chatMemberLeftDate, NEW.chatMemberLct) ON CONFLICT (chatMemberUid) DO UPDATE SET chatMemberChatUid = EXCLUDED.chatMemberChatUid, chatMemberPersonUid = EXCLUDED.chatMemberPersonUid, chatMemberJoinedDate = EXCLUDED.chatMemberJoinedDate, chatMemberLeftDate = EXCLUDED.chatMemberLeftDate, chatMemberLct = EXCLUDED.chatMemberLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_265); var element_266 = ' CREATE TRIGGER chatmember_remote_insert_trig INSTEAD OF INSERT ON ChatMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE chatmember_remote_insert_fn() '; stmtList.add_11rb$(element_266); var element_267 = ' CREATE OR REPLACE FUNCTION ch_upd_523_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (523, NEW.camUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_267); var element_268 = ' CREATE TRIGGER ch_upd_523_trig AFTER UPDATE OR INSERT ON CourseAssignmentMark FOR EACH ROW EXECUTE PROCEDURE ch_upd_523_fn(); '; stmtList.add_11rb$(element_268); var element_269 = ' CREATE OR REPLACE FUNCTION ch_del_523_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (523, OLD.camUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_269); var element_270 = ' CREATE TRIGGER ch_del_523_trig AFTER DELETE ON CourseAssignmentMark FOR EACH ROW EXECUTE PROCEDURE ch_del_523_fn(); '; stmtList.add_11rb$(element_270); var element_271 = 'CREATE VIEW CourseAssignmentMark_ReceiveView AS SELECT CourseAssignmentMark.*, CourseAssignmentMarkReplicate.* FROM CourseAssignmentMark LEFT JOIN CourseAssignmentMarkReplicate ON CourseAssignmentMarkReplicate.camPk = CourseAssignmentMark.camUid '; stmtList.add_11rb$(element_271); var element_272 = "CREATE OR REPLACE FUNCTION courseassignmentmark_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseAssignmentMark(camUid, camAssignmentUid, camSubmitterUid, camMark, camPenalty, camLct) VALUES (NEW.camUid, NEW.camAssignmentUid, NEW.camSubmitterUid, NEW.camMark, NEW.camPenalty, NEW.camLct) ON CONFLICT (camUid) DO UPDATE SET camAssignmentUid = EXCLUDED.camAssignmentUid, camSubmitterUid = EXCLUDED.camSubmitterUid, camMark = EXCLUDED.camMark, camPenalty = EXCLUDED.camPenalty, camLct = EXCLUDED.camLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_272); var element_273 = ' CREATE TRIGGER courseassignmentmark_remote_insert_trig INSTEAD OF INSERT ON CourseAssignmentMark_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseassignmentmark_remote_insert_fn() '; stmtList.add_11rb$(element_273); var element_274 = ' CREATE OR REPLACE FUNCTION ch_upd_522_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (522, NEW.casUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_274); var element_275 = ' CREATE TRIGGER ch_upd_522_trig AFTER UPDATE OR INSERT ON CourseAssignmentSubmission FOR EACH ROW EXECUTE PROCEDURE ch_upd_522_fn(); '; stmtList.add_11rb$(element_275); var element_276 = ' CREATE OR REPLACE FUNCTION ch_del_522_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (522, OLD.casUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_276); var element_277 = ' CREATE TRIGGER ch_del_522_trig AFTER DELETE ON CourseAssignmentSubmission FOR EACH ROW EXECUTE PROCEDURE ch_del_522_fn(); '; stmtList.add_11rb$(element_277); var element_278 = 'CREATE VIEW CourseAssignmentSubmission_ReceiveView AS SELECT CourseAssignmentSubmission.*, CourseAssignmentSubmissionReplicate.* FROM CourseAssignmentSubmission LEFT JOIN CourseAssignmentSubmissionReplicate ON CourseAssignmentSubmissionReplicate.casPk = CourseAssignmentSubmission.casUid '; stmtList.add_11rb$(element_278); var element_279 = "CREATE OR REPLACE FUNCTION courseassignmentsubmission_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseAssignmentSubmission(casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp) VALUES (NEW.casUid, NEW.casAssignmentUid, NEW.casSubmitterUid, NEW.casSubmitterPersonUid, NEW.casText, NEW.casType, NEW.casTimestamp) ON CONFLICT (casUid) DO UPDATE SET casAssignmentUid = EXCLUDED.casAssignmentUid, casSubmitterUid = EXCLUDED.casSubmitterUid, casSubmitterPersonUid = EXCLUDED.casSubmitterPersonUid, casText = EXCLUDED.casText, casType = EXCLUDED.casType, casTimestamp = EXCLUDED.casTimestamp ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_279); var element_280 = ' CREATE TRIGGER courseassignmentsubmission_remote_insert_trig INSTEAD OF INSERT ON CourseAssignmentSubmission_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseassignmentsubmission_remote_insert_fn() '; stmtList.add_11rb$(element_280); var element_281 = ' CREATE OR REPLACE FUNCTION ch_upd_90_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (90, NEW.casaUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_281); var element_282 = ' CREATE TRIGGER ch_upd_90_trig AFTER UPDATE OR INSERT ON CourseAssignmentSubmissionAttachment FOR EACH ROW EXECUTE PROCEDURE ch_upd_90_fn(); '; stmtList.add_11rb$(element_282); var element_283 = ' CREATE OR REPLACE FUNCTION ch_del_90_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (90, OLD.casaUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_283); var element_284 = ' CREATE TRIGGER ch_del_90_trig AFTER DELETE ON CourseAssignmentSubmissionAttachment FOR EACH ROW EXECUTE PROCEDURE ch_del_90_fn(); '; stmtList.add_11rb$(element_284); var element_285 = 'CREATE VIEW CourseAssignmentSubmissionAttachment_ReceiveView AS SELECT CourseAssignmentSubmissionAttachment.*, CourseAssignmentSubmissionAttachmentReplicate.* FROM CourseAssignmentSubmissionAttachment LEFT JOIN CourseAssignmentSubmissionAttachmentReplicate ON CourseAssignmentSubmissionAttachmentReplicate.casaPk = CourseAssignmentSubmissionAttachment.casaUid '; stmtList.add_11rb$(element_285); var element_286 = "CREATE OR REPLACE FUNCTION courseassignmentsubmissionattachment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseAssignmentSubmissionAttachment(casaUid, casaSubmissionUid, casaMimeType, casaUri, casaMd5, casaSize, casaTimestamp) VALUES (NEW.casaUid, NEW.casaSubmissionUid, NEW.casaMimeType, NEW.casaUri, NEW.casaMd5, NEW.casaSize, NEW.casaTimestamp) ON CONFLICT (casaUid) DO UPDATE SET casaSubmissionUid = EXCLUDED.casaSubmissionUid, casaMimeType = EXCLUDED.casaMimeType, casaUri = EXCLUDED.casaUri, casaMd5 = EXCLUDED.casaMd5, casaSize = EXCLUDED.casaSize, casaTimestamp = EXCLUDED.casaTimestamp ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_286); var element_287 = ' CREATE TRIGGER courseassignmentsubmissionattachment_remote_insert_trig INSTEAD OF INSERT ON CourseAssignmentSubmissionAttachment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseassignmentsubmissionattachment_remote_insert_fn() '; stmtList.add_11rb$(element_287); var element_288 = trimMargin('\n | CREATE OR REPLACE FUNCTION attach_CourseAssignmentSubmissionAttachment_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.casaUri AS zaUri\n | FROM CourseAssignmentSubmissionAttachment \n | WHERE CourseAssignmentSubmissionAttachment.casaUid = OLD.casaUid\n | AND (SELECT COUNT(*) \n | FROM CourseAssignmentSubmissionAttachment\n | WHERE casaMd5 = OLD.casaMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n '); stmtList.add_11rb$(element_288); var element_289 = trimMargin('\n |CREATE TRIGGER attach_CourseAssignmentSubmissionAttachment_trig\n |AFTER UPDATE ON CourseAssignmentSubmissionAttachment\n |FOR EACH ROW WHEN (OLD.casaMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_CourseAssignmentSubmissionAttachment_fn();\n '); stmtList.add_11rb$(element_289); var element_290 = ' CREATE OR REPLACE FUNCTION ch_upd_124_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (124, NEW.cbUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_290); var element_291 = ' CREATE TRIGGER ch_upd_124_trig AFTER UPDATE OR INSERT ON CourseBlock FOR EACH ROW EXECUTE PROCEDURE ch_upd_124_fn(); '; stmtList.add_11rb$(element_291); var element_292 = ' CREATE OR REPLACE FUNCTION ch_del_124_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (124, OLD.cbUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_292); var element_293 = ' CREATE TRIGGER ch_del_124_trig AFTER DELETE ON CourseBlock FOR EACH ROW EXECUTE PROCEDURE ch_del_124_fn(); '; stmtList.add_11rb$(element_293); var element_294 = 'CREATE VIEW CourseBlock_ReceiveView AS SELECT CourseBlock.*, CourseBlockReplicate.* FROM CourseBlock LEFT JOIN CourseBlockReplicate ON CourseBlockReplicate.cbPk = CourseBlock.cbUid '; stmtList.add_11rb$(element_294); var element_295 = "CREATE OR REPLACE FUNCTION courseblock_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseBlock(cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints,cbMinPoints, cbIndex, cbClazzUid, cbActive,cbHidden, cbEntityUid, cbLct) VALUES (NEW.cbUid, NEW.cbType, NEW.cbIndentLevel, NEW.cbModuleParentBlockUid, NEW.cbTitle, NEW.cbDescription, NEW.cbCompletionCriteria, NEW.cbHideUntilDate, NEW.cbDeadlineDate, NEW.cbLateSubmissionPenalty, NEW.cbGracePeriodDate, NEW.cbMaxPoints,NEW.cbMinPoints, NEW.cbIndex, NEW.cbClazzUid,NEW.cbActive, NEW.cbHidden, NEW.cbEntityUid, NEW.cbLct) ON CONFLICT (cbUid) DO UPDATE SET cbType = EXCLUDED.cbType, cbIndentLevel = EXCLUDED.cbIndentLevel, cbModuleParentBlockUid = EXCLUDED.cbModuleParentBlockUid, cbTitle = EXCLUDED.cbTitle, cbDescription = EXCLUDED.cbDescription, cbCompletionCriteria = EXCLUDED.cbCompletionCriteria, cbHideUntilDate = EXCLUDED.cbHideUntilDate,cbDeadlineDate = EXCLUDED.cbDeadlineDate, cbLateSubmissionPenalty = EXCLUDED.cbLateSubmissionPenalty, cbGracePeriodDate= EXCLUDED.cbGracePeriodDate, cbMaxPoints = EXCLUDED.cbMaxPoints, cbMinPoints = EXCLUDED.cbMinPoints, cbIndex = EXCLUDED.cbIndex,cbClazzUid = EXCLUDED.cbClazzUid, cbActive = EXCLUDED.cbActive, cbHidden = EXCLUDED.cbHidden, cbEntityUid = EXCLUDED.cbEntityUid, cbLct = EXCLUDED.cbLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_295); var element_296 = ' CREATE TRIGGER courseblock_remote_insert_trig INSTEAD OF INSERT ON CourseBlock_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseblock_remote_insert_fn() '; stmtList.add_11rb$(element_296); var element_297 = ' CREATE OR REPLACE FUNCTION ch_upd_130_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (130, NEW.courseDiscussionUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_297); var element_298 = ' CREATE TRIGGER ch_upd_130_trig AFTER UPDATE OR INSERT ON CourseDiscussion FOR EACH ROW EXECUTE PROCEDURE ch_upd_130_fn(); '; stmtList.add_11rb$(element_298); var element_299 = ' CREATE OR REPLACE FUNCTION ch_del_130_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (130, OLD.courseDiscussionUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_299); var element_300 = ' CREATE TRIGGER ch_del_130_trig AFTER DELETE ON CourseDiscussion FOR EACH ROW EXECUTE PROCEDURE ch_del_130_fn(); '; stmtList.add_11rb$(element_300); var element_301 = 'CREATE VIEW CourseDiscussion_ReceiveView AS SELECT CourseDiscussion.*, CourseDiscussionReplicate.* FROM CourseDiscussion LEFT JOIN CourseDiscussionReplicate ON CourseDiscussionReplicate.courseDiscussionPk = CourseDiscussion.courseDiscussionUid '; stmtList.add_11rb$(element_301); var element_302 = "CREATE OR REPLACE FUNCTION coursediscussion_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseDiscussion(courseDiscussionUid, courseDiscussionActive, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionLct) VALUES(NEW.courseDiscussionUid, NEW.courseDiscussionActive, NEW.courseDiscussionTitle, NEW.courseDiscussionDesc, NEW.courseDiscussionClazzUid, NEW.courseDiscussionLct) ON CONFLICT (courseDiscussionUid) DO UPDATE SET courseDiscussionActive = EXCLUDED.courseDiscussionActive, courseDiscussionTitle = EXCLUDED.courseDiscussionTitle, courseDiscussionDesc = EXCLUDED.courseDiscussionDesc, courseDiscussionClazzUid = EXCLUDED.courseDiscussionClazzUid, courseDiscussionLct = EXCLUDED.courseDiscussionLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_302); var element_303 = ' CREATE TRIGGER coursediscussion_remote_insert_trig INSTEAD OF INSERT ON CourseDiscussion_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursediscussion_remote_insert_fn() '; stmtList.add_11rb$(element_303); var element_304 = ' CREATE OR REPLACE FUNCTION ch_upd_243_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (243, NEW.cgmUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_304); var element_305 = ' CREATE TRIGGER ch_upd_243_trig AFTER UPDATE OR INSERT ON CourseGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_upd_243_fn(); '; stmtList.add_11rb$(element_305); var element_306 = ' CREATE OR REPLACE FUNCTION ch_del_243_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (243, OLD.cgmUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_306); var element_307 = ' CREATE TRIGGER ch_del_243_trig AFTER DELETE ON CourseGroupMember FOR EACH ROW EXECUTE PROCEDURE ch_del_243_fn(); '; stmtList.add_11rb$(element_307); var element_308 = 'CREATE VIEW CourseGroupMember_ReceiveView AS SELECT CourseGroupMember.*, CourseGroupMemberReplicate.* FROM CourseGroupMember LEFT JOIN CourseGroupMemberReplicate ON CourseGroupMemberReplicate.cgmPk = CourseGroupMember.cgmUid '; stmtList.add_11rb$(element_308); var element_309 = "CREATE OR REPLACE FUNCTION coursegroupmember_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseGroupMember(cgmUid, cgmSetUid, cgmGroupNumber, cgmPersonUid, cgmLct) VALUES (NEW.cgmUid, NEW.cgmSetUid, NEW.cgmGroupNumber, NEW.cgmPersonUid, NEW.cgmLct) ON CONFLICT (cgmUid) DO UPDATE SET cgmSetUid = EXCLUDED.cgmSetUid, cgmGroupNumber = EXCLUDED.cgmGroupNumber, cgmPersonUid = EXCLUDED.cgmPersonUid, cgmLct = EXCLUDED.cgmLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_309); var element_310 = ' CREATE TRIGGER coursegroupmember_remote_insert_trig INSTEAD OF INSERT ON CourseGroupMember_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursegroupmember_remote_insert_fn() '; stmtList.add_11rb$(element_310); var element_311 = ' CREATE OR REPLACE FUNCTION ch_upd_242_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (242, NEW.cgsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_311); var element_312 = ' CREATE TRIGGER ch_upd_242_trig AFTER UPDATE OR INSERT ON CourseGroupSet FOR EACH ROW EXECUTE PROCEDURE ch_upd_242_fn(); '; stmtList.add_11rb$(element_312); var element_313 = ' CREATE OR REPLACE FUNCTION ch_del_242_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (242, OLD.cgsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_313); var element_314 = ' CREATE TRIGGER ch_del_242_trig AFTER DELETE ON CourseGroupSet FOR EACH ROW EXECUTE PROCEDURE ch_del_242_fn(); '; stmtList.add_11rb$(element_314); var element_315 = 'CREATE VIEW CourseGroupSet_ReceiveView AS SELECT CourseGroupSet.*, CourseGroupSetReplicate.* FROM CourseGroupSet LEFT JOIN CourseGroupSetReplicate ON CourseGroupSetReplicate.cgsPk = CourseGroupSet.cgsUid '; stmtList.add_11rb$(element_315); var element_316 = "CREATE OR REPLACE FUNCTION coursegroupset_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseGroupSet(cgsUid, cgsName, cgsTotalGroups, cgsActive, cgsClazzUid, cgsLct) VALUES (NEW.cgsUid, NEW.cgsName, NEW.cgsTotalGroups, NEW.cgsActive, NEW.cgsClazzUid, NEW.cgsLct) ON CONFLICT (cgsUid) DO UPDATE SET cgsName = EXCLUDED.cgsName, cgsTotalGroups = EXCLUDED.cgsTotalGroups, cgsActive = EXCLUDED.cgsActive, cgsClazzUid = EXCLUDED.cgsClazzUid, cgsLct = EXCLUDED.cgsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_316); var element_317 = ' CREATE TRIGGER coursegroupset_remote_insert_trig INSTEAD OF INSERT ON CourseGroupSet_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursegroupset_remote_insert_fn() '; stmtList.add_11rb$(element_317); var element_318 = ' CREATE OR REPLACE FUNCTION ch_upd_125_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (125, NEW.coursePictureUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_318); var element_319 = ' CREATE TRIGGER ch_upd_125_trig AFTER UPDATE OR INSERT ON CoursePicture FOR EACH ROW EXECUTE PROCEDURE ch_upd_125_fn(); '; stmtList.add_11rb$(element_319); var element_320 = ' CREATE OR REPLACE FUNCTION ch_del_125_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (125, OLD.coursePictureUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_320); var element_321 = ' CREATE TRIGGER ch_del_125_trig AFTER DELETE ON CoursePicture FOR EACH ROW EXECUTE PROCEDURE ch_del_125_fn(); '; stmtList.add_11rb$(element_321); var element_322 = 'CREATE VIEW CoursePicture_ReceiveView AS SELECT CoursePicture.*, CoursePictureReplicate.* FROM CoursePicture LEFT JOIN CoursePictureReplicate ON CoursePictureReplicate.cpPk = CoursePicture.coursePictureUid '; stmtList.add_11rb$(element_322); var element_323 = "CREATE OR REPLACE FUNCTION coursepicture_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CoursePicture(coursePictureUid, coursePictureClazzUid, coursePictureMasterCsn, coursePictureLocalCsn, coursePictureLastChangedBy, coursePictureLct, coursePictureUri, coursePictureMd5, coursePictureFileSize, coursePictureTimestamp, coursePictureMimeType, coursePictureActive) VALUES (NEW.coursePictureUid, NEW.coursePictureClazzUid, NEW.coursePictureMasterCsn, NEW.coursePictureLocalCsn, NEW.coursePictureLastChangedBy, NEW.coursePictureLct, NEW.coursePictureUri, NEW.coursePictureMd5, NEW.coursePictureFileSize, NEW.coursePictureTimestamp, NEW.coursePictureMimeType, NEW.coursePictureActive) ON CONFLICT (coursePictureUid) DO UPDATE SET coursePictureClazzUid = EXCLUDED.coursePictureClazzUid, coursePictureMasterCsn = EXCLUDED.coursePictureMasterCsn, coursePictureLocalCsn = EXCLUDED.coursePictureLocalCsn, coursePictureLastChangedBy = EXCLUDED.coursePictureLastChangedBy, coursePictureLct = EXCLUDED.coursePictureLct, coursePictureUri = EXCLUDED.coursePictureUri, coursePictureMd5 = EXCLUDED.coursePictureMd5, coursePictureFileSize = EXCLUDED.coursePictureFileSize, coursePictureTimestamp = EXCLUDED.coursePictureTimestamp, coursePictureMimeType = EXCLUDED.coursePictureMimeType, coursePictureActive = EXCLUDED.coursePictureActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_323); var element_324 = ' CREATE TRIGGER coursepicture_remote_insert_trig INSTEAD OF INSERT ON CoursePicture_ReceiveView FOR EACH ROW EXECUTE PROCEDURE coursepicture_remote_insert_fn() '; stmtList.add_11rb$(element_324); var element_325 = trimMargin('\n | CREATE OR REPLACE FUNCTION attach_CoursePicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.coursePictureUri AS zaUri\n | FROM CoursePicture \n | WHERE CoursePicture.coursePictureUid = OLD.coursePictureUid\n | AND (SELECT COUNT(*) \n | FROM CoursePicture\n | WHERE coursePictureMd5 = OLD.coursePictureMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n '); stmtList.add_11rb$(element_325); var element_326 = trimMargin('\n |CREATE TRIGGER attach_CoursePicture_trig\n |AFTER UPDATE ON CoursePicture\n |FOR EACH ROW WHEN (OLD.coursePictureMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_CoursePicture_fn();\n '); stmtList.add_11rb$(element_326); var element_327 = ' CREATE OR REPLACE FUNCTION ch_upd_450_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (450, NEW.ctUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_327); var element_328 = ' CREATE TRIGGER ch_upd_450_trig AFTER UPDATE OR INSERT ON CourseTerminology FOR EACH ROW EXECUTE PROCEDURE ch_upd_450_fn(); '; stmtList.add_11rb$(element_328); var element_329 = ' CREATE OR REPLACE FUNCTION ch_del_450_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (450, OLD.ctUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_329); var element_330 = ' CREATE TRIGGER ch_del_450_trig AFTER DELETE ON CourseTerminology FOR EACH ROW EXECUTE PROCEDURE ch_del_450_fn(); '; stmtList.add_11rb$(element_330); var element_331 = 'CREATE VIEW CourseTerminology_ReceiveView AS SELECT CourseTerminology.*, CourseTerminologyReplicate.* FROM CourseTerminology LEFT JOIN CourseTerminologyReplicate ON CourseTerminologyReplicate.ctPk = CourseTerminology.ctUid '; stmtList.add_11rb$(element_331); var element_332 = "CREATE OR REPLACE FUNCTION courseterminology_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO CourseTerminology(ctUid, ctTitle, ctTerminology, ctLct) VALUES (NEW.ctUid, NEW.ctTitle, NEW.ctTerminology, NEW.ctLct) ON CONFLICT (ctUid) DO UPDATE SET ctTitle = EXCLUDED.ctTitle, ctTerminology = EXCLUDED.ctTerminology, ctLct = EXCLUDED.ctLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_332); var element_333 = ' CREATE TRIGGER courseterminology_remote_insert_trig INSTEAD OF INSERT ON CourseTerminology_ReceiveView FOR EACH ROW EXECUTE PROCEDURE courseterminology_remote_insert_fn() '; stmtList.add_11rb$(element_333); var element_334 = ' CREATE OR REPLACE FUNCTION ch_upd_132_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (132, NEW.discussionPostUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_334); var element_335 = ' CREATE TRIGGER ch_upd_132_trig AFTER UPDATE OR INSERT ON DiscussionPost FOR EACH ROW EXECUTE PROCEDURE ch_upd_132_fn(); '; stmtList.add_11rb$(element_335); var element_336 = ' CREATE OR REPLACE FUNCTION ch_del_132_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (132, OLD.discussionPostUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_336); var element_337 = ' CREATE TRIGGER ch_del_132_trig AFTER DELETE ON DiscussionPost FOR EACH ROW EXECUTE PROCEDURE ch_del_132_fn(); '; stmtList.add_11rb$(element_337); var element_338 = 'CREATE VIEW DiscussionPost_ReceiveView AS SELECT DiscussionPost.*, DiscussionPostReplicate.* FROM DiscussionPost LEFT JOIN DiscussionPostReplicate ON DiscussionPostReplicate.discussionPostPk = DiscussionPost.discussionPostUid '; stmtList.add_11rb$(element_338); var element_339 = "CREATE OR REPLACE FUNCTION discussionpost_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO DiscussionPost(discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct) VALUES(NEW.discussionPostUid, NEW.discussionPostTitle, NEW.discussionPostMessage, NEW.discussionPostStartDate, NEW.discussionPostDiscussionTopicUid, NEW.discussionPostVisible, NEW.discussionPostArchive, NEW.discussionPostStartedPersonUid, NEW.discussionPostClazzUid, NEW.discussionPostLct) ON CONFLICT (discussionPostUid) DO UPDATE SET discussionPostTitle = EXCLUDED.discussionPostTitle , discussionPostMessage = EXCLUDED.discussionPostMessage , discussionPostStartDate = EXCLUDED.discussionPostStartDate , discussionPostDiscussionTopicUid = EXCLUDED.discussionPostDiscussionTopicUid, discussionPostVisible = EXCLUDED.discussionPostVisible , discussionPostArchive = EXCLUDED.discussionPostArchive , discussionPostStartedPersonUid = EXCLUDED.discussionPostStartedPersonUid , discussionPostClazzUid = EXCLUDED.discussionPostClazzUid, discussionPostLct = EXCLUDED.discussionPostLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_339); var element_340 = ' CREATE TRIGGER discussionpost_remote_insert_trig INSTEAD OF INSERT ON DiscussionPost_ReceiveView FOR EACH ROW EXECUTE PROCEDURE discussionpost_remote_insert_fn() '; stmtList.add_11rb$(element_340); var element_341 = ' CREATE OR REPLACE FUNCTION ch_upd_131_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (131, NEW.discussionTopicUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_341); var element_342 = ' CREATE TRIGGER ch_upd_131_trig AFTER UPDATE OR INSERT ON DiscussionTopic FOR EACH ROW EXECUTE PROCEDURE ch_upd_131_fn(); '; stmtList.add_11rb$(element_342); var element_343 = ' CREATE OR REPLACE FUNCTION ch_del_131_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (131, OLD.discussionTopicUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_343); var element_344 = ' CREATE TRIGGER ch_del_131_trig AFTER DELETE ON DiscussionTopic FOR EACH ROW EXECUTE PROCEDURE ch_del_131_fn(); '; stmtList.add_11rb$(element_344); var element_345 = 'CREATE VIEW DiscussionTopic_ReceiveView AS SELECT DiscussionTopic.*, DiscussionTopicReplicate.* FROM DiscussionTopic LEFT JOIN DiscussionTopicReplicate ON DiscussionTopicReplicate.discussionTopicPk = DiscussionTopic.discussionTopicUid '; stmtList.add_11rb$(element_345); var element_346 = "CREATE OR REPLACE FUNCTION discussiontopic_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO DiscussionTopic(discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct) VALUES(NEW.discussionTopicUid, NEW.discussionTopicTitle, NEW.discussionTopicDesc, NEW.discussionTopicStartDate, NEW.discussionTopicCourseDiscussionUid, NEW.discussionTopicVisible, NEW.discussionTopicArchive, NEW.discussionTopicIndex, NEW.discussionTopicClazzUid, NEW.discussionTopicLct) ON CONFLICT (discussionTopicUid) DO UPDATE SET discussionTopicTitle = EXCLUDED.discussionTopicTitle, discussionTopicDesc = EXCLUDED.discussionTopicDesc, discussionTopicStartDate = EXCLUDED.discussionTopicStartDate, discussionTopicCourseDiscussionUid = EXCLUDED.discussionTopicCourseDiscussionUid, discussionTopicVisible = EXCLUDED.discussionTopicVisible, discussionTopicArchive = EXCLUDED.discussionTopicArchive, discussionTopicIndex = EXCLUDED.discussionTopicIndex, discussionTopicClazzUid = EXCLUDED.discussionTopicClazzUid, discussionTopicLct = EXCLUDED.discussionTopicLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_346); var element_347 = ' CREATE TRIGGER discussiontopic_remote_insert_trig INSTEAD OF INSERT ON DiscussionTopic_ReceiveView FOR EACH ROW EXECUTE PROCEDURE discussiontopic_remote_insert_fn() '; stmtList.add_11rb$(element_347); var element_348 = ' CREATE OR REPLACE FUNCTION ch_upd_126_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (126, NEW.messageUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_348); var element_349 = ' CREATE TRIGGER ch_upd_126_trig AFTER UPDATE OR INSERT ON Message FOR EACH ROW EXECUTE PROCEDURE ch_upd_126_fn(); '; stmtList.add_11rb$(element_349); var element_350 = ' CREATE OR REPLACE FUNCTION ch_del_126_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (126, OLD.messageUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_350); var element_351 = ' CREATE TRIGGER ch_del_126_trig AFTER DELETE ON Message FOR EACH ROW EXECUTE PROCEDURE ch_del_126_fn(); '; stmtList.add_11rb$(element_351); var element_352 = 'CREATE VIEW Message_ReceiveView AS SELECT Message.*, MessageReplicate.* FROM Message LEFT JOIN MessageReplicate ON MessageReplicate.messagePk = Message.messageUid '; stmtList.add_11rb$(element_352); var element_353 = "CREATE OR REPLACE FUNCTION message_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Message(messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct) VALUES(NEW.messageUid, NEW.messageSenderPersonUid, NEW.messageTableId, NEW.messageEntityUid, NEW.messageText, NEW.messageTimestamp, NEW.messageClazzUid, NEW.messageLct) ON CONFLICT (messageUid) DO UPDATE SET messageSenderPersonUid = EXCLUDED.messageSenderPersonUid, messageTableId = EXCLUDED.messageTableId, messageEntityUid = EXCLUDED.messageEntityUid, messageText = EXCLUDED.messageText, messageTimestamp = EXCLUDED.messageTimestamp, messageClazzUid = EXCLUDED.messageClazzUid, messageLct = EXCLUDED.messageLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_353); var element_354 = ' CREATE TRIGGER message_remote_insert_trig INSTEAD OF INSERT ON Message_ReceiveView FOR EACH ROW EXECUTE PROCEDURE message_remote_insert_fn() '; stmtList.add_11rb$(element_354); var element_355 = ' CREATE OR REPLACE FUNCTION ch_upd_129_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (129, NEW.messageReadUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_355); var element_356 = ' CREATE TRIGGER ch_upd_129_trig AFTER UPDATE OR INSERT ON MessageRead FOR EACH ROW EXECUTE PROCEDURE ch_upd_129_fn(); '; stmtList.add_11rb$(element_356); var element_357 = ' CREATE OR REPLACE FUNCTION ch_del_129_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (129, OLD.messageReadUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_357); var element_358 = ' CREATE TRIGGER ch_del_129_trig AFTER DELETE ON MessageRead FOR EACH ROW EXECUTE PROCEDURE ch_del_129_fn(); '; stmtList.add_11rb$(element_358); var element_359 = 'CREATE VIEW MessageRead_ReceiveView AS SELECT MessageRead.*, MessageReadReplicate.* FROM MessageRead LEFT JOIN MessageReadReplicate ON MessageReadReplicate.messageReadPk = MessageRead.messageReadUid '; stmtList.add_11rb$(element_359); var element_360 = "CREATE OR REPLACE FUNCTION messageread_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO MessageRead(messageReadUid, messageReadPersonUid, messageReadMessageUid, messageReadEntityUid, messageReadLct) VALUES(NEW.messageReadUid, NEW.messageReadPersonUid, NEW.messageReadMessageUid, NEW.messageReadEntityUid, NEW.messageReadLct) ON CONFLICT (messageReadUid) DO UPDATE SET messageReadPersonUid = EXCLUDED.messageReadPersonUid, messageReadMessageUid = EXCLUDED.messageReadMessageUid, messageReadEntityUid = EXCLUDED.messageReadEntityUid, messageReadLct = EXCLUDED.messageReadLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_360); var element_361 = ' CREATE TRIGGER messageread_remote_insert_trig INSTEAD OF INSERT ON MessageRead_ReceiveView FOR EACH ROW EXECUTE PROCEDURE messageread_remote_insert_fn() '; stmtList.add_11rb$(element_361); var element_362 = ' CREATE OR REPLACE FUNCTION ch_upd_520_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (520, NEW.caUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_362); var element_363 = ' CREATE TRIGGER ch_upd_520_trig AFTER UPDATE OR INSERT ON ClazzAssignment FOR EACH ROW EXECUTE PROCEDURE ch_upd_520_fn(); '; stmtList.add_11rb$(element_363); var element_364 = ' CREATE OR REPLACE FUNCTION ch_del_520_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (520, OLD.caUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_364); var element_365 = ' CREATE TRIGGER ch_del_520_trig AFTER DELETE ON ClazzAssignment FOR EACH ROW EXECUTE PROCEDURE ch_del_520_fn(); '; stmtList.add_11rb$(element_365); var element_366 = 'CREATE VIEW ClazzAssignment_ReceiveView AS SELECT ClazzAssignment.*, ClazzAssignmentReplicate.* FROM ClazzAssignment LEFT JOIN ClazzAssignmentReplicate ON ClazzAssignmentReplicate.caPk = ClazzAssignment.caUid '; stmtList.add_11rb$(element_366); var element_367 = "CREATE OR REPLACE FUNCTION clazzassignment_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzAssignment(caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct) VALUES (NEW.caUid, NEW.caTitle, NEW.caDescription, NEW.caGroupUid, NEW.caActive, NEW.caClassCommentEnabled, NEW.caPrivateCommentsEnabled, NEW.caRequireFileSubmission, NEW.caFileType, NEW.caSizeLimit, NEW.caNumberOfFiles, NEW.caSubmissionPolicy, NEW.caMarkingType,NEW.caRequireTextSubmission, NEW.caTextLimitType, NEW.caTextLimit, NEW.caXObjectUid, NEW.caClazzUid, NEW.caLocalChangeSeqNum, NEW.caMasterChangeSeqNum, NEW.caLastChangedBy, NEW.caLct) ON CONFLICT (caUid) DO UPDATE SET caTitle = EXCLUDED.caTitle, caDescription = EXCLUDED.caDescription, caGroupUid = EXCLUDED.caGroupUid, caActive = EXCLUDED.caActive, caClassCommentEnabled = EXCLUDED.caClassCommentEnabled, caPrivateCommentsEnabled = EXCLUDED.caPrivateCommentsEnabled, caRequireFileSubmission = EXCLUDED.caRequireFileSubmission, caFileType = EXCLUDED.caFileType, caSizeLimit = EXCLUDED.caSizeLimit, caNumberOfFiles = EXCLUDED.caNumberOfFiles, caSubmissionPolicy = EXCLUDED.caSubmissionPolicy, caMarkingType = EXCLUDED.caMarkingType, caRequireTextSubmission = EXCLUDED.caRequireTextSubmission, caTextLimitType = EXCLUDED.caTextLimitType, caTextLimit = EXCLUDED.caTextLimit, caXObjectUid = EXCLUDED.caXObjectUid, caClazzUid = EXCLUDED.caClazzUid, caLocalChangeSeqNum = EXCLUDED.caLocalChangeSeqNum, caMasterChangeSeqNum = EXCLUDED.caMasterChangeSeqNum, caLastChangedBy = EXCLUDED.caLastChangedBy, caLct = EXCLUDED.caLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_367); var element_368 = ' CREATE TRIGGER clazzassignment_remote_insert_trig INSTEAD OF INSERT ON ClazzAssignment_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzassignment_remote_insert_fn() '; stmtList.add_11rb$(element_368); var element_369 = ' CREATE OR REPLACE FUNCTION ch_upd_521_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (521, NEW.cacjUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_369); var element_370 = ' CREATE TRIGGER ch_upd_521_trig AFTER UPDATE OR INSERT ON ClazzAssignmentContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_upd_521_fn(); '; stmtList.add_11rb$(element_370); var element_371 = ' CREATE OR REPLACE FUNCTION ch_del_521_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (521, OLD.cacjUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_371); var element_372 = ' CREATE TRIGGER ch_del_521_trig AFTER DELETE ON ClazzAssignmentContentJoin FOR EACH ROW EXECUTE PROCEDURE ch_del_521_fn(); '; stmtList.add_11rb$(element_372); var element_373 = 'CREATE VIEW ClazzAssignmentContentJoin_ReceiveView AS SELECT ClazzAssignmentContentJoin.*, ClazzAssignmentContentJoinReplicate.* FROM ClazzAssignmentContentJoin LEFT JOIN ClazzAssignmentContentJoinReplicate ON ClazzAssignmentContentJoinReplicate.cacjPk = ClazzAssignmentContentJoin.cacjUid '; stmtList.add_11rb$(element_373); var element_374 = "CREATE OR REPLACE FUNCTION clazzassignmentcontentjoin_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ClazzAssignmentContentJoin(cacjUid, cacjContentUid, cacjAssignmentUid, cacjActive,cacjWeight, cacjMCSN, cacjLCSN, cacjLCB, cacjLct) VALUES (NEW.cacjUid, NEW.cacjContentUid, NEW.cacjAssignmentUid, NEW.cacjActive, NEW.cacjWeight, NEW.cacjMCSN, NEW.cacjLCSN, NEW.cacjLCB, NEW.cacjLct) ON CONFLICT (cacjUid) DO UPDATE SET cacjContentUid = EXCLUDED.cacjContentUid, cacjAssignmentUid = EXCLUDED.cacjAssignmentUid, cacjActive = EXCLUDED.cacjActive, cacjWeight = EXCLUDED.cacjWeight, cacjMCSN = EXCLUDED.cacjMCSN, cacjLCSN = EXCLUDED.cacjLCSN, cacjLCB = EXCLUDED.cacjLCB, cacjLct = EXCLUDED.cacjLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_374); var element_375 = ' CREATE TRIGGER clazzassignmentcontentjoin_remote_insert_trig INSTEAD OF INSERT ON ClazzAssignmentContentJoin_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazzassignmentcontentjoin_remote_insert_fn() '; stmtList.add_11rb$(element_375); var element_376 = ' CREATE OR REPLACE FUNCTION ch_upd_208_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (208, NEW.commentsUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_376); var element_377 = 'DROP TRIGGER IF EXISTS ch_upd_208_trig ON Comments'; stmtList.add_11rb$(element_377); var element_378 = ' CREATE TRIGGER ch_upd_208_trig AFTER UPDATE OR INSERT ON Comments FOR EACH ROW EXECUTE PROCEDURE ch_upd_208_fn(); '; stmtList.add_11rb$(element_378); var element_379 = ' CREATE OR REPLACE FUNCTION ch_del_208_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (208, OLD.commentsUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_379); var element_380 = 'DROP TRIGGER IF EXISTS ch_del_208_trig ON Comments'; stmtList.add_11rb$(element_380); var element_381 = ' CREATE TRIGGER ch_del_208_trig AFTER DELETE ON Comments FOR EACH ROW EXECUTE PROCEDURE ch_del_208_fn(); '; stmtList.add_11rb$(element_381); var element_382 = 'CREATE VIEW Comments_ReceiveView AS SELECT Comments.*, CommentsReplicate.* FROM Comments LEFT JOIN CommentsReplicate ON CommentsReplicate.commentsPk = Comments.commentsUid '; stmtList.add_11rb$(element_382); var element_383 = "CREATE OR REPLACE FUNCTION comments_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Comments(commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct) VALUES (NEW.commentsUid, NEW.commentsText, NEW.commentsEntityType, NEW.commentsEntityUid, NEW.commentsPublic, NEW.commentsStatus, NEW.commentsPersonUid, NEW.commentsToPersonUid, NEW.commentSubmitterUid, NEW.commentsFlagged, NEW.commentsInActive, NEW.commentsDateTimeAdded, NEW.commentsDateTimeUpdated, NEW.commentsMCSN, NEW.commentsLCSN, NEW.commentsLCB, NEW.commentsLct) ON CONFLICT (commentsUid) DO UPDATE SET commentsText = EXCLUDED.commentsText, commentsEntityType = EXCLUDED.commentsEntityType, commentsEntityUid = EXCLUDED.commentsEntityUid, commentsPublic = EXCLUDED.commentsPublic, commentsStatus = EXCLUDED.commentsStatus, commentsPersonUid = EXCLUDED.commentsPersonUid, commentsToPersonUid = EXCLUDED.commentsToPersonUid, commentSubmitterUid = EXCLUDED.commentSubmitterUid, commentsFlagged = EXCLUDED.commentsFlagged, commentsInActive = EXCLUDED.commentsInActive, commentsDateTimeAdded = EXCLUDED.commentsDateTimeAdded, commentsDateTimeUpdated = EXCLUDED.commentsDateTimeUpdated, commentsMCSN = EXCLUDED.commentsMCSN, commentsLCSN = EXCLUDED.commentsLCSN, commentsLCB = EXCLUDED.commentsLCB, commentsLct = EXCLUDED.commentsLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_383); var element_384 = 'DROP TRIGGER IF EXISTS comments_remote_insert_trig ON Comments_ReceiveView'; stmtList.add_11rb$(element_384); var element_385 = ' CREATE TRIGGER comments_remote_insert_trig INSTEAD OF INSERT ON Comments_ReceiveView FOR EACH ROW EXECUTE PROCEDURE comments_remote_insert_fn() '; stmtList.add_11rb$(element_385); } return stmtList; } var MIGRATION_102_103; function MIGRATION_103_104$lambda(db) { var stmtList = ArrayList_init(); if (dbType(db) === 1) { var element = 'DROP VIEW IF EXISTS Clazz_ReceiveView'; stmtList.add_11rb$(element); var element_0 = 'DROP TRIGGER IF EXISTS clazz_remote_insert_ins'; stmtList.add_11rb$(element_0); var element_1 = 'CREATE VIEW Clazz_ReceiveView AS SELECT Clazz.*, ClazzReplicate.* FROM Clazz LEFT JOIN ClazzReplicate ON ClazzReplicate.clazzPk = Clazz.clazzUid '; stmtList.add_11rb$(element_1); var element_2 = ' CREATE TRIGGER clazz_remote_insert_ins INSTEAD OF INSERT ON Clazz_ReceiveView FOR EACH ROW BEGIN REPLACE INTO Clazz(clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES (NEW.clazzUid, NEW.clazzName, NEW.clazzDesc, NEW.attendanceAverage, NEW.clazzHolidayUMCalendarUid, NEW.clazzScheuleUMCalendarUid, NEW.isClazzActive, NEW.clazzLocationUid, NEW.clazzStartTime, NEW.clazzEndTime, NEW.clazzFeatures, NEW.clazzSchoolUid, NEW.clazzEnrolmentPolicy, NEW.clazzTerminologyUid, NEW.clazzMasterChangeSeqNum, NEW.clazzLocalChangeSeqNum, NEW.clazzLastChangedBy, NEW.clazzLct, NEW.clazzTimeZone, NEW.clazzStudentsPersonGroupUid, NEW.clazzTeachersPersonGroupUid, NEW.clazzPendingStudentsPersonGroupUid, NEW.clazzParentsPersonGroupUid, NEW.clazzCode) /*psql ON CONFLICT (clazzUid) DO UPDATE SET clazzName = EXCLUDED.clazzName, clazzDesc = EXCLUDED.clazzDesc, attendanceAverage = EXCLUDED.attendanceAverage, clazzHolidayUMCalendarUid = EXCLUDED.clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid = EXCLUDED.clazzScheuleUMCalendarUid, isClazzActive = EXCLUDED.isClazzActive, clazzLocationUid = EXCLUDED.clazzLocationUid, clazzStartTime = EXCLUDED.clazzStartTime, clazzEndTime = EXCLUDED.clazzEndTime, clazzFeatures = EXCLUDED.clazzFeatures, clazzSchoolUid = EXCLUDED.clazzSchoolUid, clazzEnrolmentPolicy = EXCLUDED.clazzEnrolmentPolicy, clazzTerminologyUid = EXCLUDED.clazzTerminologyUid, clazzMasterChangeSeqNum = EXCLUDED.clazzMasterChangeSeqNum, clazzLocalChangeSeqNum = EXCLUDED.clazzLocalChangeSeqNum, clazzLastChangedBy = EXCLUDED.clazzLastChangedBy, clazzLct = EXCLUDED.clazzLct, clazzTimeZone = EXCLUDED.clazzTimeZone, clazzStudentsPersonGroupUid = EXCLUDED.clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid = EXCLUDED.clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid = EXCLUDED.clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid = EXCLUDED.clazzParentsPersonGroupUid, clazzCode = EXCLUDED.clazzCode */; END '; stmtList.add_11rb$(element_2); var element_3 = 'DROP VIEW IF EXISTS XObjectEntity_ReceiveView'; stmtList.add_11rb$(element_3); var element_4 = 'DROP TRIGGER IF EXISTS xobjectentity_remote_insert_ins'; stmtList.add_11rb$(element_4); var element_5 = 'CREATE VIEW XObjectEntity_ReceiveView AS SELECT XObjectEntity.*, XObjectEntityReplicate.* FROM XObjectEntity LEFT JOIN XObjectEntityReplicate ON XObjectEntityReplicate.xoePk = XObjectEntity.xObjectUid '; stmtList.add_11rb$(element_5); var element_6 = ' CREATE TRIGGER xobjectentity_remote_insert_ins INSTEAD OF INSERT ON XObjectEntity_ReceiveView FOR EACH ROW BEGIN REPLACE INTO XObjectEntity(xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, objectStatementRefUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES (NEW.xObjectUid, NEW.objectType, NEW.objectId, NEW.definitionType, NEW.interactionType, NEW.correctResponsePattern, NEW.objectContentEntryUid, NEW.objectStatementRefUid, NEW.xObjectMasterChangeSeqNum, NEW.xObjectocalChangeSeqNum, NEW.xObjectLastChangedBy, NEW.xObjectLct) /*psql ON CONFLICT (xObjectUid) DO UPDATE SET objectType = EXCLUDED.objectType, objectId = EXCLUDED.objectId, definitionType = EXCLUDED.definitionType, interactionType = EXCLUDED.interactionType, correctResponsePattern = EXCLUDED.correctResponsePattern, objectContentEntryUid = EXCLUDED.objectContentEntryUid,objectStatementRefUid = EXCLUDED.objectStatementRefUid, xObjectMasterChangeSeqNum = EXCLUDED.xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum = EXCLUDED.xObjectocalChangeSeqNum, xObjectLastChangedBy = EXCLUDED.xObjectLastChangedBy, xObjectLct = EXCLUDED.xObjectLct */; END '; stmtList.add_11rb$(element_6); } else { var element_7 = 'DROP TRIGGER IF EXISTS clazz_remote_insert_trig ON Clazz_ReceiveView'; stmtList.add_11rb$(element_7); var element_8 = 'DROP VIEW IF EXISTS Clazz_ReceiveView'; stmtList.add_11rb$(element_8); var element_9 = 'CREATE VIEW Clazz_ReceiveView AS SELECT Clazz.*, ClazzReplicate.* FROM Clazz LEFT JOIN ClazzReplicate ON ClazzReplicate.clazzPk = Clazz.clazzUid '; stmtList.add_11rb$(element_9); var element_10 = "CREATE OR REPLACE FUNCTION clazz_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO Clazz(clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode) VALUES (NEW.clazzUid, NEW.clazzName, NEW.clazzDesc, NEW.attendanceAverage, NEW.clazzHolidayUMCalendarUid, NEW.clazzScheuleUMCalendarUid, NEW.isClazzActive, NEW.clazzLocationUid, NEW.clazzStartTime, NEW.clazzEndTime, NEW.clazzFeatures, NEW.clazzSchoolUid, NEW.clazzEnrolmentPolicy, NEW.clazzTerminologyUid, NEW.clazzMasterChangeSeqNum, NEW.clazzLocalChangeSeqNum, NEW.clazzLastChangedBy, NEW.clazzLct, NEW.clazzTimeZone, NEW.clazzStudentsPersonGroupUid, NEW.clazzTeachersPersonGroupUid, NEW.clazzPendingStudentsPersonGroupUid, NEW.clazzParentsPersonGroupUid, NEW.clazzCode) ON CONFLICT (clazzUid) DO UPDATE SET clazzName = EXCLUDED.clazzName, clazzDesc = EXCLUDED.clazzDesc, attendanceAverage = EXCLUDED.attendanceAverage, clazzHolidayUMCalendarUid = EXCLUDED.clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid = EXCLUDED.clazzScheuleUMCalendarUid, isClazzActive = EXCLUDED.isClazzActive, clazzLocationUid = EXCLUDED.clazzLocationUid, clazzStartTime = EXCLUDED.clazzStartTime, clazzEndTime = EXCLUDED.clazzEndTime, clazzFeatures = EXCLUDED.clazzFeatures, clazzSchoolUid = EXCLUDED.clazzSchoolUid, clazzEnrolmentPolicy = EXCLUDED.clazzEnrolmentPolicy, clazzTerminologyUid = EXCLUDED.clazzTerminologyUid, clazzMasterChangeSeqNum = EXCLUDED.clazzMasterChangeSeqNum, clazzLocalChangeSeqNum = EXCLUDED.clazzLocalChangeSeqNum, clazzLastChangedBy = EXCLUDED.clazzLastChangedBy, clazzLct = EXCLUDED.clazzLct, clazzTimeZone = EXCLUDED.clazzTimeZone, clazzStudentsPersonGroupUid = EXCLUDED.clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid = EXCLUDED.clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid = EXCLUDED.clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid = EXCLUDED.clazzParentsPersonGroupUid, clazzCode = EXCLUDED.clazzCode ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_10); var element_11 = ' CREATE TRIGGER clazz_remote_insert_trig INSTEAD OF INSERT ON Clazz_ReceiveView FOR EACH ROW EXECUTE PROCEDURE clazz_remote_insert_fn() '; stmtList.add_11rb$(element_11); var element_12 = 'DROP TRIGGER IF EXISTS xobjectentity_remote_insert_trig ON XObjectEntity_ReceiveView'; stmtList.add_11rb$(element_12); var element_13 = 'DROP VIEW IF EXISTS XObjectEntity_ReceiveView'; stmtList.add_11rb$(element_13); var element_14 = 'CREATE VIEW XObjectEntity_ReceiveView AS SELECT XObjectEntity.*, XObjectEntityReplicate.* FROM XObjectEntity LEFT JOIN XObjectEntityReplicate ON XObjectEntityReplicate.xoePk = XObjectEntity.xObjectUid '; stmtList.add_11rb$(element_14); var element_15 = "CREATE OR REPLACE FUNCTION xobjectentity_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO XObjectEntity(xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, objectStatementRefUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct) VALUES (NEW.xObjectUid, NEW.objectType, NEW.objectId, NEW.definitionType, NEW.interactionType, NEW.correctResponsePattern, NEW.objectContentEntryUid, NEW.objectStatementRefUid, NEW.xObjectMasterChangeSeqNum, NEW.xObjectocalChangeSeqNum, NEW.xObjectLastChangedBy, NEW.xObjectLct) ON CONFLICT (xObjectUid) DO UPDATE SET objectType = EXCLUDED.objectType, objectId = EXCLUDED.objectId, definitionType = EXCLUDED.definitionType, interactionType = EXCLUDED.interactionType, correctResponsePattern = EXCLUDED.correctResponsePattern, objectContentEntryUid = EXCLUDED.objectContentEntryUid,objectStatementRefUid = EXCLUDED.objectStatementRefUid, xObjectMasterChangeSeqNum = EXCLUDED.xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum = EXCLUDED.xObjectocalChangeSeqNum, xObjectLastChangedBy = EXCLUDED.xObjectLastChangedBy, xObjectLct = EXCLUDED.xObjectLct ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_15); var element_16 = ' CREATE TRIGGER xobjectentity_remote_insert_trig INSTEAD OF INSERT ON XObjectEntity_ReceiveView FOR EACH ROW EXECUTE PROCEDURE xobjectentity_remote_insert_fn() '; stmtList.add_11rb$(element_16); } return stmtList; } var MIGRATION_103_104; function MIGRATION_104_105$lambda(db) { var stmtList = ArrayList_init(); if (dbType(db) === 1) { var element = 'CREATE TABLE IF NOT EXISTS ContentEntryPicture (`cepUid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `cepContentEntryUid` INTEGER NOT NULL, `cepUri` TEXT, `cepMd5` TEXT, `cepFileSize` INTEGER NOT NULL, `cepTimestamp` INTEGER NOT NULL, `cepMimeType` TEXT, `cepActive` INTEGER NOT NULL)'; stmtList.add_11rb$(element); var element_0 = 'CREATE TABLE IF NOT EXISTS ContentEntryPictureReplicate (`cepPk` INTEGER NOT NULL, `cepVersionId` INTEGER NOT NULL DEFAULT 0, `cepDestination` INTEGER NOT NULL, `cepPending` INTEGER NOT NULL DEFAULT 1, PRIMARY KEY(`cepPk`, `cepDestination`))'; stmtList.add_11rb$(element_0); var element_1 = 'CREATE INDEX IF NOT EXISTS `index_ContentEntryPictureReplicate_cepPk_cepDestination_cepVersionId` ON ContentEntryPictureReplicate (`cepPk`, `cepDestination`, `cepVersionId`)'; stmtList.add_11rb$(element_1); var element_2 = 'CREATE INDEX IF NOT EXISTS `index_ContentEntryPictureReplicate_cepDestination_cepPending` ON ContentEntryPictureReplicate (`cepDestination`, `cepPending`)'; stmtList.add_11rb$(element_2); var element_3 = ' CREATE TRIGGER ch_ins_138 AFTER INSERT ON ContentEntryPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 138 AS chTableId, NEW.cepUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 138 AND chEntityPk = NEW.cepUid); END '; stmtList.add_11rb$(element_3); var element_4 = ' CREATE TRIGGER ch_upd_138 AFTER UPDATE ON ContentEntryPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 138 AS chTableId, NEW.cepUid AS chEntityPk, 1 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 138 AND chEntityPk = NEW.cepUid); END '; stmtList.add_11rb$(element_4); var element_5 = ' CREATE TRIGGER ch_del_138 AFTER DELETE ON ContentEntryPicture BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) SELECT 138 AS chTableId, OLD.cepUid AS chEntityPk, 2 AS chType WHERE NOT EXISTS( SELECT chTableId FROM ChangeLog WHERE chTableId = 138 AND chEntityPk = OLD.cepUid); END '; stmtList.add_11rb$(element_5); var element_6 = 'CREATE VIEW ContentEntryPicture_ReceiveView AS SELECT ContentEntryPicture.*, ContentEntryPictureReplicate.* FROM ContentEntryPicture LEFT JOIN ContentEntryPictureReplicate ON ContentEntryPictureReplicate.cepPk = ContentEntryPicture.cepUid '; stmtList.add_11rb$(element_6); var element_7 = ' CREATE TRIGGER ceppicture_remote_insert_ins INSTEAD OF INSERT ON ContentEntryPicture_ReceiveView FOR EACH ROW BEGIN REPLACE INTO ContentEntryPicture(cepUid, cepContentEntryUid, cepUri, cepMd5, cepFileSize, cepTimestamp, cepMimeType, cepActive) VALUES (NEW.cepUid, NEW.cepContentEntryUid, NEW.cepUri, NEW.cepMd5, NEW.cepFileSize, NEW.cepTimestamp, NEW.cepMimeType, NEW.cepActive) /*psql ON CONFLICT (cepUid) DO UPDATE SET cepContentEntryUid = EXCLUDED.cepContentEntryUid, cepUri = EXCLUDED.cepUri, cepMd5 = EXCLUDED.cepMd5, cepFileSize = EXCLUDED.cepFileSize, cepTimestamp = EXCLUDED.cepTimestamp, cepMimeType = EXCLUDED.cepMimeType, cepActive = EXCLUDED.cepActive */; END '; stmtList.add_11rb$(element_7); var element_8 = trimMargin('\n |\n | CREATE TRIGGER ATTUPD_ContentEntryPicture\n | AFTER UPDATE ON ContentEntryPicture FOR EACH ROW WHEN\n | OLD.cepMd5 IS NOT NULL\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.cepUri AS zaUri\n | FROM ContentEntryPicture \n | WHERE ContentEntryPicture.cepUid = OLD.cepUid\n | AND (SELECT COUNT(*) \n | FROM ContentEntryPicture\n | WHERE cepMd5 = OLD.cepMd5) = 0\n | ; \n | END\n | \n '); stmtList.add_11rb$(element_8); } else { var element_9 = 'CREATE TABLE IF NOT EXISTS ContentEntryPicture ( cepContentEntryUid BIGINT NOT NULL , cepUri TEXT , cepMd5 TEXT , cepFileSize INTEGER NOT NULL , cepTimestamp BIGINT NOT NULL , cepMimeType TEXT , cepActive BOOL NOT NULL , cepUid BIGSERIAL PRIMARY KEY NOT NULL )'; stmtList.add_11rb$(element_9); var element_10 = 'CREATE TABLE IF NOT EXISTS ContentEntryPictureReplicate ( cepPk BIGINT NOT NULL , cepVersionId BIGINT NOT NULL DEFAULT 0 , cepDestination BIGINT NOT NULL , cepPending BOOL NOT NULL DEFAULT true, PRIMARY KEY (cepPk, cepDestination) )'; stmtList.add_11rb$(element_10); var element_11 = 'CREATE INDEX index_ContentEntryPictureReplicate_cepPk_cepDestination_cepVersionId ON ContentEntryPictureReplicate (cepPk, cepDestination, cepVersionId)'; stmtList.add_11rb$(element_11); var element_12 = 'CREATE INDEX index_ContentEntryPictureReplicate_cepDestination_cepPending ON ContentEntryPictureReplicate (cepDestination, cepPending)'; stmtList.add_11rb$(element_12); var element_13 = ' CREATE OR REPLACE FUNCTION ch_upd_138_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (138, NEW.cepUid, 1) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 1; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_13); var element_14 = ' CREATE TRIGGER ch_upd_138_trig AFTER UPDATE OR INSERT ON ContentEntryPicture FOR EACH ROW EXECUTE PROCEDURE ch_upd_138_fn(); '; stmtList.add_11rb$(element_14); var element_15 = ' CREATE OR REPLACE FUNCTION ch_del_138_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ChangeLog(chTableId, chEntityPk, chType) VALUES (138, OLD.cepUid, 2) ON CONFLICT(chTableId, chEntityPk) DO UPDATE SET chType = 2; RETURN NULL; END $$ LANGUAGE plpgsql '; stmtList.add_11rb$(element_15); var element_16 = ' CREATE TRIGGER ch_del_138_trig AFTER DELETE ON ContentEntryPicture FOR EACH ROW EXECUTE PROCEDURE ch_del_138_fn(); '; stmtList.add_11rb$(element_16); var element_17 = 'CREATE VIEW ContentEntryPicture_ReceiveView AS SELECT ContentEntryPicture.*, ContentEntryPictureReplicate.* FROM ContentEntryPicture LEFT JOIN ContentEntryPictureReplicate ON ContentEntryPictureReplicate.cepPk = ContentEntryPicture.cepUid '; stmtList.add_11rb$(element_17); var element_18 = "CREATE OR REPLACE FUNCTION ceppicture_remote_insert_fn() RETURNS TRIGGER AS $$ BEGIN INSERT INTO ContentEntryPicture(cepUid, cepContentEntryUid, cepUri, cepMd5, cepFileSize, cepTimestamp, cepMimeType, cepActive) VALUES (NEW.cepUid, NEW.cepContentEntryUid, NEW.cepUri, NEW.cepMd5, NEW.cepFileSize, NEW.cepTimestamp, NEW.cepMimeType, NEW.cepActive) ON CONFLICT (cepUid) DO UPDATE SET cepContentEntryUid = EXCLUDED.cepContentEntryUid, cepUri = EXCLUDED.cepUri, cepMd5 = EXCLUDED.cepMd5, cepFileSize = EXCLUDED.cepFileSize, cepTimestamp = EXCLUDED.cepTimestamp, cepMimeType = EXCLUDED.cepMimeType, cepActive = EXCLUDED.cepActive ; IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN RETURN NEW; ELSE RETURN OLD; END IF; END $$ LANGUAGE plpgsql"; stmtList.add_11rb$(element_18); var element_19 = ' CREATE TRIGGER ceppicture_remote_insert_trig INSTEAD OF INSERT ON ContentEntryPicture_ReceiveView FOR EACH ROW EXECUTE PROCEDURE ceppicture_remote_insert_fn() '; stmtList.add_11rb$(element_19); var element_20 = trimMargin('\n | CREATE OR REPLACE FUNCTION attach_ContentEntryPicture_fn() RETURNS trigger AS $$\n | BEGIN\n | \n | INSERT INTO ZombieAttachmentData(zaUri) \n | SELECT OLD.cepUri AS zaUri\n | FROM ContentEntryPicture \n | WHERE ContentEntryPicture.cepUid = OLD.cepUid\n | AND (SELECT COUNT(*) \n | FROM ContentEntryPicture\n | WHERE cepMd5 = OLD.cepMd5) = 0\n |;\n | RETURN NEW;\n | END $$\n | LANGUAGE plpgsql\n '); stmtList.add_11rb$(element_20); var element_21 = trimMargin('\n |CREATE TRIGGER attach_ContentEntryPicture_trig\n |AFTER UPDATE ON ContentEntryPicture\n |FOR EACH ROW WHEN (OLD.cepMd5 IS NOT NULL)\n |EXECUTE PROCEDURE attach_ContentEntryPicture_fn();\n '); stmtList.add_11rb$(element_21); } return stmtList; } var MIGRATION_104_105; function MIGRATION_105_106$lambda(db) { var stmtList = ArrayList_init(); var element = 'ALTER TABLE CourseAssignmentSubmissionAttachment ADD COLUMN casaFileName TEXT'; stmtList.add_11rb$(element); return stmtList; } var MIGRATION_105_106; function MIGRATION_106_107$lambda(db) { var $receiver = ArrayList_init(); $receiver.add_11rb$('DROP TABLE IF EXISTS SqliteChangeSeqNums'); $receiver.add_11rb$('DROP TABLE IF EXISTS UpdateNotification'); return $receiver; } var MIGRATION_106_107; function migrationList() { return listOf([UmAppDatabaseReplicationMigration91_92, MIGRATION_92_93, MIGRATION_93_94, MIGRATION_94_95, MIGRATION_95_96, MIGRATION_96_97, MIGRATION_97_98, MIGRATION_98_99, MIGRATION_99_100, MIGRATION_100_101, MIGRATION_101_102, MIGRATION_102_103, MIGRATION_103_104, MIGRATION_104_105, MIGRATION_105_106, MIGRATION_106_107]); } function AgentEntity() { AgentEntity$Companion_getInstance(); this.agentUid = L0; this.agentMbox = null; this.agentMbox_sha1sum = null; this.agentOpenid = null; this.agentAccountName = null; this.agentHomePage = null; this.agentPersonUid = L0; this.statementMasterChangeSeqNum = L0; this.statementLocalChangeSeqNum = L0; this.statementLastChangedBy = 0; this.agentLct = L0; } function AgentEntity$Companion() { AgentEntity$Companion_instance = this; this.TABLE_ID = 68; } AgentEntity$Companion.prototype.serializer = function () { return AgentEntity$$serializer_getInstance(); }; AgentEntity$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var AgentEntity$Companion_instance = null; function AgentEntity$Companion_getInstance() { if (AgentEntity$Companion_instance === null) { new AgentEntity$Companion(); } return AgentEntity$Companion_instance; } function AgentEntity$$serializer() { this.descriptor_lbfb95$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.AgentEntity', this, 11); this.descriptor.addElement_ivxn3r$('agentUid', true); this.descriptor.addElement_ivxn3r$('agentMbox', true); this.descriptor.addElement_ivxn3r$('agentMbox_sha1sum', true); this.descriptor.addElement_ivxn3r$('agentOpenid', true); this.descriptor.addElement_ivxn3r$('agentAccountName', true); this.descriptor.addElement_ivxn3r$('agentHomePage', true); this.descriptor.addElement_ivxn3r$('agentPersonUid', true); this.descriptor.addElement_ivxn3r$('statementMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('statementLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('statementLastChangedBy', true); this.descriptor.addElement_ivxn3r$('agentLct', true); AgentEntity$$serializer_instance = this; } Object.defineProperty(AgentEntity$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_lbfb95$_0; }}); AgentEntity$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.agentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.agentUid); if (!equals(value.agentMbox, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.agentMbox); if (!equals(value.agentMbox_sha1sum, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.agentMbox_sha1sum); if (!equals(value.agentOpenid, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.agentOpenid); if (!equals(value.agentAccountName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.agentAccountName); if (!equals(value.agentHomePage, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.agentHomePage); if (!equals(value.agentPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.agentPersonUid); if (!equals(value.statementMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.statementMasterChangeSeqNum); if (!equals(value.statementLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.statementLocalChangeSeqNum); if (!equals(value.statementLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.statementLastChangedBy); if (!equals(value.agentLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.agentLct); output.endStructure_24f42q$(this.descriptor); }; AgentEntity$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return AgentEntity_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, null); }; AgentEntity$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; AgentEntity$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var AgentEntity$$serializer_instance = null; function AgentEntity$$serializer_getInstance() { if (AgentEntity$$serializer_instance === null) { new AgentEntity$$serializer(); } return AgentEntity$$serializer_instance; } function AgentEntity_init(seen1, agentUid, agentMbox, agentMbox_sha1sum, agentOpenid, agentAccountName, agentHomePage, agentPersonUid, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, agentLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(AgentEntity.prototype); if ((seen1 & 1) === 0) $this.agentUid = L0; else $this.agentUid = agentUid; if ((seen1 & 2) === 0) $this.agentMbox = null; else $this.agentMbox = agentMbox; if ((seen1 & 4) === 0) $this.agentMbox_sha1sum = null; else $this.agentMbox_sha1sum = agentMbox_sha1sum; if ((seen1 & 8) === 0) $this.agentOpenid = null; else $this.agentOpenid = agentOpenid; if ((seen1 & 16) === 0) $this.agentAccountName = null; else $this.agentAccountName = agentAccountName; if ((seen1 & 32) === 0) $this.agentHomePage = null; else $this.agentHomePage = agentHomePage; if ((seen1 & 64) === 0) $this.agentPersonUid = L0; else $this.agentPersonUid = agentPersonUid; if ((seen1 & 128) === 0) $this.statementMasterChangeSeqNum = L0; else $this.statementMasterChangeSeqNum = statementMasterChangeSeqNum; if ((seen1 & 256) === 0) $this.statementLocalChangeSeqNum = L0; else $this.statementLocalChangeSeqNum = statementLocalChangeSeqNum; if ((seen1 & 512) === 0) $this.statementLastChangedBy = 0; else $this.statementLastChangedBy = statementLastChangedBy; if ((seen1 & 1024) === 0) $this.agentLct = L0; else $this.agentLct = agentLct; return $this; } AgentEntity.$metadata$ = {kind: Kind_CLASS, simpleName: 'AgentEntity', interfaces: []}; var AgentEntityReplicate$Companion_instance = null; function AgentEntityReplicate$$serializer() { this.descriptor_ndm5mc$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.AgentEntityReplicate', this, 4); this.descriptor.addElement_ivxn3r$('aePk', true); this.descriptor.addElement_ivxn3r$('aeVersionId', true); this.descriptor.addElement_ivxn3r$('aeDestination', true); this.descriptor.addElement_ivxn3r$('aePending', true); AgentEntityReplicate$$serializer_instance = this; } var AgentEntityReplicate$$serializer_instance = null; function AssignmentProgressSummary() { AssignmentProgressSummary$Companion_getInstance(); this.notSubmittedStudents = 0; this.submittedStudents = 0; this.totalStudents = 0; this.markedStudents = 0; this.hasMetricsPermission = false; } AssignmentProgressSummary.prototype.calculateNotSubmittedStudents = function () { this.notSubmittedStudents = this.totalStudents - this.markedStudents - this.submittedStudents | 0; return this.notSubmittedStudents; }; function AssignmentProgressSummary$Companion() { AssignmentProgressSummary$Companion_instance = this; } AssignmentProgressSummary$Companion.prototype.serializer = function () { return AssignmentProgressSummary$$serializer_getInstance(); }; AssignmentProgressSummary$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var AssignmentProgressSummary$Companion_instance = null; function AssignmentProgressSummary$Companion_getInstance() { if (AssignmentProgressSummary$Companion_instance === null) { new AssignmentProgressSummary$Companion(); } return AssignmentProgressSummary$Companion_instance; } function AssignmentProgressSummary$$serializer() { this.descriptor_qpfaj$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.AssignmentProgressSummary', this, 5); this.descriptor.addElement_ivxn3r$('notSubmittedStudents', true); this.descriptor.addElement_ivxn3r$('submittedStudents', true); this.descriptor.addElement_ivxn3r$('totalStudents', true); this.descriptor.addElement_ivxn3r$('markedStudents', true); this.descriptor.addElement_ivxn3r$('hasMetricsPermission', true); AssignmentProgressSummary$$serializer_instance = this; } Object.defineProperty(AssignmentProgressSummary$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_qpfaj$_0; }}); AssignmentProgressSummary$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.notSubmittedStudents, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeIntElement_ptg7oe$(this.descriptor, 0, value.notSubmittedStudents); if (!equals(value.submittedStudents, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeIntElement_ptg7oe$(this.descriptor, 1, value.submittedStudents); if (!equals(value.totalStudents, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.totalStudents); if (!equals(value.markedStudents, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.markedStudents); if (!equals(value.hasMetricsPermission, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.hasMetricsPermission); output.endStructure_24f42q$(this.descriptor); }; AssignmentProgressSummary$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeIntElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeIntElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return AssignmentProgressSummary_init(bitMask0, local0, local1, local2, local3, local4, null); }; AssignmentProgressSummary$$serializer.prototype.childSerializers = function () { return [internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.BooleanSerializer]; }; AssignmentProgressSummary$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var AssignmentProgressSummary$$serializer_instance = null; function AssignmentProgressSummary$$serializer_getInstance() { if (AssignmentProgressSummary$$serializer_instance === null) { new AssignmentProgressSummary$$serializer(); } return AssignmentProgressSummary$$serializer_instance; } function AssignmentProgressSummary_init(seen1, notSubmittedStudents, submittedStudents, totalStudents, markedStudents, hasMetricsPermission, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(AssignmentProgressSummary.prototype); if ((seen1 & 1) === 0) $this.notSubmittedStudents = 0; else $this.notSubmittedStudents = notSubmittedStudents; if ((seen1 & 2) === 0) $this.submittedStudents = 0; else $this.submittedStudents = submittedStudents; if ((seen1 & 4) === 0) $this.totalStudents = 0; else $this.totalStudents = totalStudents; if ((seen1 & 8) === 0) $this.markedStudents = 0; else $this.markedStudents = markedStudents; if ((seen1 & 16) === 0) $this.hasMetricsPermission = false; else $this.hasMetricsPermission = hasMetricsPermission; return $this; } AssignmentProgressSummary.$metadata$ = {kind: Kind_CLASS, simpleName: 'AssignmentProgressSummary', interfaces: []}; function Chat() { Chat$Companion_getInstance(); this.chatUid = L0; this.chatStartDate = L0; this.chatTitle = null; this.chatGroup = false; this.chatLct = L0; } function Chat$Companion() { Chat$Companion_instance = this; this.TABLE_ID = 127; } Chat$Companion.prototype.serializer = function () { return Chat$$serializer_getInstance(); }; Chat$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var Chat$Companion_instance = null; function Chat$Companion_getInstance() { if (Chat$Companion_instance === null) { new Chat$Companion(); } return Chat$Companion_instance; } function Chat$$serializer() { this.descriptor_2fmgmb$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.Chat', this, 5); this.descriptor.addElement_ivxn3r$('chatUid', true); this.descriptor.addElement_ivxn3r$('chatStartDate', true); this.descriptor.addElement_ivxn3r$('chatTitle', true); this.descriptor.addElement_ivxn3r$('chatGroup', true); this.descriptor.addElement_ivxn3r$('chatLct', true); Chat$$serializer_instance = this; } Object.defineProperty(Chat$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_2fmgmb$_0; }}); Chat$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.chatUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.chatUid); if (!equals(value.chatStartDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.chatStartDate); if (!equals(value.chatTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.chatTitle); if (!equals(value.chatGroup, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 3, value.chatGroup); if (!equals(value.chatLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.chatLct); output.endStructure_24f42q$(this.descriptor); }; Chat$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeBooleanElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return Chat_init(bitMask0, local0, local1, local2, local3, local4, null); }; Chat$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.LongSerializer]; }; Chat$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var Chat$$serializer_instance = null; function Chat$$serializer_getInstance() { if (Chat$$serializer_instance === null) { new Chat$$serializer(); } return Chat$$serializer_instance; } function Chat_init(seen1, chatUid, chatStartDate, chatTitle, chatGroup, chatLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(Chat.prototype); if ((seen1 & 1) === 0) $this.chatUid = L0; else $this.chatUid = chatUid; if ((seen1 & 2) === 0) $this.chatStartDate = L0; else $this.chatStartDate = chatStartDate; if ((seen1 & 4) === 0) $this.chatTitle = null; else $this.chatTitle = chatTitle; if ((seen1 & 8) === 0) $this.chatGroup = false; else $this.chatGroup = chatGroup; if ((seen1 & 16) === 0) $this.chatLct = L0; else $this.chatLct = chatLct; return $this; } Chat.$metadata$ = {kind: Kind_CLASS, simpleName: 'Chat', interfaces: []}; function Chat_init_1(title, isGroup, $this) { $this = $this || Object.create(Chat.prototype); Chat.call($this); $this.chatTitle = title; $this.chatGroup = isGroup; $this.chatStartDate = systemTimeInMillis(); return $this; } function ChatMember() { ChatMember$Companion_getInstance(); this.chatMemberUid = L0; this.chatMemberChatUid = L0; this.chatMemberPersonUid = L0; this.chatMemberJoinedDate = L0; this.chatMemberLeftDate = Long$Companion$MAX_VALUE; this.chatMemberLct = L0; } function ChatMember$Companion() { ChatMember$Companion_instance = this; this.TABLE_ID = 128; } ChatMember$Companion.prototype.serializer = function () { return ChatMember$$serializer_getInstance(); }; ChatMember$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ChatMember$Companion_instance = null; function ChatMember$Companion_getInstance() { if (ChatMember$Companion_instance === null) { new ChatMember$Companion(); } return ChatMember$Companion_instance; } function ChatMember$$serializer() { this.descriptor_uhefxf$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ChatMember', this, 6); this.descriptor.addElement_ivxn3r$('chatMemberUid', true); this.descriptor.addElement_ivxn3r$('chatMemberChatUid', true); this.descriptor.addElement_ivxn3r$('chatMemberPersonUid', true); this.descriptor.addElement_ivxn3r$('chatMemberJoinedDate', true); this.descriptor.addElement_ivxn3r$('chatMemberLeftDate', true); this.descriptor.addElement_ivxn3r$('chatMemberLct', true); ChatMember$$serializer_instance = this; } Object.defineProperty(ChatMember$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_uhefxf$_0; }}); ChatMember$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.chatMemberUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.chatMemberUid); if (!equals(value.chatMemberChatUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.chatMemberChatUid); if (!equals(value.chatMemberPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.chatMemberPersonUid); if (!equals(value.chatMemberJoinedDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.chatMemberJoinedDate); if (!equals(value.chatMemberLeftDate, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.chatMemberLeftDate); if (!equals(value.chatMemberLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.chatMemberLct); output.endStructure_24f42q$(this.descriptor); }; ChatMember$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ChatMember_init(bitMask0, local0, local1, local2, local3, local4, local5, null); }; ChatMember$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer]; }; ChatMember$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ChatMember$$serializer_instance = null; function ChatMember$$serializer_getInstance() { if (ChatMember$$serializer_instance === null) { new ChatMember$$serializer(); } return ChatMember$$serializer_instance; } function ChatMember_init(seen1, chatMemberUid, chatMemberChatUid, chatMemberPersonUid, chatMemberJoinedDate, chatMemberLeftDate, chatMemberLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ChatMember.prototype); if ((seen1 & 1) === 0) $this.chatMemberUid = L0; else $this.chatMemberUid = chatMemberUid; if ((seen1 & 2) === 0) $this.chatMemberChatUid = L0; else $this.chatMemberChatUid = chatMemberChatUid; if ((seen1 & 4) === 0) $this.chatMemberPersonUid = L0; else $this.chatMemberPersonUid = chatMemberPersonUid; if ((seen1 & 8) === 0) $this.chatMemberJoinedDate = L0; else $this.chatMemberJoinedDate = chatMemberJoinedDate; if ((seen1 & 16) === 0) $this.chatMemberLeftDate = Long$Companion$MAX_VALUE; else $this.chatMemberLeftDate = chatMemberLeftDate; if ((seen1 & 32) === 0) $this.chatMemberLct = L0; else $this.chatMemberLct = chatMemberLct; return $this; } ChatMember.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatMember', interfaces: []}; function ChatMember_init_0(chatUid, personUid, $this) { $this = $this || Object.create(ChatMember.prototype); ChatMember.call($this); $this.chatMemberChatUid = chatUid; $this.chatMemberPersonUid = personUid; $this.chatMemberJoinedDate = systemTimeInMillis(); return $this; } var ChatMemberReplicate$Companion_instance = null; function ChatMemberReplicate$$serializer() { this.descriptor_udj2yy$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ChatMemberReplicate', this, 4); this.descriptor.addElement_ivxn3r$('chatMemberPk', true); this.descriptor.addElement_ivxn3r$('chatMemberVersionId', true); this.descriptor.addElement_ivxn3r$('chatMemberDestination', true); this.descriptor.addElement_ivxn3r$('chatMemberPending', true); ChatMemberReplicate$$serializer_instance = this; } var ChatMemberReplicate$$serializer_instance = null; var ChatReplicate$Companion_instance = null; function ChatReplicate$$serializer() { this.descriptor_5v3kmo$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ChatReplicate', this, 4); this.descriptor.addElement_ivxn3r$('chatPk', true); this.descriptor.addElement_ivxn3r$('chatVersionId', true); this.descriptor.addElement_ivxn3r$('chatDestination', true); this.descriptor.addElement_ivxn3r$('chatPending', true); ChatReplicate$$serializer_instance = this; } var ChatReplicate$$serializer_instance = null; function ChatWithLatestMessageAndCount() { ChatWithLatestMessageAndCount$Companion_getInstance(); Chat.call(this); this.unreadMessageCount = 0; this.latestMessage = null; this.latestMessageTimestamp = L0; this.otherPersonUid = L0; this.otherPersonFirstNames = null; this.otherPersonLastName = null; } Object.defineProperty(ChatWithLatestMessageAndCount.prototype, 'chatName', {configurable: true, get: function () { var tmp$, tmp$_0; if (this.chatGroup) { return this.chatTitle; } else { var f = ''; var l = ''; if (this.otherPersonFirstNames != null) { f = typeof (tmp$ = this.otherPersonFirstNames) === 'string' ? tmp$ : throwCCE(); } if (this.otherPersonLastName != null) { l = typeof (tmp$_0 = this.otherPersonLastName) === 'string' ? tmp$_0 : throwCCE(); } return f + ' ' + l; } }}); ChatWithLatestMessageAndCount.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, ChatWithLatestMessageAndCount) ? tmp$_0 : throwCCE(); if (this.unreadMessageCount !== other.unreadMessageCount) return false; if (!equals(this.latestMessage, other.latestMessage)) return false; if (!equals(this.otherPersonUid, other.otherPersonUid)) return false; if (!equals(this.otherPersonFirstNames, other.otherPersonFirstNames)) return false; if (!equals(this.otherPersonLastName, other.otherPersonLastName)) return false; return true; }; ChatWithLatestMessageAndCount.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4; var result = this.unreadMessageCount; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.latestMessage) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + hashCode(this.otherPersonUid) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.otherPersonFirstNames) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + ((tmp$_4 = (tmp$_3 = this.otherPersonLastName) != null ? hashCode(tmp$_3) : null) != null ? tmp$_4 : 0) | 0; return result; }; function ChatWithLatestMessageAndCount$Companion() { ChatWithLatestMessageAndCount$Companion_instance = this; } ChatWithLatestMessageAndCount$Companion.prototype.serializer = function () { return ChatWithLatestMessageAndCount$$serializer_getInstance(); }; ChatWithLatestMessageAndCount$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ChatWithLatestMessageAndCount$Companion_instance = null; function ChatWithLatestMessageAndCount$Companion_getInstance() { if (ChatWithLatestMessageAndCount$Companion_instance === null) { new ChatWithLatestMessageAndCount$Companion(); } return ChatWithLatestMessageAndCount$Companion_instance; } function ChatWithLatestMessageAndCount$$serializer() { this.descriptor_gcec55$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ChatWithLatestMessageAndCount', this, 11); this.descriptor.addElement_ivxn3r$('chatUid', true); this.descriptor.addElement_ivxn3r$('chatStartDate', true); this.descriptor.addElement_ivxn3r$('chatTitle', true); this.descriptor.addElement_ivxn3r$('chatGroup', true); this.descriptor.addElement_ivxn3r$('chatLct', true); this.descriptor.addElement_ivxn3r$('unreadMessageCount', true); this.descriptor.addElement_ivxn3r$('latestMessage', true); this.descriptor.addElement_ivxn3r$('latestMessageTimestamp', true); this.descriptor.addElement_ivxn3r$('otherPersonUid', true); this.descriptor.addElement_ivxn3r$('otherPersonFirstNames', true); this.descriptor.addElement_ivxn3r$('otherPersonLastName', true); ChatWithLatestMessageAndCount$$serializer_instance = this; } Object.defineProperty(ChatWithLatestMessageAndCount$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_gcec55$_0; }}); ChatWithLatestMessageAndCount$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.chatUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.chatUid); if (!equals(value.chatStartDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.chatStartDate); if (!equals(value.chatTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.chatTitle); if (!equals(value.chatGroup, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 3, value.chatGroup); if (!equals(value.chatLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.chatLct); if (!equals(value.unreadMessageCount, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.unreadMessageCount); if (!equals(value.latestMessage, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 6, internal.StringSerializer, value.latestMessage); if (!equals(value.latestMessageTimestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.latestMessageTimestamp); if (!equals(value.otherPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.otherPersonUid); if (!equals(value.otherPersonFirstNames, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.otherPersonFirstNames); if (!equals(value.otherPersonLastName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.otherPersonLastName); output.endStructure_24f42q$(this.descriptor); }; ChatWithLatestMessageAndCount$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeBooleanElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 6, internal.StringSerializer, local6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ChatWithLatestMessageAndCount_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, null); }; ChatWithLatestMessageAndCount$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.LongSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer)]; }; ChatWithLatestMessageAndCount$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ChatWithLatestMessageAndCount$$serializer_instance = null; function ChatWithLatestMessageAndCount$$serializer_getInstance() { if (ChatWithLatestMessageAndCount$$serializer_instance === null) { new ChatWithLatestMessageAndCount$$serializer(); } return ChatWithLatestMessageAndCount$$serializer_instance; } function ChatWithLatestMessageAndCount_init(seen1, chatUid, chatStartDate, chatTitle, chatGroup, chatLct, unreadMessageCount, latestMessage, latestMessageTimestamp, otherPersonUid, otherPersonFirstNames, otherPersonLastName, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ChatWithLatestMessageAndCount.prototype); $this = Chat_init(seen1, chatUid, chatStartDate, chatTitle, chatGroup, chatLct, $this); if ((seen1 & 32) === 0) $this.unreadMessageCount = 0; else $this.unreadMessageCount = unreadMessageCount; if ((seen1 & 64) === 0) $this.latestMessage = null; else $this.latestMessage = latestMessage; if ((seen1 & 128) === 0) $this.latestMessageTimestamp = L0; else $this.latestMessageTimestamp = latestMessageTimestamp; if ((seen1 & 256) === 0) $this.otherPersonUid = L0; else $this.otherPersonUid = otherPersonUid; if ((seen1 & 512) === 0) $this.otherPersonFirstNames = null; else $this.otherPersonFirstNames = otherPersonFirstNames; if ((seen1 & 1024) === 0) $this.otherPersonLastName = null; else $this.otherPersonLastName = otherPersonLastName; return $this; } ChatWithLatestMessageAndCount.$metadata$ = {kind: Kind_CLASS, simpleName: 'ChatWithLatestMessageAndCount', interfaces: [Chat]}; function Clazz() { Clazz$Companion_getInstance(); this.clazzUid = L0; this.clazzName = null; this.clazzDesc = null; this.attendanceAverage = -1.0; this.clazzHolidayUMCalendarUid = L0; this.clazzScheuleUMCalendarUid = L0; this.isClazzActive = false; this.clazzLocationUid = L0; this.clazzStartTime = L0; this.clazzEndTime = Long$Companion$MAX_VALUE; this.clazzFeatures = Clazz$Companion_getInstance().CLAZZ_FEATURE_ATTENDANCE; this.clazzSchoolUid = L0; this.clazzEnrolmentPolicy = 102; this.clazzTerminologyUid = L25966; this.clazzMasterChangeSeqNum = L0; this.clazzLocalChangeSeqNum = L0; this.clazzLastChangedBy = 0; this.clazzLct = L0; this.clazzTimeZone = null; this.clazzStudentsPersonGroupUid = L0; this.clazzTeachersPersonGroupUid = L0; this.clazzPendingStudentsPersonGroupUid = L0; this.clazzParentsPersonGroupUid = L0; this.clazzCode = null; } Clazz.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, Clazz) ? tmp$_0 : throwCCE(); if (!equals(this.clazzUid, other.clazzUid)) return false; if (!equals(this.clazzName, other.clazzName)) return false; if (!equals(this.clazzDesc, other.clazzDesc)) return false; if (this.attendanceAverage !== other.attendanceAverage) return false; if (!equals(this.clazzHolidayUMCalendarUid, other.clazzHolidayUMCalendarUid)) return false; if (!equals(this.clazzScheuleUMCalendarUid, other.clazzScheuleUMCalendarUid)) return false; if (this.isClazzActive !== other.isClazzActive) return false; if (!equals(this.clazzLocationUid, other.clazzLocationUid)) return false; if (!equals(this.clazzStartTime, other.clazzStartTime)) return false; if (!equals(this.clazzEndTime, other.clazzEndTime)) return false; if (!equals(this.clazzFeatures, other.clazzFeatures)) return false; if (!equals(this.clazzSchoolUid, other.clazzSchoolUid)) return false; if (!equals(this.clazzMasterChangeSeqNum, other.clazzMasterChangeSeqNum)) return false; if (!equals(this.clazzLocalChangeSeqNum, other.clazzLocalChangeSeqNum)) return false; if (this.clazzLastChangedBy !== other.clazzLastChangedBy) return false; if (!equals(this.clazzLct, other.clazzLct)) return false; if (!equals(this.clazzTimeZone, other.clazzTimeZone)) return false; if (!equals(this.clazzStudentsPersonGroupUid, other.clazzStudentsPersonGroupUid)) return false; if (!equals(this.clazzTeachersPersonGroupUid, other.clazzTeachersPersonGroupUid)) return false; if (!equals(this.clazzPendingStudentsPersonGroupUid, other.clazzPendingStudentsPersonGroupUid)) return false; if (!equals(this.clazzParentsPersonGroupUid, other.clazzParentsPersonGroupUid)) return false; if (!equals(this.clazzCode, other.clazzCode)) return false; return true; }; Clazz.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5, tmp$_6; var result = hashCode(this.clazzUid); result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.clazzName) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.clazzDesc) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + hashCode(this.attendanceAverage) | 0; result = (31 * result | 0) + hashCode(this.clazzHolidayUMCalendarUid) | 0; result = (31 * result | 0) + hashCode(this.clazzScheuleUMCalendarUid) | 0; result = (31 * result | 0) + hashCode(this.isClazzActive) | 0; result = (31 * result | 0) + hashCode(this.clazzLocationUid) | 0; result = (31 * result | 0) + hashCode(this.clazzStartTime) | 0; result = (31 * result | 0) + hashCode(this.clazzEndTime) | 0; result = (31 * result | 0) + hashCode(this.clazzFeatures) | 0; result = (31 * result | 0) + hashCode(this.clazzSchoolUid) | 0; result = (31 * result | 0) + hashCode(this.clazzMasterChangeSeqNum) | 0; result = (31 * result | 0) + hashCode(this.clazzLocalChangeSeqNum) | 0; result = (31 * result | 0) + this.clazzLastChangedBy | 0; result = (31 * result | 0) + hashCode(this.clazzLct) | 0; result = (31 * result | 0) + ((tmp$_4 = (tmp$_3 = this.clazzTimeZone) != null ? hashCode(tmp$_3) : null) != null ? tmp$_4 : 0) | 0; result = (31 * result | 0) + hashCode(this.clazzStudentsPersonGroupUid) | 0; result = (31 * result | 0) + hashCode(this.clazzTeachersPersonGroupUid) | 0; result = (31 * result | 0) + hashCode(this.clazzPendingStudentsPersonGroupUid) | 0; result = (31 * result | 0) + hashCode(this.clazzParentsPersonGroupUid) | 0; result = (31 * result | 0) + ((tmp$_6 = (tmp$_5 = this.clazzCode) != null ? hashCode(tmp$_5) : null) != null ? tmp$_6 : 0) | 0; return result; }; function Clazz$Companion() { Clazz$Companion_instance = this; this.TABLE_ID = 6; this.CLAZZ_FEATURE_ATTENDANCE = L1; this.CLAZZ_FEATURE_ACTIVITY = L4; this.CLAZZ_FEATURE_CLAZZ_ASSIGNMENT = L8; this.CLAZZ_CODE_DEFAULT_LENGTH = 6; this.CLAZZ_ENROLMENT_POLICY_WITH_LINK = 100; this.CLAZZ_ENROLMENT_POLICY_OPEN = 102; this.JOIN_SCOPEDGRANT_ON_CLAUSE = '\n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 6\n AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n OR (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n '; this.JOIN_FROM_CLAZZ_TO_USERSESSION_VIA_SCOPEDGRANT_PT1 = '\n JOIN ScopedGrant\n ON \n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 6\n AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n OR (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n \n AND (ScopedGrant.sgPermissions & \n '; this.JOIN_FROM_SCOPEDGRANT_TO_PERSONGROUPMEMBER = '\n ) > 0\n JOIN PersonGroupMember AS PrsGrpMbr\n ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n '; this.JOIN_FROM_CLAZZ_TO_USERSESSION_VIA_SCOPEDGRANT_PT2 = '\n \n ) > 0\n JOIN PersonGroupMember AS PrsGrpMbr\n ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n \n JOIN UserSession\n ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n AND UserSession.usStatus = 1\n '; this.JOIN_FROM_PERSONGROUPMEMBER_TO_CLAZZ_VIA_SCOPEDGRANT_PT1 = '\n JOIN ScopedGrant\n ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n AND (ScopedGrant.sgPermissions & \n '; this.JOIN_FROM_PERSONGROUPMEMBER_TO_CLAZZ_VIA_SCOPEDGRANT_PT2 = '\n ) > 0\n JOIN Clazz \n ON \n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 6\n AND ScopedGrant.sgEntityUid = Clazz.clazzUid)\n OR (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid = Clazz.clazzSchoolUid))\n \n '; } Clazz$Companion.prototype.serializer = function () { return Clazz$$serializer_getInstance(); }; Clazz$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var Clazz$Companion_instance = null; function Clazz$Companion_getInstance() { if (Clazz$Companion_instance === null) { new Clazz$Companion(); } return Clazz$Companion_instance; } function Clazz$$serializer() { this.descriptor_vv0e95$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.Clazz', this, 24); this.descriptor.addElement_ivxn3r$('clazzUid', true); this.descriptor.addElement_ivxn3r$('clazzName', true); this.descriptor.addElement_ivxn3r$('clazzDesc', true); this.descriptor.addElement_ivxn3r$('attendanceAverage', true); this.descriptor.addElement_ivxn3r$('clazzHolidayUMCalendarUid', true); this.descriptor.addElement_ivxn3r$('clazzScheuleUMCalendarUid', true); this.descriptor.addElement_ivxn3r$('isClazzActive', true); this.descriptor.addElement_ivxn3r$('clazzLocationUid', true); this.descriptor.addElement_ivxn3r$('clazzStartTime', true); this.descriptor.addElement_ivxn3r$('clazzEndTime', true); this.descriptor.addElement_ivxn3r$('clazzFeatures', true); this.descriptor.addElement_ivxn3r$('clazzSchoolUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentPolicy', true); this.descriptor.addElement_ivxn3r$('clazzTerminologyUid', true); this.descriptor.addElement_ivxn3r$('clazzMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLastChangedBy', true); this.descriptor.addElement_ivxn3r$('clazzLct', true); this.descriptor.addElement_ivxn3r$('clazzTimeZone', true); this.descriptor.addElement_ivxn3r$('clazzStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzTeachersPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzPendingStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzParentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzCode', true); Clazz$$serializer_instance = this; } Object.defineProperty(Clazz$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_vv0e95$_0; }}); Clazz$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.clazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.clazzUid); if (!equals(value.clazzName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.clazzName); if (!equals(value.clazzDesc, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.clazzDesc); if (!equals(value.attendanceAverage, -1.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeFloatElement_lf6hpt$(this.descriptor, 3, value.attendanceAverage); if (!equals(value.clazzHolidayUMCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.clazzHolidayUMCalendarUid); if (!equals(value.clazzScheuleUMCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.clazzScheuleUMCalendarUid); if (!equals(value.isClazzActive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.isClazzActive); if (!equals(value.clazzLocationUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.clazzLocationUid); if (!equals(value.clazzStartTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.clazzStartTime); if (!equals(value.clazzEndTime, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.clazzEndTime); if (!equals(value.clazzFeatures, Clazz$Companion_getInstance().CLAZZ_FEATURE_ATTENDANCE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.clazzFeatures); if (!equals(value.clazzSchoolUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.clazzSchoolUid); if (!equals(value.clazzEnrolmentPolicy, 102) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.clazzEnrolmentPolicy); if (!equals(value.clazzTerminologyUid, L25966) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.clazzTerminologyUid); if (!equals(value.clazzMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.clazzMasterChangeSeqNum); if (!equals(value.clazzLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeLongElement_j0o2mv$(this.descriptor, 15, value.clazzLocalChangeSeqNum); if (!equals(value.clazzLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeIntElement_ptg7oe$(this.descriptor, 16, value.clazzLastChangedBy); if (!equals(value.clazzLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.clazzLct); if (!equals(value.clazzTimeZone, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 18, internal.StringSerializer, value.clazzTimeZone); if (!equals(value.clazzStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.clazzStudentsPersonGroupUid); if (!equals(value.clazzTeachersPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeLongElement_j0o2mv$(this.descriptor, 20, value.clazzTeachersPersonGroupUid); if (!equals(value.clazzPendingStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.clazzPendingStudentsPersonGroupUid); if (!equals(value.clazzParentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.clazzParentsPersonGroupUid); if (!equals(value.clazzCode, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 23, internal.StringSerializer, value.clazzCode); output.endStructure_24f42q$(this.descriptor); }; Clazz$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeFloatElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeLongElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeIntElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 18, internal.StringSerializer, local18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeLongElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 23, internal.StringSerializer, local23); bitMask0 |= 8388608; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return Clazz_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, null); }; Clazz$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.FloatSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer)]; }; Clazz$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var Clazz$$serializer_instance = null; function Clazz$$serializer_getInstance() { if (Clazz$$serializer_instance === null) { new Clazz$$serializer(); } return Clazz$$serializer_instance; } function Clazz_init(seen1, clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(Clazz.prototype); if ((seen1 & 1) === 0) $this.clazzUid = L0; else $this.clazzUid = clazzUid; if ((seen1 & 2) === 0) $this.clazzName = null; else $this.clazzName = clazzName; if ((seen1 & 4) === 0) $this.clazzDesc = null; else $this.clazzDesc = clazzDesc; if ((seen1 & 8) === 0) $this.attendanceAverage = -1.0; else $this.attendanceAverage = attendanceAverage; if ((seen1 & 16) === 0) $this.clazzHolidayUMCalendarUid = L0; else $this.clazzHolidayUMCalendarUid = clazzHolidayUMCalendarUid; if ((seen1 & 32) === 0) $this.clazzScheuleUMCalendarUid = L0; else $this.clazzScheuleUMCalendarUid = clazzScheuleUMCalendarUid; if ((seen1 & 64) === 0) $this.isClazzActive = false; else $this.isClazzActive = isClazzActive; if ((seen1 & 128) === 0) $this.clazzLocationUid = L0; else $this.clazzLocationUid = clazzLocationUid; if ((seen1 & 256) === 0) $this.clazzStartTime = L0; else $this.clazzStartTime = clazzStartTime; if ((seen1 & 512) === 0) $this.clazzEndTime = Long$Companion$MAX_VALUE; else $this.clazzEndTime = clazzEndTime; if ((seen1 & 1024) === 0) $this.clazzFeatures = Clazz$Companion_getInstance().CLAZZ_FEATURE_ATTENDANCE; else $this.clazzFeatures = clazzFeatures; if ((seen1 & 2048) === 0) $this.clazzSchoolUid = L0; else $this.clazzSchoolUid = clazzSchoolUid; if ((seen1 & 4096) === 0) $this.clazzEnrolmentPolicy = 102; else $this.clazzEnrolmentPolicy = clazzEnrolmentPolicy; if ((seen1 & 8192) === 0) $this.clazzTerminologyUid = L25966; else $this.clazzTerminologyUid = clazzTerminologyUid; if ((seen1 & 16384) === 0) $this.clazzMasterChangeSeqNum = L0; else $this.clazzMasterChangeSeqNum = clazzMasterChangeSeqNum; if ((seen1 & 32768) === 0) $this.clazzLocalChangeSeqNum = L0; else $this.clazzLocalChangeSeqNum = clazzLocalChangeSeqNum; if ((seen1 & 65536) === 0) $this.clazzLastChangedBy = 0; else $this.clazzLastChangedBy = clazzLastChangedBy; if ((seen1 & 131072) === 0) $this.clazzLct = L0; else $this.clazzLct = clazzLct; if ((seen1 & 262144) === 0) $this.clazzTimeZone = null; else $this.clazzTimeZone = clazzTimeZone; if ((seen1 & 524288) === 0) $this.clazzStudentsPersonGroupUid = L0; else $this.clazzStudentsPersonGroupUid = clazzStudentsPersonGroupUid; if ((seen1 & 1048576) === 0) $this.clazzTeachersPersonGroupUid = L0; else $this.clazzTeachersPersonGroupUid = clazzTeachersPersonGroupUid; if ((seen1 & 2097152) === 0) $this.clazzPendingStudentsPersonGroupUid = L0; else $this.clazzPendingStudentsPersonGroupUid = clazzPendingStudentsPersonGroupUid; if ((seen1 & 4194304) === 0) $this.clazzParentsPersonGroupUid = L0; else $this.clazzParentsPersonGroupUid = clazzParentsPersonGroupUid; if ((seen1 & 8388608) === 0) $this.clazzCode = null; else $this.clazzCode = clazzCode; return $this; } Clazz.$metadata$ = {kind: Kind_CLASS, simpleName: 'Clazz', interfaces: []}; function ClazzAssignment() { ClazzAssignment$Companion_getInstance(); this.caUid = L0; this.caTitle = null; this.caDescription = null; this.caGroupUid = L0; this.caActive = true; this.caClassCommentEnabled = true; this.caPrivateCommentsEnabled = true; this.caCompletionCriteria = 100; this.caRequireFileSubmission = true; this.caFileType = 0; this.caSizeLimit = 50; this.caNumberOfFiles = 1; this.caSubmissionPolicy = 1; this.caMarkingType = 1; this.caRequireTextSubmission = true; this.caTextLimitType = 1; this.caTextLimit = 500; this.caXObjectUid = L0; this.caClazzUid = L0; this.caLocalChangeSeqNum = L0; this.caMasterChangeSeqNum = L0; this.caLastChangedBy = 0; this.caLct = L0; } function ClazzAssignment$Companion() { ClazzAssignment$Companion_instance = this; this.TABLE_ID = 520; this.SUBMISSION_POLICY_SUBMIT_ALL_AT_ONCE = 1; this.SUBMISSION_POLICY_MULTIPLE_ALLOWED = 2; this.MARKED_BY_COURSE_LEADER = 1; this.MARKED_BY_PEERS = 2; this.FILE_TYPE_ANY = 0; this.FILE_TYPE_DOC = 1; this.FILE_TYPE_IMAGE = 2; this.FILE_TYPE_VIDEO = 3; this.FILE_TYPE_AUDIO = 4; this.FILE_SUBMISSION_NOT_REQUIRED = 0; this.FILE_NOT_SUBMITTED = 1; this.FILE_SUBMITTED = 2; this.FILE_MARKED = 3; this.TEXT_WORD_LIMIT = 1; this.TEXT_CHAR_LIMIT = 2; this.COMPLETION_CRITERIA_SUBMIT = 100; this.COMPLETION_CRITERIA_GRADED = 102; } ClazzAssignment$Companion.prototype.serializer = function () { return ClazzAssignment$$serializer_getInstance(); }; ClazzAssignment$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzAssignment$Companion_instance = null; function ClazzAssignment$Companion_getInstance() { if (ClazzAssignment$Companion_instance === null) { new ClazzAssignment$Companion(); } return ClazzAssignment$Companion_instance; } function ClazzAssignment$$serializer() { this.descriptor_vxkytg$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzAssignment', this, 23); this.descriptor.addElement_ivxn3r$('caUid', true); this.descriptor.addElement_ivxn3r$('caTitle', true); this.descriptor.addElement_ivxn3r$('caDescription', true); this.descriptor.addElement_ivxn3r$('caGroupUid', true); this.descriptor.addElement_ivxn3r$('caActive', true); this.descriptor.addElement_ivxn3r$('caClassCommentEnabled', true); this.descriptor.addElement_ivxn3r$('caPrivateCommentsEnabled', true); this.descriptor.addElement_ivxn3r$('caCompletionCriteria', true); this.descriptor.addElement_ivxn3r$('caRequireFileSubmission', true); this.descriptor.addElement_ivxn3r$('caFileType', true); this.descriptor.addElement_ivxn3r$('caSizeLimit', true); this.descriptor.addElement_ivxn3r$('caNumberOfFiles', true); this.descriptor.addElement_ivxn3r$('caSubmissionPolicy', true); this.descriptor.addElement_ivxn3r$('caMarkingType', true); this.descriptor.addElement_ivxn3r$('caRequireTextSubmission', true); this.descriptor.addElement_ivxn3r$('caTextLimitType', true); this.descriptor.addElement_ivxn3r$('caTextLimit', true); this.descriptor.addElement_ivxn3r$('caXObjectUid', true); this.descriptor.addElement_ivxn3r$('caClazzUid', true); this.descriptor.addElement_ivxn3r$('caLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('caMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('caLastChangedBy', true); this.descriptor.addElement_ivxn3r$('caLct', true); ClazzAssignment$$serializer_instance = this; } Object.defineProperty(ClazzAssignment$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_vxkytg$_0; }}); ClazzAssignment$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.caUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.caUid); if (!equals(value.caTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.caTitle); if (!equals(value.caDescription, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.caDescription); if (!equals(value.caGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.caGroupUid); if (!equals(value.caActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.caActive); if (!equals(value.caClassCommentEnabled, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 5, value.caClassCommentEnabled); if (!equals(value.caPrivateCommentsEnabled, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.caPrivateCommentsEnabled); if (!equals(value.caCompletionCriteria, 100) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.caCompletionCriteria); if (!equals(value.caRequireFileSubmission, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 8, value.caRequireFileSubmission); if (!equals(value.caFileType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.caFileType); if (!equals(value.caSizeLimit, 50) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeIntElement_ptg7oe$(this.descriptor, 10, value.caSizeLimit); if (!equals(value.caNumberOfFiles, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.caNumberOfFiles); if (!equals(value.caSubmissionPolicy, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.caSubmissionPolicy); if (!equals(value.caMarkingType, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeIntElement_ptg7oe$(this.descriptor, 13, value.caMarkingType); if (!equals(value.caRequireTextSubmission, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 14, value.caRequireTextSubmission); if (!equals(value.caTextLimitType, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeIntElement_ptg7oe$(this.descriptor, 15, value.caTextLimitType); if (!equals(value.caTextLimit, 500) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeIntElement_ptg7oe$(this.descriptor, 16, value.caTextLimit); if (!equals(value.caXObjectUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.caXObjectUid); if (!equals(value.caClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.caClazzUid); if (!equals(value.caLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.caLocalChangeSeqNum); if (!equals(value.caMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeLongElement_j0o2mv$(this.descriptor, 20, value.caMasterChangeSeqNum); if (!equals(value.caLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeIntElement_ptg7oe$(this.descriptor, 21, value.caLastChangedBy); if (!equals(value.caLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.caLct); output.endStructure_24f42q$(this.descriptor); }; ClazzAssignment$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeBooleanElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeBooleanElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeIntElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeIntElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeBooleanElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeIntElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeIntElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeLongElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeIntElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzAssignment_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, null); }; ClazzAssignment$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; ClazzAssignment$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzAssignment$$serializer_instance = null; function ClazzAssignment$$serializer_getInstance() { if (ClazzAssignment$$serializer_instance === null) { new ClazzAssignment$$serializer(); } return ClazzAssignment$$serializer_instance; } function ClazzAssignment_init(seen1, caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caCompletionCriteria, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzAssignment.prototype); if ((seen1 & 1) === 0) $this.caUid = L0; else $this.caUid = caUid; if ((seen1 & 2) === 0) $this.caTitle = null; else $this.caTitle = caTitle; if ((seen1 & 4) === 0) $this.caDescription = null; else $this.caDescription = caDescription; if ((seen1 & 8) === 0) $this.caGroupUid = L0; else $this.caGroupUid = caGroupUid; if ((seen1 & 16) === 0) $this.caActive = true; else $this.caActive = caActive; if ((seen1 & 32) === 0) $this.caClassCommentEnabled = true; else $this.caClassCommentEnabled = caClassCommentEnabled; if ((seen1 & 64) === 0) $this.caPrivateCommentsEnabled = true; else $this.caPrivateCommentsEnabled = caPrivateCommentsEnabled; if ((seen1 & 128) === 0) $this.caCompletionCriteria = 100; else $this.caCompletionCriteria = caCompletionCriteria; if ((seen1 & 256) === 0) $this.caRequireFileSubmission = true; else $this.caRequireFileSubmission = caRequireFileSubmission; if ((seen1 & 512) === 0) $this.caFileType = 0; else $this.caFileType = caFileType; if ((seen1 & 1024) === 0) $this.caSizeLimit = 50; else $this.caSizeLimit = caSizeLimit; if ((seen1 & 2048) === 0) $this.caNumberOfFiles = 1; else $this.caNumberOfFiles = caNumberOfFiles; if ((seen1 & 4096) === 0) $this.caSubmissionPolicy = 1; else $this.caSubmissionPolicy = caSubmissionPolicy; if ((seen1 & 8192) === 0) $this.caMarkingType = 1; else $this.caMarkingType = caMarkingType; if ((seen1 & 16384) === 0) $this.caRequireTextSubmission = true; else $this.caRequireTextSubmission = caRequireTextSubmission; if ((seen1 & 32768) === 0) $this.caTextLimitType = 1; else $this.caTextLimitType = caTextLimitType; if ((seen1 & 65536) === 0) $this.caTextLimit = 500; else $this.caTextLimit = caTextLimit; if ((seen1 & 131072) === 0) $this.caXObjectUid = L0; else $this.caXObjectUid = caXObjectUid; if ((seen1 & 262144) === 0) $this.caClazzUid = L0; else $this.caClazzUid = caClazzUid; if ((seen1 & 524288) === 0) $this.caLocalChangeSeqNum = L0; else $this.caLocalChangeSeqNum = caLocalChangeSeqNum; if ((seen1 & 1048576) === 0) $this.caMasterChangeSeqNum = L0; else $this.caMasterChangeSeqNum = caMasterChangeSeqNum; if ((seen1 & 2097152) === 0) $this.caLastChangedBy = 0; else $this.caLastChangedBy = caLastChangedBy; if ((seen1 & 4194304) === 0) $this.caLct = L0; else $this.caLct = caLct; return $this; } ClazzAssignment.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignment', interfaces: []}; var ClazzAssignmentContentJoin$Companion_instance = null; function ClazzAssignmentContentJoin$$serializer() { this.descriptor_nozybb$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzAssignmentContentJoin', this, 9); this.descriptor.addElement_ivxn3r$('cacjUid', true); this.descriptor.addElement_ivxn3r$('cacjContentUid', true); this.descriptor.addElement_ivxn3r$('cacjAssignmentUid', true); this.descriptor.addElement_ivxn3r$('cacjActive', true); this.descriptor.addElement_ivxn3r$('cacjWeight', true); this.descriptor.addElement_ivxn3r$('cacjMCSN', true); this.descriptor.addElement_ivxn3r$('cacjLCSN', true); this.descriptor.addElement_ivxn3r$('cacjLCB', true); this.descriptor.addElement_ivxn3r$('cacjLct', true); ClazzAssignmentContentJoin$$serializer_instance = this; } var ClazzAssignmentContentJoin$$serializer_instance = null; var ClazzAssignmentContentJoinReplicate$Companion_instance = null; function ClazzAssignmentContentJoinReplicate$$serializer() { this.descriptor_txn2mi$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzAssignmentContentJoinReplicate', this, 4); this.descriptor.addElement_ivxn3r$('cacjPk', true); this.descriptor.addElement_ivxn3r$('cacjVersionId', true); this.descriptor.addElement_ivxn3r$('cacjDestination', true); this.descriptor.addElement_ivxn3r$('cacjPending', true); ClazzAssignmentContentJoinReplicate$$serializer_instance = this; } var ClazzAssignmentContentJoinReplicate$$serializer_instance = null; var ClazzAssignmentReplicate$Companion_instance = null; function ClazzAssignmentReplicate$$serializer() { this.descriptor_l9sj3$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzAssignmentReplicate', this, 4); this.descriptor.addElement_ivxn3r$('caPk', true); this.descriptor.addElement_ivxn3r$('caVersionId', true); this.descriptor.addElement_ivxn3r$('caDestination', true); this.descriptor.addElement_ivxn3r$('caPending', true); ClazzAssignmentReplicate$$serializer_instance = this; } var ClazzAssignmentReplicate$$serializer_instance = null; var ClazzAssignmentRollUp$Companion_instance = null; function ClazzAssignmentRollUp$$serializer() { this.descriptor_rwlihw$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzAssignmentRollUp', this, 13); this.descriptor.addElement_ivxn3r$('cacheUid', true); this.descriptor.addElement_ivxn3r$('cachePersonUid', true); this.descriptor.addElement_ivxn3r$('cacheContentEntryUid', true); this.descriptor.addElement_ivxn3r$('cacheClazzAssignmentUid', true); this.descriptor.addElement_ivxn3r$('cacheStudentScore', true); this.descriptor.addElement_ivxn3r$('cacheMaxScore', true); this.descriptor.addElement_ivxn3r$('cacheFinalWeightScoreWithPenalty', true); this.descriptor.addElement_ivxn3r$('cacheWeight', true); this.descriptor.addElement_ivxn3r$('cacheProgress', true); this.descriptor.addElement_ivxn3r$('cacheContentComplete', true); this.descriptor.addElement_ivxn3r$('cacheSuccess', true); this.descriptor.addElement_ivxn3r$('cachePenalty', true); this.descriptor.addElement_ivxn3r$('lastCsnChecked', true); ClazzAssignmentRollUp$$serializer_instance = this; } var ClazzAssignmentRollUp$$serializer_instance = null; function ClazzAssignmentWithCourseBlock() { ClazzAssignmentWithCourseBlock$Companion_getInstance(); ClazzAssignment.call(this); this.block = null; } function ClazzAssignmentWithCourseBlock$Companion() { ClazzAssignmentWithCourseBlock$Companion_instance = this; } ClazzAssignmentWithCourseBlock$Companion.prototype.serializer = function () { return ClazzAssignmentWithCourseBlock$$serializer_getInstance(); }; ClazzAssignmentWithCourseBlock$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzAssignmentWithCourseBlock$Companion_instance = null; function ClazzAssignmentWithCourseBlock$Companion_getInstance() { if (ClazzAssignmentWithCourseBlock$Companion_instance === null) { new ClazzAssignmentWithCourseBlock$Companion(); } return ClazzAssignmentWithCourseBlock$Companion_instance; } function ClazzAssignmentWithCourseBlock$$serializer() { this.descriptor_pji0r6$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzAssignmentWithCourseBlock', this, 24); this.descriptor.addElement_ivxn3r$('caUid', true); this.descriptor.addElement_ivxn3r$('caTitle', true); this.descriptor.addElement_ivxn3r$('caDescription', true); this.descriptor.addElement_ivxn3r$('caGroupUid', true); this.descriptor.addElement_ivxn3r$('caActive', true); this.descriptor.addElement_ivxn3r$('caClassCommentEnabled', true); this.descriptor.addElement_ivxn3r$('caPrivateCommentsEnabled', true); this.descriptor.addElement_ivxn3r$('caCompletionCriteria', true); this.descriptor.addElement_ivxn3r$('caRequireFileSubmission', true); this.descriptor.addElement_ivxn3r$('caFileType', true); this.descriptor.addElement_ivxn3r$('caSizeLimit', true); this.descriptor.addElement_ivxn3r$('caNumberOfFiles', true); this.descriptor.addElement_ivxn3r$('caSubmissionPolicy', true); this.descriptor.addElement_ivxn3r$('caMarkingType', true); this.descriptor.addElement_ivxn3r$('caRequireTextSubmission', true); this.descriptor.addElement_ivxn3r$('caTextLimitType', true); this.descriptor.addElement_ivxn3r$('caTextLimit', true); this.descriptor.addElement_ivxn3r$('caXObjectUid', true); this.descriptor.addElement_ivxn3r$('caClazzUid', true); this.descriptor.addElement_ivxn3r$('caLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('caMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('caLastChangedBy', true); this.descriptor.addElement_ivxn3r$('caLct', true); this.descriptor.addElement_ivxn3r$('block', true); ClazzAssignmentWithCourseBlock$$serializer_instance = this; } Object.defineProperty(ClazzAssignmentWithCourseBlock$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_pji0r6$_0; }}); ClazzAssignmentWithCourseBlock$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.caUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.caUid); if (!equals(value.caTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.caTitle); if (!equals(value.caDescription, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.caDescription); if (!equals(value.caGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.caGroupUid); if (!equals(value.caActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.caActive); if (!equals(value.caClassCommentEnabled, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 5, value.caClassCommentEnabled); if (!equals(value.caPrivateCommentsEnabled, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.caPrivateCommentsEnabled); if (!equals(value.caCompletionCriteria, 100) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.caCompletionCriteria); if (!equals(value.caRequireFileSubmission, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 8, value.caRequireFileSubmission); if (!equals(value.caFileType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.caFileType); if (!equals(value.caSizeLimit, 50) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeIntElement_ptg7oe$(this.descriptor, 10, value.caSizeLimit); if (!equals(value.caNumberOfFiles, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.caNumberOfFiles); if (!equals(value.caSubmissionPolicy, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.caSubmissionPolicy); if (!equals(value.caMarkingType, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeIntElement_ptg7oe$(this.descriptor, 13, value.caMarkingType); if (!equals(value.caRequireTextSubmission, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 14, value.caRequireTextSubmission); if (!equals(value.caTextLimitType, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeIntElement_ptg7oe$(this.descriptor, 15, value.caTextLimitType); if (!equals(value.caTextLimit, 500) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeIntElement_ptg7oe$(this.descriptor, 16, value.caTextLimit); if (!equals(value.caXObjectUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.caXObjectUid); if (!equals(value.caClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.caClazzUid); if (!equals(value.caLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.caLocalChangeSeqNum); if (!equals(value.caMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeLongElement_j0o2mv$(this.descriptor, 20, value.caMasterChangeSeqNum); if (!equals(value.caLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeIntElement_ptg7oe$(this.descriptor, 21, value.caLastChangedBy); if (!equals(value.caLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.caLct); if (!equals(value.block, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 23, CourseBlock$$serializer_getInstance(), value.block); output.endStructure_24f42q$(this.descriptor); }; ClazzAssignmentWithCourseBlock$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeBooleanElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeBooleanElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeIntElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeIntElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeBooleanElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeIntElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeIntElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeLongElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeIntElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 23, CourseBlock$$serializer_getInstance(), local23); bitMask0 |= 8388608; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzAssignmentWithCourseBlock_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, null); }; ClazzAssignmentWithCourseBlock$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(CourseBlock$$serializer_getInstance())]; }; ClazzAssignmentWithCourseBlock$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzAssignmentWithCourseBlock$$serializer_instance = null; function ClazzAssignmentWithCourseBlock$$serializer_getInstance() { if (ClazzAssignmentWithCourseBlock$$serializer_instance === null) { new ClazzAssignmentWithCourseBlock$$serializer(); } return ClazzAssignmentWithCourseBlock$$serializer_instance; } function ClazzAssignmentWithCourseBlock_init(seen1, caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caCompletionCriteria, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct, block, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzAssignmentWithCourseBlock.prototype); $this = ClazzAssignment_init(seen1, caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caCompletionCriteria, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct, $this); if ((seen1 & 8388608) === 0) $this.block = null; else $this.block = block; return $this; } ClazzAssignmentWithCourseBlock.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentWithCourseBlock', interfaces: [ClazzAssignment]}; function ClazzAssignmentWithMetrics() { ClazzAssignmentWithMetrics$Companion_getInstance(); ClazzAssignment.call(this); this.progressSummary = null; this.mark = null; this.fileSubmissionStatus = 0; } function ClazzAssignmentWithMetrics$Companion() { ClazzAssignmentWithMetrics$Companion_instance = this; } ClazzAssignmentWithMetrics$Companion.prototype.serializer = function () { return ClazzAssignmentWithMetrics$$serializer_getInstance(); }; ClazzAssignmentWithMetrics$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzAssignmentWithMetrics$Companion_instance = null; function ClazzAssignmentWithMetrics$Companion_getInstance() { if (ClazzAssignmentWithMetrics$Companion_instance === null) { new ClazzAssignmentWithMetrics$Companion(); } return ClazzAssignmentWithMetrics$Companion_instance; } function ClazzAssignmentWithMetrics$$serializer() { this.descriptor_n80hwd$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzAssignmentWithMetrics', this, 26); this.descriptor.addElement_ivxn3r$('caUid', true); this.descriptor.addElement_ivxn3r$('caTitle', true); this.descriptor.addElement_ivxn3r$('caDescription', true); this.descriptor.addElement_ivxn3r$('caGroupUid', true); this.descriptor.addElement_ivxn3r$('caActive', true); this.descriptor.addElement_ivxn3r$('caClassCommentEnabled', true); this.descriptor.addElement_ivxn3r$('caPrivateCommentsEnabled', true); this.descriptor.addElement_ivxn3r$('caCompletionCriteria', true); this.descriptor.addElement_ivxn3r$('caRequireFileSubmission', true); this.descriptor.addElement_ivxn3r$('caFileType', true); this.descriptor.addElement_ivxn3r$('caSizeLimit', true); this.descriptor.addElement_ivxn3r$('caNumberOfFiles', true); this.descriptor.addElement_ivxn3r$('caSubmissionPolicy', true); this.descriptor.addElement_ivxn3r$('caMarkingType', true); this.descriptor.addElement_ivxn3r$('caRequireTextSubmission', true); this.descriptor.addElement_ivxn3r$('caTextLimitType', true); this.descriptor.addElement_ivxn3r$('caTextLimit', true); this.descriptor.addElement_ivxn3r$('caXObjectUid', true); this.descriptor.addElement_ivxn3r$('caClazzUid', true); this.descriptor.addElement_ivxn3r$('caLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('caMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('caLastChangedBy', true); this.descriptor.addElement_ivxn3r$('caLct', true); this.descriptor.addElement_ivxn3r$('progressSummary', true); this.descriptor.addElement_ivxn3r$('mark', true); this.descriptor.addElement_ivxn3r$('fileSubmissionStatus', true); ClazzAssignmentWithMetrics$$serializer_instance = this; } Object.defineProperty(ClazzAssignmentWithMetrics$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_n80hwd$_0; }}); ClazzAssignmentWithMetrics$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.caUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.caUid); if (!equals(value.caTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.caTitle); if (!equals(value.caDescription, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.caDescription); if (!equals(value.caGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.caGroupUid); if (!equals(value.caActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.caActive); if (!equals(value.caClassCommentEnabled, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 5, value.caClassCommentEnabled); if (!equals(value.caPrivateCommentsEnabled, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.caPrivateCommentsEnabled); if (!equals(value.caCompletionCriteria, 100) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.caCompletionCriteria); if (!equals(value.caRequireFileSubmission, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 8, value.caRequireFileSubmission); if (!equals(value.caFileType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.caFileType); if (!equals(value.caSizeLimit, 50) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeIntElement_ptg7oe$(this.descriptor, 10, value.caSizeLimit); if (!equals(value.caNumberOfFiles, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.caNumberOfFiles); if (!equals(value.caSubmissionPolicy, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.caSubmissionPolicy); if (!equals(value.caMarkingType, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeIntElement_ptg7oe$(this.descriptor, 13, value.caMarkingType); if (!equals(value.caRequireTextSubmission, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 14, value.caRequireTextSubmission); if (!equals(value.caTextLimitType, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeIntElement_ptg7oe$(this.descriptor, 15, value.caTextLimitType); if (!equals(value.caTextLimit, 500) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeIntElement_ptg7oe$(this.descriptor, 16, value.caTextLimit); if (!equals(value.caXObjectUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.caXObjectUid); if (!equals(value.caClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.caClazzUid); if (!equals(value.caLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.caLocalChangeSeqNum); if (!equals(value.caMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeLongElement_j0o2mv$(this.descriptor, 20, value.caMasterChangeSeqNum); if (!equals(value.caLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeIntElement_ptg7oe$(this.descriptor, 21, value.caLastChangedBy); if (!equals(value.caLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.caLct); if (!equals(value.progressSummary, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 23, AssignmentProgressSummary$$serializer_getInstance(), value.progressSummary); if (!equals(value.mark, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 24, CourseAssignmentMark$$serializer_getInstance(), value.mark); if (!equals(value.fileSubmissionStatus, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeIntElement_ptg7oe$(this.descriptor, 25, value.fileSubmissionStatus); output.endStructure_24f42q$(this.descriptor); }; ClazzAssignmentWithMetrics$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeBooleanElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeBooleanElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeIntElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeIntElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeBooleanElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeIntElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeIntElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeLongElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeIntElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 23, AssignmentProgressSummary$$serializer_getInstance(), local23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 24, CourseAssignmentMark$$serializer_getInstance(), local24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeIntElement_szpzho$(this.descriptor, 25); bitMask0 |= 33554432; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzAssignmentWithMetrics_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, null); }; ClazzAssignmentWithMetrics$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(AssignmentProgressSummary$$serializer_getInstance()), new NullableSerializer(CourseAssignmentMark$$serializer_getInstance()), internal.IntSerializer]; }; ClazzAssignmentWithMetrics$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzAssignmentWithMetrics$$serializer_instance = null; function ClazzAssignmentWithMetrics$$serializer_getInstance() { if (ClazzAssignmentWithMetrics$$serializer_instance === null) { new ClazzAssignmentWithMetrics$$serializer(); } return ClazzAssignmentWithMetrics$$serializer_instance; } function ClazzAssignmentWithMetrics_init(seen1, caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caCompletionCriteria, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct, progressSummary, mark, fileSubmissionStatus, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzAssignmentWithMetrics.prototype); $this = ClazzAssignment_init(seen1, caUid, caTitle, caDescription, caGroupUid, caActive, caClassCommentEnabled, caPrivateCommentsEnabled, caCompletionCriteria, caRequireFileSubmission, caFileType, caSizeLimit, caNumberOfFiles, caSubmissionPolicy, caMarkingType, caRequireTextSubmission, caTextLimitType, caTextLimit, caXObjectUid, caClazzUid, caLocalChangeSeqNum, caMasterChangeSeqNum, caLastChangedBy, caLct, $this); if ((seen1 & 8388608) === 0) $this.progressSummary = null; else $this.progressSummary = progressSummary; if ((seen1 & 16777216) === 0) $this.mark = null; else $this.mark = mark; if ((seen1 & 33554432) === 0) $this.fileSubmissionStatus = 0; else $this.fileSubmissionStatus = fileSubmissionStatus; return $this; } ClazzAssignmentWithMetrics.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzAssignmentWithMetrics', interfaces: [ClazzAssignment]}; var ClazzAssignmentWithTimezone$Companion_instance = null; function ClazzAssignmentWithTimezone$$serializer() { this.descriptor_jype4j$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzAssignmentWithTimezone', this, 24); this.descriptor.addElement_ivxn3r$('caUid', true); this.descriptor.addElement_ivxn3r$('caTitle', true); this.descriptor.addElement_ivxn3r$('caDescription', true); this.descriptor.addElement_ivxn3r$('caGroupUid', true); this.descriptor.addElement_ivxn3r$('caActive', true); this.descriptor.addElement_ivxn3r$('caClassCommentEnabled', true); this.descriptor.addElement_ivxn3r$('caPrivateCommentsEnabled', true); this.descriptor.addElement_ivxn3r$('caCompletionCriteria', true); this.descriptor.addElement_ivxn3r$('caRequireFileSubmission', true); this.descriptor.addElement_ivxn3r$('caFileType', true); this.descriptor.addElement_ivxn3r$('caSizeLimit', true); this.descriptor.addElement_ivxn3r$('caNumberOfFiles', true); this.descriptor.addElement_ivxn3r$('caSubmissionPolicy', true); this.descriptor.addElement_ivxn3r$('caMarkingType', true); this.descriptor.addElement_ivxn3r$('caRequireTextSubmission', true); this.descriptor.addElement_ivxn3r$('caTextLimitType', true); this.descriptor.addElement_ivxn3r$('caTextLimit', true); this.descriptor.addElement_ivxn3r$('caXObjectUid', true); this.descriptor.addElement_ivxn3r$('caClazzUid', true); this.descriptor.addElement_ivxn3r$('caLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('caMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('caLastChangedBy', true); this.descriptor.addElement_ivxn3r$('caLct', true); this.descriptor.addElement_ivxn3r$('effectiveTimeZone', true); ClazzAssignmentWithTimezone$$serializer_instance = this; } var ClazzAssignmentWithTimezone$$serializer_instance = null; var ClazzContentJoin$Companion_instance = null; function ClazzContentJoin$$serializer() { this.descriptor_qtsw7q$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzContentJoin', this, 8); this.descriptor.addElement_ivxn3r$('ccjUid', true); this.descriptor.addElement_ivxn3r$('ccjContentEntryUid', true); this.descriptor.addElement_ivxn3r$('ccjClazzUid', true); this.descriptor.addElement_ivxn3r$('ccjActive', true); this.descriptor.addElement_ivxn3r$('ccjLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('ccjMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('ccjLastChangedBy', true); this.descriptor.addElement_ivxn3r$('ccjLct', true); ClazzContentJoin$$serializer_instance = this; } var ClazzContentJoin$$serializer_instance = null; var ClazzContentJoinReplicate$Companion_instance = null; function ClazzContentJoinReplicate$$serializer() { this.descriptor_t6o5r1$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzContentJoinReplicate', this, 4); this.descriptor.addElement_ivxn3r$('ccjPk', true); this.descriptor.addElement_ivxn3r$('ccjVersionId', true); this.descriptor.addElement_ivxn3r$('ccjDestination', true); this.descriptor.addElement_ivxn3r$('ccjPending', true); ClazzContentJoinReplicate$$serializer_instance = this; } var ClazzContentJoinReplicate$$serializer_instance = null; function ClazzEnrolment() { ClazzEnrolment$Companion_getInstance(); this.clazzEnrolmentUid = L0; this.clazzEnrolmentPersonUid = L0; this.clazzEnrolmentClazzUid = L0; this.clazzEnrolmentDateJoined = L0; this.clazzEnrolmentDateLeft = Long$Companion$MAX_VALUE; this.clazzEnrolmentRole = 0; this.clazzEnrolmentAttendancePercentage = 0; this.clazzEnrolmentActive = true; this.clazzEnrolmentLeavingReasonUid = L0; this.clazzEnrolmentOutcome = 200; this.clazzEnrolmentLocalChangeSeqNum = L0; this.clazzEnrolmentMasterChangeSeqNum = L0; this.clazzEnrolmentLastChangedBy = 0; this.clazzEnrolmentLct = L0; } function ClazzEnrolment$Companion() { ClazzEnrolment$Companion_instance = this; this.FROM_SCOPEDGRANT_TO_CLAZZENROLMENT_JOIN__ON_CLAUSE = '\n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 9\n AND ScopedGrant.sgEntityUid = ClazzEnrolment.clazzEnrolmentPersonUid)\n OR (ScopedGrant.sgTableId = 6\n AND ScopedGrant.sgEntityUid = ClazzEnrolment.clazzEnrolmentClazzUid)\n OR (ScopedGrant.sgTableId = 164\n AND ClazzEnrolment.clazzEnrolmentClazzUid IN (\n SELECT clazzUid \n FROM Clazz\n WHERE clazzSchoolUid = ScopedGrant.sgEntityUid))\n )\n '; this.FROM_CLAZZENROLMENT_TO_SCOPEDGRANT_JOIN_ON_CLAUSE = '\n (ScopedGrant.sgTableId = 6\n AND ScopedGrant.sgEntityUid = ClazzEnrolment.clazzEnrolmentClazzUid)\n '; this.JOIN_FROM_CLAZZENROLMENT_TO_USERSESSION_VIA_SCOPEDGRANT_CLAZZSCOPE_ONLY_PT1 = '\n JOIN ScopedGrant \n ON \n (ScopedGrant.sgTableId = 6\n AND ScopedGrant.sgEntityUid = ClazzEnrolment.clazzEnrolmentClazzUid)\n \n AND (ScopedGrant.sgPermissions &\n '; this.JOIN_FROM_CLAZZENROLMENT_TO_USERSESSION_VIA_SCOPEDGRANT_PT2 = '\n ) > 0 \n JOIN PersonGroupMember \n ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n JOIN UserSession\n ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n AND UserSession.usStatus = 1\n '; this.ROLE_STUDENT = 1000; this.ROLE_TEACHER = 1001; this.ROLE_STUDENT_PENDING = 1002; this.ROLE_PARENT = 1003; this.OUTCOME_IN_PROGRESS = 200; this.OUTCOME_GRADUATED = 201; this.OUTCOME_FAILED = 202; this.OUTCOME_DROPPED_OUT = 203; this.TABLE_ID = 65; } ClazzEnrolment$Companion.prototype.serializer = function () { return ClazzEnrolment$$serializer_getInstance(); }; ClazzEnrolment$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzEnrolment$Companion_instance = null; function ClazzEnrolment$Companion_getInstance() { if (ClazzEnrolment$Companion_instance === null) { new ClazzEnrolment$Companion(); } return ClazzEnrolment$Companion_instance; } function ClazzEnrolment$$serializer() { this.descriptor_ugpeq1$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzEnrolment', this, 14); this.descriptor.addElement_ivxn3r$('clazzEnrolmentUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentPersonUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentClazzUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentDateJoined', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentDateLeft', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentRole', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentAttendancePercentage', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentActive', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLeavingReasonUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentOutcome', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLastChangedBy', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLct', true); ClazzEnrolment$$serializer_instance = this; } Object.defineProperty(ClazzEnrolment$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ugpeq1$_0; }}); ClazzEnrolment$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.clazzEnrolmentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.clazzEnrolmentUid); if (!equals(value.clazzEnrolmentPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.clazzEnrolmentPersonUid); if (!equals(value.clazzEnrolmentClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.clazzEnrolmentClazzUid); if (!equals(value.clazzEnrolmentDateJoined, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.clazzEnrolmentDateJoined); if (!equals(value.clazzEnrolmentDateLeft, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.clazzEnrolmentDateLeft); if (!equals(value.clazzEnrolmentRole, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.clazzEnrolmentRole); if (!equals(value.clazzEnrolmentAttendancePercentage, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeFloatElement_lf6hpt$(this.descriptor, 6, value.clazzEnrolmentAttendancePercentage); if (!equals(value.clazzEnrolmentActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 7, value.clazzEnrolmentActive); if (!equals(value.clazzEnrolmentLeavingReasonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.clazzEnrolmentLeavingReasonUid); if (!equals(value.clazzEnrolmentOutcome, 200) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.clazzEnrolmentOutcome); if (!equals(value.clazzEnrolmentLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.clazzEnrolmentLocalChangeSeqNum); if (!equals(value.clazzEnrolmentMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.clazzEnrolmentMasterChangeSeqNum); if (!equals(value.clazzEnrolmentLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.clazzEnrolmentLastChangedBy); if (!equals(value.clazzEnrolmentLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.clazzEnrolmentLct); output.endStructure_24f42q$(this.descriptor); }; ClazzEnrolment$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeFloatElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeBooleanElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzEnrolment_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, null); }; ClazzEnrolment$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.FloatSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; ClazzEnrolment$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzEnrolment$$serializer_instance = null; function ClazzEnrolment$$serializer_getInstance() { if (ClazzEnrolment$$serializer_instance === null) { new ClazzEnrolment$$serializer(); } return ClazzEnrolment$$serializer_instance; } function ClazzEnrolment_init(seen1, clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzEnrolment.prototype); if ((seen1 & 1) === 0) $this.clazzEnrolmentUid = L0; else $this.clazzEnrolmentUid = clazzEnrolmentUid; if ((seen1 & 2) === 0) $this.clazzEnrolmentPersonUid = L0; else $this.clazzEnrolmentPersonUid = clazzEnrolmentPersonUid; if ((seen1 & 4) === 0) $this.clazzEnrolmentClazzUid = L0; else $this.clazzEnrolmentClazzUid = clazzEnrolmentClazzUid; if ((seen1 & 8) === 0) $this.clazzEnrolmentDateJoined = L0; else $this.clazzEnrolmentDateJoined = clazzEnrolmentDateJoined; if ((seen1 & 16) === 0) $this.clazzEnrolmentDateLeft = Long$Companion$MAX_VALUE; else $this.clazzEnrolmentDateLeft = clazzEnrolmentDateLeft; if ((seen1 & 32) === 0) $this.clazzEnrolmentRole = 0; else $this.clazzEnrolmentRole = clazzEnrolmentRole; if ((seen1 & 64) === 0) $this.clazzEnrolmentAttendancePercentage = 0; else $this.clazzEnrolmentAttendancePercentage = clazzEnrolmentAttendancePercentage; if ((seen1 & 128) === 0) $this.clazzEnrolmentActive = true; else $this.clazzEnrolmentActive = clazzEnrolmentActive; if ((seen1 & 256) === 0) $this.clazzEnrolmentLeavingReasonUid = L0; else $this.clazzEnrolmentLeavingReasonUid = clazzEnrolmentLeavingReasonUid; if ((seen1 & 512) === 0) $this.clazzEnrolmentOutcome = 200; else $this.clazzEnrolmentOutcome = clazzEnrolmentOutcome; if ((seen1 & 1024) === 0) $this.clazzEnrolmentLocalChangeSeqNum = L0; else $this.clazzEnrolmentLocalChangeSeqNum = clazzEnrolmentLocalChangeSeqNum; if ((seen1 & 2048) === 0) $this.clazzEnrolmentMasterChangeSeqNum = L0; else $this.clazzEnrolmentMasterChangeSeqNum = clazzEnrolmentMasterChangeSeqNum; if ((seen1 & 4096) === 0) $this.clazzEnrolmentLastChangedBy = 0; else $this.clazzEnrolmentLastChangedBy = clazzEnrolmentLastChangedBy; if ((seen1 & 8192) === 0) $this.clazzEnrolmentLct = L0; else $this.clazzEnrolmentLct = clazzEnrolmentLct; return $this; } ClazzEnrolment.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzEnrolment', interfaces: []}; var ClazzEnrolmentReplicate$Companion_instance = null; function ClazzEnrolmentReplicate$$serializer() { this.descriptor_f1cm58$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzEnrolmentReplicate', this, 4); this.descriptor.addElement_ivxn3r$('cePk', true); this.descriptor.addElement_ivxn3r$('ceVersionId', true); this.descriptor.addElement_ivxn3r$('ceDestination', true); this.descriptor.addElement_ivxn3r$('cePending', true); ClazzEnrolmentReplicate$$serializer_instance = this; } var ClazzEnrolmentReplicate$$serializer_instance = null; function ClazzEnrolmentWithClazz() { ClazzEnrolmentWithClazz$Companion_getInstance(); ClazzEnrolment.call(this); this.clazz = null; } function ClazzEnrolmentWithClazz$Companion() { ClazzEnrolmentWithClazz$Companion_instance = this; } ClazzEnrolmentWithClazz$Companion.prototype.serializer = function () { return ClazzEnrolmentWithClazz$$serializer_getInstance(); }; ClazzEnrolmentWithClazz$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzEnrolmentWithClazz$Companion_instance = null; function ClazzEnrolmentWithClazz$Companion_getInstance() { if (ClazzEnrolmentWithClazz$Companion_instance === null) { new ClazzEnrolmentWithClazz$Companion(); } return ClazzEnrolmentWithClazz$Companion_instance; } function ClazzEnrolmentWithClazz$$serializer() { this.descriptor_nrikv9$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzEnrolmentWithClazz', this, 15); this.descriptor.addElement_ivxn3r$('clazzEnrolmentUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentPersonUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentClazzUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentDateJoined', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentDateLeft', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentRole', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentAttendancePercentage', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentActive', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLeavingReasonUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentOutcome', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLastChangedBy', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLct', true); this.descriptor.addElement_ivxn3r$('clazz', true); ClazzEnrolmentWithClazz$$serializer_instance = this; } Object.defineProperty(ClazzEnrolmentWithClazz$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_nrikv9$_0; }}); ClazzEnrolmentWithClazz$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.clazzEnrolmentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.clazzEnrolmentUid); if (!equals(value.clazzEnrolmentPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.clazzEnrolmentPersonUid); if (!equals(value.clazzEnrolmentClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.clazzEnrolmentClazzUid); if (!equals(value.clazzEnrolmentDateJoined, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.clazzEnrolmentDateJoined); if (!equals(value.clazzEnrolmentDateLeft, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.clazzEnrolmentDateLeft); if (!equals(value.clazzEnrolmentRole, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.clazzEnrolmentRole); if (!equals(value.clazzEnrolmentAttendancePercentage, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeFloatElement_lf6hpt$(this.descriptor, 6, value.clazzEnrolmentAttendancePercentage); if (!equals(value.clazzEnrolmentActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 7, value.clazzEnrolmentActive); if (!equals(value.clazzEnrolmentLeavingReasonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.clazzEnrolmentLeavingReasonUid); if (!equals(value.clazzEnrolmentOutcome, 200) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.clazzEnrolmentOutcome); if (!equals(value.clazzEnrolmentLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.clazzEnrolmentLocalChangeSeqNum); if (!equals(value.clazzEnrolmentMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.clazzEnrolmentMasterChangeSeqNum); if (!equals(value.clazzEnrolmentLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.clazzEnrolmentLastChangedBy); if (!equals(value.clazzEnrolmentLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.clazzEnrolmentLct); if (!equals(value.clazz, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 14, Clazz$$serializer_getInstance(), value.clazz); output.endStructure_24f42q$(this.descriptor); }; ClazzEnrolmentWithClazz$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeFloatElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeBooleanElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 14, Clazz$$serializer_getInstance(), local14); bitMask0 |= 16384; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzEnrolmentWithClazz_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, null); }; ClazzEnrolmentWithClazz$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.FloatSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(Clazz$$serializer_getInstance())]; }; ClazzEnrolmentWithClazz$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzEnrolmentWithClazz$$serializer_instance = null; function ClazzEnrolmentWithClazz$$serializer_getInstance() { if (ClazzEnrolmentWithClazz$$serializer_instance === null) { new ClazzEnrolmentWithClazz$$serializer(); } return ClazzEnrolmentWithClazz$$serializer_instance; } function ClazzEnrolmentWithClazz_init(seen1, clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct, clazz, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzEnrolmentWithClazz.prototype); $this = ClazzEnrolment_init(seen1, clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct, $this); if ((seen1 & 16384) === 0) $this.clazz = null; else $this.clazz = clazz; return $this; } ClazzEnrolmentWithClazz.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzEnrolmentWithClazz', interfaces: [ClazzEnrolment]}; function ClazzEnrolmentWithClazzAndAttendance() { ClazzEnrolmentWithClazzAndAttendance$Companion_getInstance(); ClazzEnrolmentWithClazz.call(this); this.attendance = 0.0; } function ClazzEnrolmentWithClazzAndAttendance$Companion() { ClazzEnrolmentWithClazzAndAttendance$Companion_instance = this; } ClazzEnrolmentWithClazzAndAttendance$Companion.prototype.serializer = function () { return ClazzEnrolmentWithClazzAndAttendance$$serializer_getInstance(); }; ClazzEnrolmentWithClazzAndAttendance$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzEnrolmentWithClazzAndAttendance$Companion_instance = null; function ClazzEnrolmentWithClazzAndAttendance$Companion_getInstance() { if (ClazzEnrolmentWithClazzAndAttendance$Companion_instance === null) { new ClazzEnrolmentWithClazzAndAttendance$Companion(); } return ClazzEnrolmentWithClazzAndAttendance$Companion_instance; } function ClazzEnrolmentWithClazzAndAttendance$$serializer() { this.descriptor_ym5ntx$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzEnrolmentWithClazzAndAttendance', this, 16); this.descriptor.addElement_ivxn3r$('clazzEnrolmentUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentPersonUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentClazzUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentDateJoined', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentDateLeft', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentRole', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentAttendancePercentage', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentActive', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLeavingReasonUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentOutcome', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLastChangedBy', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLct', true); this.descriptor.addElement_ivxn3r$('clazz', true); this.descriptor.addElement_ivxn3r$('attendance', true); ClazzEnrolmentWithClazzAndAttendance$$serializer_instance = this; } Object.defineProperty(ClazzEnrolmentWithClazzAndAttendance$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ym5ntx$_0; }}); ClazzEnrolmentWithClazzAndAttendance$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.clazzEnrolmentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.clazzEnrolmentUid); if (!equals(value.clazzEnrolmentPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.clazzEnrolmentPersonUid); if (!equals(value.clazzEnrolmentClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.clazzEnrolmentClazzUid); if (!equals(value.clazzEnrolmentDateJoined, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.clazzEnrolmentDateJoined); if (!equals(value.clazzEnrolmentDateLeft, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.clazzEnrolmentDateLeft); if (!equals(value.clazzEnrolmentRole, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.clazzEnrolmentRole); if (!equals(value.clazzEnrolmentAttendancePercentage, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeFloatElement_lf6hpt$(this.descriptor, 6, value.clazzEnrolmentAttendancePercentage); if (!equals(value.clazzEnrolmentActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 7, value.clazzEnrolmentActive); if (!equals(value.clazzEnrolmentLeavingReasonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.clazzEnrolmentLeavingReasonUid); if (!equals(value.clazzEnrolmentOutcome, 200) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.clazzEnrolmentOutcome); if (!equals(value.clazzEnrolmentLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.clazzEnrolmentLocalChangeSeqNum); if (!equals(value.clazzEnrolmentMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.clazzEnrolmentMasterChangeSeqNum); if (!equals(value.clazzEnrolmentLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.clazzEnrolmentLastChangedBy); if (!equals(value.clazzEnrolmentLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.clazzEnrolmentLct); if (!equals(value.clazz, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 14, Clazz$$serializer_getInstance(), value.clazz); if (!equals(value.attendance, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeFloatElement_lf6hpt$(this.descriptor, 15, value.attendance); output.endStructure_24f42q$(this.descriptor); }; ClazzEnrolmentWithClazzAndAttendance$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeFloatElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeBooleanElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 14, Clazz$$serializer_getInstance(), local14); bitMask0 |= 16384; break; case 15: local15 = input.decodeFloatElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzEnrolmentWithClazzAndAttendance_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, null); }; ClazzEnrolmentWithClazzAndAttendance$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.FloatSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(Clazz$$serializer_getInstance()), internal.FloatSerializer]; }; ClazzEnrolmentWithClazzAndAttendance$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzEnrolmentWithClazzAndAttendance$$serializer_instance = null; function ClazzEnrolmentWithClazzAndAttendance$$serializer_getInstance() { if (ClazzEnrolmentWithClazzAndAttendance$$serializer_instance === null) { new ClazzEnrolmentWithClazzAndAttendance$$serializer(); } return ClazzEnrolmentWithClazzAndAttendance$$serializer_instance; } function ClazzEnrolmentWithClazzAndAttendance_init(seen1, clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct, clazz, attendance, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzEnrolmentWithClazzAndAttendance.prototype); $this = ClazzEnrolmentWithClazz_init(seen1, clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct, clazz, $this); if ((seen1 & 32768) === 0) $this.attendance = 0.0; else $this.attendance = attendance; return $this; } ClazzEnrolmentWithClazzAndAttendance.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzEnrolmentWithClazzAndAttendance', interfaces: [ClazzEnrolmentWithClazz]}; function ClazzEnrolmentWithLeavingReason() { ClazzEnrolmentWithLeavingReason$Companion_getInstance(); ClazzEnrolment.call(this); this.leavingReason = null; this.timeZone = null; } function ClazzEnrolmentWithLeavingReason$Companion() { ClazzEnrolmentWithLeavingReason$Companion_instance = this; } ClazzEnrolmentWithLeavingReason$Companion.prototype.serializer = function () { return ClazzEnrolmentWithLeavingReason$$serializer_getInstance(); }; ClazzEnrolmentWithLeavingReason$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzEnrolmentWithLeavingReason$Companion_instance = null; function ClazzEnrolmentWithLeavingReason$Companion_getInstance() { if (ClazzEnrolmentWithLeavingReason$Companion_instance === null) { new ClazzEnrolmentWithLeavingReason$Companion(); } return ClazzEnrolmentWithLeavingReason$Companion_instance; } function ClazzEnrolmentWithLeavingReason$$serializer() { this.descriptor_kcg00r$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzEnrolmentWithLeavingReason', this, 16); this.descriptor.addElement_ivxn3r$('clazzEnrolmentUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentPersonUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentClazzUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentDateJoined', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentDateLeft', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentRole', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentAttendancePercentage', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentActive', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLeavingReasonUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentOutcome', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLastChangedBy', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLct', true); this.descriptor.addElement_ivxn3r$('leavingReason', true); this.descriptor.addElement_ivxn3r$('timeZone', true); ClazzEnrolmentWithLeavingReason$$serializer_instance = this; } Object.defineProperty(ClazzEnrolmentWithLeavingReason$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_kcg00r$_0; }}); ClazzEnrolmentWithLeavingReason$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.clazzEnrolmentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.clazzEnrolmentUid); if (!equals(value.clazzEnrolmentPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.clazzEnrolmentPersonUid); if (!equals(value.clazzEnrolmentClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.clazzEnrolmentClazzUid); if (!equals(value.clazzEnrolmentDateJoined, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.clazzEnrolmentDateJoined); if (!equals(value.clazzEnrolmentDateLeft, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.clazzEnrolmentDateLeft); if (!equals(value.clazzEnrolmentRole, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.clazzEnrolmentRole); if (!equals(value.clazzEnrolmentAttendancePercentage, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeFloatElement_lf6hpt$(this.descriptor, 6, value.clazzEnrolmentAttendancePercentage); if (!equals(value.clazzEnrolmentActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 7, value.clazzEnrolmentActive); if (!equals(value.clazzEnrolmentLeavingReasonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.clazzEnrolmentLeavingReasonUid); if (!equals(value.clazzEnrolmentOutcome, 200) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.clazzEnrolmentOutcome); if (!equals(value.clazzEnrolmentLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.clazzEnrolmentLocalChangeSeqNum); if (!equals(value.clazzEnrolmentMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.clazzEnrolmentMasterChangeSeqNum); if (!equals(value.clazzEnrolmentLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.clazzEnrolmentLastChangedBy); if (!equals(value.clazzEnrolmentLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.clazzEnrolmentLct); if (!equals(value.leavingReason, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 14, LeavingReason$$serializer_getInstance(), value.leavingReason); if (!equals(value.timeZone, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 15, internal.StringSerializer, value.timeZone); output.endStructure_24f42q$(this.descriptor); }; ClazzEnrolmentWithLeavingReason$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeFloatElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeBooleanElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 14, LeavingReason$$serializer_getInstance(), local14); bitMask0 |= 16384; break; case 15: local15 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 15, internal.StringSerializer, local15); bitMask0 |= 32768; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzEnrolmentWithLeavingReason_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, null); }; ClazzEnrolmentWithLeavingReason$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.FloatSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(LeavingReason$$serializer_getInstance()), new NullableSerializer(internal.StringSerializer)]; }; ClazzEnrolmentWithLeavingReason$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzEnrolmentWithLeavingReason$$serializer_instance = null; function ClazzEnrolmentWithLeavingReason$$serializer_getInstance() { if (ClazzEnrolmentWithLeavingReason$$serializer_instance === null) { new ClazzEnrolmentWithLeavingReason$$serializer(); } return ClazzEnrolmentWithLeavingReason$$serializer_instance; } function ClazzEnrolmentWithLeavingReason_init(seen1, clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct, leavingReason, timeZone, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzEnrolmentWithLeavingReason.prototype); $this = ClazzEnrolment_init(seen1, clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct, $this); if ((seen1 & 16384) === 0) $this.leavingReason = null; else $this.leavingReason = leavingReason; if ((seen1 & 32768) === 0) $this.timeZone = null; else $this.timeZone = timeZone; return $this; } ClazzEnrolmentWithLeavingReason.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzEnrolmentWithLeavingReason', interfaces: [ClazzEnrolment]}; function ClazzEnrolmentWithPerson() { ClazzEnrolmentWithPerson$Companion_getInstance(); ClazzEnrolment.call(this); this.person = null; } function ClazzEnrolmentWithPerson$Companion() { ClazzEnrolmentWithPerson$Companion_instance = this; } ClazzEnrolmentWithPerson$Companion.prototype.serializer = function () { return ClazzEnrolmentWithPerson$$serializer_getInstance(); }; ClazzEnrolmentWithPerson$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzEnrolmentWithPerson$Companion_instance = null; function ClazzEnrolmentWithPerson$Companion_getInstance() { if (ClazzEnrolmentWithPerson$Companion_instance === null) { new ClazzEnrolmentWithPerson$Companion(); } return ClazzEnrolmentWithPerson$Companion_instance; } function ClazzEnrolmentWithPerson$$serializer() { this.descriptor_7ns32q$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzEnrolmentWithPerson', this, 15); this.descriptor.addElement_ivxn3r$('clazzEnrolmentUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentPersonUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentClazzUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentDateJoined', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentDateLeft', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentRole', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentAttendancePercentage', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentActive', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLeavingReasonUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentOutcome', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLastChangedBy', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentLct', true); this.descriptor.addElement_ivxn3r$('person', true); ClazzEnrolmentWithPerson$$serializer_instance = this; } Object.defineProperty(ClazzEnrolmentWithPerson$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_7ns32q$_0; }}); ClazzEnrolmentWithPerson$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.clazzEnrolmentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.clazzEnrolmentUid); if (!equals(value.clazzEnrolmentPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.clazzEnrolmentPersonUid); if (!equals(value.clazzEnrolmentClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.clazzEnrolmentClazzUid); if (!equals(value.clazzEnrolmentDateJoined, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.clazzEnrolmentDateJoined); if (!equals(value.clazzEnrolmentDateLeft, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.clazzEnrolmentDateLeft); if (!equals(value.clazzEnrolmentRole, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.clazzEnrolmentRole); if (!equals(value.clazzEnrolmentAttendancePercentage, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeFloatElement_lf6hpt$(this.descriptor, 6, value.clazzEnrolmentAttendancePercentage); if (!equals(value.clazzEnrolmentActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 7, value.clazzEnrolmentActive); if (!equals(value.clazzEnrolmentLeavingReasonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.clazzEnrolmentLeavingReasonUid); if (!equals(value.clazzEnrolmentOutcome, 200) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.clazzEnrolmentOutcome); if (!equals(value.clazzEnrolmentLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.clazzEnrolmentLocalChangeSeqNum); if (!equals(value.clazzEnrolmentMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.clazzEnrolmentMasterChangeSeqNum); if (!equals(value.clazzEnrolmentLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.clazzEnrolmentLastChangedBy); if (!equals(value.clazzEnrolmentLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.clazzEnrolmentLct); if (!equals(value.person, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 14, Person$$serializer_getInstance(), value.person); output.endStructure_24f42q$(this.descriptor); }; ClazzEnrolmentWithPerson$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeFloatElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeBooleanElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 14, Person$$serializer_getInstance(), local14); bitMask0 |= 16384; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzEnrolmentWithPerson_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, null); }; ClazzEnrolmentWithPerson$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.FloatSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(Person$$serializer_getInstance())]; }; ClazzEnrolmentWithPerson$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzEnrolmentWithPerson$$serializer_instance = null; function ClazzEnrolmentWithPerson$$serializer_getInstance() { if (ClazzEnrolmentWithPerson$$serializer_instance === null) { new ClazzEnrolmentWithPerson$$serializer(); } return ClazzEnrolmentWithPerson$$serializer_instance; } function ClazzEnrolmentWithPerson_init(seen1, clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct, person, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzEnrolmentWithPerson.prototype); $this = ClazzEnrolment_init(seen1, clazzEnrolmentUid, clazzEnrolmentPersonUid, clazzEnrolmentClazzUid, clazzEnrolmentDateJoined, clazzEnrolmentDateLeft, clazzEnrolmentRole, clazzEnrolmentAttendancePercentage, clazzEnrolmentActive, clazzEnrolmentLeavingReasonUid, clazzEnrolmentOutcome, clazzEnrolmentLocalChangeSeqNum, clazzEnrolmentMasterChangeSeqNum, clazzEnrolmentLastChangedBy, clazzEnrolmentLct, $this); if ((seen1 & 16384) === 0) $this.person = null; else $this.person = person; return $this; } ClazzEnrolmentWithPerson.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzEnrolmentWithPerson', interfaces: [ClazzEnrolment]}; function ClazzLog() { ClazzLog$Companion_getInstance(); this.clazzLogUid = L0; this.clazzLogClazzUid = L0; this.logDate = L0; this.timeRecorded = L0; this.clazzLogDone = false; this.cancellationNote = null; this.clazzLogCancelled = false; this.clazzLogNumPresent = 0; this.clazzLogNumAbsent = 0; this.clazzLogNumPartial = 0; this.clazzLogScheduleUid = L0; this.clazzLogStatusFlag = 0; this.clazzLogMSQN = L0; this.clazzLogLCSN = L0; this.clazzLogLCB = 0; this.clazzLogLastChangedTime = L0; } function ClazzLog$Companion() { ClazzLog$Companion_instance = this; this.TABLE_ID = 14; this.STATUS_CREATED = 0; this.STATUS_HOLIDAY = 1; this.STATUS_MANUALLYCANCELED = 2; this.STATUS_RECORDED = 4; this.STATUS_RESCHEDULED = 8; this.STATUS_INACTIVE = 16; } ClazzLog$Companion.prototype.serializer = function () { return ClazzLog$$serializer_getInstance(); }; ClazzLog$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzLog$Companion_instance = null; function ClazzLog$Companion_getInstance() { if (ClazzLog$Companion_instance === null) { new ClazzLog$Companion(); } return ClazzLog$Companion_instance; } ClazzLog.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, ClazzLog) ? tmp$_0 : throwCCE(); if (!equals(this.clazzLogUid, other.clazzLogUid)) return false; if (!equals(this.clazzLogClazzUid, other.clazzLogClazzUid)) return false; if (!equals(this.logDate, other.logDate)) return false; if (!equals(this.timeRecorded, other.timeRecorded)) return false; if (this.clazzLogDone !== other.clazzLogDone) return false; if (!equals(this.cancellationNote, other.cancellationNote)) return false; if (this.clazzLogCancelled !== other.clazzLogCancelled) return false; if (this.clazzLogNumPresent !== other.clazzLogNumPresent) return false; if (this.clazzLogNumAbsent !== other.clazzLogNumAbsent) return false; if (this.clazzLogNumPartial !== other.clazzLogNumPartial) return false; if (!equals(this.clazzLogScheduleUid, other.clazzLogScheduleUid)) return false; if (this.clazzLogStatusFlag !== other.clazzLogStatusFlag) return false; if (!equals(this.clazzLogMSQN, other.clazzLogMSQN)) return false; if (!equals(this.clazzLogLCSN, other.clazzLogLCSN)) return false; if (this.clazzLogLCB !== other.clazzLogLCB) return false; if (!equals(this.clazzLogLastChangedTime, other.clazzLogLastChangedTime)) return false; return true; }; ClazzLog.prototype.hashCode = function () { var tmp$, tmp$_0; var result = hashCode(this.clazzLogUid); result = (31 * result | 0) + hashCode(this.clazzLogClazzUid) | 0; result = (31 * result | 0) + hashCode(this.logDate) | 0; result = (31 * result | 0) + hashCode(this.timeRecorded) | 0; result = (31 * result | 0) + hashCode(this.clazzLogDone) | 0; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.cancellationNote) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + hashCode(this.clazzLogCancelled) | 0; result = (31 * result | 0) + this.clazzLogNumPresent | 0; result = (31 * result | 0) + this.clazzLogNumAbsent | 0; result = (31 * result | 0) + this.clazzLogNumPartial | 0; result = (31 * result | 0) + hashCode(this.clazzLogScheduleUid) | 0; result = (31 * result | 0) + this.clazzLogStatusFlag | 0; result = (31 * result | 0) + hashCode(this.clazzLogMSQN) | 0; result = (31 * result | 0) + hashCode(this.clazzLogLCSN) | 0; result = (31 * result | 0) + this.clazzLogLCB | 0; result = (31 * result | 0) + hashCode(this.clazzLogLastChangedTime) | 0; return result; }; function ClazzLog$$serializer() { this.descriptor_ady8ev$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzLog', this, 16); this.descriptor.addElement_ivxn3r$('clazzLogUid', true); this.descriptor.addElement_ivxn3r$('clazzLogClazzUid', true); this.descriptor.addElement_ivxn3r$('logDate', true); this.descriptor.addElement_ivxn3r$('timeRecorded', true); this.descriptor.addElement_ivxn3r$('clazzLogDone', true); this.descriptor.addElement_ivxn3r$('cancellationNote', true); this.descriptor.addElement_ivxn3r$('clazzLogCancelled', true); this.descriptor.addElement_ivxn3r$('clazzLogNumPresent', true); this.descriptor.addElement_ivxn3r$('clazzLogNumAbsent', true); this.descriptor.addElement_ivxn3r$('clazzLogNumPartial', true); this.descriptor.addElement_ivxn3r$('clazzLogScheduleUid', true); this.descriptor.addElement_ivxn3r$('clazzLogStatusFlag', true); this.descriptor.addElement_ivxn3r$('clazzLogMSQN', true); this.descriptor.addElement_ivxn3r$('clazzLogLCSN', true); this.descriptor.addElement_ivxn3r$('clazzLogLCB', true); this.descriptor.addElement_ivxn3r$('clazzLogLastChangedTime', true); ClazzLog$$serializer_instance = this; } Object.defineProperty(ClazzLog$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ady8ev$_0; }}); ClazzLog$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.clazzLogUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.clazzLogUid); if (!equals(value.clazzLogClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.clazzLogClazzUid); if (!equals(value.logDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.logDate); if (!equals(value.timeRecorded, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.timeRecorded); if (!equals(value.clazzLogDone, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.clazzLogDone); if (!equals(value.cancellationNote, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.cancellationNote); if (!equals(value.clazzLogCancelled, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.clazzLogCancelled); if (!equals(value.clazzLogNumPresent, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.clazzLogNumPresent); if (!equals(value.clazzLogNumAbsent, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeIntElement_ptg7oe$(this.descriptor, 8, value.clazzLogNumAbsent); if (!equals(value.clazzLogNumPartial, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.clazzLogNumPartial); if (!equals(value.clazzLogScheduleUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.clazzLogScheduleUid); if (!equals(value.clazzLogStatusFlag, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.clazzLogStatusFlag); if (!equals(value.clazzLogMSQN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.clazzLogMSQN); if (!equals(value.clazzLogLCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.clazzLogLCSN); if (!equals(value.clazzLogLCB, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeIntElement_ptg7oe$(this.descriptor, 14, value.clazzLogLCB); if (!equals(value.clazzLogLastChangedTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeLongElement_j0o2mv$(this.descriptor, 15, value.clazzLogLastChangedTime); output.endStructure_24f42q$(this.descriptor); }; ClazzLog$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeIntElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeIntElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeLongElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzLog_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, null); }; ClazzLog$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; ClazzLog$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzLog$$serializer_instance = null; function ClazzLog$$serializer_getInstance() { if (ClazzLog$$serializer_instance === null) { new ClazzLog$$serializer(); } return ClazzLog$$serializer_instance; } function ClazzLog_init(seen1, clazzLogUid, clazzLogClazzUid, logDate, timeRecorded, clazzLogDone, cancellationNote, clazzLogCancelled, clazzLogNumPresent, clazzLogNumAbsent, clazzLogNumPartial, clazzLogScheduleUid, clazzLogStatusFlag, clazzLogMSQN, clazzLogLCSN, clazzLogLCB, clazzLogLastChangedTime, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzLog.prototype); if ((seen1 & 1) === 0) $this.clazzLogUid = L0; else $this.clazzLogUid = clazzLogUid; if ((seen1 & 2) === 0) $this.clazzLogClazzUid = L0; else $this.clazzLogClazzUid = clazzLogClazzUid; if ((seen1 & 4) === 0) $this.logDate = L0; else $this.logDate = logDate; if ((seen1 & 8) === 0) $this.timeRecorded = L0; else $this.timeRecorded = timeRecorded; if ((seen1 & 16) === 0) $this.clazzLogDone = false; else $this.clazzLogDone = clazzLogDone; if ((seen1 & 32) === 0) $this.cancellationNote = null; else $this.cancellationNote = cancellationNote; if ((seen1 & 64) === 0) $this.clazzLogCancelled = false; else $this.clazzLogCancelled = clazzLogCancelled; if ((seen1 & 128) === 0) $this.clazzLogNumPresent = 0; else $this.clazzLogNumPresent = clazzLogNumPresent; if ((seen1 & 256) === 0) $this.clazzLogNumAbsent = 0; else $this.clazzLogNumAbsent = clazzLogNumAbsent; if ((seen1 & 512) === 0) $this.clazzLogNumPartial = 0; else $this.clazzLogNumPartial = clazzLogNumPartial; if ((seen1 & 1024) === 0) $this.clazzLogScheduleUid = L0; else $this.clazzLogScheduleUid = clazzLogScheduleUid; if ((seen1 & 2048) === 0) $this.clazzLogStatusFlag = 0; else $this.clazzLogStatusFlag = clazzLogStatusFlag; if ((seen1 & 4096) === 0) $this.clazzLogMSQN = L0; else $this.clazzLogMSQN = clazzLogMSQN; if ((seen1 & 8192) === 0) $this.clazzLogLCSN = L0; else $this.clazzLogLCSN = clazzLogLCSN; if ((seen1 & 16384) === 0) $this.clazzLogLCB = 0; else $this.clazzLogLCB = clazzLogLCB; if ((seen1 & 32768) === 0) $this.clazzLogLastChangedTime = L0; else $this.clazzLogLastChangedTime = clazzLogLastChangedTime; return $this; } ClazzLog.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLog', interfaces: []}; function ClazzLogAttendanceRecord() { ClazzLogAttendanceRecord$Companion_getInstance(); this.clazzLogAttendanceRecordUid = L0; this.clazzLogAttendanceRecordClazzLogUid = L0; this.clazzLogAttendanceRecordPersonUid = L0; this.attendanceStatus = 0; this.clazzLogAttendanceRecordMasterChangeSeqNum = L0; this.clazzLogAttendanceRecordLocalChangeSeqNum = L0; this.clazzLogAttendanceRecordLastChangedBy = 0; this.clazzLogAttendanceRecordLastChangedTime = L0; } ClazzLogAttendanceRecord.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, ClazzLogAttendanceRecord) ? tmp$_0 : throwCCE(); if (!equals(this.clazzLogAttendanceRecordUid, other.clazzLogAttendanceRecordUid)) return false; if (!equals(this.clazzLogAttendanceRecordClazzLogUid, other.clazzLogAttendanceRecordClazzLogUid)) return false; if (!equals(this.clazzLogAttendanceRecordPersonUid, other.clazzLogAttendanceRecordPersonUid)) return false; if (this.attendanceStatus !== other.attendanceStatus) return false; if (!equals(this.clazzLogAttendanceRecordMasterChangeSeqNum, other.clazzLogAttendanceRecordMasterChangeSeqNum)) return false; if (!equals(this.clazzLogAttendanceRecordLocalChangeSeqNum, other.clazzLogAttendanceRecordLocalChangeSeqNum)) return false; if (this.clazzLogAttendanceRecordLastChangedBy !== other.clazzLogAttendanceRecordLastChangedBy) return false; return true; }; ClazzLogAttendanceRecord.prototype.hashCode = function () { var result = hashCode(this.clazzLogAttendanceRecordUid); result = (31 * result | 0) + hashCode(this.clazzLogAttendanceRecordClazzLogUid) | 0; result = (31 * result | 0) + hashCode(this.clazzLogAttendanceRecordPersonUid) | 0; result = (31 * result | 0) + this.attendanceStatus | 0; result = (31 * result | 0) + hashCode(this.clazzLogAttendanceRecordMasterChangeSeqNum) | 0; result = (31 * result | 0) + hashCode(this.clazzLogAttendanceRecordLocalChangeSeqNum) | 0; result = (31 * result | 0) + this.clazzLogAttendanceRecordLastChangedBy | 0; return result; }; function ClazzLogAttendanceRecord$Companion() { ClazzLogAttendanceRecord$Companion_instance = this; this.FROM_CLAZZLOGATTENDANCERECORD_TO_SCOPEDGRANT_JOIN_ON_CLAUSE = '\n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 9\n AND ScopedGrant.sgEntityUid = ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid)\n OR (ScopedGrant.sgTableId = 6\n AND ScopedGrant.sgEntityUid = (\n SELECT clazzLogClazzUid \n FROM ClazzLog\n WHERE clazzLogUid = ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid))\n OR (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid = (\n SELECT clazzSchoolUid\n FROM Clazz\n WHERE clazzUid = (\n SELECT clazzLogClazzUid \n FROM ClazzLog\n WHERE clazzLogUid = ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid)))\n \n )\n \n '; this.FROM_SCOPEDGRANT_TO_CLAZZLOGATTENDANCERECORD_JOIN_ON_CLAUSE = '\n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 9\n AND ScopedGrant.sgEntityUid = ClazzLogAttendanceRecord.clazzLogAttendanceRecordPersonUid)\n OR (ScopedGrant.sgTableId = 6\n AND ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid IN (\n SELECT clazzLogUid \n FROM ClazzLog\n WHERE clazzLogClazzUid = ScopedGrant.sgEntityUid))\n OR (ScopedGrant.sgTableId = 164\n AND ClazzLogAttendanceRecord.clazzLogAttendanceRecordClazzLogUid IN (\n SELECT clazzLogUid\n FROM ClazzLog\n WHERE clazzLogClazzUid IN (\n SELECT clazzUid\n FROM Clazz\n WHERE clazzSchoolUid = ScopedGrant.sgEntityUid)))\n ) \n '; this.TABLE_ID = 15; this.STATUS_ATTENDED = 1; this.STATUS_ABSENT = 2; this.STATUS_PARTIAL = 4; } ClazzLogAttendanceRecord$Companion.prototype.serializer = function () { return ClazzLogAttendanceRecord$$serializer_getInstance(); }; ClazzLogAttendanceRecord$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzLogAttendanceRecord$Companion_instance = null; function ClazzLogAttendanceRecord$Companion_getInstance() { if (ClazzLogAttendanceRecord$Companion_instance === null) { new ClazzLogAttendanceRecord$Companion(); } return ClazzLogAttendanceRecord$Companion_instance; } function ClazzLogAttendanceRecord$$serializer() { this.descriptor_pq1oof$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzLogAttendanceRecord', this, 8); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordUid', true); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordClazzLogUid', true); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordPersonUid', true); this.descriptor.addElement_ivxn3r$('attendanceStatus', true); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordLastChangedBy', true); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordLastChangedTime', true); ClazzLogAttendanceRecord$$serializer_instance = this; } Object.defineProperty(ClazzLogAttendanceRecord$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_pq1oof$_0; }}); ClazzLogAttendanceRecord$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.clazzLogAttendanceRecordUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.clazzLogAttendanceRecordUid); if (!equals(value.clazzLogAttendanceRecordClazzLogUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.clazzLogAttendanceRecordClazzLogUid); if (!equals(value.clazzLogAttendanceRecordPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.clazzLogAttendanceRecordPersonUid); if (!equals(value.attendanceStatus, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.attendanceStatus); if (!equals(value.clazzLogAttendanceRecordMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.clazzLogAttendanceRecordMasterChangeSeqNum); if (!equals(value.clazzLogAttendanceRecordLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.clazzLogAttendanceRecordLocalChangeSeqNum); if (!equals(value.clazzLogAttendanceRecordLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.clazzLogAttendanceRecordLastChangedBy); if (!equals(value.clazzLogAttendanceRecordLastChangedTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.clazzLogAttendanceRecordLastChangedTime); output.endStructure_24f42q$(this.descriptor); }; ClazzLogAttendanceRecord$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzLogAttendanceRecord_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; ClazzLogAttendanceRecord$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; ClazzLogAttendanceRecord$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzLogAttendanceRecord$$serializer_instance = null; function ClazzLogAttendanceRecord$$serializer_getInstance() { if (ClazzLogAttendanceRecord$$serializer_instance === null) { new ClazzLogAttendanceRecord$$serializer(); } return ClazzLogAttendanceRecord$$serializer_instance; } function ClazzLogAttendanceRecord_init(seen1, clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzLogAttendanceRecord.prototype); if ((seen1 & 1) === 0) $this.clazzLogAttendanceRecordUid = L0; else $this.clazzLogAttendanceRecordUid = clazzLogAttendanceRecordUid; if ((seen1 & 2) === 0) $this.clazzLogAttendanceRecordClazzLogUid = L0; else $this.clazzLogAttendanceRecordClazzLogUid = clazzLogAttendanceRecordClazzLogUid; if ((seen1 & 4) === 0) $this.clazzLogAttendanceRecordPersonUid = L0; else $this.clazzLogAttendanceRecordPersonUid = clazzLogAttendanceRecordPersonUid; if ((seen1 & 8) === 0) $this.attendanceStatus = 0; else $this.attendanceStatus = attendanceStatus; if ((seen1 & 16) === 0) $this.clazzLogAttendanceRecordMasterChangeSeqNum = L0; else $this.clazzLogAttendanceRecordMasterChangeSeqNum = clazzLogAttendanceRecordMasterChangeSeqNum; if ((seen1 & 32) === 0) $this.clazzLogAttendanceRecordLocalChangeSeqNum = L0; else $this.clazzLogAttendanceRecordLocalChangeSeqNum = clazzLogAttendanceRecordLocalChangeSeqNum; if ((seen1 & 64) === 0) $this.clazzLogAttendanceRecordLastChangedBy = 0; else $this.clazzLogAttendanceRecordLastChangedBy = clazzLogAttendanceRecordLastChangedBy; if ((seen1 & 128) === 0) $this.clazzLogAttendanceRecordLastChangedTime = L0; else $this.clazzLogAttendanceRecordLastChangedTime = clazzLogAttendanceRecordLastChangedTime; return $this; } ClazzLogAttendanceRecord.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogAttendanceRecord', interfaces: []}; var ClazzLogAttendanceRecordReplicate$Companion_instance = null; function ClazzLogAttendanceRecordReplicate$$serializer() { this.descriptor_mc4uki$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzLogAttendanceRecordReplicate', this, 4); this.descriptor.addElement_ivxn3r$('clarPk', true); this.descriptor.addElement_ivxn3r$('clarVersionId', true); this.descriptor.addElement_ivxn3r$('clarDestination', true); this.descriptor.addElement_ivxn3r$('clarPending', true); ClazzLogAttendanceRecordReplicate$$serializer_instance = this; } var ClazzLogAttendanceRecordReplicate$$serializer_instance = null; function ClazzLogAttendanceRecordWithPerson() { ClazzLogAttendanceRecordWithPerson$Companion_getInstance(); ClazzLogAttendanceRecord.call(this); this.person = null; } ClazzLogAttendanceRecordWithPerson.prototype.copy = function () { var $receiver = new ClazzLogAttendanceRecordWithPerson(); $receiver.person = this.person; $receiver.clazzLogAttendanceRecordUid = this.clazzLogAttendanceRecordUid; $receiver.clazzLogAttendanceRecordPersonUid = this.clazzLogAttendanceRecordPersonUid; $receiver.clazzLogAttendanceRecordClazzLogUid = this.clazzLogAttendanceRecordClazzLogUid; $receiver.clazzLogAttendanceRecordLastChangedBy = this.clazzLogAttendanceRecordLastChangedBy; $receiver.clazzLogAttendanceRecordLocalChangeSeqNum = this.clazzLogAttendanceRecordLocalChangeSeqNum; $receiver.clazzLogAttendanceRecordMasterChangeSeqNum = this.clazzLogAttendanceRecordMasterChangeSeqNum; $receiver.attendanceStatus = this.attendanceStatus; return $receiver; }; function ClazzLogAttendanceRecordWithPerson$Companion() { ClazzLogAttendanceRecordWithPerson$Companion_instance = this; } ClazzLogAttendanceRecordWithPerson$Companion.prototype.serializer = function () { return ClazzLogAttendanceRecordWithPerson$$serializer_getInstance(); }; ClazzLogAttendanceRecordWithPerson$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzLogAttendanceRecordWithPerson$Companion_instance = null; function ClazzLogAttendanceRecordWithPerson$Companion_getInstance() { if (ClazzLogAttendanceRecordWithPerson$Companion_instance === null) { new ClazzLogAttendanceRecordWithPerson$Companion(); } return ClazzLogAttendanceRecordWithPerson$Companion_instance; } function ClazzLogAttendanceRecordWithPerson$$serializer() { this.descriptor_kur6b0$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzLogAttendanceRecordWithPerson', this, 9); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordUid', true); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordClazzLogUid', true); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordPersonUid', true); this.descriptor.addElement_ivxn3r$('attendanceStatus', true); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordLastChangedBy', true); this.descriptor.addElement_ivxn3r$('clazzLogAttendanceRecordLastChangedTime', true); this.descriptor.addElement_ivxn3r$('person', true); ClazzLogAttendanceRecordWithPerson$$serializer_instance = this; } Object.defineProperty(ClazzLogAttendanceRecordWithPerson$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_kur6b0$_0; }}); ClazzLogAttendanceRecordWithPerson$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.clazzLogAttendanceRecordUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.clazzLogAttendanceRecordUid); if (!equals(value.clazzLogAttendanceRecordClazzLogUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.clazzLogAttendanceRecordClazzLogUid); if (!equals(value.clazzLogAttendanceRecordPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.clazzLogAttendanceRecordPersonUid); if (!equals(value.attendanceStatus, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.attendanceStatus); if (!equals(value.clazzLogAttendanceRecordMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.clazzLogAttendanceRecordMasterChangeSeqNum); if (!equals(value.clazzLogAttendanceRecordLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.clazzLogAttendanceRecordLocalChangeSeqNum); if (!equals(value.clazzLogAttendanceRecordLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.clazzLogAttendanceRecordLastChangedBy); if (!equals(value.clazzLogAttendanceRecordLastChangedTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.clazzLogAttendanceRecordLastChangedTime); if (!equals(value.person, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, Person$$serializer_getInstance(), value.person); output.endStructure_24f42q$(this.descriptor); }; ClazzLogAttendanceRecordWithPerson$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, Person$$serializer_getInstance(), local8); bitMask0 |= 256; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzLogAttendanceRecordWithPerson_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, null); }; ClazzLogAttendanceRecordWithPerson$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(Person$$serializer_getInstance())]; }; ClazzLogAttendanceRecordWithPerson$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzLogAttendanceRecordWithPerson$$serializer_instance = null; function ClazzLogAttendanceRecordWithPerson$$serializer_getInstance() { if (ClazzLogAttendanceRecordWithPerson$$serializer_instance === null) { new ClazzLogAttendanceRecordWithPerson$$serializer(); } return ClazzLogAttendanceRecordWithPerson$$serializer_instance; } function ClazzLogAttendanceRecordWithPerson_init(seen1, clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime, person, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzLogAttendanceRecordWithPerson.prototype); $this = ClazzLogAttendanceRecord_init(seen1, clazzLogAttendanceRecordUid, clazzLogAttendanceRecordClazzLogUid, clazzLogAttendanceRecordPersonUid, attendanceStatus, clazzLogAttendanceRecordMasterChangeSeqNum, clazzLogAttendanceRecordLocalChangeSeqNum, clazzLogAttendanceRecordLastChangedBy, clazzLogAttendanceRecordLastChangedTime, $this); if ((seen1 & 256) === 0) $this.person = null; else $this.person = person; return $this; } ClazzLogAttendanceRecordWithPerson.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzLogAttendanceRecordWithPerson', interfaces: [ClazzLogAttendanceRecord]}; var ClazzLogReplicate$Companion_instance = null; function ClazzLogReplicate$$serializer() { this.descriptor_phbtx8$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzLogReplicate', this, 4); this.descriptor.addElement_ivxn3r$('clPk', true); this.descriptor.addElement_ivxn3r$('clVersionId', true); this.descriptor.addElement_ivxn3r$('clDestination', true); this.descriptor.addElement_ivxn3r$('clPending', true); ClazzLogReplicate$$serializer_instance = this; } var ClazzLogReplicate$$serializer_instance = null; var ClazzReplicate$Companion_instance = null; function ClazzReplicate$$serializer() { this.descriptor_yjf1c4$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzReplicate', this, 4); this.descriptor.addElement_ivxn3r$('clazzPk', true); this.descriptor.addElement_ivxn3r$('clazzVersionId', true); this.descriptor.addElement_ivxn3r$('clazzDestination', true); this.descriptor.addElement_ivxn3r$('clazzPending', true); ClazzReplicate$$serializer_instance = this; } var ClazzReplicate$$serializer_instance = null; function ClazzWithDisplayDetails() { ClazzWithDisplayDetails$Companion_getInstance(); Clazz.call(this); this.clazzHolidayCalendar = null; this.clazzSchool = null; this.terminology = null; this.numStudents = 0; this.numTeachers = 0; } function ClazzWithDisplayDetails$Companion() { ClazzWithDisplayDetails$Companion_instance = this; } ClazzWithDisplayDetails$Companion.prototype.serializer = function () { return ClazzWithDisplayDetails$$serializer_getInstance(); }; ClazzWithDisplayDetails$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzWithDisplayDetails$Companion_instance = null; function ClazzWithDisplayDetails$Companion_getInstance() { if (ClazzWithDisplayDetails$Companion_instance === null) { new ClazzWithDisplayDetails$Companion(); } return ClazzWithDisplayDetails$Companion_instance; } function ClazzWithDisplayDetails$$serializer() { this.descriptor_bmce0t$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzWithDisplayDetails', this, 29); this.descriptor.addElement_ivxn3r$('clazzUid', true); this.descriptor.addElement_ivxn3r$('clazzName', true); this.descriptor.addElement_ivxn3r$('clazzDesc', true); this.descriptor.addElement_ivxn3r$('attendanceAverage', true); this.descriptor.addElement_ivxn3r$('clazzHolidayUMCalendarUid', true); this.descriptor.addElement_ivxn3r$('clazzScheuleUMCalendarUid', true); this.descriptor.addElement_ivxn3r$('isClazzActive', true); this.descriptor.addElement_ivxn3r$('clazzLocationUid', true); this.descriptor.addElement_ivxn3r$('clazzStartTime', true); this.descriptor.addElement_ivxn3r$('clazzEndTime', true); this.descriptor.addElement_ivxn3r$('clazzFeatures', true); this.descriptor.addElement_ivxn3r$('clazzSchoolUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentPolicy', true); this.descriptor.addElement_ivxn3r$('clazzTerminologyUid', true); this.descriptor.addElement_ivxn3r$('clazzMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLastChangedBy', true); this.descriptor.addElement_ivxn3r$('clazzLct', true); this.descriptor.addElement_ivxn3r$('clazzTimeZone', true); this.descriptor.addElement_ivxn3r$('clazzStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzTeachersPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzPendingStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzParentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzCode', true); this.descriptor.addElement_ivxn3r$('clazzHolidayCalendar', true); this.descriptor.addElement_ivxn3r$('clazzSchool', true); this.descriptor.addElement_ivxn3r$('terminology', true); this.descriptor.addElement_ivxn3r$('numStudents', true); this.descriptor.addElement_ivxn3r$('numTeachers', true); ClazzWithDisplayDetails$$serializer_instance = this; } Object.defineProperty(ClazzWithDisplayDetails$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_bmce0t$_0; }}); ClazzWithDisplayDetails$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.clazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.clazzUid); if (!equals(value.clazzName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.clazzName); if (!equals(value.clazzDesc, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.clazzDesc); if (!equals(value.attendanceAverage, -1.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeFloatElement_lf6hpt$(this.descriptor, 3, value.attendanceAverage); if (!equals(value.clazzHolidayUMCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.clazzHolidayUMCalendarUid); if (!equals(value.clazzScheuleUMCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.clazzScheuleUMCalendarUid); if (!equals(value.isClazzActive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.isClazzActive); if (!equals(value.clazzLocationUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.clazzLocationUid); if (!equals(value.clazzStartTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.clazzStartTime); if (!equals(value.clazzEndTime, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.clazzEndTime); if (!equals(value.clazzFeatures, Clazz$Companion_getInstance().CLAZZ_FEATURE_ATTENDANCE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.clazzFeatures); if (!equals(value.clazzSchoolUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.clazzSchoolUid); if (!equals(value.clazzEnrolmentPolicy, 102) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.clazzEnrolmentPolicy); if (!equals(value.clazzTerminologyUid, L25966) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.clazzTerminologyUid); if (!equals(value.clazzMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.clazzMasterChangeSeqNum); if (!equals(value.clazzLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeLongElement_j0o2mv$(this.descriptor, 15, value.clazzLocalChangeSeqNum); if (!equals(value.clazzLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeIntElement_ptg7oe$(this.descriptor, 16, value.clazzLastChangedBy); if (!equals(value.clazzLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.clazzLct); if (!equals(value.clazzTimeZone, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 18, internal.StringSerializer, value.clazzTimeZone); if (!equals(value.clazzStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.clazzStudentsPersonGroupUid); if (!equals(value.clazzTeachersPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeLongElement_j0o2mv$(this.descriptor, 20, value.clazzTeachersPersonGroupUid); if (!equals(value.clazzPendingStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.clazzPendingStudentsPersonGroupUid); if (!equals(value.clazzParentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.clazzParentsPersonGroupUid); if (!equals(value.clazzCode, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 23, internal.StringSerializer, value.clazzCode); if (!equals(value.clazzHolidayCalendar, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 24, HolidayCalendar$$serializer_getInstance(), value.clazzHolidayCalendar); if (!equals(value.clazzSchool, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 25, School$$serializer_getInstance(), value.clazzSchool); if (!equals(value.terminology, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 26)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 26, CourseTerminology$$serializer_getInstance(), value.terminology); if (!equals(value.numStudents, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 27)) output.encodeIntElement_ptg7oe$(this.descriptor, 27, value.numStudents); if (!equals(value.numTeachers, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 28)) output.encodeIntElement_ptg7oe$(this.descriptor, 28, value.numTeachers); output.endStructure_24f42q$(this.descriptor); }; ClazzWithDisplayDetails$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, local28; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeFloatElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeLongElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeIntElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 18, internal.StringSerializer, local18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeLongElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 23, internal.StringSerializer, local23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 24, HolidayCalendar$$serializer_getInstance(), local24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 25, School$$serializer_getInstance(), local25); bitMask0 |= 33554432; break; case 26: local26 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 26, CourseTerminology$$serializer_getInstance(), local26); bitMask0 |= 67108864; break; case 27: local27 = input.decodeIntElement_szpzho$(this.descriptor, 27); bitMask0 |= 134217728; break; case 28: local28 = input.decodeIntElement_szpzho$(this.descriptor, 28); bitMask0 |= 268435456; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzWithDisplayDetails_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, local28, null); }; ClazzWithDisplayDetails$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.FloatSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(HolidayCalendar$$serializer_getInstance()), new NullableSerializer(School$$serializer_getInstance()), new NullableSerializer(CourseTerminology$$serializer_getInstance()), internal.IntSerializer, internal.IntSerializer]; }; ClazzWithDisplayDetails$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzWithDisplayDetails$$serializer_instance = null; function ClazzWithDisplayDetails$$serializer_getInstance() { if (ClazzWithDisplayDetails$$serializer_instance === null) { new ClazzWithDisplayDetails$$serializer(); } return ClazzWithDisplayDetails$$serializer_instance; } function ClazzWithDisplayDetails_init(seen1, clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode, clazzHolidayCalendar, clazzSchool, terminology, numStudents, numTeachers, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzWithDisplayDetails.prototype); $this = Clazz_init(seen1, clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode, $this); if ((seen1 & 16777216) === 0) $this.clazzHolidayCalendar = null; else $this.clazzHolidayCalendar = clazzHolidayCalendar; if ((seen1 & 33554432) === 0) $this.clazzSchool = null; else $this.clazzSchool = clazzSchool; if ((seen1 & 67108864) === 0) $this.terminology = null; else $this.terminology = terminology; if ((seen1 & 134217728) === 0) $this.numStudents = 0; else $this.numStudents = numStudents; if ((seen1 & 268435456) === 0) $this.numTeachers = 0; else $this.numTeachers = numTeachers; return $this; } ClazzWithDisplayDetails.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzWithDisplayDetails', interfaces: [Clazz]}; function ClazzWithHolidayCalendarAndSchoolAndTerminology() { ClazzWithHolidayCalendarAndSchoolAndTerminology$Companion_getInstance(); Clazz.call(this); this.holidayCalendar = null; this.school = null; this.terminology = null; } function ClazzWithHolidayCalendarAndSchoolAndTerminology$Companion() { ClazzWithHolidayCalendarAndSchoolAndTerminology$Companion_instance = this; } ClazzWithHolidayCalendarAndSchoolAndTerminology$Companion.prototype.serializer = function () { return ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer_getInstance(); }; ClazzWithHolidayCalendarAndSchoolAndTerminology$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzWithHolidayCalendarAndSchoolAndTerminology$Companion_instance = null; function ClazzWithHolidayCalendarAndSchoolAndTerminology$Companion_getInstance() { if (ClazzWithHolidayCalendarAndSchoolAndTerminology$Companion_instance === null) { new ClazzWithHolidayCalendarAndSchoolAndTerminology$Companion(); } return ClazzWithHolidayCalendarAndSchoolAndTerminology$Companion_instance; } function ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer() { this.descriptor_w1t26q$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzWithHolidayCalendarAndSchoolAndTerminology', this, 27); this.descriptor.addElement_ivxn3r$('clazzUid', true); this.descriptor.addElement_ivxn3r$('clazzName', true); this.descriptor.addElement_ivxn3r$('clazzDesc', true); this.descriptor.addElement_ivxn3r$('attendanceAverage', true); this.descriptor.addElement_ivxn3r$('clazzHolidayUMCalendarUid', true); this.descriptor.addElement_ivxn3r$('clazzScheuleUMCalendarUid', true); this.descriptor.addElement_ivxn3r$('isClazzActive', true); this.descriptor.addElement_ivxn3r$('clazzLocationUid', true); this.descriptor.addElement_ivxn3r$('clazzStartTime', true); this.descriptor.addElement_ivxn3r$('clazzEndTime', true); this.descriptor.addElement_ivxn3r$('clazzFeatures', true); this.descriptor.addElement_ivxn3r$('clazzSchoolUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentPolicy', true); this.descriptor.addElement_ivxn3r$('clazzTerminologyUid', true); this.descriptor.addElement_ivxn3r$('clazzMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLastChangedBy', true); this.descriptor.addElement_ivxn3r$('clazzLct', true); this.descriptor.addElement_ivxn3r$('clazzTimeZone', true); this.descriptor.addElement_ivxn3r$('clazzStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzTeachersPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzPendingStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzParentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzCode', true); this.descriptor.addElement_ivxn3r$('holidayCalendar', true); this.descriptor.addElement_ivxn3r$('school', true); this.descriptor.addElement_ivxn3r$('terminology', true); ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer_instance = this; } Object.defineProperty(ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_w1t26q$_0; }}); ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.clazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.clazzUid); if (!equals(value.clazzName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.clazzName); if (!equals(value.clazzDesc, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.clazzDesc); if (!equals(value.attendanceAverage, -1.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeFloatElement_lf6hpt$(this.descriptor, 3, value.attendanceAverage); if (!equals(value.clazzHolidayUMCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.clazzHolidayUMCalendarUid); if (!equals(value.clazzScheuleUMCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.clazzScheuleUMCalendarUid); if (!equals(value.isClazzActive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.isClazzActive); if (!equals(value.clazzLocationUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.clazzLocationUid); if (!equals(value.clazzStartTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.clazzStartTime); if (!equals(value.clazzEndTime, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.clazzEndTime); if (!equals(value.clazzFeatures, Clazz$Companion_getInstance().CLAZZ_FEATURE_ATTENDANCE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.clazzFeatures); if (!equals(value.clazzSchoolUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.clazzSchoolUid); if (!equals(value.clazzEnrolmentPolicy, 102) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.clazzEnrolmentPolicy); if (!equals(value.clazzTerminologyUid, L25966) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.clazzTerminologyUid); if (!equals(value.clazzMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.clazzMasterChangeSeqNum); if (!equals(value.clazzLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeLongElement_j0o2mv$(this.descriptor, 15, value.clazzLocalChangeSeqNum); if (!equals(value.clazzLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeIntElement_ptg7oe$(this.descriptor, 16, value.clazzLastChangedBy); if (!equals(value.clazzLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.clazzLct); if (!equals(value.clazzTimeZone, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 18, internal.StringSerializer, value.clazzTimeZone); if (!equals(value.clazzStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.clazzStudentsPersonGroupUid); if (!equals(value.clazzTeachersPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeLongElement_j0o2mv$(this.descriptor, 20, value.clazzTeachersPersonGroupUid); if (!equals(value.clazzPendingStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.clazzPendingStudentsPersonGroupUid); if (!equals(value.clazzParentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.clazzParentsPersonGroupUid); if (!equals(value.clazzCode, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 23, internal.StringSerializer, value.clazzCode); if (!equals(value.holidayCalendar, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 24, HolidayCalendar$$serializer_getInstance(), value.holidayCalendar); if (!equals(value.school, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 25, School$$serializer_getInstance(), value.school); if (!equals(value.terminology, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 26)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 26, CourseTerminology$$serializer_getInstance(), value.terminology); output.endStructure_24f42q$(this.descriptor); }; ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeFloatElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeLongElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeIntElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 18, internal.StringSerializer, local18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeLongElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 23, internal.StringSerializer, local23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 24, HolidayCalendar$$serializer_getInstance(), local24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 25, School$$serializer_getInstance(), local25); bitMask0 |= 33554432; break; case 26: local26 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 26, CourseTerminology$$serializer_getInstance(), local26); bitMask0 |= 67108864; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzWithHolidayCalendarAndSchoolAndTerminology_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, null); }; ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.FloatSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(HolidayCalendar$$serializer_getInstance()), new NullableSerializer(School$$serializer_getInstance()), new NullableSerializer(CourseTerminology$$serializer_getInstance())]; }; ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer_instance = null; function ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer_getInstance() { if (ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer_instance === null) { new ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer(); } return ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer_instance; } function ClazzWithHolidayCalendarAndSchoolAndTerminology_init(seen1, clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode, holidayCalendar, school, terminology, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzWithHolidayCalendarAndSchoolAndTerminology.prototype); $this = Clazz_init(seen1, clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode, $this); if ((seen1 & 16777216) === 0) $this.holidayCalendar = null; else $this.holidayCalendar = holidayCalendar; if ((seen1 & 33554432) === 0) $this.school = null; else $this.school = school; if ((seen1 & 67108864) === 0) $this.terminology = null; else $this.terminology = terminology; return $this; } ClazzWithHolidayCalendarAndSchoolAndTerminology.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzWithHolidayCalendarAndSchoolAndTerminology', interfaces: [Clazz]}; function ClazzWithListDisplayDetails() { ClazzWithListDisplayDetails$Companion_getInstance(); Clazz.call(this); this.numStudents = 0; this.numTeachers = 0; this.teacherNames = null; this.lastRecorded = L0; this.clazzActiveEnrolment = null; this.terminology = null; } ClazzWithListDisplayDetails.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, ClazzWithListDisplayDetails) ? tmp$_0 : throwCCE(); if (this.numStudents !== other.numStudents) return false; if (this.numTeachers !== other.numTeachers) return false; if (!equals(this.teacherNames, other.teacherNames)) return false; if (!equals(this.lastRecorded, other.lastRecorded)) return false; if (!equals(this.clazzName, other.clazzName)) return false; return true; }; ClazzWithListDisplayDetails.prototype.hashCode = function () { var tmp$, tmp$_0; var result = this.numStudents; result = (31 * result | 0) + this.numTeachers | 0; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.teacherNames) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + hashCode(this.lastRecorded) | 0; return result; }; function ClazzWithListDisplayDetails$Companion() { ClazzWithListDisplayDetails$Companion_instance = this; } ClazzWithListDisplayDetails$Companion.prototype.serializer = function () { return ClazzWithListDisplayDetails$$serializer_getInstance(); }; ClazzWithListDisplayDetails$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzWithListDisplayDetails$Companion_instance = null; function ClazzWithListDisplayDetails$Companion_getInstance() { if (ClazzWithListDisplayDetails$Companion_instance === null) { new ClazzWithListDisplayDetails$Companion(); } return ClazzWithListDisplayDetails$Companion_instance; } function ClazzWithListDisplayDetails$$serializer() { this.descriptor_8bnt4r$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzWithListDisplayDetails', this, 30); this.descriptor.addElement_ivxn3r$('clazzUid', true); this.descriptor.addElement_ivxn3r$('clazzName', true); this.descriptor.addElement_ivxn3r$('clazzDesc', true); this.descriptor.addElement_ivxn3r$('attendanceAverage', true); this.descriptor.addElement_ivxn3r$('clazzHolidayUMCalendarUid', true); this.descriptor.addElement_ivxn3r$('clazzScheuleUMCalendarUid', true); this.descriptor.addElement_ivxn3r$('isClazzActive', true); this.descriptor.addElement_ivxn3r$('clazzLocationUid', true); this.descriptor.addElement_ivxn3r$('clazzStartTime', true); this.descriptor.addElement_ivxn3r$('clazzEndTime', true); this.descriptor.addElement_ivxn3r$('clazzFeatures', true); this.descriptor.addElement_ivxn3r$('clazzSchoolUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentPolicy', true); this.descriptor.addElement_ivxn3r$('clazzTerminologyUid', true); this.descriptor.addElement_ivxn3r$('clazzMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLastChangedBy', true); this.descriptor.addElement_ivxn3r$('clazzLct', true); this.descriptor.addElement_ivxn3r$('clazzTimeZone', true); this.descriptor.addElement_ivxn3r$('clazzStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzTeachersPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzPendingStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzParentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzCode', true); this.descriptor.addElement_ivxn3r$('numStudents', true); this.descriptor.addElement_ivxn3r$('numTeachers', true); this.descriptor.addElement_ivxn3r$('teacherNames', true); this.descriptor.addElement_ivxn3r$('lastRecorded', true); this.descriptor.addElement_ivxn3r$('clazzActiveEnrolment', true); this.descriptor.addElement_ivxn3r$('terminology', true); ClazzWithListDisplayDetails$$serializer_instance = this; } Object.defineProperty(ClazzWithListDisplayDetails$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_8bnt4r$_0; }}); ClazzWithListDisplayDetails$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.clazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.clazzUid); if (!equals(value.clazzName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.clazzName); if (!equals(value.clazzDesc, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.clazzDesc); if (!equals(value.attendanceAverage, -1.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeFloatElement_lf6hpt$(this.descriptor, 3, value.attendanceAverage); if (!equals(value.clazzHolidayUMCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.clazzHolidayUMCalendarUid); if (!equals(value.clazzScheuleUMCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.clazzScheuleUMCalendarUid); if (!equals(value.isClazzActive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.isClazzActive); if (!equals(value.clazzLocationUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.clazzLocationUid); if (!equals(value.clazzStartTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.clazzStartTime); if (!equals(value.clazzEndTime, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.clazzEndTime); if (!equals(value.clazzFeatures, Clazz$Companion_getInstance().CLAZZ_FEATURE_ATTENDANCE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.clazzFeatures); if (!equals(value.clazzSchoolUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.clazzSchoolUid); if (!equals(value.clazzEnrolmentPolicy, 102) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.clazzEnrolmentPolicy); if (!equals(value.clazzTerminologyUid, L25966) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.clazzTerminologyUid); if (!equals(value.clazzMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.clazzMasterChangeSeqNum); if (!equals(value.clazzLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeLongElement_j0o2mv$(this.descriptor, 15, value.clazzLocalChangeSeqNum); if (!equals(value.clazzLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeIntElement_ptg7oe$(this.descriptor, 16, value.clazzLastChangedBy); if (!equals(value.clazzLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.clazzLct); if (!equals(value.clazzTimeZone, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 18, internal.StringSerializer, value.clazzTimeZone); if (!equals(value.clazzStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.clazzStudentsPersonGroupUid); if (!equals(value.clazzTeachersPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeLongElement_j0o2mv$(this.descriptor, 20, value.clazzTeachersPersonGroupUid); if (!equals(value.clazzPendingStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.clazzPendingStudentsPersonGroupUid); if (!equals(value.clazzParentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.clazzParentsPersonGroupUid); if (!equals(value.clazzCode, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 23, internal.StringSerializer, value.clazzCode); if (!equals(value.numStudents, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeIntElement_ptg7oe$(this.descriptor, 24, value.numStudents); if (!equals(value.numTeachers, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeIntElement_ptg7oe$(this.descriptor, 25, value.numTeachers); if (!equals(value.teacherNames, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 26)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 26, internal.StringSerializer, value.teacherNames); if (!equals(value.lastRecorded, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 27)) output.encodeLongElement_j0o2mv$(this.descriptor, 27, value.lastRecorded); if (!equals(value.clazzActiveEnrolment, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 28)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 28, ClazzEnrolment$$serializer_getInstance(), value.clazzActiveEnrolment); if (!equals(value.terminology, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 29)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 29, CourseTerminology$$serializer_getInstance(), value.terminology); output.endStructure_24f42q$(this.descriptor); }; ClazzWithListDisplayDetails$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, local28, local29; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeFloatElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeLongElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeIntElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 18, internal.StringSerializer, local18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeLongElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 23, internal.StringSerializer, local23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeIntElement_szpzho$(this.descriptor, 24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeIntElement_szpzho$(this.descriptor, 25); bitMask0 |= 33554432; break; case 26: local26 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 26, internal.StringSerializer, local26); bitMask0 |= 67108864; break; case 27: local27 = input.decodeLongElement_szpzho$(this.descriptor, 27); bitMask0 |= 134217728; break; case 28: local28 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 28, ClazzEnrolment$$serializer_getInstance(), local28); bitMask0 |= 268435456; break; case 29: local29 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 29, CourseTerminology$$serializer_getInstance(), local29); bitMask0 |= 536870912; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzWithListDisplayDetails_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, local28, local29, null); }; ClazzWithListDisplayDetails$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.FloatSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, new NullableSerializer(ClazzEnrolment$$serializer_getInstance()), new NullableSerializer(CourseTerminology$$serializer_getInstance())]; }; ClazzWithListDisplayDetails$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzWithListDisplayDetails$$serializer_instance = null; function ClazzWithListDisplayDetails$$serializer_getInstance() { if (ClazzWithListDisplayDetails$$serializer_instance === null) { new ClazzWithListDisplayDetails$$serializer(); } return ClazzWithListDisplayDetails$$serializer_instance; } function ClazzWithListDisplayDetails_init(seen1, clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode, numStudents, numTeachers, teacherNames, lastRecorded, clazzActiveEnrolment, terminology, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzWithListDisplayDetails.prototype); $this = Clazz_init(seen1, clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode, $this); if ((seen1 & 16777216) === 0) $this.numStudents = 0; else $this.numStudents = numStudents; if ((seen1 & 33554432) === 0) $this.numTeachers = 0; else $this.numTeachers = numTeachers; if ((seen1 & 67108864) === 0) $this.teacherNames = null; else $this.teacherNames = teacherNames; if ((seen1 & 134217728) === 0) $this.lastRecorded = L0; else $this.lastRecorded = lastRecorded; if ((seen1 & 268435456) === 0) $this.clazzActiveEnrolment = null; else $this.clazzActiveEnrolment = clazzActiveEnrolment; if ((seen1 & 536870912) === 0) $this.terminology = null; else $this.terminology = terminology; return $this; } ClazzWithListDisplayDetails.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzWithListDisplayDetails', interfaces: [Clazz]}; function ClazzWithSchool() { ClazzWithSchool$Companion_getInstance(); Clazz.call(this); this.school = null; } function ClazzWithSchool$Companion() { ClazzWithSchool$Companion_instance = this; } ClazzWithSchool$Companion.prototype.serializer = function () { return ClazzWithSchool$$serializer_getInstance(); }; ClazzWithSchool$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ClazzWithSchool$Companion_instance = null; function ClazzWithSchool$Companion_getInstance() { if (ClazzWithSchool$Companion_instance === null) { new ClazzWithSchool$Companion(); } return ClazzWithSchool$Companion_instance; } function ClazzWithSchool$$serializer() { this.descriptor_cprwrz$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ClazzWithSchool', this, 25); this.descriptor.addElement_ivxn3r$('clazzUid', true); this.descriptor.addElement_ivxn3r$('clazzName', true); this.descriptor.addElement_ivxn3r$('clazzDesc', true); this.descriptor.addElement_ivxn3r$('attendanceAverage', true); this.descriptor.addElement_ivxn3r$('clazzHolidayUMCalendarUid', true); this.descriptor.addElement_ivxn3r$('clazzScheuleUMCalendarUid', true); this.descriptor.addElement_ivxn3r$('isClazzActive', true); this.descriptor.addElement_ivxn3r$('clazzLocationUid', true); this.descriptor.addElement_ivxn3r$('clazzStartTime', true); this.descriptor.addElement_ivxn3r$('clazzEndTime', true); this.descriptor.addElement_ivxn3r$('clazzFeatures', true); this.descriptor.addElement_ivxn3r$('clazzSchoolUid', true); this.descriptor.addElement_ivxn3r$('clazzEnrolmentPolicy', true); this.descriptor.addElement_ivxn3r$('clazzTerminologyUid', true); this.descriptor.addElement_ivxn3r$('clazzMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('clazzLastChangedBy', true); this.descriptor.addElement_ivxn3r$('clazzLct', true); this.descriptor.addElement_ivxn3r$('clazzTimeZone', true); this.descriptor.addElement_ivxn3r$('clazzStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzTeachersPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzPendingStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzParentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('clazzCode', true); this.descriptor.addElement_ivxn3r$('school', true); ClazzWithSchool$$serializer_instance = this; } Object.defineProperty(ClazzWithSchool$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_cprwrz$_0; }}); ClazzWithSchool$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.clazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.clazzUid); if (!equals(value.clazzName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.clazzName); if (!equals(value.clazzDesc, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.clazzDesc); if (!equals(value.attendanceAverage, -1.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeFloatElement_lf6hpt$(this.descriptor, 3, value.attendanceAverage); if (!equals(value.clazzHolidayUMCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.clazzHolidayUMCalendarUid); if (!equals(value.clazzScheuleUMCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.clazzScheuleUMCalendarUid); if (!equals(value.isClazzActive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.isClazzActive); if (!equals(value.clazzLocationUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.clazzLocationUid); if (!equals(value.clazzStartTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.clazzStartTime); if (!equals(value.clazzEndTime, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.clazzEndTime); if (!equals(value.clazzFeatures, Clazz$Companion_getInstance().CLAZZ_FEATURE_ATTENDANCE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.clazzFeatures); if (!equals(value.clazzSchoolUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.clazzSchoolUid); if (!equals(value.clazzEnrolmentPolicy, 102) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.clazzEnrolmentPolicy); if (!equals(value.clazzTerminologyUid, L25966) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.clazzTerminologyUid); if (!equals(value.clazzMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.clazzMasterChangeSeqNum); if (!equals(value.clazzLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeLongElement_j0o2mv$(this.descriptor, 15, value.clazzLocalChangeSeqNum); if (!equals(value.clazzLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeIntElement_ptg7oe$(this.descriptor, 16, value.clazzLastChangedBy); if (!equals(value.clazzLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.clazzLct); if (!equals(value.clazzTimeZone, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 18, internal.StringSerializer, value.clazzTimeZone); if (!equals(value.clazzStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.clazzStudentsPersonGroupUid); if (!equals(value.clazzTeachersPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeLongElement_j0o2mv$(this.descriptor, 20, value.clazzTeachersPersonGroupUid); if (!equals(value.clazzPendingStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.clazzPendingStudentsPersonGroupUid); if (!equals(value.clazzParentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.clazzParentsPersonGroupUid); if (!equals(value.clazzCode, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 23, internal.StringSerializer, value.clazzCode); if (!equals(value.school, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 24, School$$serializer_getInstance(), value.school); output.endStructure_24f42q$(this.descriptor); }; ClazzWithSchool$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeFloatElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeLongElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeIntElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 18, internal.StringSerializer, local18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeLongElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 23, internal.StringSerializer, local23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 24, School$$serializer_getInstance(), local24); bitMask0 |= 16777216; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ClazzWithSchool_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, null); }; ClazzWithSchool$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.FloatSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(School$$serializer_getInstance())]; }; ClazzWithSchool$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ClazzWithSchool$$serializer_instance = null; function ClazzWithSchool$$serializer_getInstance() { if (ClazzWithSchool$$serializer_instance === null) { new ClazzWithSchool$$serializer(); } return ClazzWithSchool$$serializer_instance; } function ClazzWithSchool_init(seen1, clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode, school, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ClazzWithSchool.prototype); $this = Clazz_init(seen1, clazzUid, clazzName, clazzDesc, attendanceAverage, clazzHolidayUMCalendarUid, clazzScheuleUMCalendarUid, isClazzActive, clazzLocationUid, clazzStartTime, clazzEndTime, clazzFeatures, clazzSchoolUid, clazzEnrolmentPolicy, clazzTerminologyUid, clazzMasterChangeSeqNum, clazzLocalChangeSeqNum, clazzLastChangedBy, clazzLct, clazzTimeZone, clazzStudentsPersonGroupUid, clazzTeachersPersonGroupUid, clazzPendingStudentsPersonGroupUid, clazzParentsPersonGroupUid, clazzCode, $this); if ((seen1 & 16777216) === 0) $this.school = null; else $this.school = school; return $this; } ClazzWithSchool.$metadata$ = {kind: Kind_CLASS, simpleName: 'ClazzWithSchool', interfaces: [Clazz]}; function Comments() { Comments$Companion_getInstance(); this.commentsUid = L0; this.commentsText = null; this.commentsEntityType = 0; this.commentsEntityUid = L0; this.commentsPublic = false; this.commentsStatus = 0; this.commentsPersonUid = L0; this.commentsToPersonUid = L0; this.commentSubmitterUid = L0; this.commentsFlagged = false; this.commentsInActive = false; this.commentsDateTimeAdded = L0; this.commentsDateTimeUpdated = L0; this.commentsMCSN = L0; this.commentsLCSN = L0; this.commentsLCB = 0; this.commentsLct = L0; } function Comments$Companion() { Comments$Companion_instance = this; this.TABLE_ID = 208; this.COMMENTS_STATUS_APPROVED = 0; this.COMMENTS_STATUS_PENDING = 1; this.COMMENTS_STATUS_REJECTED = 2; this.COMMENTS_STATUS_INAPPROPRIATE_REPORTED = 4; } Comments$Companion.prototype.serializer = function () { return Comments$$serializer_getInstance(); }; Comments$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var Comments$Companion_instance = null; function Comments$Companion_getInstance() { if (Comments$Companion_instance === null) { new Comments$Companion(); } return Comments$Companion_instance; } function Comments$$serializer() { this.descriptor_ti3scf$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.Comments', this, 17); this.descriptor.addElement_ivxn3r$('commentsUid', true); this.descriptor.addElement_ivxn3r$('commentsText', true); this.descriptor.addElement_ivxn3r$('commentsEntityType', true); this.descriptor.addElement_ivxn3r$('commentsEntityUid', true); this.descriptor.addElement_ivxn3r$('commentsPublic', true); this.descriptor.addElement_ivxn3r$('commentsStatus', true); this.descriptor.addElement_ivxn3r$('commentsPersonUid', true); this.descriptor.addElement_ivxn3r$('commentsToPersonUid', true); this.descriptor.addElement_ivxn3r$('commentSubmitterUid', true); this.descriptor.addElement_ivxn3r$('commentsFlagged', true); this.descriptor.addElement_ivxn3r$('commentsInActive', true); this.descriptor.addElement_ivxn3r$('commentsDateTimeAdded', true); this.descriptor.addElement_ivxn3r$('commentsDateTimeUpdated', true); this.descriptor.addElement_ivxn3r$('commentsMCSN', true); this.descriptor.addElement_ivxn3r$('commentsLCSN', true); this.descriptor.addElement_ivxn3r$('commentsLCB', true); this.descriptor.addElement_ivxn3r$('commentsLct', true); Comments$$serializer_instance = this; } Object.defineProperty(Comments$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ti3scf$_0; }}); Comments$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.commentsUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.commentsUid); if (!equals(value.commentsText, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.commentsText); if (!equals(value.commentsEntityType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.commentsEntityType); if (!equals(value.commentsEntityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.commentsEntityUid); if (!equals(value.commentsPublic, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.commentsPublic); if (!equals(value.commentsStatus, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.commentsStatus); if (!equals(value.commentsPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.commentsPersonUid); if (!equals(value.commentsToPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.commentsToPersonUid); if (!equals(value.commentSubmitterUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.commentSubmitterUid); if (!equals(value.commentsFlagged, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 9, value.commentsFlagged); if (!equals(value.commentsInActive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 10, value.commentsInActive); if (!equals(value.commentsDateTimeAdded, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.commentsDateTimeAdded); if (!equals(value.commentsDateTimeUpdated, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.commentsDateTimeUpdated); if (!equals(value.commentsMCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.commentsMCSN); if (!equals(value.commentsLCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.commentsLCSN); if (!equals(value.commentsLCB, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeIntElement_ptg7oe$(this.descriptor, 15, value.commentsLCB); if (!equals(value.commentsLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeLongElement_j0o2mv$(this.descriptor, 16, value.commentsLct); output.endStructure_24f42q$(this.descriptor); }; Comments$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeBooleanElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeBooleanElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeIntElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeLongElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return Comments_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, null); }; Comments$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; Comments$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var Comments$$serializer_instance = null; function Comments$$serializer_getInstance() { if (Comments$$serializer_instance === null) { new Comments$$serializer(); } return Comments$$serializer_instance; } function Comments_init(seen1, commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(Comments.prototype); if ((seen1 & 1) === 0) $this.commentsUid = L0; else $this.commentsUid = commentsUid; if ((seen1 & 2) === 0) $this.commentsText = null; else $this.commentsText = commentsText; if ((seen1 & 4) === 0) $this.commentsEntityType = 0; else $this.commentsEntityType = commentsEntityType; if ((seen1 & 8) === 0) $this.commentsEntityUid = L0; else $this.commentsEntityUid = commentsEntityUid; if ((seen1 & 16) === 0) $this.commentsPublic = false; else $this.commentsPublic = commentsPublic; if ((seen1 & 32) === 0) $this.commentsStatus = 0; else $this.commentsStatus = commentsStatus; if ((seen1 & 64) === 0) $this.commentsPersonUid = L0; else $this.commentsPersonUid = commentsPersonUid; if ((seen1 & 128) === 0) $this.commentsToPersonUid = L0; else $this.commentsToPersonUid = commentsToPersonUid; if ((seen1 & 256) === 0) $this.commentSubmitterUid = L0; else $this.commentSubmitterUid = commentSubmitterUid; if ((seen1 & 512) === 0) $this.commentsFlagged = false; else $this.commentsFlagged = commentsFlagged; if ((seen1 & 1024) === 0) $this.commentsInActive = false; else $this.commentsInActive = commentsInActive; if ((seen1 & 2048) === 0) $this.commentsDateTimeAdded = L0; else $this.commentsDateTimeAdded = commentsDateTimeAdded; if ((seen1 & 4096) === 0) $this.commentsDateTimeUpdated = L0; else $this.commentsDateTimeUpdated = commentsDateTimeUpdated; if ((seen1 & 8192) === 0) $this.commentsMCSN = L0; else $this.commentsMCSN = commentsMCSN; if ((seen1 & 16384) === 0) $this.commentsLCSN = L0; else $this.commentsLCSN = commentsLCSN; if ((seen1 & 32768) === 0) $this.commentsLCB = 0; else $this.commentsLCB = commentsLCB; if ((seen1 & 65536) === 0) $this.commentsLct = L0; else $this.commentsLct = commentsLct; return $this; } Comments.$metadata$ = {kind: Kind_CLASS, simpleName: 'Comments', interfaces: []}; function Comments_init_0(table, uid, personUid, now, comment, isPublic, $this) { $this = $this || Object.create(Comments.prototype); Comments.call($this); $this.commentsText = comment; $this.commentsEntityType = table; $this.commentsEntityUid = uid; $this.commentsPublic = isPublic; $this.commentsPersonUid = personUid; $this.commentsDateTimeAdded = now; return $this; } var CommentsReplicate$Companion_instance = null; function CommentsReplicate$$serializer() { this.descriptor_v8u4fg$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CommentsReplicate', this, 4); this.descriptor.addElement_ivxn3r$('commentsPk', true); this.descriptor.addElement_ivxn3r$('commentsVersionId', true); this.descriptor.addElement_ivxn3r$('commentsDestination', true); this.descriptor.addElement_ivxn3r$('commentsPending', true); CommentsReplicate$$serializer_instance = this; } var CommentsReplicate$$serializer_instance = null; function CommentsWithPerson() { CommentsWithPerson$Companion_getInstance(); Comments.call(this); this.commentsPerson = null; } function CommentsWithPerson$Companion() { CommentsWithPerson$Companion_instance = this; } CommentsWithPerson$Companion.prototype.serializer = function () { return CommentsWithPerson$$serializer_getInstance(); }; CommentsWithPerson$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CommentsWithPerson$Companion_instance = null; function CommentsWithPerson$Companion_getInstance() { if (CommentsWithPerson$Companion_instance === null) { new CommentsWithPerson$Companion(); } return CommentsWithPerson$Companion_instance; } function CommentsWithPerson$$serializer() { this.descriptor_6hrp7q$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CommentsWithPerson', this, 18); this.descriptor.addElement_ivxn3r$('commentsUid', true); this.descriptor.addElement_ivxn3r$('commentsText', true); this.descriptor.addElement_ivxn3r$('commentsEntityType', true); this.descriptor.addElement_ivxn3r$('commentsEntityUid', true); this.descriptor.addElement_ivxn3r$('commentsPublic', true); this.descriptor.addElement_ivxn3r$('commentsStatus', true); this.descriptor.addElement_ivxn3r$('commentsPersonUid', true); this.descriptor.addElement_ivxn3r$('commentsToPersonUid', true); this.descriptor.addElement_ivxn3r$('commentSubmitterUid', true); this.descriptor.addElement_ivxn3r$('commentsFlagged', true); this.descriptor.addElement_ivxn3r$('commentsInActive', true); this.descriptor.addElement_ivxn3r$('commentsDateTimeAdded', true); this.descriptor.addElement_ivxn3r$('commentsDateTimeUpdated', true); this.descriptor.addElement_ivxn3r$('commentsMCSN', true); this.descriptor.addElement_ivxn3r$('commentsLCSN', true); this.descriptor.addElement_ivxn3r$('commentsLCB', true); this.descriptor.addElement_ivxn3r$('commentsLct', true); this.descriptor.addElement_ivxn3r$('commentsPerson', true); CommentsWithPerson$$serializer_instance = this; } Object.defineProperty(CommentsWithPerson$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_6hrp7q$_0; }}); CommentsWithPerson$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.commentsUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.commentsUid); if (!equals(value.commentsText, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.commentsText); if (!equals(value.commentsEntityType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.commentsEntityType); if (!equals(value.commentsEntityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.commentsEntityUid); if (!equals(value.commentsPublic, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.commentsPublic); if (!equals(value.commentsStatus, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.commentsStatus); if (!equals(value.commentsPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.commentsPersonUid); if (!equals(value.commentsToPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.commentsToPersonUid); if (!equals(value.commentSubmitterUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.commentSubmitterUid); if (!equals(value.commentsFlagged, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 9, value.commentsFlagged); if (!equals(value.commentsInActive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 10, value.commentsInActive); if (!equals(value.commentsDateTimeAdded, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.commentsDateTimeAdded); if (!equals(value.commentsDateTimeUpdated, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.commentsDateTimeUpdated); if (!equals(value.commentsMCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.commentsMCSN); if (!equals(value.commentsLCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.commentsLCSN); if (!equals(value.commentsLCB, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeIntElement_ptg7oe$(this.descriptor, 15, value.commentsLCB); if (!equals(value.commentsLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeLongElement_j0o2mv$(this.descriptor, 16, value.commentsLct); if (!equals(value.commentsPerson, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 17, Person$$serializer_getInstance(), value.commentsPerson); output.endStructure_24f42q$(this.descriptor); }; CommentsWithPerson$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeBooleanElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeBooleanElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeIntElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeLongElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 17, Person$$serializer_getInstance(), local17); bitMask0 |= 131072; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CommentsWithPerson_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, null); }; CommentsWithPerson$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(Person$$serializer_getInstance())]; }; CommentsWithPerson$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CommentsWithPerson$$serializer_instance = null; function CommentsWithPerson$$serializer_getInstance() { if (CommentsWithPerson$$serializer_instance === null) { new CommentsWithPerson$$serializer(); } return CommentsWithPerson$$serializer_instance; } function CommentsWithPerson_init(seen1, commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct, commentsPerson, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CommentsWithPerson.prototype); $this = Comments_init(seen1, commentsUid, commentsText, commentsEntityType, commentsEntityUid, commentsPublic, commentsStatus, commentsPersonUid, commentsToPersonUid, commentSubmitterUid, commentsFlagged, commentsInActive, commentsDateTimeAdded, commentsDateTimeUpdated, commentsMCSN, commentsLCSN, commentsLCB, commentsLct, $this); if ((seen1 & 131072) === 0) $this.commentsPerson = null; else $this.commentsPerson = commentsPerson; return $this; } CommentsWithPerson.$metadata$ = {kind: Kind_CLASS, simpleName: 'CommentsWithPerson', interfaces: [Comments]}; function ConnectivityStatus() { ConnectivityStatus$Companion_getInstance(); this.csUid = 1; this.connectivityState = 0; this.wifiSsid = null; this.connectedOrConnecting = false; } ConnectivityStatus.prototype.toString = function () { var val = ''; switch (this.connectivityState) { case 3: val += 'METERED'; break; case 4: val += 'UNMETERED'; break; case 0: val += 'DISCONNECTED'; break; case 2: val += 'CONNECTED_LOCAL'; break; case 1: val += 'CONNECTING_LOCAL'; break; } if (this.wifiSsid != null) { val += ' SSID = ' + '"' + toString(this.wifiSsid) + '"'; } val += ' connectedOrConnecting = ' + this.connectedOrConnecting; return val; }; function ConnectivityStatus$Companion() { ConnectivityStatus$Companion_instance = this; this.STATE_DISCONNECTED = 0; this.STATE_CONNECTING_LOCAL = 1; this.STATE_CONNECTED_LOCAL = 2; this.STATE_METERED = 3; this.STATE_UNMETERED = 4; } ConnectivityStatus$Companion.prototype.serializer = function () { return ConnectivityStatus$$serializer_getInstance(); }; ConnectivityStatus$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ConnectivityStatus$Companion_instance = null; function ConnectivityStatus$Companion_getInstance() { if (ConnectivityStatus$Companion_instance === null) { new ConnectivityStatus$Companion(); } return ConnectivityStatus$Companion_instance; } function ConnectivityStatus$$serializer() { this.descriptor_hmi0d0$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ConnectivityStatus', this, 4); this.descriptor.addElement_ivxn3r$('csUid', true); this.descriptor.addElement_ivxn3r$('connectivityState', true); this.descriptor.addElement_ivxn3r$('wifiSsid', true); this.descriptor.addElement_ivxn3r$('connectedOrConnecting', true); ConnectivityStatus$$serializer_instance = this; } Object.defineProperty(ConnectivityStatus$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_hmi0d0$_0; }}); ConnectivityStatus$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.csUid, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeIntElement_ptg7oe$(this.descriptor, 0, value.csUid); if (!equals(value.connectivityState, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeIntElement_ptg7oe$(this.descriptor, 1, value.connectivityState); if (!equals(value.wifiSsid, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.wifiSsid); if (!equals(value.connectedOrConnecting, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 3, value.connectedOrConnecting); output.endStructure_24f42q$(this.descriptor); }; ConnectivityStatus$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeIntElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeIntElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeBooleanElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ConnectivityStatus_init(bitMask0, local0, local1, local2, local3, null); }; ConnectivityStatus$$serializer.prototype.childSerializers = function () { return [internal.IntSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer]; }; ConnectivityStatus$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ConnectivityStatus$$serializer_instance = null; function ConnectivityStatus$$serializer_getInstance() { if (ConnectivityStatus$$serializer_instance === null) { new ConnectivityStatus$$serializer(); } return ConnectivityStatus$$serializer_instance; } function ConnectivityStatus_init(seen1, csUid, connectivityState, wifiSsid, connectedOrConnecting, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ConnectivityStatus.prototype); if ((seen1 & 1) === 0) $this.csUid = 1; else $this.csUid = csUid; if ((seen1 & 2) === 0) $this.connectivityState = 0; else $this.connectivityState = connectivityState; if ((seen1 & 4) === 0) $this.wifiSsid = null; else $this.wifiSsid = wifiSsid; if ((seen1 & 8) === 0) $this.connectedOrConnecting = false; else $this.connectedOrConnecting = connectedOrConnecting; return $this; } ConnectivityStatus.$metadata$ = {kind: Kind_CLASS, simpleName: 'ConnectivityStatus', interfaces: []}; function Container() { Container$Companion_getInstance(); this.containerUid = L0; this.cntLocalCsn = L0; this.cntMasterCsn = L0; this.cntLastModBy = 0; this.cntLct = L0; this.fileSize = L0; this.containerContentEntryUid = L0; this.cntLastModified = L0; this.mimeType = null; this.remarks = null; this.mobileOptimized = false; this.cntNumEntries = 0; } Container.prototype.equals = function (other) { if (this === other) return true; if (!Kotlin.isType(other, Container)) return false; if (!equals(this.containerUid, other.containerUid)) return false; if (!equals(this.cntLocalCsn, other.cntLocalCsn)) return false; if (!equals(this.cntMasterCsn, other.cntMasterCsn)) return false; if (this.cntLastModBy !== other.cntLastModBy) return false; if (!equals(this.fileSize, other.fileSize)) return false; if (!equals(this.containerContentEntryUid, other.containerContentEntryUid)) return false; if (!equals(this.cntLastModified, other.cntLastModified)) return false; if (!equals(this.mimeType, other.mimeType)) return false; if (!equals(this.remarks, other.remarks)) return false; if (this.mobileOptimized !== other.mobileOptimized) return false; if (this.cntNumEntries !== other.cntNumEntries) return false; return true; }; Container.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2; var result = hashCode(this.containerUid); result = (31 * result | 0) + hashCode(this.cntLocalCsn) | 0; result = (31 * result | 0) + hashCode(this.cntMasterCsn) | 0; result = (31 * result | 0) + this.cntLastModBy | 0; result = (31 * result | 0) + hashCode(this.fileSize) | 0; result = (31 * result | 0) + hashCode(this.containerContentEntryUid) | 0; result = (31 * result | 0) + hashCode(this.cntLastModified) | 0; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.mimeType) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.remarks) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + hashCode(this.mobileOptimized) | 0; result = (31 * result | 0) + this.cntNumEntries | 0; return result; }; function Container$Companion() { Container$Companion_instance = this; this.TABLE_ID = 51; } Container$Companion.prototype.serializer = function () { return Container$$serializer_getInstance(); }; Container$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var Container$Companion_instance = null; function Container$Companion_getInstance() { if (Container$Companion_instance === null) { new Container$Companion(); } return Container$Companion_instance; } function Container$$serializer() { this.descriptor_iu1uyo$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.Container', this, 12); this.descriptor.addElement_ivxn3r$('containerUid', true); this.descriptor.addElement_ivxn3r$('cntLocalCsn', true); this.descriptor.addElement_ivxn3r$('cntMasterCsn', true); this.descriptor.addElement_ivxn3r$('cntLastModBy', true); this.descriptor.addElement_ivxn3r$('cntLct', true); this.descriptor.addElement_ivxn3r$('fileSize', true); this.descriptor.addElement_ivxn3r$('containerContentEntryUid', true); this.descriptor.addElement_ivxn3r$('cntLastModified', true); this.descriptor.addElement_ivxn3r$('mimeType', true); this.descriptor.addElement_ivxn3r$('remarks', true); this.descriptor.addElement_ivxn3r$('mobileOptimized', true); this.descriptor.addElement_ivxn3r$('cntNumEntries', true); Container$$serializer_instance = this; } Object.defineProperty(Container$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_iu1uyo$_0; }}); Container$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.containerUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.containerUid); if (!equals(value.cntLocalCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.cntLocalCsn); if (!equals(value.cntMasterCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.cntMasterCsn); if (!equals(value.cntLastModBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.cntLastModBy); if (!equals(value.cntLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.cntLct); if (!equals(value.fileSize, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.fileSize); if (!equals(value.containerContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.containerContentEntryUid); if (!equals(value.cntLastModified, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.cntLastModified); if (!equals(value.mimeType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, internal.StringSerializer, value.mimeType); if (!equals(value.remarks, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.remarks); if (!equals(value.mobileOptimized, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 10, value.mobileOptimized); if (!equals(value.cntNumEntries, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.cntNumEntries); output.endStructure_24f42q$(this.descriptor); }; Container$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, internal.StringSerializer, local8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeBooleanElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return Container_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, null); }; Container$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.IntSerializer]; }; Container$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var Container$$serializer_instance = null; function Container$$serializer_getInstance() { if (Container$$serializer_instance === null) { new Container$$serializer(); } return Container$$serializer_instance; } function Container_init(seen1, containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(Container.prototype); if ((seen1 & 1) === 0) $this.containerUid = L0; else $this.containerUid = containerUid; if ((seen1 & 2) === 0) $this.cntLocalCsn = L0; else $this.cntLocalCsn = cntLocalCsn; if ((seen1 & 4) === 0) $this.cntMasterCsn = L0; else $this.cntMasterCsn = cntMasterCsn; if ((seen1 & 8) === 0) $this.cntLastModBy = 0; else $this.cntLastModBy = cntLastModBy; if ((seen1 & 16) === 0) $this.cntLct = L0; else $this.cntLct = cntLct; if ((seen1 & 32) === 0) $this.fileSize = L0; else $this.fileSize = fileSize; if ((seen1 & 64) === 0) $this.containerContentEntryUid = L0; else $this.containerContentEntryUid = containerContentEntryUid; if ((seen1 & 128) === 0) $this.cntLastModified = L0; else $this.cntLastModified = cntLastModified; if ((seen1 & 256) === 0) $this.mimeType = null; else $this.mimeType = mimeType; if ((seen1 & 512) === 0) $this.remarks = null; else $this.remarks = remarks; if ((seen1 & 1024) === 0) $this.mobileOptimized = false; else $this.mobileOptimized = mobileOptimized; if ((seen1 & 2048) === 0) $this.cntNumEntries = 0; else $this.cntNumEntries = cntNumEntries; return $this; } Container.$metadata$ = {kind: Kind_CLASS, simpleName: 'Container', interfaces: []}; var ContainerETag$Companion_instance = null; function ContainerETag$$serializer() { this.descriptor_1fmetx$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContainerETag', this, 2); this.descriptor.addElement_ivxn3r$('ceContainerUid', true); this.descriptor.addElement_ivxn3r$('cetag', true); ContainerETag$$serializer_instance = this; } var ContainerETag$$serializer_instance = null; function ContainerEntry() { ContainerEntry$Companion_getInstance(); this.ceUid = L0; this.ceContainerUid = L0; this.cePath = null; this.ceCefUid = L0; } function ContainerEntry$Companion() { ContainerEntry$Companion_instance = this; } ContainerEntry$Companion.prototype.serializer = function () { return ContainerEntry$$serializer_getInstance(); }; ContainerEntry$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContainerEntry$Companion_instance = null; function ContainerEntry$Companion_getInstance() { if (ContainerEntry$Companion_instance === null) { new ContainerEntry$Companion(); } return ContainerEntry$Companion_instance; } function ContainerEntry$$serializer() { this.descriptor_tk1qkk$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContainerEntry', this, 4); this.descriptor.addElement_ivxn3r$('ceUid', true); this.descriptor.addElement_ivxn3r$('ceContainerUid', true); this.descriptor.addElement_ivxn3r$('cePath', true); this.descriptor.addElement_ivxn3r$('ceCefUid', true); ContainerEntry$$serializer_instance = this; } Object.defineProperty(ContainerEntry$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_tk1qkk$_0; }}); ContainerEntry$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.ceUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.ceUid); if (!equals(value.ceContainerUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.ceContainerUid); if (!equals(value.cePath, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.cePath); if (!equals(value.ceCefUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.ceCefUid); output.endStructure_24f42q$(this.descriptor); }; ContainerEntry$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContainerEntry_init(bitMask0, local0, local1, local2, local3, null); }; ContainerEntry$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer]; }; ContainerEntry$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContainerEntry$$serializer_instance = null; function ContainerEntry$$serializer_getInstance() { if (ContainerEntry$$serializer_instance === null) { new ContainerEntry$$serializer(); } return ContainerEntry$$serializer_instance; } function ContainerEntry_init(seen1, ceUid, ceContainerUid, cePath, ceCefUid, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContainerEntry.prototype); if ((seen1 & 1) === 0) $this.ceUid = L0; else $this.ceUid = ceUid; if ((seen1 & 2) === 0) $this.ceContainerUid = L0; else $this.ceContainerUid = ceContainerUid; if ((seen1 & 4) === 0) $this.cePath = null; else $this.cePath = cePath; if ((seen1 & 8) === 0) $this.ceCefUid = L0; else $this.ceCefUid = ceCefUid; return $this; } ContainerEntry.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerEntry', interfaces: []}; function ContainerEntryFile() { ContainerEntryFile$Companion_getInstance(); this.cefUid = L0; this.cefMd5 = null; this.cefPath = null; this.ceTotalSize = L0; this.ceCompressedSize = L0; this.compression = 0; this.lastModified = L0; } function ContainerEntryFile$Companion() { ContainerEntryFile$Companion_instance = this; this.COMPRESSION_NONE = 0; this.COMPRESSION_GZIP = 1; } ContainerEntryFile$Companion.prototype.serializer = function () { return ContainerEntryFile$$serializer_getInstance(); }; ContainerEntryFile$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContainerEntryFile$Companion_instance = null; function ContainerEntryFile$Companion_getInstance() { if (ContainerEntryFile$Companion_instance === null) { new ContainerEntryFile$Companion(); } return ContainerEntryFile$Companion_instance; } function ContainerEntryFile$$serializer() { this.descriptor_3gimag$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContainerEntryFile', this, 7); this.descriptor.addElement_ivxn3r$('cefUid', true); this.descriptor.addElement_ivxn3r$('cefMd5', true); this.descriptor.addElement_ivxn3r$('cefPath', true); this.descriptor.addElement_ivxn3r$('ceTotalSize', true); this.descriptor.addElement_ivxn3r$('ceCompressedSize', true); this.descriptor.addElement_ivxn3r$('compression', true); this.descriptor.addElement_ivxn3r$('lastModified', true); ContainerEntryFile$$serializer_instance = this; } Object.defineProperty(ContainerEntryFile$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_3gimag$_0; }}); ContainerEntryFile$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.cefUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.cefUid); if (!equals(value.cefMd5, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.cefMd5); if (!equals(value.cefPath, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.cefPath); if (!equals(value.ceTotalSize, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.ceTotalSize); if (!equals(value.ceCompressedSize, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.ceCompressedSize); if (!equals(value.compression, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.compression); if (!equals(value.lastModified, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.lastModified); output.endStructure_24f42q$(this.descriptor); }; ContainerEntryFile$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContainerEntryFile_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, null); }; ContainerEntryFile$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; ContainerEntryFile$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContainerEntryFile$$serializer_instance = null; function ContainerEntryFile$$serializer_getInstance() { if (ContainerEntryFile$$serializer_instance === null) { new ContainerEntryFile$$serializer(); } return ContainerEntryFile$$serializer_instance; } function ContainerEntryFile_init(seen1, cefUid, cefMd5, cefPath, ceTotalSize, ceCompressedSize, compression, lastModified, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContainerEntryFile.prototype); if ((seen1 & 1) === 0) $this.cefUid = L0; else $this.cefUid = cefUid; if ((seen1 & 2) === 0) $this.cefMd5 = null; else $this.cefMd5 = cefMd5; if ((seen1 & 4) === 0) $this.cefPath = null; else $this.cefPath = cefPath; if ((seen1 & 8) === 0) $this.ceTotalSize = L0; else $this.ceTotalSize = ceTotalSize; if ((seen1 & 16) === 0) $this.ceCompressedSize = L0; else $this.ceCompressedSize = ceCompressedSize; if ((seen1 & 32) === 0) $this.compression = 0; else $this.compression = compression; if ((seen1 & 64) === 0) $this.lastModified = L0; else $this.lastModified = lastModified; return $this; } ContainerEntryFile.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerEntryFile', interfaces: []}; function ContainerEntryFileUidAndPath() { ContainerEntryFileUidAndPath$Companion_getInstance(); this.cefUid = L0; this.cefPath = null; } function ContainerEntryFileUidAndPath$Companion() { ContainerEntryFileUidAndPath$Companion_instance = this; } ContainerEntryFileUidAndPath$Companion.prototype.serializer = function () { return ContainerEntryFileUidAndPath$$serializer_getInstance(); }; ContainerEntryFileUidAndPath$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContainerEntryFileUidAndPath$Companion_instance = null; function ContainerEntryFileUidAndPath$Companion_getInstance() { if (ContainerEntryFileUidAndPath$Companion_instance === null) { new ContainerEntryFileUidAndPath$Companion(); } return ContainerEntryFileUidAndPath$Companion_instance; } function ContainerEntryFileUidAndPath$$serializer() { this.descriptor_rx3d2c$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContainerEntryFileUidAndPath', this, 2); this.descriptor.addElement_ivxn3r$('cefUid', true); this.descriptor.addElement_ivxn3r$('cefPath', true); ContainerEntryFileUidAndPath$$serializer_instance = this; } Object.defineProperty(ContainerEntryFileUidAndPath$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_rx3d2c$_0; }}); ContainerEntryFileUidAndPath$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.cefUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.cefUid); if (!equals(value.cefPath, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.cefPath); output.endStructure_24f42q$(this.descriptor); }; ContainerEntryFileUidAndPath$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContainerEntryFileUidAndPath_init(bitMask0, local0, local1, null); }; ContainerEntryFileUidAndPath$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer)]; }; ContainerEntryFileUidAndPath$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContainerEntryFileUidAndPath$$serializer_instance = null; function ContainerEntryFileUidAndPath$$serializer_getInstance() { if (ContainerEntryFileUidAndPath$$serializer_instance === null) { new ContainerEntryFileUidAndPath$$serializer(); } return ContainerEntryFileUidAndPath$$serializer_instance; } function ContainerEntryFileUidAndPath_init(seen1, cefUid, cefPath, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContainerEntryFileUidAndPath.prototype); if ((seen1 & 1) === 0) $this.cefUid = L0; else $this.cefUid = cefUid; if ((seen1 & 2) === 0) $this.cefPath = null; else $this.cefPath = cefPath; return $this; } ContainerEntryFileUidAndPath.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerEntryFileUidAndPath', interfaces: []}; function ContainerEntryWithContainerEntryFile() { ContainerEntryWithContainerEntryFile$Companion_getInstance(); ContainerEntry.call(this); this.containerEntryFile = null; } function ContainerEntryWithContainerEntryFile$Companion() { ContainerEntryWithContainerEntryFile$Companion_instance = this; } ContainerEntryWithContainerEntryFile$Companion.prototype.serializer = function () { return ContainerEntryWithContainerEntryFile$$serializer_getInstance(); }; ContainerEntryWithContainerEntryFile$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContainerEntryWithContainerEntryFile$Companion_instance = null; function ContainerEntryWithContainerEntryFile$Companion_getInstance() { if (ContainerEntryWithContainerEntryFile$Companion_instance === null) { new ContainerEntryWithContainerEntryFile$Companion(); } return ContainerEntryWithContainerEntryFile$Companion_instance; } function ContainerEntryWithContainerEntryFile$$serializer() { this.descriptor_hyj6y9$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContainerEntryWithContainerEntryFile', this, 5); this.descriptor.addElement_ivxn3r$('ceUid', true); this.descriptor.addElement_ivxn3r$('ceContainerUid', true); this.descriptor.addElement_ivxn3r$('cePath', true); this.descriptor.addElement_ivxn3r$('ceCefUid', true); this.descriptor.addElement_ivxn3r$('containerEntryFile', true); ContainerEntryWithContainerEntryFile$$serializer_instance = this; } Object.defineProperty(ContainerEntryWithContainerEntryFile$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_hyj6y9$_0; }}); ContainerEntryWithContainerEntryFile$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.ceUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.ceUid); if (!equals(value.ceContainerUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.ceContainerUid); if (!equals(value.cePath, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.cePath); if (!equals(value.ceCefUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.ceCefUid); if (!equals(value.containerEntryFile, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, ContainerEntryFile$$serializer_getInstance(), value.containerEntryFile); output.endStructure_24f42q$(this.descriptor); }; ContainerEntryWithContainerEntryFile$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, ContainerEntryFile$$serializer_getInstance(), local4); bitMask0 |= 16; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContainerEntryWithContainerEntryFile_init(bitMask0, local0, local1, local2, local3, local4, null); }; ContainerEntryWithContainerEntryFile$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, new NullableSerializer(ContainerEntryFile$$serializer_getInstance())]; }; ContainerEntryWithContainerEntryFile$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContainerEntryWithContainerEntryFile$$serializer_instance = null; function ContainerEntryWithContainerEntryFile$$serializer_getInstance() { if (ContainerEntryWithContainerEntryFile$$serializer_instance === null) { new ContainerEntryWithContainerEntryFile$$serializer(); } return ContainerEntryWithContainerEntryFile$$serializer_instance; } function ContainerEntryWithContainerEntryFile_init(seen1, ceUid, ceContainerUid, cePath, ceCefUid, containerEntryFile, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContainerEntryWithContainerEntryFile.prototype); $this = ContainerEntry_init(seen1, ceUid, ceContainerUid, cePath, ceCefUid, $this); if ((seen1 & 16) === 0) $this.containerEntryFile = null; else $this.containerEntryFile = containerEntryFile; return $this; } ContainerEntryWithContainerEntryFile.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerEntryWithContainerEntryFile', interfaces: [ContainerEntry]}; function ContainerEntryWithContainerEntryFile_init_0(cePath, container, entryFile, $this) { if (cePath === void 0) cePath = ''; if (container === void 0) container = new Container(); if (entryFile === void 0) entryFile = new ContainerEntryFile(); $this = $this || Object.create(ContainerEntryWithContainerEntryFile.prototype); ContainerEntryWithContainerEntryFile.call($this); Kotlin.callSetter($this, ContainerEntry.prototype, 'cePath', cePath); Kotlin.callSetter($this, ContainerEntry.prototype, 'ceCefUid', entryFile.cefUid); Kotlin.callSetter($this, ContainerEntry.prototype, 'ceContainerUid', container.containerUid); $this.containerEntryFile = entryFile; return $this; } function ContainerEntryWithMd5(cefMd5) { ContainerEntryWithMd5$Companion_getInstance(); if (cefMd5 === void 0) cefMd5 = null; ContainerEntry.call(this); this.cefMd5 = cefMd5; } function ContainerEntryWithMd5$Companion() { ContainerEntryWithMd5$Companion_instance = this; } ContainerEntryWithMd5$Companion.prototype.serializer = function () { return ContainerEntryWithMd5$$serializer_getInstance(); }; ContainerEntryWithMd5$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContainerEntryWithMd5$Companion_instance = null; function ContainerEntryWithMd5$Companion_getInstance() { if (ContainerEntryWithMd5$Companion_instance === null) { new ContainerEntryWithMd5$Companion(); } return ContainerEntryWithMd5$Companion_instance; } function ContainerEntryWithMd5$$serializer() { this.descriptor_ss3vbu$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContainerEntryWithMd5', this, 5); this.descriptor.addElement_ivxn3r$('ceUid', true); this.descriptor.addElement_ivxn3r$('ceContainerUid', true); this.descriptor.addElement_ivxn3r$('cePath', true); this.descriptor.addElement_ivxn3r$('ceCefUid', true); this.descriptor.addElement_ivxn3r$('cefMd5', true); ContainerEntryWithMd5$$serializer_instance = this; } Object.defineProperty(ContainerEntryWithMd5$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ss3vbu$_0; }}); ContainerEntryWithMd5$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.ceUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.ceUid); if (!equals(value.ceContainerUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.ceContainerUid); if (!equals(value.cePath, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.cePath); if (!equals(value.ceCefUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.ceCefUid); if (!equals(value.cefMd5, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.cefMd5); output.endStructure_24f42q$(this.descriptor); }; ContainerEntryWithMd5$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContainerEntryWithMd5_init(bitMask0, local0, local1, local2, local3, local4, null); }; ContainerEntryWithMd5$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, new NullableSerializer(internal.StringSerializer)]; }; ContainerEntryWithMd5$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContainerEntryWithMd5$$serializer_instance = null; function ContainerEntryWithMd5$$serializer_getInstance() { if (ContainerEntryWithMd5$$serializer_instance === null) { new ContainerEntryWithMd5$$serializer(); } return ContainerEntryWithMd5$$serializer_instance; } function ContainerEntryWithMd5_init(seen1, ceUid, ceContainerUid, cePath, ceCefUid, cefMd5, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContainerEntryWithMd5.prototype); $this = ContainerEntry_init(seen1, ceUid, ceContainerUid, cePath, ceCefUid, $this); if ((seen1 & 16) === 0) $this.cefMd5 = null; else $this.cefMd5 = cefMd5; return $this; } ContainerEntryWithMd5.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerEntryWithMd5', interfaces: [ContainerEntry]}; var ContainerWithContainerEntryWithMd5$Companion_instance = null; function ContainerWithContainerEntryWithMd5$$serializer() { this.descriptor_70geh7$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContainerWithContainerEntryWithMd5', this, 2); this.descriptor.addElement_ivxn3r$('container', false); this.descriptor.addElement_ivxn3r$('containerEntries', false); ContainerWithContainerEntryWithMd5$$serializer_instance = this; } var ContainerWithContainerEntryWithMd5$$serializer_instance = null; var ContainerFilesWithContentEntry$Companion_instance = null; function ContainerFilesWithContentEntry$$serializer() { this.descriptor_qjlsxs$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContainerFilesWithContentEntry', this, 6); this.descriptor.addElement_ivxn3r$('containerUid', true); this.descriptor.addElement_ivxn3r$('containerEntryFileUid', true); this.descriptor.addElement_ivxn3r$('containerEntryFilePath', true); this.descriptor.addElement_ivxn3r$('contentEntryTitle', true); this.descriptor.addElement_ivxn3r$('contentEntryDesc', true); this.descriptor.addElement_ivxn3r$('contentEntryId', true); ContainerFilesWithContentEntry$$serializer_instance = this; } var ContainerFilesWithContentEntry$$serializer_instance = null; function ContainerImportJob() { ContainerImportJob$Companion_getInstance(); this.cijUid = L0; this.cijContainerUid = L0; this.cijUri = null; this.cijImportMode = 0; this.cijContainerBaseDir = null; this.cijContentEntryUid = L0; this.cijMimeType = null; this.cijSessionId = null; this.cijJobStatus = 0; this.cijBytesSoFar = L0; this.cijImportCompleted = false; this.cijContentLength = L0; this.cijContainerEntryFileUids = null; this.cijConversionParams = null; } function ContainerImportJob$Companion() { ContainerImportJob$Companion_instance = this; this.SERVER_IMPORT_MODE = 1001; this.CLIENT_IMPORT_MODE = 1002; } ContainerImportJob$Companion.prototype.serializer = function () { return ContainerImportJob$$serializer_getInstance(); }; ContainerImportJob$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContainerImportJob$Companion_instance = null; function ContainerImportJob$Companion_getInstance() { if (ContainerImportJob$Companion_instance === null) { new ContainerImportJob$Companion(); } return ContainerImportJob$Companion_instance; } function ContainerImportJob$$serializer() { this.descriptor_cm7tni$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContainerImportJob', this, 14); this.descriptor.addElement_ivxn3r$('cijUid', true); this.descriptor.addElement_ivxn3r$('cijContainerUid', true); this.descriptor.addElement_ivxn3r$('cijUri', true); this.descriptor.addElement_ivxn3r$('cijImportMode', true); this.descriptor.addElement_ivxn3r$('cijContainerBaseDir', true); this.descriptor.addElement_ivxn3r$('cijContentEntryUid', true); this.descriptor.addElement_ivxn3r$('cijMimeType', true); this.descriptor.addElement_ivxn3r$('cijSessionId', true); this.descriptor.addElement_ivxn3r$('cijJobStatus', true); this.descriptor.addElement_ivxn3r$('cijBytesSoFar', true); this.descriptor.addElement_ivxn3r$('cijImportCompleted', true); this.descriptor.addElement_ivxn3r$('cijContentLength', true); this.descriptor.addElement_ivxn3r$('cijContainerEntryFileUids', true); this.descriptor.addElement_ivxn3r$('cijConversionParams', true); ContainerImportJob$$serializer_instance = this; } Object.defineProperty(ContainerImportJob$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_cm7tni$_0; }}); ContainerImportJob$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.cijUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.cijUid); if (!equals(value.cijContainerUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.cijContainerUid); if (!equals(value.cijUri, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.cijUri); if (!equals(value.cijImportMode, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.cijImportMode); if (!equals(value.cijContainerBaseDir, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.cijContainerBaseDir); if (!equals(value.cijContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.cijContentEntryUid); if (!equals(value.cijMimeType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 6, internal.StringSerializer, value.cijMimeType); if (!equals(value.cijSessionId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 7, internal.StringSerializer, value.cijSessionId); if (!equals(value.cijJobStatus, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeIntElement_ptg7oe$(this.descriptor, 8, value.cijJobStatus); if (!equals(value.cijBytesSoFar, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.cijBytesSoFar); if (!equals(value.cijImportCompleted, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 10, value.cijImportCompleted); if (!equals(value.cijContentLength, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.cijContentLength); if (!equals(value.cijContainerEntryFileUids, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 12, internal.StringSerializer, value.cijContainerEntryFileUids); if (!equals(value.cijConversionParams, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 13, internal.StringSerializer, value.cijConversionParams); output.endStructure_24f42q$(this.descriptor); }; ContainerImportJob$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 6, internal.StringSerializer, local6); bitMask0 |= 64; break; case 7: local7 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 7, internal.StringSerializer, local7); bitMask0 |= 128; break; case 8: local8 = input.decodeIntElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeBooleanElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 12, internal.StringSerializer, local12); bitMask0 |= 4096; break; case 13: local13 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 13, internal.StringSerializer, local13); bitMask0 |= 8192; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContainerImportJob_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, null); }; ContainerImportJob$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer)]; }; ContainerImportJob$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContainerImportJob$$serializer_instance = null; function ContainerImportJob$$serializer_getInstance() { if (ContainerImportJob$$serializer_instance === null) { new ContainerImportJob$$serializer(); } return ContainerImportJob$$serializer_instance; } function ContainerImportJob_init(seen1, cijUid, cijContainerUid, cijUri, cijImportMode, cijContainerBaseDir, cijContentEntryUid, cijMimeType, cijSessionId, cijJobStatus, cijBytesSoFar, cijImportCompleted, cijContentLength, cijContainerEntryFileUids, cijConversionParams, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContainerImportJob.prototype); if ((seen1 & 1) === 0) $this.cijUid = L0; else $this.cijUid = cijUid; if ((seen1 & 2) === 0) $this.cijContainerUid = L0; else $this.cijContainerUid = cijContainerUid; if ((seen1 & 4) === 0) $this.cijUri = null; else $this.cijUri = cijUri; if ((seen1 & 8) === 0) $this.cijImportMode = 0; else $this.cijImportMode = cijImportMode; if ((seen1 & 16) === 0) $this.cijContainerBaseDir = null; else $this.cijContainerBaseDir = cijContainerBaseDir; if ((seen1 & 32) === 0) $this.cijContentEntryUid = L0; else $this.cijContentEntryUid = cijContentEntryUid; if ((seen1 & 64) === 0) $this.cijMimeType = null; else $this.cijMimeType = cijMimeType; if ((seen1 & 128) === 0) $this.cijSessionId = null; else $this.cijSessionId = cijSessionId; if ((seen1 & 256) === 0) $this.cijJobStatus = 0; else $this.cijJobStatus = cijJobStatus; if ((seen1 & 512) === 0) $this.cijBytesSoFar = L0; else $this.cijBytesSoFar = cijBytesSoFar; if ((seen1 & 1024) === 0) $this.cijImportCompleted = false; else $this.cijImportCompleted = cijImportCompleted; if ((seen1 & 2048) === 0) $this.cijContentLength = L0; else $this.cijContentLength = cijContentLength; if ((seen1 & 4096) === 0) $this.cijContainerEntryFileUids = null; else $this.cijContainerEntryFileUids = cijContainerEntryFileUids; if ((seen1 & 8192) === 0) $this.cijConversionParams = null; else $this.cijConversionParams = cijConversionParams; return $this; } ContainerImportJob.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerImportJob', interfaces: []}; var ContainerManifest$Companion_instance = null; function ContainerManifest$$serializer() { this.descriptor_8xcw4x$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContainerManifest', this, 2); this.descriptor.addElement_ivxn3r$('container', true); this.descriptor.addElement_ivxn3r$('entryMap', true); ContainerManifest$$serializer_instance = this; } var ContainerManifest$$serializer_instance = null; var ContainerReplicate$Companion_instance = null; function ContainerReplicate$$serializer() { this.descriptor_jf1zeb$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContainerReplicate', this, 4); this.descriptor.addElement_ivxn3r$('containerPk', true); this.descriptor.addElement_ivxn3r$('containerVersionId', true); this.descriptor.addElement_ivxn3r$('containerDestination', true); this.descriptor.addElement_ivxn3r$('containerPending', true); ContainerReplicate$$serializer_instance = this; } var ContainerReplicate$$serializer_instance = null; function ContainerUidAndMimeType() { ContainerUidAndMimeType$Companion_getInstance(); this.containerUid = L0; this.mimeType = null; } function ContainerUidAndMimeType$Companion() { ContainerUidAndMimeType$Companion_instance = this; } ContainerUidAndMimeType$Companion.prototype.serializer = function () { return ContainerUidAndMimeType$$serializer_getInstance(); }; ContainerUidAndMimeType$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContainerUidAndMimeType$Companion_instance = null; function ContainerUidAndMimeType$Companion_getInstance() { if (ContainerUidAndMimeType$Companion_instance === null) { new ContainerUidAndMimeType$Companion(); } return ContainerUidAndMimeType$Companion_instance; } function ContainerUidAndMimeType$$serializer() { this.descriptor_nvtqlx$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContainerUidAndMimeType', this, 2); this.descriptor.addElement_ivxn3r$('containerUid', true); this.descriptor.addElement_ivxn3r$('mimeType', true); ContainerUidAndMimeType$$serializer_instance = this; } Object.defineProperty(ContainerUidAndMimeType$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_nvtqlx$_0; }}); ContainerUidAndMimeType$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.containerUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.containerUid); if (!equals(value.mimeType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.mimeType); output.endStructure_24f42q$(this.descriptor); }; ContainerUidAndMimeType$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContainerUidAndMimeType_init(bitMask0, local0, local1, null); }; ContainerUidAndMimeType$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer)]; }; ContainerUidAndMimeType$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContainerUidAndMimeType$$serializer_instance = null; function ContainerUidAndMimeType$$serializer_getInstance() { if (ContainerUidAndMimeType$$serializer_instance === null) { new ContainerUidAndMimeType$$serializer(); } return ContainerUidAndMimeType$$serializer_instance; } function ContainerUidAndMimeType_init(seen1, containerUid, mimeType, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContainerUidAndMimeType.prototype); if ((seen1 & 1) === 0) $this.containerUid = L0; else $this.containerUid = containerUid; if ((seen1 & 2) === 0) $this.mimeType = null; else $this.mimeType = mimeType; return $this; } ContainerUidAndMimeType.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerUidAndMimeType', interfaces: []}; function ContainerWithContentEntry() { ContainerWithContentEntry$Companion_getInstance(); Container.call(this); this.entryId = null; this.sourceUrl = null; } function ContainerWithContentEntry$Companion() { ContainerWithContentEntry$Companion_instance = this; } ContainerWithContentEntry$Companion.prototype.serializer = function () { return ContainerWithContentEntry$$serializer_getInstance(); }; ContainerWithContentEntry$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContainerWithContentEntry$Companion_instance = null; function ContainerWithContentEntry$Companion_getInstance() { if (ContainerWithContentEntry$Companion_instance === null) { new ContainerWithContentEntry$Companion(); } return ContainerWithContentEntry$Companion_instance; } function ContainerWithContentEntry$$serializer() { this.descriptor_ft7r3$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContainerWithContentEntry', this, 14); this.descriptor.addElement_ivxn3r$('containerUid', true); this.descriptor.addElement_ivxn3r$('cntLocalCsn', true); this.descriptor.addElement_ivxn3r$('cntMasterCsn', true); this.descriptor.addElement_ivxn3r$('cntLastModBy', true); this.descriptor.addElement_ivxn3r$('cntLct', true); this.descriptor.addElement_ivxn3r$('fileSize', true); this.descriptor.addElement_ivxn3r$('containerContentEntryUid', true); this.descriptor.addElement_ivxn3r$('cntLastModified', true); this.descriptor.addElement_ivxn3r$('mimeType', true); this.descriptor.addElement_ivxn3r$('remarks', true); this.descriptor.addElement_ivxn3r$('mobileOptimized', true); this.descriptor.addElement_ivxn3r$('cntNumEntries', true); this.descriptor.addElement_ivxn3r$('entryId', true); this.descriptor.addElement_ivxn3r$('sourceUrl', true); ContainerWithContentEntry$$serializer_instance = this; } Object.defineProperty(ContainerWithContentEntry$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ft7r3$_0; }}); ContainerWithContentEntry$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.containerUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.containerUid); if (!equals(value.cntLocalCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.cntLocalCsn); if (!equals(value.cntMasterCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.cntMasterCsn); if (!equals(value.cntLastModBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.cntLastModBy); if (!equals(value.cntLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.cntLct); if (!equals(value.fileSize, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.fileSize); if (!equals(value.containerContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.containerContentEntryUid); if (!equals(value.cntLastModified, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.cntLastModified); if (!equals(value.mimeType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, internal.StringSerializer, value.mimeType); if (!equals(value.remarks, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.remarks); if (!equals(value.mobileOptimized, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 10, value.mobileOptimized); if (!equals(value.cntNumEntries, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.cntNumEntries); if (!equals(value.entryId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 12, internal.StringSerializer, value.entryId); if (!equals(value.sourceUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 13, internal.StringSerializer, value.sourceUrl); output.endStructure_24f42q$(this.descriptor); }; ContainerWithContentEntry$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, internal.StringSerializer, local8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeBooleanElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 12, internal.StringSerializer, local12); bitMask0 |= 4096; break; case 13: local13 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 13, internal.StringSerializer, local13); bitMask0 |= 8192; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContainerWithContentEntry_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, null); }; ContainerWithContentEntry$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer)]; }; ContainerWithContentEntry$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContainerWithContentEntry$$serializer_instance = null; function ContainerWithContentEntry$$serializer_getInstance() { if (ContainerWithContentEntry$$serializer_instance === null) { new ContainerWithContentEntry$$serializer(); } return ContainerWithContentEntry$$serializer_instance; } function ContainerWithContentEntry_init(seen1, containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries, entryId, sourceUrl, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContainerWithContentEntry.prototype); $this = Container_init(seen1, containerUid, cntLocalCsn, cntMasterCsn, cntLastModBy, cntLct, fileSize, containerContentEntryUid, cntLastModified, mimeType, remarks, mobileOptimized, cntNumEntries, $this); if ((seen1 & 4096) === 0) $this.entryId = null; else $this.entryId = entryId; if ((seen1 & 8192) === 0) $this.sourceUrl = null; else $this.sourceUrl = sourceUrl; return $this; } ContainerWithContentEntry.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContainerWithContentEntry', interfaces: [Container]}; function ContentCategory() { ContentCategory$Companion_getInstance(); this.contentCategoryUid = L0; this.ctnCatContentCategorySchemaUid = L0; this.name = null; this.contentCategoryLocalChangeSeqNum = L0; this.contentCategoryMasterChangeSeqNum = L0; this.contentCategoryLastChangedBy = 0; this.contentCategoryLct = L0; } ContentCategory.prototype.equals = function (other) { var tmp$; if (this === other) return true; var category = (tmp$ = other) == null || Kotlin.isType(tmp$, ContentCategory) ? tmp$ : throwCCE(); if (!equals(this.contentCategoryUid, ensureNotNull(category).contentCategoryUid)) return false; if (!equals(this.ctnCatContentCategorySchemaUid, category.ctnCatContentCategorySchemaUid)) return false; return this.name != null ? equals(this.name, category.name) : category.name == null; }; ContentCategory.prototype.hashCode = function () { var result = this.contentCategoryUid.xor(this.contentCategoryUid.shiftRightUnsigned(32)).toInt(); result = (31 * result | 0) + this.ctnCatContentCategorySchemaUid.xor(this.ctnCatContentCategorySchemaUid.shiftRightUnsigned(32)).toInt() | 0; result = (31 * result | 0) + (this.name != null ? hashCode(ensureNotNull(this.name)) : 0) | 0; return result; }; function ContentCategory$Companion() { ContentCategory$Companion_instance = this; this.TABLE_ID = 1; } ContentCategory$Companion.prototype.serializer = function () { return ContentCategory$$serializer_getInstance(); }; ContentCategory$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentCategory$Companion_instance = null; function ContentCategory$Companion_getInstance() { if (ContentCategory$Companion_instance === null) { new ContentCategory$Companion(); } return ContentCategory$Companion_instance; } function ContentCategory$$serializer() { this.descriptor_il4l92$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentCategory', this, 7); this.descriptor.addElement_ivxn3r$('contentCategoryUid', true); this.descriptor.addElement_ivxn3r$('ctnCatContentCategorySchemaUid', true); this.descriptor.addElement_ivxn3r$('name', true); this.descriptor.addElement_ivxn3r$('contentCategoryLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentCategoryMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentCategoryLastChangedBy', true); this.descriptor.addElement_ivxn3r$('contentCategoryLct', true); ContentCategory$$serializer_instance = this; } Object.defineProperty(ContentCategory$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_il4l92$_0; }}); ContentCategory$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.contentCategoryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.contentCategoryUid); if (!equals(value.ctnCatContentCategorySchemaUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.ctnCatContentCategorySchemaUid); if (!equals(value.name, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.name); if (!equals(value.contentCategoryLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.contentCategoryLocalChangeSeqNum); if (!equals(value.contentCategoryMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.contentCategoryMasterChangeSeqNum); if (!equals(value.contentCategoryLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.contentCategoryLastChangedBy); if (!equals(value.contentCategoryLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.contentCategoryLct); output.endStructure_24f42q$(this.descriptor); }; ContentCategory$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentCategory_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, null); }; ContentCategory$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; ContentCategory$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentCategory$$serializer_instance = null; function ContentCategory$$serializer_getInstance() { if (ContentCategory$$serializer_instance === null) { new ContentCategory$$serializer(); } return ContentCategory$$serializer_instance; } function ContentCategory_init(seen1, contentCategoryUid, ctnCatContentCategorySchemaUid, name, contentCategoryLocalChangeSeqNum, contentCategoryMasterChangeSeqNum, contentCategoryLastChangedBy, contentCategoryLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentCategory.prototype); if ((seen1 & 1) === 0) $this.contentCategoryUid = L0; else $this.contentCategoryUid = contentCategoryUid; if ((seen1 & 2) === 0) $this.ctnCatContentCategorySchemaUid = L0; else $this.ctnCatContentCategorySchemaUid = ctnCatContentCategorySchemaUid; if ((seen1 & 4) === 0) $this.name = null; else $this.name = name; if ((seen1 & 8) === 0) $this.contentCategoryLocalChangeSeqNum = L0; else $this.contentCategoryLocalChangeSeqNum = contentCategoryLocalChangeSeqNum; if ((seen1 & 16) === 0) $this.contentCategoryMasterChangeSeqNum = L0; else $this.contentCategoryMasterChangeSeqNum = contentCategoryMasterChangeSeqNum; if ((seen1 & 32) === 0) $this.contentCategoryLastChangedBy = 0; else $this.contentCategoryLastChangedBy = contentCategoryLastChangedBy; if ((seen1 & 64) === 0) $this.contentCategoryLct = L0; else $this.contentCategoryLct = contentCategoryLct; return $this; } ContentCategory.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategory', interfaces: []}; var ContentCategoryReplicate$Companion_instance = null; function ContentCategoryReplicate$$serializer() { this.descriptor_6omba5$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentCategoryReplicate', this, 4); this.descriptor.addElement_ivxn3r$('ccPk', true); this.descriptor.addElement_ivxn3r$('ccVersionId', true); this.descriptor.addElement_ivxn3r$('ccDestination', true); this.descriptor.addElement_ivxn3r$('ccPending', true); ContentCategoryReplicate$$serializer_instance = this; } var ContentCategoryReplicate$$serializer_instance = null; function ContentCategorySchema() { ContentCategorySchema$Companion_getInstance(); this.contentCategorySchemaUid = L0; this.schemaName = null; this.schemaUrl = null; this.contentCategorySchemaLocalChangeSeqNum = L0; this.contentCategorySchemaMasterChangeSeqNum = L0; this.contentCategorySchemaLastChangedBy = 0; this.contentCategorySchemaLct = L0; } ContentCategorySchema.prototype.equals = function (other) { var tmp$; if (this === other) return true; var schema = (tmp$ = other) == null || Kotlin.isType(tmp$, ContentCategorySchema) ? tmp$ : throwCCE(); if (!equals(this.contentCategorySchemaUid, ensureNotNull(schema).contentCategorySchemaUid)) return false; if (this.schemaName != null ? !equals(this.schemaName, schema.schemaName) : schema.schemaName != null) return false; return this.schemaUrl != null ? equals(this.schemaUrl, schema.schemaUrl) : schema.schemaUrl == null; }; ContentCategorySchema.prototype.hashCode = function () { var result = this.contentCategorySchemaUid.xor(this.contentCategorySchemaUid.shiftRightUnsigned(32)).toInt(); result = (31 * result | 0) + (this.schemaName != null ? hashCode(ensureNotNull(this.schemaName)) : 0) | 0; result = (31 * result | 0) + (this.schemaUrl != null ? hashCode(ensureNotNull(this.schemaUrl)) : 0) | 0; return result; }; function ContentCategorySchema$Companion() { ContentCategorySchema$Companion_instance = this; this.TABLE_ID = 2; } ContentCategorySchema$Companion.prototype.serializer = function () { return ContentCategorySchema$$serializer_getInstance(); }; ContentCategorySchema$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentCategorySchema$Companion_instance = null; function ContentCategorySchema$Companion_getInstance() { if (ContentCategorySchema$Companion_instance === null) { new ContentCategorySchema$Companion(); } return ContentCategorySchema$Companion_instance; } function ContentCategorySchema$$serializer() { this.descriptor_x9l6cp$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentCategorySchema', this, 7); this.descriptor.addElement_ivxn3r$('contentCategorySchemaUid', true); this.descriptor.addElement_ivxn3r$('schemaName', true); this.descriptor.addElement_ivxn3r$('schemaUrl', true); this.descriptor.addElement_ivxn3r$('contentCategorySchemaLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentCategorySchemaMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentCategorySchemaLastChangedBy', true); this.descriptor.addElement_ivxn3r$('contentCategorySchemaLct', true); ContentCategorySchema$$serializer_instance = this; } Object.defineProperty(ContentCategorySchema$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_x9l6cp$_0; }}); ContentCategorySchema$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.contentCategorySchemaUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.contentCategorySchemaUid); if (!equals(value.schemaName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.schemaName); if (!equals(value.schemaUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.schemaUrl); if (!equals(value.contentCategorySchemaLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.contentCategorySchemaLocalChangeSeqNum); if (!equals(value.contentCategorySchemaMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.contentCategorySchemaMasterChangeSeqNum); if (!equals(value.contentCategorySchemaLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.contentCategorySchemaLastChangedBy); if (!equals(value.contentCategorySchemaLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.contentCategorySchemaLct); output.endStructure_24f42q$(this.descriptor); }; ContentCategorySchema$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentCategorySchema_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, null); }; ContentCategorySchema$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; ContentCategorySchema$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentCategorySchema$$serializer_instance = null; function ContentCategorySchema$$serializer_getInstance() { if (ContentCategorySchema$$serializer_instance === null) { new ContentCategorySchema$$serializer(); } return ContentCategorySchema$$serializer_instance; } function ContentCategorySchema_init(seen1, contentCategorySchemaUid, schemaName, schemaUrl, contentCategorySchemaLocalChangeSeqNum, contentCategorySchemaMasterChangeSeqNum, contentCategorySchemaLastChangedBy, contentCategorySchemaLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentCategorySchema.prototype); if ((seen1 & 1) === 0) $this.contentCategorySchemaUid = L0; else $this.contentCategorySchemaUid = contentCategorySchemaUid; if ((seen1 & 2) === 0) $this.schemaName = null; else $this.schemaName = schemaName; if ((seen1 & 4) === 0) $this.schemaUrl = null; else $this.schemaUrl = schemaUrl; if ((seen1 & 8) === 0) $this.contentCategorySchemaLocalChangeSeqNum = L0; else $this.contentCategorySchemaLocalChangeSeqNum = contentCategorySchemaLocalChangeSeqNum; if ((seen1 & 16) === 0) $this.contentCategorySchemaMasterChangeSeqNum = L0; else $this.contentCategorySchemaMasterChangeSeqNum = contentCategorySchemaMasterChangeSeqNum; if ((seen1 & 32) === 0) $this.contentCategorySchemaLastChangedBy = 0; else $this.contentCategorySchemaLastChangedBy = contentCategorySchemaLastChangedBy; if ((seen1 & 64) === 0) $this.contentCategorySchemaLct = L0; else $this.contentCategorySchemaLct = contentCategorySchemaLct; return $this; } ContentCategorySchema.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentCategorySchema', interfaces: []}; var ContentCategorySchemaReplicate$Companion_instance = null; function ContentCategorySchemaReplicate$$serializer() { this.descriptor_ixvrgc$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentCategorySchemaReplicate', this, 4); this.descriptor.addElement_ivxn3r$('ccsPk', true); this.descriptor.addElement_ivxn3r$('ccsVersionId', true); this.descriptor.addElement_ivxn3r$('ccsDestination', true); this.descriptor.addElement_ivxn3r$('ccsPending', true); ContentCategorySchemaReplicate$$serializer_instance = this; } var ContentCategorySchemaReplicate$$serializer_instance = null; function ContentEntry() { ContentEntry$Companion_getInstance(); this.contentEntryUid = L0; this.title = null; this.description = null; this.entryId = null; this.author = null; this.publisher = null; this.licenseType = 0; this.licenseName = null; this.licenseUrl = null; this.sourceUrl = null; this.thumbnailUrl = null; this.lastModified = L0; this.primaryLanguageUid = L0; this.languageVariantUid = L0; this.contentFlags = 0; this.leaf = false; this.publik = true; this.ceInactive = false; this.completionCriteria = 0; this.minScore = 0; this.contentTypeFlag = 0; this.contentOwner = L0; this.contentEntryLocalChangeSeqNum = L0; this.contentEntryMasterChangeSeqNum = L0; this.contentEntryLastChangedBy = 0; this.contentEntryLct = L0; } function ContentEntry$Companion() { ContentEntry$Companion_instance = this; this.TABLE_ID = 42; this.LICENSE_TYPE_CC_BY = 1; this.LICENSE_TYPE_CC_BY_SA = 2; this.LICENSE_TYPE_CC_BY_SA_NC = 3; this.LICENSE_TYPE_CC_BY_NC = 4; this.ALL_RIGHTS_RESERVED = 5; this.LICENSE_TYPE_CC_BY_NC_SA = 6; this.LICENSE_TYPE_PUBLIC_DOMAIN = 7; this.LICENSE_TYPE_OTHER = 8; this.LICENSE_TYPE_CC_BY_ND = 10; this.LICENSE_TYPE_CC_BY_NC_ND = 11; this.LICENSE_TYPE_CC_0 = 9; this.TYPE_UNDEFINED = 0; this.TYPE_COLLECTION = 1; this.TYPE_EBOOK = 2; this.TYPE_INTERACTIVE_EXERCISE = 3; this.TYPE_VIDEO = 4; this.TYPE_AUDIO = 5; this.TYPE_DOCUMENT = 6; this.TYPE_ARTICLE = 7; this.TYPE_PDF = 8; this.FLAG_IMPORTED = 1; this.FLAG_CONTENT_EDITOR = 2; this.FLAG_SCRAPPED = 4; this.COMPLETION_CRITERIA_AUTOMATIC = 0; this.COMPLETION_CRITERIA_MIN_SCORE = 1; this.COMPLETION_CRITERIA_MARKED_BY_STUDENT = 2; } ContentEntry$Companion.prototype.serializer = function () { return ContentEntry$$serializer_getInstance(); }; ContentEntry$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntry$Companion_instance = null; function ContentEntry$Companion_getInstance() { if (ContentEntry$Companion_instance === null) { new ContentEntry$Companion(); } return ContentEntry$Companion_instance; } ContentEntry.prototype.equals = function (other) { if (this === other) return true; if (!Kotlin.isType(other, ContentEntry)) return false; if (!equals(this.contentEntryUid, other.contentEntryUid)) return false; if (!equals(this.title, other.title)) return false; if (!equals(this.description, other.description)) return false; if (!equals(this.entryId, other.entryId)) return false; if (!equals(this.author, other.author)) return false; if (!equals(this.publisher, other.publisher)) return false; if (this.licenseType !== other.licenseType) return false; if (!equals(this.licenseName, other.licenseName)) return false; if (!equals(this.licenseUrl, other.licenseUrl)) return false; if (!equals(this.sourceUrl, other.sourceUrl)) return false; if (!equals(this.thumbnailUrl, other.thumbnailUrl)) return false; if (!equals(this.lastModified, other.lastModified)) return false; if (!equals(this.primaryLanguageUid, other.primaryLanguageUid)) return false; if (!equals(this.languageVariantUid, other.languageVariantUid)) return false; if (this.contentFlags !== other.contentFlags) return false; if (this.leaf !== other.leaf) return false; if (this.publik !== other.publik) return false; if (this.ceInactive !== other.ceInactive) return false; if (this.contentTypeFlag !== other.contentTypeFlag) return false; if (this.completionCriteria !== other.completionCriteria) return false; if (this.minScore !== other.minScore) return false; if (!equals(this.contentEntryLocalChangeSeqNum, other.contentEntryLocalChangeSeqNum)) return false; if (!equals(this.contentEntryMasterChangeSeqNum, other.contentEntryMasterChangeSeqNum)) return false; if (this.contentEntryLastChangedBy !== other.contentEntryLastChangedBy) return false; return true; }; ContentEntry.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5, tmp$_6, tmp$_7, tmp$_8, tmp$_9, tmp$_10, tmp$_11, tmp$_12, tmp$_13, tmp$_14, tmp$_15, tmp$_16; var result = hashCode(this.contentEntryUid); result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.title) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.description) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + ((tmp$_4 = (tmp$_3 = this.entryId) != null ? hashCode(tmp$_3) : null) != null ? tmp$_4 : 0) | 0; result = (31 * result | 0) + ((tmp$_6 = (tmp$_5 = this.author) != null ? hashCode(tmp$_5) : null) != null ? tmp$_6 : 0) | 0; result = (31 * result | 0) + ((tmp$_8 = (tmp$_7 = this.publisher) != null ? hashCode(tmp$_7) : null) != null ? tmp$_8 : 0) | 0; result = (31 * result | 0) + this.licenseType | 0; result = (31 * result | 0) + ((tmp$_10 = (tmp$_9 = this.licenseName) != null ? hashCode(tmp$_9) : null) != null ? tmp$_10 : 0) | 0; result = (31 * result | 0) + ((tmp$_12 = (tmp$_11 = this.licenseUrl) != null ? hashCode(tmp$_11) : null) != null ? tmp$_12 : 0) | 0; result = (31 * result | 0) + ((tmp$_14 = (tmp$_13 = this.sourceUrl) != null ? hashCode(tmp$_13) : null) != null ? tmp$_14 : 0) | 0; result = (31 * result | 0) + ((tmp$_16 = (tmp$_15 = this.thumbnailUrl) != null ? hashCode(tmp$_15) : null) != null ? tmp$_16 : 0) | 0; result = (31 * result | 0) + hashCode(this.lastModified) | 0; result = (31 * result | 0) + hashCode(this.primaryLanguageUid) | 0; result = (31 * result | 0) + hashCode(this.languageVariantUid) | 0; result = (31 * result | 0) + this.contentFlags | 0; result = (31 * result | 0) + hashCode(this.leaf) | 0; result = (31 * result | 0) + hashCode(this.publik) | 0; result = (31 * result | 0) + hashCode(this.ceInactive) | 0; result = (31 * result | 0) + this.contentTypeFlag | 0; result = (31 * result | 0) + this.completionCriteria | 0; result = (31 * result | 0) + this.minScore | 0; result = (31 * result | 0) + hashCode(this.contentEntryLocalChangeSeqNum) | 0; result = (31 * result | 0) + hashCode(this.contentEntryMasterChangeSeqNum) | 0; result = (31 * result | 0) + this.contentEntryLastChangedBy | 0; return result; }; function ContentEntry$$serializer() { this.descriptor_wwrnlo$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntry', this, 26); this.descriptor.addElement_ivxn3r$('contentEntryUid', true); this.descriptor.addElement_ivxn3r$('title', true); this.descriptor.addElement_ivxn3r$('description', true); this.descriptor.addElement_ivxn3r$('entryId', true); this.descriptor.addElement_ivxn3r$('author', true); this.descriptor.addElement_ivxn3r$('publisher', true); this.descriptor.addElement_ivxn3r$('licenseType', true); this.descriptor.addElement_ivxn3r$('licenseName', true); this.descriptor.addElement_ivxn3r$('licenseUrl', true); this.descriptor.addElement_ivxn3r$('sourceUrl', true); this.descriptor.addElement_ivxn3r$('thumbnailUrl', true); this.descriptor.addElement_ivxn3r$('lastModified', true); this.descriptor.addElement_ivxn3r$('primaryLanguageUid', true); this.descriptor.addElement_ivxn3r$('languageVariantUid', true); this.descriptor.addElement_ivxn3r$('contentFlags', true); this.descriptor.addElement_ivxn3r$('leaf', true); this.descriptor.addElement_ivxn3r$('publik', true); this.descriptor.addElement_ivxn3r$('ceInactive', true); this.descriptor.addElement_ivxn3r$('completionCriteria', true); this.descriptor.addElement_ivxn3r$('minScore', true); this.descriptor.addElement_ivxn3r$('contentTypeFlag', true); this.descriptor.addElement_ivxn3r$('contentOwner', true); this.descriptor.addElement_ivxn3r$('contentEntryLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentEntryMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentEntryLastChangedBy', true); this.descriptor.addElement_ivxn3r$('contentEntryLct', true); ContentEntry$$serializer_instance = this; } Object.defineProperty(ContentEntry$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_wwrnlo$_0; }}); ContentEntry$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.contentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.contentEntryUid); if (!equals(value.title, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.title); if (!equals(value.description, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.description); if (!equals(value.entryId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.entryId); if (!equals(value.author, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.author); if (!equals(value.publisher, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.publisher); if (!equals(value.licenseType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.licenseType); if (!equals(value.licenseName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 7, internal.StringSerializer, value.licenseName); if (!equals(value.licenseUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, internal.StringSerializer, value.licenseUrl); if (!equals(value.sourceUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.sourceUrl); if (!equals(value.thumbnailUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.thumbnailUrl); if (!equals(value.lastModified, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.lastModified); if (!equals(value.primaryLanguageUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.primaryLanguageUid); if (!equals(value.languageVariantUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.languageVariantUid); if (!equals(value.contentFlags, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeIntElement_ptg7oe$(this.descriptor, 14, value.contentFlags); if (!equals(value.leaf, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 15, value.leaf); if (!equals(value.publik, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 16, value.publik); if (!equals(value.ceInactive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 17, value.ceInactive); if (!equals(value.completionCriteria, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeIntElement_ptg7oe$(this.descriptor, 18, value.completionCriteria); if (!equals(value.minScore, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeIntElement_ptg7oe$(this.descriptor, 19, value.minScore); if (!equals(value.contentTypeFlag, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeIntElement_ptg7oe$(this.descriptor, 20, value.contentTypeFlag); if (!equals(value.contentOwner, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.contentOwner); if (!equals(value.contentEntryLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.contentEntryLocalChangeSeqNum); if (!equals(value.contentEntryMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeLongElement_j0o2mv$(this.descriptor, 23, value.contentEntryMasterChangeSeqNum); if (!equals(value.contentEntryLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeIntElement_ptg7oe$(this.descriptor, 24, value.contentEntryLastChangedBy); if (!equals(value.contentEntryLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeLongElement_j0o2mv$(this.descriptor, 25, value.contentEntryLct); output.endStructure_24f42q$(this.descriptor); }; ContentEntry$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 7, internal.StringSerializer, local7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, internal.StringSerializer, local8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeIntElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeBooleanElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeBooleanElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeBooleanElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeIntElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeIntElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeIntElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeLongElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeIntElement_szpzho$(this.descriptor, 24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeLongElement_szpzho$(this.descriptor, 25); bitMask0 |= 33554432; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntry_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, null); }; ContentEntry$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; ContentEntry$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntry$$serializer_instance = null; function ContentEntry$$serializer_getInstance() { if (ContentEntry$$serializer_instance === null) { new ContentEntry$$serializer(); } return ContentEntry$$serializer_instance; } function ContentEntry_init(seen1, contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntry.prototype); if ((seen1 & 1) === 0) $this.contentEntryUid = L0; else $this.contentEntryUid = contentEntryUid; if ((seen1 & 2) === 0) $this.title = null; else $this.title = title; if ((seen1 & 4) === 0) $this.description = null; else $this.description = description; if ((seen1 & 8) === 0) $this.entryId = null; else $this.entryId = entryId; if ((seen1 & 16) === 0) $this.author = null; else $this.author = author; if ((seen1 & 32) === 0) $this.publisher = null; else $this.publisher = publisher; if ((seen1 & 64) === 0) $this.licenseType = 0; else $this.licenseType = licenseType; if ((seen1 & 128) === 0) $this.licenseName = null; else $this.licenseName = licenseName; if ((seen1 & 256) === 0) $this.licenseUrl = null; else $this.licenseUrl = licenseUrl; if ((seen1 & 512) === 0) $this.sourceUrl = null; else $this.sourceUrl = sourceUrl; if ((seen1 & 1024) === 0) $this.thumbnailUrl = null; else $this.thumbnailUrl = thumbnailUrl; if ((seen1 & 2048) === 0) $this.lastModified = L0; else $this.lastModified = lastModified; if ((seen1 & 4096) === 0) $this.primaryLanguageUid = L0; else $this.primaryLanguageUid = primaryLanguageUid; if ((seen1 & 8192) === 0) $this.languageVariantUid = L0; else $this.languageVariantUid = languageVariantUid; if ((seen1 & 16384) === 0) $this.contentFlags = 0; else $this.contentFlags = contentFlags; if ((seen1 & 32768) === 0) $this.leaf = false; else $this.leaf = leaf; if ((seen1 & 65536) === 0) $this.publik = true; else $this.publik = publik; if ((seen1 & 131072) === 0) $this.ceInactive = false; else $this.ceInactive = ceInactive; if ((seen1 & 262144) === 0) $this.completionCriteria = 0; else $this.completionCriteria = completionCriteria; if ((seen1 & 524288) === 0) $this.minScore = 0; else $this.minScore = minScore; if ((seen1 & 1048576) === 0) $this.contentTypeFlag = 0; else $this.contentTypeFlag = contentTypeFlag; if ((seen1 & 2097152) === 0) $this.contentOwner = L0; else $this.contentOwner = contentOwner; if ((seen1 & 4194304) === 0) $this.contentEntryLocalChangeSeqNum = L0; else $this.contentEntryLocalChangeSeqNum = contentEntryLocalChangeSeqNum; if ((seen1 & 8388608) === 0) $this.contentEntryMasterChangeSeqNum = L0; else $this.contentEntryMasterChangeSeqNum = contentEntryMasterChangeSeqNum; if ((seen1 & 16777216) === 0) $this.contentEntryLastChangedBy = 0; else $this.contentEntryLastChangedBy = contentEntryLastChangedBy; if ((seen1 & 33554432) === 0) $this.contentEntryLct = L0; else $this.contentEntryLct = contentEntryLct; return $this; } ContentEntry.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntry', interfaces: []}; function ContentEntryButtonModel() { this.showDownloadButton = false; this.showOpenButton = false; this.showUpdateButton = false; this.showDeleteButton = false; this.showManageDownloadButton = false; } ContentEntryButtonModel.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryButtonModel', interfaces: []}; function ContentEntryContentCategoryJoin() { ContentEntryContentCategoryJoin$Companion_getInstance(); this.ceccjUid = L0; this.ceccjContentEntryUid = L0; this.ceccjContentCategoryUid = L0; this.ceccjLocalChangeSeqNum = L0; this.ceccjMasterChangeSeqNum = L0; this.ceccjLastChangedBy = 0; this.ceccjLct = L0; } ContentEntryContentCategoryJoin.prototype.equals = function (other) { var tmp$; if (this === other) return true; var that = (tmp$ = other) == null || Kotlin.isType(tmp$, ContentEntryContentCategoryJoin) ? tmp$ : throwCCE(); if (!equals(this.ceccjUid, ensureNotNull(that).ceccjUid)) return false; return !equals(this.ceccjContentEntryUid, that.ceccjContentEntryUid) ? false : equals(this.ceccjContentCategoryUid, that.ceccjContentCategoryUid); }; ContentEntryContentCategoryJoin.prototype.hashCode = function () { var result = this.ceccjUid.xor(this.ceccjUid.shiftRightUnsigned(32)).toInt(); result = (31 * result | 0) + this.ceccjContentEntryUid.xor(this.ceccjContentEntryUid.shiftRightUnsigned(32)).toInt() | 0; result = (31 * result | 0) + this.ceccjContentCategoryUid.xor(this.ceccjContentCategoryUid.shiftRightUnsigned(32)).toInt() | 0; return result; }; function ContentEntryContentCategoryJoin$Companion() { ContentEntryContentCategoryJoin$Companion_instance = this; this.TABLE_ID = 3; } ContentEntryContentCategoryJoin$Companion.prototype.serializer = function () { return ContentEntryContentCategoryJoin$$serializer_getInstance(); }; ContentEntryContentCategoryJoin$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntryContentCategoryJoin$Companion_instance = null; function ContentEntryContentCategoryJoin$Companion_getInstance() { if (ContentEntryContentCategoryJoin$Companion_instance === null) { new ContentEntryContentCategoryJoin$Companion(); } return ContentEntryContentCategoryJoin$Companion_instance; } function ContentEntryContentCategoryJoin$$serializer() { this.descriptor_fnoes9$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryContentCategoryJoin', this, 7); this.descriptor.addElement_ivxn3r$('ceccjUid', true); this.descriptor.addElement_ivxn3r$('ceccjContentEntryUid', true); this.descriptor.addElement_ivxn3r$('ceccjContentCategoryUid', true); this.descriptor.addElement_ivxn3r$('ceccjLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('ceccjMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('ceccjLastChangedBy', true); this.descriptor.addElement_ivxn3r$('ceccjLct', true); ContentEntryContentCategoryJoin$$serializer_instance = this; } Object.defineProperty(ContentEntryContentCategoryJoin$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_fnoes9$_0; }}); ContentEntryContentCategoryJoin$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.ceccjUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.ceccjUid); if (!equals(value.ceccjContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.ceccjContentEntryUid); if (!equals(value.ceccjContentCategoryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.ceccjContentCategoryUid); if (!equals(value.ceccjLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.ceccjLocalChangeSeqNum); if (!equals(value.ceccjMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.ceccjMasterChangeSeqNum); if (!equals(value.ceccjLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.ceccjLastChangedBy); if (!equals(value.ceccjLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.ceccjLct); output.endStructure_24f42q$(this.descriptor); }; ContentEntryContentCategoryJoin$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntryContentCategoryJoin_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, null); }; ContentEntryContentCategoryJoin$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; ContentEntryContentCategoryJoin$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntryContentCategoryJoin$$serializer_instance = null; function ContentEntryContentCategoryJoin$$serializer_getInstance() { if (ContentEntryContentCategoryJoin$$serializer_instance === null) { new ContentEntryContentCategoryJoin$$serializer(); } return ContentEntryContentCategoryJoin$$serializer_instance; } function ContentEntryContentCategoryJoin_init(seen1, ceccjUid, ceccjContentEntryUid, ceccjContentCategoryUid, ceccjLocalChangeSeqNum, ceccjMasterChangeSeqNum, ceccjLastChangedBy, ceccjLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntryContentCategoryJoin.prototype); if ((seen1 & 1) === 0) $this.ceccjUid = L0; else $this.ceccjUid = ceccjUid; if ((seen1 & 2) === 0) $this.ceccjContentEntryUid = L0; else $this.ceccjContentEntryUid = ceccjContentEntryUid; if ((seen1 & 4) === 0) $this.ceccjContentCategoryUid = L0; else $this.ceccjContentCategoryUid = ceccjContentCategoryUid; if ((seen1 & 8) === 0) $this.ceccjLocalChangeSeqNum = L0; else $this.ceccjLocalChangeSeqNum = ceccjLocalChangeSeqNum; if ((seen1 & 16) === 0) $this.ceccjMasterChangeSeqNum = L0; else $this.ceccjMasterChangeSeqNum = ceccjMasterChangeSeqNum; if ((seen1 & 32) === 0) $this.ceccjLastChangedBy = 0; else $this.ceccjLastChangedBy = ceccjLastChangedBy; if ((seen1 & 64) === 0) $this.ceccjLct = L0; else $this.ceccjLct = ceccjLct; return $this; } ContentEntryContentCategoryJoin.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryContentCategoryJoin', interfaces: []}; var ContentEntryContentCategoryJoinReplicate$Companion_instance = null; function ContentEntryContentCategoryJoinReplicate$$serializer() { this.descriptor_uomvxo$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryContentCategoryJoinReplicate', this, 4); this.descriptor.addElement_ivxn3r$('ceccjPk', true); this.descriptor.addElement_ivxn3r$('ceccjVersionId', true); this.descriptor.addElement_ivxn3r$('ceccjDestination', true); this.descriptor.addElement_ivxn3r$('ceccjPending', true); ContentEntryContentCategoryJoinReplicate$$serializer_instance = this; } var ContentEntryContentCategoryJoinReplicate$$serializer_instance = null; function ContentEntryContentJobItemParams() { ContentEntryContentJobItemParams$Companion_getInstance(); this.contentEntryUid = L0; this.leaf = false; this.mostRecentContainerUid = L0; this.mostRecentContainerSize = L0; } function ContentEntryContentJobItemParams$Companion() { ContentEntryContentJobItemParams$Companion_instance = this; } ContentEntryContentJobItemParams$Companion.prototype.serializer = function () { return ContentEntryContentJobItemParams$$serializer_getInstance(); }; ContentEntryContentJobItemParams$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntryContentJobItemParams$Companion_instance = null; function ContentEntryContentJobItemParams$Companion_getInstance() { if (ContentEntryContentJobItemParams$Companion_instance === null) { new ContentEntryContentJobItemParams$Companion(); } return ContentEntryContentJobItemParams$Companion_instance; } function ContentEntryContentJobItemParams$$serializer() { this.descriptor_zcd6kf$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryContentJobItemParams', this, 4); this.descriptor.addElement_ivxn3r$('contentEntryUid', true); this.descriptor.addElement_ivxn3r$('leaf', true); this.descriptor.addElement_ivxn3r$('mostRecentContainerUid', true); this.descriptor.addElement_ivxn3r$('mostRecentContainerSize', true); ContentEntryContentJobItemParams$$serializer_instance = this; } Object.defineProperty(ContentEntryContentJobItemParams$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_zcd6kf$_0; }}); ContentEntryContentJobItemParams$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.contentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.contentEntryUid); if (!equals(value.leaf, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 1, value.leaf); if (!equals(value.mostRecentContainerUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.mostRecentContainerUid); if (!equals(value.mostRecentContainerSize, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.mostRecentContainerSize); output.endStructure_24f42q$(this.descriptor); }; ContentEntryContentJobItemParams$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeBooleanElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntryContentJobItemParams_init(bitMask0, local0, local1, local2, local3, null); }; ContentEntryContentJobItemParams$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer]; }; ContentEntryContentJobItemParams$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntryContentJobItemParams$$serializer_instance = null; function ContentEntryContentJobItemParams$$serializer_getInstance() { if (ContentEntryContentJobItemParams$$serializer_instance === null) { new ContentEntryContentJobItemParams$$serializer(); } return ContentEntryContentJobItemParams$$serializer_instance; } function ContentEntryContentJobItemParams_init(seen1, contentEntryUid, leaf, mostRecentContainerUid, mostRecentContainerSize, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntryContentJobItemParams.prototype); if ((seen1 & 1) === 0) $this.contentEntryUid = L0; else $this.contentEntryUid = contentEntryUid; if ((seen1 & 2) === 0) $this.leaf = false; else $this.leaf = leaf; if ((seen1 & 4) === 0) $this.mostRecentContainerUid = L0; else $this.mostRecentContainerUid = mostRecentContainerUid; if ((seen1 & 8) === 0) $this.mostRecentContainerSize = L0; else $this.mostRecentContainerSize = mostRecentContainerSize; return $this; } ContentEntryContentJobItemParams.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryContentJobItemParams', interfaces: []}; function ContentEntryParentChildJoin(cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex) { ContentEntryParentChildJoin$Companion_getInstance(); if (cepcjParentContentEntryUid === void 0) cepcjParentContentEntryUid = L0; if (cepcjChildContentEntryUid === void 0) cepcjChildContentEntryUid = L0; if (childIndex === void 0) childIndex = 0; this.cepcjParentContentEntryUid = cepcjParentContentEntryUid; this.cepcjChildContentEntryUid = cepcjChildContentEntryUid; this.childIndex = childIndex; this.cepcjUid = L0; this.cepcjLocalChangeSeqNum = L0; this.cepcjMasterChangeSeqNum = L0; this.cepcjLastChangedBy = 0; this.cepcjLct = L0; } function ContentEntryParentChildJoin$Companion() { ContentEntryParentChildJoin$Companion_instance = this; this.TABLE_ID = 7; } ContentEntryParentChildJoin$Companion.prototype.serializer = function () { return ContentEntryParentChildJoin$$serializer_getInstance(); }; ContentEntryParentChildJoin$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntryParentChildJoin$Companion_instance = null; function ContentEntryParentChildJoin$Companion_getInstance() { if (ContentEntryParentChildJoin$Companion_instance === null) { new ContentEntryParentChildJoin$Companion(); } return ContentEntryParentChildJoin$Companion_instance; } ContentEntryParentChildJoin.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, ContentEntryParentChildJoin) ? tmp$_0 : throwCCE(); if (!equals(this.cepcjUid, other.cepcjUid)) return false; if (!equals(this.cepcjLocalChangeSeqNum, other.cepcjLocalChangeSeqNum)) return false; if (!equals(this.cepcjMasterChangeSeqNum, other.cepcjMasterChangeSeqNum)) return false; if (this.cepcjLastChangedBy !== other.cepcjLastChangedBy) return false; if (!equals(this.cepcjParentContentEntryUid, other.cepcjParentContentEntryUid)) return false; if (!equals(this.cepcjChildContentEntryUid, other.cepcjChildContentEntryUid)) return false; if (this.childIndex !== other.childIndex) return false; return true; }; ContentEntryParentChildJoin.prototype.hashCode = function () { var result = hashCode(this.cepcjUid); result = (31 * result | 0) + hashCode(this.cepcjLocalChangeSeqNum) | 0; result = (31 * result | 0) + hashCode(this.cepcjMasterChangeSeqNum) | 0; result = (31 * result | 0) + this.cepcjLastChangedBy | 0; result = (31 * result | 0) + hashCode(this.cepcjParentContentEntryUid) | 0; result = (31 * result | 0) + hashCode(this.cepcjChildContentEntryUid) | 0; result = (31 * result | 0) + this.childIndex | 0; return result; }; function ContentEntryParentChildJoin$$serializer() { this.descriptor_49p3oe$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryParentChildJoin', this, 8); this.descriptor.addElement_ivxn3r$('cepcjParentContentEntryUid', true); this.descriptor.addElement_ivxn3r$('cepcjChildContentEntryUid', true); this.descriptor.addElement_ivxn3r$('childIndex', true); this.descriptor.addElement_ivxn3r$('cepcjUid', true); this.descriptor.addElement_ivxn3r$('cepcjLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('cepcjMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('cepcjLastChangedBy', true); this.descriptor.addElement_ivxn3r$('cepcjLct', true); ContentEntryParentChildJoin$$serializer_instance = this; } Object.defineProperty(ContentEntryParentChildJoin$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_49p3oe$_0; }}); ContentEntryParentChildJoin$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.cepcjParentContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.cepcjParentContentEntryUid); if (!equals(value.cepcjChildContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.cepcjChildContentEntryUid); if (!equals(value.childIndex, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.childIndex); if (!equals(value.cepcjUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.cepcjUid); if (!equals(value.cepcjLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.cepcjLocalChangeSeqNum); if (!equals(value.cepcjMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.cepcjMasterChangeSeqNum); if (!equals(value.cepcjLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.cepcjLastChangedBy); if (!equals(value.cepcjLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.cepcjLct); output.endStructure_24f42q$(this.descriptor); }; ContentEntryParentChildJoin$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntryParentChildJoin_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; ContentEntryParentChildJoin$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; ContentEntryParentChildJoin$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntryParentChildJoin$$serializer_instance = null; function ContentEntryParentChildJoin$$serializer_getInstance() { if (ContentEntryParentChildJoin$$serializer_instance === null) { new ContentEntryParentChildJoin$$serializer(); } return ContentEntryParentChildJoin$$serializer_instance; } function ContentEntryParentChildJoin_init(seen1, cepcjParentContentEntryUid, cepcjChildContentEntryUid, childIndex, cepcjUid, cepcjLocalChangeSeqNum, cepcjMasterChangeSeqNum, cepcjLastChangedBy, cepcjLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntryParentChildJoin.prototype); if ((seen1 & 1) === 0) $this.cepcjParentContentEntryUid = L0; else $this.cepcjParentContentEntryUid = cepcjParentContentEntryUid; if ((seen1 & 2) === 0) $this.cepcjChildContentEntryUid = L0; else $this.cepcjChildContentEntryUid = cepcjChildContentEntryUid; if ((seen1 & 4) === 0) $this.childIndex = 0; else $this.childIndex = childIndex; if ((seen1 & 8) === 0) $this.cepcjUid = L0; else $this.cepcjUid = cepcjUid; if ((seen1 & 16) === 0) $this.cepcjLocalChangeSeqNum = L0; else $this.cepcjLocalChangeSeqNum = cepcjLocalChangeSeqNum; if ((seen1 & 32) === 0) $this.cepcjMasterChangeSeqNum = L0; else $this.cepcjMasterChangeSeqNum = cepcjMasterChangeSeqNum; if ((seen1 & 64) === 0) $this.cepcjLastChangedBy = 0; else $this.cepcjLastChangedBy = cepcjLastChangedBy; if ((seen1 & 128) === 0) $this.cepcjLct = L0; else $this.cepcjLct = cepcjLct; return $this; } ContentEntryParentChildJoin.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryParentChildJoin', interfaces: []}; var ContentEntryParentChildJoinReplicate$Companion_instance = null; function ContentEntryParentChildJoinReplicate$$serializer() { this.descriptor_8k9htb$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryParentChildJoinReplicate', this, 4); this.descriptor.addElement_ivxn3r$('cepcjPk', true); this.descriptor.addElement_ivxn3r$('cepcjVersionId', true); this.descriptor.addElement_ivxn3r$('cepcjDestination', true); this.descriptor.addElement_ivxn3r$('cepcjPending', true); ContentEntryParentChildJoinReplicate$$serializer_instance = this; } var ContentEntryParentChildJoinReplicate$$serializer_instance = null; function ContentEntryPicture() { ContentEntryPicture$Companion_getInstance(); this.cepUid = L0; this.cepContentEntryUid = L0; this.cepUri = null; this.cepMd5 = null; this.cepFileSize = 0; this.cepTimestamp = L0; this.cepMimeType = null; this.cepActive = true; } function ContentEntryPicture$Companion() { ContentEntryPicture$Companion_instance = this; this.TABLE_ID = 138; } ContentEntryPicture$Companion.prototype.serializer = function () { return ContentEntryPicture$$serializer_getInstance(); }; ContentEntryPicture$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntryPicture$Companion_instance = null; function ContentEntryPicture$Companion_getInstance() { if (ContentEntryPicture$Companion_instance === null) { new ContentEntryPicture$Companion(); } return ContentEntryPicture$Companion_instance; } ContentEntryPicture.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, ContentEntryPicture) ? tmp$_0 : throwCCE(); if (!equals(this.cepUid, other.cepUid)) return false; if (!equals(this.cepContentEntryUid, other.cepContentEntryUid)) return false; if (!equals(this.cepUri, other.cepUri)) return false; if (!equals(this.cepMd5, other.cepMd5)) return false; if (this.cepFileSize !== other.cepFileSize) return false; if (!equals(this.cepTimestamp, other.cepTimestamp)) return false; if (!equals(this.cepMimeType, other.cepMimeType)) return false; if (this.cepActive !== other.cepActive) return false; return true; }; ContentEntryPicture.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4; var result = hashCode(this.cepUid); result = (31 * result | 0) + hashCode(this.cepContentEntryUid) | 0; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.cepUri) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.cepMd5) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + this.cepFileSize | 0; result = (31 * result | 0) + hashCode(this.cepTimestamp) | 0; result = (31 * result | 0) + ((tmp$_4 = (tmp$_3 = this.cepMimeType) != null ? hashCode(tmp$_3) : null) != null ? tmp$_4 : 0) | 0; result = (31 * result | 0) + hashCode(this.cepActive) | 0; return result; }; function ContentEntryPicture$$serializer() { this.descriptor_8lwvy4$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryPicture', this, 8); this.descriptor.addElement_ivxn3r$('cepUid', true); this.descriptor.addElement_ivxn3r$('cepContentEntryUid', true); this.descriptor.addElement_ivxn3r$('cepUri', true); this.descriptor.addElement_ivxn3r$('cepMd5', true); this.descriptor.addElement_ivxn3r$('cepFileSize', true); this.descriptor.addElement_ivxn3r$('cepTimestamp', true); this.descriptor.addElement_ivxn3r$('cepMimeType', true); this.descriptor.addElement_ivxn3r$('cepActive', true); ContentEntryPicture$$serializer_instance = this; } Object.defineProperty(ContentEntryPicture$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_8lwvy4$_0; }}); ContentEntryPicture$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.cepUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.cepUid); if (!equals(value.cepContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.cepContentEntryUid); if (!equals(value.cepUri, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.cepUri); if (!equals(value.cepMd5, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.cepMd5); if (!equals(value.cepFileSize, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeIntElement_ptg7oe$(this.descriptor, 4, value.cepFileSize); if (!equals(value.cepTimestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.cepTimestamp); if (!equals(value.cepMimeType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 6, internal.StringSerializer, value.cepMimeType); if (!equals(value.cepActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 7, value.cepActive); output.endStructure_24f42q$(this.descriptor); }; ContentEntryPicture$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeIntElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 6, internal.StringSerializer, local6); bitMask0 |= 64; break; case 7: local7 = input.decodeBooleanElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntryPicture_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; ContentEntryPicture$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer]; }; ContentEntryPicture$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntryPicture$$serializer_instance = null; function ContentEntryPicture$$serializer_getInstance() { if (ContentEntryPicture$$serializer_instance === null) { new ContentEntryPicture$$serializer(); } return ContentEntryPicture$$serializer_instance; } function ContentEntryPicture_init(seen1, cepUid, cepContentEntryUid, cepUri, cepMd5, cepFileSize, cepTimestamp, cepMimeType, cepActive, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntryPicture.prototype); if ((seen1 & 1) === 0) $this.cepUid = L0; else $this.cepUid = cepUid; if ((seen1 & 2) === 0) $this.cepContentEntryUid = L0; else $this.cepContentEntryUid = cepContentEntryUid; if ((seen1 & 4) === 0) $this.cepUri = null; else $this.cepUri = cepUri; if ((seen1 & 8) === 0) $this.cepMd5 = null; else $this.cepMd5 = cepMd5; if ((seen1 & 16) === 0) $this.cepFileSize = 0; else $this.cepFileSize = cepFileSize; if ((seen1 & 32) === 0) $this.cepTimestamp = L0; else $this.cepTimestamp = cepTimestamp; if ((seen1 & 64) === 0) $this.cepMimeType = null; else $this.cepMimeType = cepMimeType; if ((seen1 & 128) === 0) $this.cepActive = true; else $this.cepActive = cepActive; return $this; } ContentEntryPicture.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryPicture', interfaces: []}; var ContentEntryPictureReplicate$Companion_instance = null; function ContentEntryPictureReplicate$$serializer() { this.descriptor_uf5mq9$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryPictureReplicate', this, 4); this.descriptor.addElement_ivxn3r$('cepPk', true); this.descriptor.addElement_ivxn3r$('cepVersionId', true); this.descriptor.addElement_ivxn3r$('cepDestination', true); this.descriptor.addElement_ivxn3r$('cepPending', true); ContentEntryPictureReplicate$$serializer_instance = this; } var ContentEntryPictureReplicate$$serializer_instance = null; function ContentEntryRelatedEntryJoin() { ContentEntryRelatedEntryJoin$Companion_getInstance(); this.cerejUid = L0; this.cerejContentEntryUid = L0; this.cerejRelatedEntryUid = L0; this.cerejLastChangedBy = 0; this.relType = 0; this.comment = null; this.cerejRelLanguageUid = L0; this.cerejLocalChangeSeqNum = L0; this.cerejMasterChangeSeqNum = L0; this.cerejLct = L0; } ContentEntryRelatedEntryJoin.prototype.equals = function (other) { var tmp$; if (this === other) return true; var that = (tmp$ = other) == null || Kotlin.isType(tmp$, ContentEntryRelatedEntryJoin) ? tmp$ : throwCCE(); if (!equals(this.cerejUid, ensureNotNull(that).cerejUid)) return false; if (!equals(this.cerejContentEntryUid, that.cerejContentEntryUid)) return false; if (!equals(this.cerejRelatedEntryUid, that.cerejRelatedEntryUid)) return false; if (this.relType !== that.relType) return false; if (!equals(this.cerejRelLanguageUid, that.cerejRelLanguageUid)) return false; return this.comment != null ? equals(this.comment, that.comment) : that.comment == null; }; ContentEntryRelatedEntryJoin.prototype.hashCode = function () { var result = this.cerejUid.xor(this.cerejUid.shiftRightUnsigned(32)).toInt(); result = (31 * result | 0) + this.cerejContentEntryUid.xor(this.cerejContentEntryUid.shiftRightUnsigned(32)).toInt() | 0; result = (31 * result | 0) + this.cerejRelatedEntryUid.xor(this.cerejRelatedEntryUid.shiftRightUnsigned(32)).toInt() | 0; result = (31 * result | 0) + this.relType | 0; result = (31 * result | 0) + (this.comment != null ? hashCode(ensureNotNull(this.comment)) : 0) | 0; result = (31 * result | 0) + this.cerejRelLanguageUid.xor(this.cerejRelLanguageUid.shiftRightUnsigned(32)).toInt() | 0; return result; }; function ContentEntryRelatedEntryJoin$Companion() { ContentEntryRelatedEntryJoin$Companion_instance = this; this.TABLE_ID = 8; this.REL_TYPE_TRANSLATED_VERSION = 1; this.REL_TYPE_SEE_ALSO = 2; } ContentEntryRelatedEntryJoin$Companion.prototype.serializer = function () { return ContentEntryRelatedEntryJoin$$serializer_getInstance(); }; ContentEntryRelatedEntryJoin$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntryRelatedEntryJoin$Companion_instance = null; function ContentEntryRelatedEntryJoin$Companion_getInstance() { if (ContentEntryRelatedEntryJoin$Companion_instance === null) { new ContentEntryRelatedEntryJoin$Companion(); } return ContentEntryRelatedEntryJoin$Companion_instance; } function ContentEntryRelatedEntryJoin$$serializer() { this.descriptor_nqjoej$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryRelatedEntryJoin', this, 10); this.descriptor.addElement_ivxn3r$('cerejUid', true); this.descriptor.addElement_ivxn3r$('cerejContentEntryUid', true); this.descriptor.addElement_ivxn3r$('cerejRelatedEntryUid', true); this.descriptor.addElement_ivxn3r$('cerejLastChangedBy', true); this.descriptor.addElement_ivxn3r$('relType', true); this.descriptor.addElement_ivxn3r$('comment', true); this.descriptor.addElement_ivxn3r$('cerejRelLanguageUid', true); this.descriptor.addElement_ivxn3r$('cerejLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('cerejMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('cerejLct', true); ContentEntryRelatedEntryJoin$$serializer_instance = this; } Object.defineProperty(ContentEntryRelatedEntryJoin$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_nqjoej$_0; }}); ContentEntryRelatedEntryJoin$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.cerejUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.cerejUid); if (!equals(value.cerejContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.cerejContentEntryUid); if (!equals(value.cerejRelatedEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.cerejRelatedEntryUid); if (!equals(value.cerejLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.cerejLastChangedBy); if (!equals(value.relType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeIntElement_ptg7oe$(this.descriptor, 4, value.relType); if (!equals(value.comment, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.comment); if (!equals(value.cerejRelLanguageUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.cerejRelLanguageUid); if (!equals(value.cerejLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.cerejLocalChangeSeqNum); if (!equals(value.cerejMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.cerejMasterChangeSeqNum); if (!equals(value.cerejLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.cerejLct); output.endStructure_24f42q$(this.descriptor); }; ContentEntryRelatedEntryJoin$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeIntElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntryRelatedEntryJoin_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, null); }; ContentEntryRelatedEntryJoin$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer]; }; ContentEntryRelatedEntryJoin$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntryRelatedEntryJoin$$serializer_instance = null; function ContentEntryRelatedEntryJoin$$serializer_getInstance() { if (ContentEntryRelatedEntryJoin$$serializer_instance === null) { new ContentEntryRelatedEntryJoin$$serializer(); } return ContentEntryRelatedEntryJoin$$serializer_instance; } function ContentEntryRelatedEntryJoin_init(seen1, cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntryRelatedEntryJoin.prototype); if ((seen1 & 1) === 0) $this.cerejUid = L0; else $this.cerejUid = cerejUid; if ((seen1 & 2) === 0) $this.cerejContentEntryUid = L0; else $this.cerejContentEntryUid = cerejContentEntryUid; if ((seen1 & 4) === 0) $this.cerejRelatedEntryUid = L0; else $this.cerejRelatedEntryUid = cerejRelatedEntryUid; if ((seen1 & 8) === 0) $this.cerejLastChangedBy = 0; else $this.cerejLastChangedBy = cerejLastChangedBy; if ((seen1 & 16) === 0) $this.relType = 0; else $this.relType = relType; if ((seen1 & 32) === 0) $this.comment = null; else $this.comment = comment; if ((seen1 & 64) === 0) $this.cerejRelLanguageUid = L0; else $this.cerejRelLanguageUid = cerejRelLanguageUid; if ((seen1 & 128) === 0) $this.cerejLocalChangeSeqNum = L0; else $this.cerejLocalChangeSeqNum = cerejLocalChangeSeqNum; if ((seen1 & 256) === 0) $this.cerejMasterChangeSeqNum = L0; else $this.cerejMasterChangeSeqNum = cerejMasterChangeSeqNum; if ((seen1 & 512) === 0) $this.cerejLct = L0; else $this.cerejLct = cerejLct; return $this; } ContentEntryRelatedEntryJoin.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryRelatedEntryJoin', interfaces: []}; var ContentEntryRelatedEntryJoinReplicate$Companion_instance = null; function ContentEntryRelatedEntryJoinReplicate$$serializer() { this.descriptor_bzoof6$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryRelatedEntryJoinReplicate', this, 4); this.descriptor.addElement_ivxn3r$('cerejPk', true); this.descriptor.addElement_ivxn3r$('cerejVersionId', true); this.descriptor.addElement_ivxn3r$('cerejDestination', true); this.descriptor.addElement_ivxn3r$('cerejPending', true); ContentEntryRelatedEntryJoinReplicate$$serializer_instance = this; } var ContentEntryRelatedEntryJoinReplicate$$serializer_instance = null; function ContentEntryRelatedEntryJoinWithLangName() { ContentEntryRelatedEntryJoinWithLangName$Companion_getInstance(); this.cerejContentEntryUid = L0; this.cerejRelatedEntryUid = L0; this.languageName = null; } ContentEntryRelatedEntryJoinWithLangName.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, ContentEntryRelatedEntryJoinWithLangName) ? tmp$_0 : throwCCE(); if (!equals(this.cerejContentEntryUid, other.cerejContentEntryUid)) return false; if (!equals(this.cerejRelatedEntryUid, other.cerejRelatedEntryUid)) return false; if (!equals(this.languageName, other.languageName)) return false; return true; }; ContentEntryRelatedEntryJoinWithLangName.prototype.hashCode = function () { var tmp$, tmp$_0; var result = hashCode(this.cerejContentEntryUid); result = (31 * result | 0) + hashCode(this.cerejRelatedEntryUid) | 0; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.languageName) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; return result; }; function ContentEntryRelatedEntryJoinWithLangName$Companion() { ContentEntryRelatedEntryJoinWithLangName$Companion_instance = this; } ContentEntryRelatedEntryJoinWithLangName$Companion.prototype.serializer = function () { return ContentEntryRelatedEntryJoinWithLangName$$serializer_getInstance(); }; ContentEntryRelatedEntryJoinWithLangName$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntryRelatedEntryJoinWithLangName$Companion_instance = null; function ContentEntryRelatedEntryJoinWithLangName$Companion_getInstance() { if (ContentEntryRelatedEntryJoinWithLangName$Companion_instance === null) { new ContentEntryRelatedEntryJoinWithLangName$Companion(); } return ContentEntryRelatedEntryJoinWithLangName$Companion_instance; } function ContentEntryRelatedEntryJoinWithLangName$$serializer() { this.descriptor_6vvwwk$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryRelatedEntryJoinWithLangName', this, 3); this.descriptor.addElement_ivxn3r$('cerejContentEntryUid', true); this.descriptor.addElement_ivxn3r$('cerejRelatedEntryUid', true); this.descriptor.addElement_ivxn3r$('languageName', true); ContentEntryRelatedEntryJoinWithLangName$$serializer_instance = this; } Object.defineProperty(ContentEntryRelatedEntryJoinWithLangName$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_6vvwwk$_0; }}); ContentEntryRelatedEntryJoinWithLangName$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.cerejContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.cerejContentEntryUid); if (!equals(value.cerejRelatedEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.cerejRelatedEntryUid); if (!equals(value.languageName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.languageName); output.endStructure_24f42q$(this.descriptor); }; ContentEntryRelatedEntryJoinWithLangName$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntryRelatedEntryJoinWithLangName_init(bitMask0, local0, local1, local2, null); }; ContentEntryRelatedEntryJoinWithLangName$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer)]; }; ContentEntryRelatedEntryJoinWithLangName$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntryRelatedEntryJoinWithLangName$$serializer_instance = null; function ContentEntryRelatedEntryJoinWithLangName$$serializer_getInstance() { if (ContentEntryRelatedEntryJoinWithLangName$$serializer_instance === null) { new ContentEntryRelatedEntryJoinWithLangName$$serializer(); } return ContentEntryRelatedEntryJoinWithLangName$$serializer_instance; } function ContentEntryRelatedEntryJoinWithLangName_init(seen1, cerejContentEntryUid, cerejRelatedEntryUid, languageName, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntryRelatedEntryJoinWithLangName.prototype); if ((seen1 & 1) === 0) $this.cerejContentEntryUid = L0; else $this.cerejContentEntryUid = cerejContentEntryUid; if ((seen1 & 2) === 0) $this.cerejRelatedEntryUid = L0; else $this.cerejRelatedEntryUid = cerejRelatedEntryUid; if ((seen1 & 4) === 0) $this.languageName = null; else $this.languageName = languageName; return $this; } ContentEntryRelatedEntryJoinWithLangName.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryRelatedEntryJoinWithLangName', interfaces: []}; function ContentEntryRelatedEntryJoinWithLanguage() { ContentEntryRelatedEntryJoinWithLanguage$Companion_getInstance(); ContentEntryRelatedEntryJoin.call(this); this.language = null; } ContentEntryRelatedEntryJoinWithLanguage.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; if (!ContentEntryRelatedEntryJoin.prototype.equals.call(this, other)) return false; Kotlin.isType(tmp$_0 = other, ContentEntryRelatedEntryJoinWithLanguage) ? tmp$_0 : throwCCE(); if (!equals(this.language, other.language)) return false; return true; }; ContentEntryRelatedEntryJoinWithLanguage.prototype.hashCode = function () { var tmp$, tmp$_0; var result = ContentEntryRelatedEntryJoin.prototype.hashCode.call(this); result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.language) != null ? tmp$.hashCode() : null) != null ? tmp$_0 : 0) | 0; return result; }; function ContentEntryRelatedEntryJoinWithLanguage$Companion() { ContentEntryRelatedEntryJoinWithLanguage$Companion_instance = this; } ContentEntryRelatedEntryJoinWithLanguage$Companion.prototype.serializer = function () { return ContentEntryRelatedEntryJoinWithLanguage$$serializer_getInstance(); }; ContentEntryRelatedEntryJoinWithLanguage$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntryRelatedEntryJoinWithLanguage$Companion_instance = null; function ContentEntryRelatedEntryJoinWithLanguage$Companion_getInstance() { if (ContentEntryRelatedEntryJoinWithLanguage$Companion_instance === null) { new ContentEntryRelatedEntryJoinWithLanguage$Companion(); } return ContentEntryRelatedEntryJoinWithLanguage$Companion_instance; } function ContentEntryRelatedEntryJoinWithLanguage$$serializer() { this.descriptor_ifksfh$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryRelatedEntryJoinWithLanguage', this, 11); this.descriptor.addElement_ivxn3r$('cerejUid', true); this.descriptor.addElement_ivxn3r$('cerejContentEntryUid', true); this.descriptor.addElement_ivxn3r$('cerejRelatedEntryUid', true); this.descriptor.addElement_ivxn3r$('cerejLastChangedBy', true); this.descriptor.addElement_ivxn3r$('relType', true); this.descriptor.addElement_ivxn3r$('comment', true); this.descriptor.addElement_ivxn3r$('cerejRelLanguageUid', true); this.descriptor.addElement_ivxn3r$('cerejLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('cerejMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('cerejLct', true); this.descriptor.addElement_ivxn3r$('language', true); ContentEntryRelatedEntryJoinWithLanguage$$serializer_instance = this; } Object.defineProperty(ContentEntryRelatedEntryJoinWithLanguage$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ifksfh$_0; }}); ContentEntryRelatedEntryJoinWithLanguage$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.cerejUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.cerejUid); if (!equals(value.cerejContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.cerejContentEntryUid); if (!equals(value.cerejRelatedEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.cerejRelatedEntryUid); if (!equals(value.cerejLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.cerejLastChangedBy); if (!equals(value.relType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeIntElement_ptg7oe$(this.descriptor, 4, value.relType); if (!equals(value.comment, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.comment); if (!equals(value.cerejRelLanguageUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.cerejRelLanguageUid); if (!equals(value.cerejLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.cerejLocalChangeSeqNum); if (!equals(value.cerejMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.cerejMasterChangeSeqNum); if (!equals(value.cerejLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.cerejLct); if (!equals(value.language, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, Language$$serializer_getInstance(), value.language); output.endStructure_24f42q$(this.descriptor); }; ContentEntryRelatedEntryJoinWithLanguage$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeIntElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, Language$$serializer_getInstance(), local10); bitMask0 |= 1024; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntryRelatedEntryJoinWithLanguage_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, null); }; ContentEntryRelatedEntryJoinWithLanguage$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(Language$$serializer_getInstance())]; }; ContentEntryRelatedEntryJoinWithLanguage$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntryRelatedEntryJoinWithLanguage$$serializer_instance = null; function ContentEntryRelatedEntryJoinWithLanguage$$serializer_getInstance() { if (ContentEntryRelatedEntryJoinWithLanguage$$serializer_instance === null) { new ContentEntryRelatedEntryJoinWithLanguage$$serializer(); } return ContentEntryRelatedEntryJoinWithLanguage$$serializer_instance; } function ContentEntryRelatedEntryJoinWithLanguage_init(seen1, cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct, language, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntryRelatedEntryJoinWithLanguage.prototype); $this = ContentEntryRelatedEntryJoin_init(seen1, cerejUid, cerejContentEntryUid, cerejRelatedEntryUid, cerejLastChangedBy, relType, comment, cerejRelLanguageUid, cerejLocalChangeSeqNum, cerejMasterChangeSeqNum, cerejLct, $this); if ((seen1 & 1024) === 0) $this.language = null; else $this.language = language; return $this; } ContentEntryRelatedEntryJoinWithLanguage.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryRelatedEntryJoinWithLanguage', interfaces: [ContentEntryRelatedEntryJoin]}; var ContentEntryReplicate$Companion_instance = null; function ContentEntryReplicate$$serializer() { this.descriptor_wbxflb$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryReplicate', this, 4); this.descriptor.addElement_ivxn3r$('cePk', true); this.descriptor.addElement_ivxn3r$('ceVersionId', true); this.descriptor.addElement_ivxn3r$('ceDestination', true); this.descriptor.addElement_ivxn3r$('cePending', true); ContentEntryReplicate$$serializer_instance = this; } var ContentEntryReplicate$$serializer_instance = null; function ContentEntryStatementScoreProgress() { ContentEntryStatementScoreProgress$Companion_getInstance(); this.resultScore = 0; this.resultMax = 0; this.resultScaled = 0.0; this.resultWeight = 0; this.contentComplete = false; this.progress = 0; this.success = StatementEntity$Companion_getInstance().RESULT_UNSET; this.penalty = 0; this.totalContent = 0; this.totalCompletedContent = 0; } ContentEntryStatementScoreProgress.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, ContentEntryStatementScoreProgress) ? tmp$_0 : throwCCE(); if (this.resultScore !== other.resultScore) return false; if (this.resultMax !== other.resultMax) return false; if (this.resultScaled !== other.resultScaled) return false; if (this.resultWeight !== other.resultWeight) return false; if (this.contentComplete !== other.contentComplete) return false; if (this.progress !== other.progress) return false; if (this.success !== other.success) return false; if (this.penalty !== other.penalty) return false; if (this.totalContent !== other.totalContent) return false; if (this.totalCompletedContent !== other.totalCompletedContent) return false; return true; }; ContentEntryStatementScoreProgress.prototype.hashCode = function () { var result = this.resultScore; result = (31 * result | 0) + this.resultMax | 0; result = (31 * result | 0) + hashCode(this.resultScaled) | 0; result = (31 * result | 0) + this.resultWeight | 0; result = (31 * result | 0) + hashCode(this.contentComplete) | 0; result = (31 * result | 0) + this.progress | 0; result = (31 * result | 0) + this.success; result = (31 * result | 0) + this.penalty | 0; result = (31 * result | 0) + this.totalContent | 0; result = (31 * result | 0) + this.totalCompletedContent | 0; return result; }; function ContentEntryStatementScoreProgress$Companion() { ContentEntryStatementScoreProgress$Companion_instance = this; } ContentEntryStatementScoreProgress$Companion.prototype.serializer = function () { return ContentEntryStatementScoreProgress$$serializer_getInstance(); }; ContentEntryStatementScoreProgress$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntryStatementScoreProgress$Companion_instance = null; function ContentEntryStatementScoreProgress$Companion_getInstance() { if (ContentEntryStatementScoreProgress$Companion_instance === null) { new ContentEntryStatementScoreProgress$Companion(); } return ContentEntryStatementScoreProgress$Companion_instance; } function ContentEntryStatementScoreProgress$$serializer() { this.descriptor_1bj0do$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryStatementScoreProgress', this, 10); this.descriptor.addElement_ivxn3r$('resultScore', true); this.descriptor.addElement_ivxn3r$('resultMax', true); this.descriptor.addElement_ivxn3r$('resultScaled', true); this.descriptor.addElement_ivxn3r$('resultWeight', true); this.descriptor.addElement_ivxn3r$('contentComplete', true); this.descriptor.addElement_ivxn3r$('progress', true); this.descriptor.addElement_ivxn3r$('success', true); this.descriptor.addElement_ivxn3r$('penalty', true); this.descriptor.addElement_ivxn3r$('totalContent', true); this.descriptor.addElement_ivxn3r$('totalCompletedContent', true); ContentEntryStatementScoreProgress$$serializer_instance = this; } Object.defineProperty(ContentEntryStatementScoreProgress$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_1bj0do$_0; }}); ContentEntryStatementScoreProgress$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.resultScore, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeIntElement_ptg7oe$(this.descriptor, 0, value.resultScore); if (!equals(value.resultMax, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeIntElement_ptg7oe$(this.descriptor, 1, value.resultMax); if (!equals(value.resultScaled, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeFloatElement_lf6hpt$(this.descriptor, 2, value.resultScaled); if (!equals(value.resultWeight, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.resultWeight); if (!equals(value.contentComplete, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.contentComplete); if (!equals(value.progress, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.progress); if (!equals(value.success, StatementEntity$Companion_getInstance().RESULT_UNSET) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeByteElement_j0u8y3$(this.descriptor, 6, value.success); if (!equals(value.penalty, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.penalty); if (!equals(value.totalContent, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeIntElement_ptg7oe$(this.descriptor, 8, value.totalContent); if (!equals(value.totalCompletedContent, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.totalCompletedContent); output.endStructure_24f42q$(this.descriptor); }; ContentEntryStatementScoreProgress$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeIntElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeIntElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeFloatElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeByteElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeIntElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntryStatementScoreProgress_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, null); }; ContentEntryStatementScoreProgress$$serializer.prototype.childSerializers = function () { return [internal.IntSerializer, internal.IntSerializer, internal.FloatSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.ByteSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer]; }; ContentEntryStatementScoreProgress$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntryStatementScoreProgress$$serializer_instance = null; function ContentEntryStatementScoreProgress$$serializer_getInstance() { if (ContentEntryStatementScoreProgress$$serializer_instance === null) { new ContentEntryStatementScoreProgress$$serializer(); } return ContentEntryStatementScoreProgress$$serializer_instance; } function ContentEntryStatementScoreProgress_init(seen1, resultScore, resultMax, resultScaled, resultWeight, contentComplete, progress, success, penalty, totalContent, totalCompletedContent, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntryStatementScoreProgress.prototype); if ((seen1 & 1) === 0) $this.resultScore = 0; else $this.resultScore = resultScore; if ((seen1 & 2) === 0) $this.resultMax = 0; else $this.resultMax = resultMax; if ((seen1 & 4) === 0) $this.resultScaled = 0.0; else $this.resultScaled = resultScaled; if ((seen1 & 8) === 0) $this.resultWeight = 0; else $this.resultWeight = resultWeight; if ((seen1 & 16) === 0) $this.contentComplete = false; else $this.contentComplete = contentComplete; if ((seen1 & 32) === 0) $this.progress = 0; else $this.progress = progress; if ((seen1 & 64) === 0) $this.success = StatementEntity$Companion_getInstance().RESULT_UNSET; else $this.success = success; if ((seen1 & 128) === 0) $this.penalty = 0; else $this.penalty = penalty; if ((seen1 & 256) === 0) $this.totalContent = 0; else $this.totalContent = totalContent; if ((seen1 & 512) === 0) $this.totalCompletedContent = 0; else $this.totalCompletedContent = totalCompletedContent; return $this; } ContentEntryStatementScoreProgress.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryStatementScoreProgress', interfaces: []}; var ContentEntryWithAttemptsSummary$Companion_instance = null; function ContentEntryWithAttemptsSummary$$serializer() { this.descriptor_8wn4io$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryWithAttemptsSummary', this, 11); this.descriptor.addElement_ivxn3r$('contentEntryUid', true); this.descriptor.addElement_ivxn3r$('title', true); this.descriptor.addElement_ivxn3r$('thumbnailUrl', true); this.descriptor.addElement_ivxn3r$('attempts', true); this.descriptor.addElement_ivxn3r$('progress', true); this.descriptor.addElement_ivxn3r$('startDate', true); this.descriptor.addElement_ivxn3r$('endDate', true); this.descriptor.addElement_ivxn3r$('duration', true); this.descriptor.addElement_ivxn3r$('resultScoreScaled', true); this.descriptor.addElement_ivxn3r$('resultMax', true); this.descriptor.addElement_ivxn3r$('resultScore', true); ContentEntryWithAttemptsSummary$$serializer_instance = this; } var ContentEntryWithAttemptsSummary$$serializer_instance = null; function ContentEntryWithBlockAndLanguage() { ContentEntryWithBlockAndLanguage$Companion_getInstance(); ContentEntry.call(this); this.language = null; this.block = null; } function ContentEntryWithBlockAndLanguage$Companion() { ContentEntryWithBlockAndLanguage$Companion_instance = this; } ContentEntryWithBlockAndLanguage$Companion.prototype.serializer = function () { return ContentEntryWithBlockAndLanguage$$serializer_getInstance(); }; ContentEntryWithBlockAndLanguage$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntryWithBlockAndLanguage$Companion_instance = null; function ContentEntryWithBlockAndLanguage$Companion_getInstance() { if (ContentEntryWithBlockAndLanguage$Companion_instance === null) { new ContentEntryWithBlockAndLanguage$Companion(); } return ContentEntryWithBlockAndLanguage$Companion_instance; } function ContentEntryWithBlockAndLanguage$$serializer() { this.descriptor_m2djck$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryWithBlockAndLanguage', this, 28); this.descriptor.addElement_ivxn3r$('contentEntryUid', true); this.descriptor.addElement_ivxn3r$('title', true); this.descriptor.addElement_ivxn3r$('description', true); this.descriptor.addElement_ivxn3r$('entryId', true); this.descriptor.addElement_ivxn3r$('author', true); this.descriptor.addElement_ivxn3r$('publisher', true); this.descriptor.addElement_ivxn3r$('licenseType', true); this.descriptor.addElement_ivxn3r$('licenseName', true); this.descriptor.addElement_ivxn3r$('licenseUrl', true); this.descriptor.addElement_ivxn3r$('sourceUrl', true); this.descriptor.addElement_ivxn3r$('thumbnailUrl', true); this.descriptor.addElement_ivxn3r$('lastModified', true); this.descriptor.addElement_ivxn3r$('primaryLanguageUid', true); this.descriptor.addElement_ivxn3r$('languageVariantUid', true); this.descriptor.addElement_ivxn3r$('contentFlags', true); this.descriptor.addElement_ivxn3r$('leaf', true); this.descriptor.addElement_ivxn3r$('publik', true); this.descriptor.addElement_ivxn3r$('ceInactive', true); this.descriptor.addElement_ivxn3r$('completionCriteria', true); this.descriptor.addElement_ivxn3r$('minScore', true); this.descriptor.addElement_ivxn3r$('contentTypeFlag', true); this.descriptor.addElement_ivxn3r$('contentOwner', true); this.descriptor.addElement_ivxn3r$('contentEntryLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentEntryMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentEntryLastChangedBy', true); this.descriptor.addElement_ivxn3r$('contentEntryLct', true); this.descriptor.addElement_ivxn3r$('language', true); this.descriptor.addElement_ivxn3r$('block', true); ContentEntryWithBlockAndLanguage$$serializer_instance = this; } Object.defineProperty(ContentEntryWithBlockAndLanguage$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_m2djck$_0; }}); ContentEntryWithBlockAndLanguage$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.contentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.contentEntryUid); if (!equals(value.title, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.title); if (!equals(value.description, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.description); if (!equals(value.entryId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.entryId); if (!equals(value.author, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.author); if (!equals(value.publisher, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.publisher); if (!equals(value.licenseType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.licenseType); if (!equals(value.licenseName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 7, internal.StringSerializer, value.licenseName); if (!equals(value.licenseUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, internal.StringSerializer, value.licenseUrl); if (!equals(value.sourceUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.sourceUrl); if (!equals(value.thumbnailUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.thumbnailUrl); if (!equals(value.lastModified, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.lastModified); if (!equals(value.primaryLanguageUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.primaryLanguageUid); if (!equals(value.languageVariantUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.languageVariantUid); if (!equals(value.contentFlags, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeIntElement_ptg7oe$(this.descriptor, 14, value.contentFlags); if (!equals(value.leaf, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 15, value.leaf); if (!equals(value.publik, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 16, value.publik); if (!equals(value.ceInactive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 17, value.ceInactive); if (!equals(value.completionCriteria, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeIntElement_ptg7oe$(this.descriptor, 18, value.completionCriteria); if (!equals(value.minScore, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeIntElement_ptg7oe$(this.descriptor, 19, value.minScore); if (!equals(value.contentTypeFlag, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeIntElement_ptg7oe$(this.descriptor, 20, value.contentTypeFlag); if (!equals(value.contentOwner, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.contentOwner); if (!equals(value.contentEntryLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.contentEntryLocalChangeSeqNum); if (!equals(value.contentEntryMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeLongElement_j0o2mv$(this.descriptor, 23, value.contentEntryMasterChangeSeqNum); if (!equals(value.contentEntryLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeIntElement_ptg7oe$(this.descriptor, 24, value.contentEntryLastChangedBy); if (!equals(value.contentEntryLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeLongElement_j0o2mv$(this.descriptor, 25, value.contentEntryLct); if (!equals(value.language, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 26)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 26, Language$$serializer_getInstance(), value.language); if (!equals(value.block, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 27)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 27, CourseBlock$$serializer_getInstance(), value.block); output.endStructure_24f42q$(this.descriptor); }; ContentEntryWithBlockAndLanguage$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 7, internal.StringSerializer, local7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, internal.StringSerializer, local8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeIntElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeBooleanElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeBooleanElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeBooleanElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeIntElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeIntElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeIntElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeLongElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeIntElement_szpzho$(this.descriptor, 24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeLongElement_szpzho$(this.descriptor, 25); bitMask0 |= 33554432; break; case 26: local26 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 26, Language$$serializer_getInstance(), local26); bitMask0 |= 67108864; break; case 27: local27 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 27, CourseBlock$$serializer_getInstance(), local27); bitMask0 |= 134217728; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntryWithBlockAndLanguage_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, null); }; ContentEntryWithBlockAndLanguage$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(Language$$serializer_getInstance()), new NullableSerializer(CourseBlock$$serializer_getInstance())]; }; ContentEntryWithBlockAndLanguage$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntryWithBlockAndLanguage$$serializer_instance = null; function ContentEntryWithBlockAndLanguage$$serializer_getInstance() { if (ContentEntryWithBlockAndLanguage$$serializer_instance === null) { new ContentEntryWithBlockAndLanguage$$serializer(); } return ContentEntryWithBlockAndLanguage$$serializer_instance; } function ContentEntryWithBlockAndLanguage_init(seen1, contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct, language, block, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntryWithBlockAndLanguage.prototype); $this = ContentEntry_init(seen1, contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct, $this); if ((seen1 & 67108864) === 0) $this.language = null; else $this.language = language; if ((seen1 & 134217728) === 0) $this.block = null; else $this.block = block; return $this; } ContentEntryWithBlockAndLanguage.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryWithBlockAndLanguage', interfaces: [ContentEntry]}; function ContentEntryWithLanguage() { ContentEntryWithLanguage$Companion_getInstance(); ContentEntry.call(this); this.language = null; } function ContentEntryWithLanguage$Companion() { ContentEntryWithLanguage$Companion_instance = this; } ContentEntryWithLanguage$Companion.prototype.serializer = function () { return ContentEntryWithLanguage$$serializer_getInstance(); }; ContentEntryWithLanguage$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntryWithLanguage$Companion_instance = null; function ContentEntryWithLanguage$Companion_getInstance() { if (ContentEntryWithLanguage$Companion_instance === null) { new ContentEntryWithLanguage$Companion(); } return ContentEntryWithLanguage$Companion_instance; } function ContentEntryWithLanguage$$serializer() { this.descriptor_34i7c2$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryWithLanguage', this, 27); this.descriptor.addElement_ivxn3r$('contentEntryUid', true); this.descriptor.addElement_ivxn3r$('title', true); this.descriptor.addElement_ivxn3r$('description', true); this.descriptor.addElement_ivxn3r$('entryId', true); this.descriptor.addElement_ivxn3r$('author', true); this.descriptor.addElement_ivxn3r$('publisher', true); this.descriptor.addElement_ivxn3r$('licenseType', true); this.descriptor.addElement_ivxn3r$('licenseName', true); this.descriptor.addElement_ivxn3r$('licenseUrl', true); this.descriptor.addElement_ivxn3r$('sourceUrl', true); this.descriptor.addElement_ivxn3r$('thumbnailUrl', true); this.descriptor.addElement_ivxn3r$('lastModified', true); this.descriptor.addElement_ivxn3r$('primaryLanguageUid', true); this.descriptor.addElement_ivxn3r$('languageVariantUid', true); this.descriptor.addElement_ivxn3r$('contentFlags', true); this.descriptor.addElement_ivxn3r$('leaf', true); this.descriptor.addElement_ivxn3r$('publik', true); this.descriptor.addElement_ivxn3r$('ceInactive', true); this.descriptor.addElement_ivxn3r$('completionCriteria', true); this.descriptor.addElement_ivxn3r$('minScore', true); this.descriptor.addElement_ivxn3r$('contentTypeFlag', true); this.descriptor.addElement_ivxn3r$('contentOwner', true); this.descriptor.addElement_ivxn3r$('contentEntryLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentEntryMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentEntryLastChangedBy', true); this.descriptor.addElement_ivxn3r$('contentEntryLct', true); this.descriptor.addElement_ivxn3r$('language', true); ContentEntryWithLanguage$$serializer_instance = this; } Object.defineProperty(ContentEntryWithLanguage$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_34i7c2$_0; }}); ContentEntryWithLanguage$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.contentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.contentEntryUid); if (!equals(value.title, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.title); if (!equals(value.description, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.description); if (!equals(value.entryId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.entryId); if (!equals(value.author, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.author); if (!equals(value.publisher, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.publisher); if (!equals(value.licenseType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.licenseType); if (!equals(value.licenseName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 7, internal.StringSerializer, value.licenseName); if (!equals(value.licenseUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, internal.StringSerializer, value.licenseUrl); if (!equals(value.sourceUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.sourceUrl); if (!equals(value.thumbnailUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.thumbnailUrl); if (!equals(value.lastModified, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.lastModified); if (!equals(value.primaryLanguageUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.primaryLanguageUid); if (!equals(value.languageVariantUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.languageVariantUid); if (!equals(value.contentFlags, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeIntElement_ptg7oe$(this.descriptor, 14, value.contentFlags); if (!equals(value.leaf, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 15, value.leaf); if (!equals(value.publik, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 16, value.publik); if (!equals(value.ceInactive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 17, value.ceInactive); if (!equals(value.completionCriteria, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeIntElement_ptg7oe$(this.descriptor, 18, value.completionCriteria); if (!equals(value.minScore, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeIntElement_ptg7oe$(this.descriptor, 19, value.minScore); if (!equals(value.contentTypeFlag, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeIntElement_ptg7oe$(this.descriptor, 20, value.contentTypeFlag); if (!equals(value.contentOwner, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.contentOwner); if (!equals(value.contentEntryLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.contentEntryLocalChangeSeqNum); if (!equals(value.contentEntryMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeLongElement_j0o2mv$(this.descriptor, 23, value.contentEntryMasterChangeSeqNum); if (!equals(value.contentEntryLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeIntElement_ptg7oe$(this.descriptor, 24, value.contentEntryLastChangedBy); if (!equals(value.contentEntryLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeLongElement_j0o2mv$(this.descriptor, 25, value.contentEntryLct); if (!equals(value.language, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 26)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 26, Language$$serializer_getInstance(), value.language); output.endStructure_24f42q$(this.descriptor); }; ContentEntryWithLanguage$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 7, internal.StringSerializer, local7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, internal.StringSerializer, local8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeIntElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeBooleanElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeBooleanElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeBooleanElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeIntElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeIntElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeIntElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeLongElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeIntElement_szpzho$(this.descriptor, 24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeLongElement_szpzho$(this.descriptor, 25); bitMask0 |= 33554432; break; case 26: local26 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 26, Language$$serializer_getInstance(), local26); bitMask0 |= 67108864; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntryWithLanguage_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, null); }; ContentEntryWithLanguage$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(Language$$serializer_getInstance())]; }; ContentEntryWithLanguage$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntryWithLanguage$$serializer_instance = null; function ContentEntryWithLanguage$$serializer_getInstance() { if (ContentEntryWithLanguage$$serializer_instance === null) { new ContentEntryWithLanguage$$serializer(); } return ContentEntryWithLanguage$$serializer_instance; } function ContentEntryWithLanguage_init(seen1, contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct, language, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntryWithLanguage.prototype); $this = ContentEntry_init(seen1, contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct, $this); if ((seen1 & 67108864) === 0) $this.language = null; else $this.language = language; return $this; } ContentEntryWithLanguage.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryWithLanguage', interfaces: [ContentEntry]}; function ContentEntryWithMostRecentContainer() { ContentEntryWithMostRecentContainer$Companion_getInstance(); ContentEntry.call(this); this.container = null; } function ContentEntryWithMostRecentContainer$Companion() { ContentEntryWithMostRecentContainer$Companion_instance = this; } ContentEntryWithMostRecentContainer$Companion.prototype.serializer = function () { return ContentEntryWithMostRecentContainer$$serializer_getInstance(); }; ContentEntryWithMostRecentContainer$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntryWithMostRecentContainer$Companion_instance = null; function ContentEntryWithMostRecentContainer$Companion_getInstance() { if (ContentEntryWithMostRecentContainer$Companion_instance === null) { new ContentEntryWithMostRecentContainer$Companion(); } return ContentEntryWithMostRecentContainer$Companion_instance; } function ContentEntryWithMostRecentContainer$$serializer() { this.descriptor_cgdvy5$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryWithMostRecentContainer', this, 27); this.descriptor.addElement_ivxn3r$('contentEntryUid', true); this.descriptor.addElement_ivxn3r$('title', true); this.descriptor.addElement_ivxn3r$('description', true); this.descriptor.addElement_ivxn3r$('entryId', true); this.descriptor.addElement_ivxn3r$('author', true); this.descriptor.addElement_ivxn3r$('publisher', true); this.descriptor.addElement_ivxn3r$('licenseType', true); this.descriptor.addElement_ivxn3r$('licenseName', true); this.descriptor.addElement_ivxn3r$('licenseUrl', true); this.descriptor.addElement_ivxn3r$('sourceUrl', true); this.descriptor.addElement_ivxn3r$('thumbnailUrl', true); this.descriptor.addElement_ivxn3r$('lastModified', true); this.descriptor.addElement_ivxn3r$('primaryLanguageUid', true); this.descriptor.addElement_ivxn3r$('languageVariantUid', true); this.descriptor.addElement_ivxn3r$('contentFlags', true); this.descriptor.addElement_ivxn3r$('leaf', true); this.descriptor.addElement_ivxn3r$('publik', true); this.descriptor.addElement_ivxn3r$('ceInactive', true); this.descriptor.addElement_ivxn3r$('completionCriteria', true); this.descriptor.addElement_ivxn3r$('minScore', true); this.descriptor.addElement_ivxn3r$('contentTypeFlag', true); this.descriptor.addElement_ivxn3r$('contentOwner', true); this.descriptor.addElement_ivxn3r$('contentEntryLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentEntryMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentEntryLastChangedBy', true); this.descriptor.addElement_ivxn3r$('contentEntryLct', true); this.descriptor.addElement_ivxn3r$('container', true); ContentEntryWithMostRecentContainer$$serializer_instance = this; } Object.defineProperty(ContentEntryWithMostRecentContainer$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_cgdvy5$_0; }}); ContentEntryWithMostRecentContainer$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.contentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.contentEntryUid); if (!equals(value.title, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.title); if (!equals(value.description, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.description); if (!equals(value.entryId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.entryId); if (!equals(value.author, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.author); if (!equals(value.publisher, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.publisher); if (!equals(value.licenseType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.licenseType); if (!equals(value.licenseName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 7, internal.StringSerializer, value.licenseName); if (!equals(value.licenseUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, internal.StringSerializer, value.licenseUrl); if (!equals(value.sourceUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.sourceUrl); if (!equals(value.thumbnailUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.thumbnailUrl); if (!equals(value.lastModified, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.lastModified); if (!equals(value.primaryLanguageUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.primaryLanguageUid); if (!equals(value.languageVariantUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.languageVariantUid); if (!equals(value.contentFlags, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeIntElement_ptg7oe$(this.descriptor, 14, value.contentFlags); if (!equals(value.leaf, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 15, value.leaf); if (!equals(value.publik, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 16, value.publik); if (!equals(value.ceInactive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 17, value.ceInactive); if (!equals(value.completionCriteria, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeIntElement_ptg7oe$(this.descriptor, 18, value.completionCriteria); if (!equals(value.minScore, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeIntElement_ptg7oe$(this.descriptor, 19, value.minScore); if (!equals(value.contentTypeFlag, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeIntElement_ptg7oe$(this.descriptor, 20, value.contentTypeFlag); if (!equals(value.contentOwner, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.contentOwner); if (!equals(value.contentEntryLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.contentEntryLocalChangeSeqNum); if (!equals(value.contentEntryMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeLongElement_j0o2mv$(this.descriptor, 23, value.contentEntryMasterChangeSeqNum); if (!equals(value.contentEntryLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeIntElement_ptg7oe$(this.descriptor, 24, value.contentEntryLastChangedBy); if (!equals(value.contentEntryLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeLongElement_j0o2mv$(this.descriptor, 25, value.contentEntryLct); if (!equals(value.container, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 26)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 26, Container$$serializer_getInstance(), value.container); output.endStructure_24f42q$(this.descriptor); }; ContentEntryWithMostRecentContainer$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 7, internal.StringSerializer, local7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, internal.StringSerializer, local8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeIntElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeBooleanElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeBooleanElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeBooleanElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeIntElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeIntElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeIntElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeLongElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeIntElement_szpzho$(this.descriptor, 24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeLongElement_szpzho$(this.descriptor, 25); bitMask0 |= 33554432; break; case 26: local26 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 26, Container$$serializer_getInstance(), local26); bitMask0 |= 67108864; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntryWithMostRecentContainer_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, null); }; ContentEntryWithMostRecentContainer$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(Container$$serializer_getInstance())]; }; ContentEntryWithMostRecentContainer$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntryWithMostRecentContainer$$serializer_instance = null; function ContentEntryWithMostRecentContainer$$serializer_getInstance() { if (ContentEntryWithMostRecentContainer$$serializer_instance === null) { new ContentEntryWithMostRecentContainer$$serializer(); } return ContentEntryWithMostRecentContainer$$serializer_instance; } function ContentEntryWithMostRecentContainer_init(seen1, contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct, container, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntryWithMostRecentContainer.prototype); $this = ContentEntry_init(seen1, contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct, $this); if ((seen1 & 67108864) === 0) $this.container = null; else $this.container = container; return $this; } ContentEntryWithMostRecentContainer.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryWithMostRecentContainer', interfaces: [ContentEntry]}; function ContentEntryWithParentChildJoinAndMostRecentContainer() { ContentEntryWithParentChildJoinAndMostRecentContainer$Companion_getInstance(); ContentEntry.call(this); this.mostRecentContainer = null; this.contentEntryParentChildJoin = null; } function ContentEntryWithParentChildJoinAndMostRecentContainer$Companion() { ContentEntryWithParentChildJoinAndMostRecentContainer$Companion_instance = this; } ContentEntryWithParentChildJoinAndMostRecentContainer$Companion.prototype.serializer = function () { return ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer_getInstance(); }; ContentEntryWithParentChildJoinAndMostRecentContainer$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntryWithParentChildJoinAndMostRecentContainer$Companion_instance = null; function ContentEntryWithParentChildJoinAndMostRecentContainer$Companion_getInstance() { if (ContentEntryWithParentChildJoinAndMostRecentContainer$Companion_instance === null) { new ContentEntryWithParentChildJoinAndMostRecentContainer$Companion(); } return ContentEntryWithParentChildJoinAndMostRecentContainer$Companion_instance; } function ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer() { this.descriptor_gin57c$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryWithParentChildJoinAndMostRecentContainer', this, 28); this.descriptor.addElement_ivxn3r$('contentEntryUid', true); this.descriptor.addElement_ivxn3r$('title', true); this.descriptor.addElement_ivxn3r$('description', true); this.descriptor.addElement_ivxn3r$('entryId', true); this.descriptor.addElement_ivxn3r$('author', true); this.descriptor.addElement_ivxn3r$('publisher', true); this.descriptor.addElement_ivxn3r$('licenseType', true); this.descriptor.addElement_ivxn3r$('licenseName', true); this.descriptor.addElement_ivxn3r$('licenseUrl', true); this.descriptor.addElement_ivxn3r$('sourceUrl', true); this.descriptor.addElement_ivxn3r$('thumbnailUrl', true); this.descriptor.addElement_ivxn3r$('lastModified', true); this.descriptor.addElement_ivxn3r$('primaryLanguageUid', true); this.descriptor.addElement_ivxn3r$('languageVariantUid', true); this.descriptor.addElement_ivxn3r$('contentFlags', true); this.descriptor.addElement_ivxn3r$('leaf', true); this.descriptor.addElement_ivxn3r$('publik', true); this.descriptor.addElement_ivxn3r$('ceInactive', true); this.descriptor.addElement_ivxn3r$('completionCriteria', true); this.descriptor.addElement_ivxn3r$('minScore', true); this.descriptor.addElement_ivxn3r$('contentTypeFlag', true); this.descriptor.addElement_ivxn3r$('contentOwner', true); this.descriptor.addElement_ivxn3r$('contentEntryLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentEntryMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentEntryLastChangedBy', true); this.descriptor.addElement_ivxn3r$('contentEntryLct', true); this.descriptor.addElement_ivxn3r$('mostRecentContainer', true); this.descriptor.addElement_ivxn3r$('contentEntryParentChildJoin', true); ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer_instance = this; } Object.defineProperty(ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_gin57c$_0; }}); ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.contentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.contentEntryUid); if (!equals(value.title, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.title); if (!equals(value.description, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.description); if (!equals(value.entryId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.entryId); if (!equals(value.author, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.author); if (!equals(value.publisher, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.publisher); if (!equals(value.licenseType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.licenseType); if (!equals(value.licenseName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 7, internal.StringSerializer, value.licenseName); if (!equals(value.licenseUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, internal.StringSerializer, value.licenseUrl); if (!equals(value.sourceUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.sourceUrl); if (!equals(value.thumbnailUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.thumbnailUrl); if (!equals(value.lastModified, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.lastModified); if (!equals(value.primaryLanguageUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.primaryLanguageUid); if (!equals(value.languageVariantUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.languageVariantUid); if (!equals(value.contentFlags, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeIntElement_ptg7oe$(this.descriptor, 14, value.contentFlags); if (!equals(value.leaf, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 15, value.leaf); if (!equals(value.publik, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 16, value.publik); if (!equals(value.ceInactive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 17, value.ceInactive); if (!equals(value.completionCriteria, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeIntElement_ptg7oe$(this.descriptor, 18, value.completionCriteria); if (!equals(value.minScore, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeIntElement_ptg7oe$(this.descriptor, 19, value.minScore); if (!equals(value.contentTypeFlag, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeIntElement_ptg7oe$(this.descriptor, 20, value.contentTypeFlag); if (!equals(value.contentOwner, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.contentOwner); if (!equals(value.contentEntryLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.contentEntryLocalChangeSeqNum); if (!equals(value.contentEntryMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeLongElement_j0o2mv$(this.descriptor, 23, value.contentEntryMasterChangeSeqNum); if (!equals(value.contentEntryLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeIntElement_ptg7oe$(this.descriptor, 24, value.contentEntryLastChangedBy); if (!equals(value.contentEntryLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeLongElement_j0o2mv$(this.descriptor, 25, value.contentEntryLct); if (!equals(value.mostRecentContainer, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 26)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 26, Container$$serializer_getInstance(), value.mostRecentContainer); if (!equals(value.contentEntryParentChildJoin, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 27)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 27, ContentEntryParentChildJoin$$serializer_getInstance(), value.contentEntryParentChildJoin); output.endStructure_24f42q$(this.descriptor); }; ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 7, internal.StringSerializer, local7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, internal.StringSerializer, local8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeIntElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeBooleanElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeBooleanElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeBooleanElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeIntElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeIntElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeIntElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeLongElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeIntElement_szpzho$(this.descriptor, 24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeLongElement_szpzho$(this.descriptor, 25); bitMask0 |= 33554432; break; case 26: local26 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 26, Container$$serializer_getInstance(), local26); bitMask0 |= 67108864; break; case 27: local27 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 27, ContentEntryParentChildJoin$$serializer_getInstance(), local27); bitMask0 |= 134217728; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntryWithParentChildJoinAndMostRecentContainer_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, null); }; ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(Container$$serializer_getInstance()), new NullableSerializer(ContentEntryParentChildJoin$$serializer_getInstance())]; }; ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer_instance = null; function ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer_getInstance() { if (ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer_instance === null) { new ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer(); } return ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer_instance; } function ContentEntryWithParentChildJoinAndMostRecentContainer_init(seen1, contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct, mostRecentContainer, contentEntryParentChildJoin, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntryWithParentChildJoinAndMostRecentContainer.prototype); $this = ContentEntry_init(seen1, contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct, $this); if ((seen1 & 67108864) === 0) $this.mostRecentContainer = null; else $this.mostRecentContainer = mostRecentContainer; if ((seen1 & 134217728) === 0) $this.contentEntryParentChildJoin = null; else $this.contentEntryParentChildJoin = contentEntryParentChildJoin; return $this; } ContentEntryWithParentChildJoinAndMostRecentContainer.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryWithParentChildJoinAndMostRecentContainer', interfaces: [ContentEntry]}; function ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer() { ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$Companion_getInstance(); ContentEntry.call(this); this.mostRecentContainer = null; this.contentEntryParentChildJoin = null; this.scoreProgress = null; this.assignmentContentWeight = 0; } ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer.prototype.equals = function (other) { if (this === other) return true; if (!Kotlin.isType(other, ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer)) return false; if (!ContentEntry.prototype.equals.call(this, other)) return false; if (!equals(this.mostRecentContainer, other.mostRecentContainer)) return false; if (!equals(this.contentEntryParentChildJoin, other.contentEntryParentChildJoin)) return false; if (!equals(this.scoreProgress, other.scoreProgress)) return false; if (this.assignmentContentWeight !== other.assignmentContentWeight) return false; return true; }; ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4; var result = ContentEntry.prototype.hashCode.call(this); result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.mostRecentContainer) != null ? tmp$.hashCode() : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.contentEntryParentChildJoin) != null ? tmp$_1.hashCode() : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + ((tmp$_4 = (tmp$_3 = this.scoreProgress) != null ? tmp$_3.hashCode() : null) != null ? tmp$_4 : 0) | 0; result = (31 * result | 0) + hashCode(this.assignmentContentWeight) | 0; return result; }; function ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$Companion() { ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$Companion_instance = this; } ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$Companion.prototype.serializer = function () { return ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer_getInstance(); }; ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$Companion_instance = null; function ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$Companion_getInstance() { if (ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$Companion_instance === null) { new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$Companion(); } return ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$Companion_instance; } function ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer() { this.descriptor_b6spul$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer', this, 30); this.descriptor.addElement_ivxn3r$('contentEntryUid', true); this.descriptor.addElement_ivxn3r$('title', true); this.descriptor.addElement_ivxn3r$('description', true); this.descriptor.addElement_ivxn3r$('entryId', true); this.descriptor.addElement_ivxn3r$('author', true); this.descriptor.addElement_ivxn3r$('publisher', true); this.descriptor.addElement_ivxn3r$('licenseType', true); this.descriptor.addElement_ivxn3r$('licenseName', true); this.descriptor.addElement_ivxn3r$('licenseUrl', true); this.descriptor.addElement_ivxn3r$('sourceUrl', true); this.descriptor.addElement_ivxn3r$('thumbnailUrl', true); this.descriptor.addElement_ivxn3r$('lastModified', true); this.descriptor.addElement_ivxn3r$('primaryLanguageUid', true); this.descriptor.addElement_ivxn3r$('languageVariantUid', true); this.descriptor.addElement_ivxn3r$('contentFlags', true); this.descriptor.addElement_ivxn3r$('leaf', true); this.descriptor.addElement_ivxn3r$('publik', true); this.descriptor.addElement_ivxn3r$('ceInactive', true); this.descriptor.addElement_ivxn3r$('completionCriteria', true); this.descriptor.addElement_ivxn3r$('minScore', true); this.descriptor.addElement_ivxn3r$('contentTypeFlag', true); this.descriptor.addElement_ivxn3r$('contentOwner', true); this.descriptor.addElement_ivxn3r$('contentEntryLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentEntryMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('contentEntryLastChangedBy', true); this.descriptor.addElement_ivxn3r$('contentEntryLct', true); this.descriptor.addElement_ivxn3r$('mostRecentContainer', true); this.descriptor.addElement_ivxn3r$('contentEntryParentChildJoin', true); this.descriptor.addElement_ivxn3r$('scoreProgress', true); this.descriptor.addElement_ivxn3r$('assignmentContentWeight', true); ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer_instance = this; } Object.defineProperty(ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_b6spul$_0; }}); ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.contentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.contentEntryUid); if (!equals(value.title, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.title); if (!equals(value.description, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.description); if (!equals(value.entryId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.entryId); if (!equals(value.author, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.author); if (!equals(value.publisher, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.publisher); if (!equals(value.licenseType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.licenseType); if (!equals(value.licenseName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 7, internal.StringSerializer, value.licenseName); if (!equals(value.licenseUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, internal.StringSerializer, value.licenseUrl); if (!equals(value.sourceUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.sourceUrl); if (!equals(value.thumbnailUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.thumbnailUrl); if (!equals(value.lastModified, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.lastModified); if (!equals(value.primaryLanguageUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.primaryLanguageUid); if (!equals(value.languageVariantUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.languageVariantUid); if (!equals(value.contentFlags, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeIntElement_ptg7oe$(this.descriptor, 14, value.contentFlags); if (!equals(value.leaf, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 15, value.leaf); if (!equals(value.publik, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 16, value.publik); if (!equals(value.ceInactive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 17, value.ceInactive); if (!equals(value.completionCriteria, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeIntElement_ptg7oe$(this.descriptor, 18, value.completionCriteria); if (!equals(value.minScore, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeIntElement_ptg7oe$(this.descriptor, 19, value.minScore); if (!equals(value.contentTypeFlag, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeIntElement_ptg7oe$(this.descriptor, 20, value.contentTypeFlag); if (!equals(value.contentOwner, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.contentOwner); if (!equals(value.contentEntryLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeLongElement_j0o2mv$(this.descriptor, 22, value.contentEntryLocalChangeSeqNum); if (!equals(value.contentEntryMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeLongElement_j0o2mv$(this.descriptor, 23, value.contentEntryMasterChangeSeqNum); if (!equals(value.contentEntryLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeIntElement_ptg7oe$(this.descriptor, 24, value.contentEntryLastChangedBy); if (!equals(value.contentEntryLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeLongElement_j0o2mv$(this.descriptor, 25, value.contentEntryLct); if (!equals(value.mostRecentContainer, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 26)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 26, Container$$serializer_getInstance(), value.mostRecentContainer); if (!equals(value.contentEntryParentChildJoin, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 27)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 27, ContentEntryParentChildJoin$$serializer_getInstance(), value.contentEntryParentChildJoin); if (!equals(value.scoreProgress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 28)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 28, ContentEntryStatementScoreProgress$$serializer_getInstance(), value.scoreProgress); if (!equals(value.assignmentContentWeight, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 29)) output.encodeIntElement_ptg7oe$(this.descriptor, 29, value.assignmentContentWeight); output.endStructure_24f42q$(this.descriptor); }; ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, local28, local29; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 7, internal.StringSerializer, local7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, internal.StringSerializer, local8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeIntElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeBooleanElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeBooleanElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeBooleanElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeIntElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeIntElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeIntElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeLongElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeLongElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeIntElement_szpzho$(this.descriptor, 24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeLongElement_szpzho$(this.descriptor, 25); bitMask0 |= 33554432; break; case 26: local26 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 26, Container$$serializer_getInstance(), local26); bitMask0 |= 67108864; break; case 27: local27 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 27, ContentEntryParentChildJoin$$serializer_getInstance(), local27); bitMask0 |= 134217728; break; case 28: local28 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 28, ContentEntryStatementScoreProgress$$serializer_getInstance(), local28); bitMask0 |= 268435456; break; case 29: local29 = input.decodeIntElement_szpzho$(this.descriptor, 29); bitMask0 |= 536870912; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, local28, local29, null); }; ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(Container$$serializer_getInstance()), new NullableSerializer(ContentEntryParentChildJoin$$serializer_getInstance()), new NullableSerializer(ContentEntryStatementScoreProgress$$serializer_getInstance()), internal.IntSerializer]; }; ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer_instance = null; function ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer_getInstance() { if (ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer_instance === null) { new ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer(); } return ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer_instance; } function ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_init(seen1, contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct, mostRecentContainer, contentEntryParentChildJoin, scoreProgress, assignmentContentWeight, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer.prototype); $this = ContentEntry_init(seen1, contentEntryUid, title, description, entryId, author, publisher, licenseType, licenseName, licenseUrl, sourceUrl, thumbnailUrl, lastModified, primaryLanguageUid, languageVariantUid, contentFlags, leaf, publik, ceInactive, completionCriteria, minScore, contentTypeFlag, contentOwner, contentEntryLocalChangeSeqNum, contentEntryMasterChangeSeqNum, contentEntryLastChangedBy, contentEntryLct, $this); if ((seen1 & 67108864) === 0) $this.mostRecentContainer = null; else $this.mostRecentContainer = mostRecentContainer; if ((seen1 & 134217728) === 0) $this.contentEntryParentChildJoin = null; else $this.contentEntryParentChildJoin = contentEntryParentChildJoin; if ((seen1 & 268435456) === 0) $this.scoreProgress = null; else $this.scoreProgress = scoreProgress; if ((seen1 & 536870912) === 0) $this.assignmentContentWeight = 0; else $this.assignmentContentWeight = assignmentContentWeight; return $this; } ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer', interfaces: [ContentEntry]}; function ContentJob(cjUid, toUri, cjProgress, cjTotal, cjNotificationTitle, cjIsMeteredAllowed, params) { if (cjUid === void 0) cjUid = L0; if (toUri === void 0) toUri = null; if (cjProgress === void 0) cjProgress = L0; if (cjTotal === void 0) cjTotal = L0; if (cjNotificationTitle === void 0) cjNotificationTitle = null; if (cjIsMeteredAllowed === void 0) cjIsMeteredAllowed = false; if (params === void 0) params = null; this.cjUid = cjUid; this.toUri = toUri; this.cjProgress = cjProgress; this.cjTotal = cjTotal; this.cjNotificationTitle = cjNotificationTitle; this.cjIsMeteredAllowed = cjIsMeteredAllowed; this.params = params; } ContentJob.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentJob', interfaces: []}; ContentJob.prototype.component1 = function () { return this.cjUid; }; ContentJob.prototype.component2 = function () { return this.toUri; }; ContentJob.prototype.component3 = function () { return this.cjProgress; }; ContentJob.prototype.component4 = function () { return this.cjTotal; }; ContentJob.prototype.component5 = function () { return this.cjNotificationTitle; }; ContentJob.prototype.component6 = function () { return this.cjIsMeteredAllowed; }; ContentJob.prototype.component7 = function () { return this.params; }; ContentJob.prototype.copy_sfjiz9$ = function (cjUid, toUri, cjProgress, cjTotal, cjNotificationTitle, cjIsMeteredAllowed, params) { return new ContentJob(cjUid === void 0 ? this.cjUid : cjUid, toUri === void 0 ? this.toUri : toUri, cjProgress === void 0 ? this.cjProgress : cjProgress, cjTotal === void 0 ? this.cjTotal : cjTotal, cjNotificationTitle === void 0 ? this.cjNotificationTitle : cjNotificationTitle, cjIsMeteredAllowed === void 0 ? this.cjIsMeteredAllowed : cjIsMeteredAllowed, params === void 0 ? this.params : params); }; ContentJob.prototype.toString = function () { return 'ContentJob(cjUid=' + Kotlin.toString(this.cjUid) + (', toUri=' + Kotlin.toString(this.toUri)) + (', cjProgress=' + Kotlin.toString(this.cjProgress)) + (', cjTotal=' + Kotlin.toString(this.cjTotal)) + (', cjNotificationTitle=' + Kotlin.toString(this.cjNotificationTitle)) + (', cjIsMeteredAllowed=' + Kotlin.toString(this.cjIsMeteredAllowed)) + (', params=' + Kotlin.toString(this.params)) + ')'; }; ContentJob.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.cjUid) | 0; result = result * 31 + Kotlin.hashCode(this.toUri) | 0; result = result * 31 + Kotlin.hashCode(this.cjProgress) | 0; result = result * 31 + Kotlin.hashCode(this.cjTotal) | 0; result = result * 31 + Kotlin.hashCode(this.cjNotificationTitle) | 0; result = result * 31 + Kotlin.hashCode(this.cjIsMeteredAllowed) | 0; result = result * 31 + Kotlin.hashCode(this.params) | 0; return result; }; ContentJob.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.cjUid, other.cjUid) && Kotlin.equals(this.toUri, other.toUri) && Kotlin.equals(this.cjProgress, other.cjProgress) && Kotlin.equals(this.cjTotal, other.cjTotal) && Kotlin.equals(this.cjNotificationTitle, other.cjNotificationTitle) && Kotlin.equals(this.cjIsMeteredAllowed, other.cjIsMeteredAllowed) && Kotlin.equals(this.params, other.params))))); }; function ContentJobItem(cjiUid, cjiJobUid, sourceUri, cjiIsLeaf, cjiContentEntryUid, cjiParentContentEntryUid, cjiContainerUid, cjiItemProgress, cjiItemTotal, cjiRecursiveProgress, cjiRecursiveTotal, cjiStatus, cjiRecursiveStatus, cjiConnectivityNeeded, cjiPluginId, cjiAttemptCount, cjiParentCjiUid, cjiServerJobId, cjiStartTime, cjiFinishTime, cjiUploadSessionUid, cjiContentDeletedOnCancellation, cjiContainerProcessed) { if (cjiUid === void 0) cjiUid = L0; if (cjiJobUid === void 0) cjiJobUid = L0; if (sourceUri === void 0) sourceUri = null; if (cjiIsLeaf === void 0) cjiIsLeaf = true; if (cjiContentEntryUid === void 0) cjiContentEntryUid = L0; if (cjiParentContentEntryUid === void 0) cjiParentContentEntryUid = L0; if (cjiContainerUid === void 0) cjiContainerUid = L0; if (cjiItemProgress === void 0) cjiItemProgress = L0; if (cjiItemTotal === void 0) cjiItemTotal = L0; if (cjiRecursiveProgress === void 0) cjiRecursiveProgress = L0; if (cjiRecursiveTotal === void 0) cjiRecursiveTotal = L0; if (cjiStatus === void 0) cjiStatus = 4; if (cjiRecursiveStatus === void 0) cjiRecursiveStatus = 4; if (cjiConnectivityNeeded === void 0) cjiConnectivityNeeded = false; if (cjiPluginId === void 0) cjiPluginId = 0; if (cjiAttemptCount === void 0) cjiAttemptCount = 0; if (cjiParentCjiUid === void 0) cjiParentCjiUid = L0; if (cjiServerJobId === void 0) cjiServerJobId = L0; if (cjiStartTime === void 0) cjiStartTime = L0; if (cjiFinishTime === void 0) cjiFinishTime = L0; if (cjiUploadSessionUid === void 0) cjiUploadSessionUid = null; if (cjiContentDeletedOnCancellation === void 0) cjiContentDeletedOnCancellation = false; if (cjiContainerProcessed === void 0) cjiContainerProcessed = false; this.cjiUid = cjiUid; this.cjiJobUid = cjiJobUid; this.sourceUri = sourceUri; this.cjiIsLeaf = cjiIsLeaf; this.cjiContentEntryUid = cjiContentEntryUid; this.cjiParentContentEntryUid = cjiParentContentEntryUid; this.cjiContainerUid = cjiContainerUid; this.cjiItemProgress = cjiItemProgress; this.cjiItemTotal = cjiItemTotal; this.cjiRecursiveProgress = cjiRecursiveProgress; this.cjiRecursiveTotal = cjiRecursiveTotal; this.cjiStatus = cjiStatus; this.cjiRecursiveStatus = cjiRecursiveStatus; this.cjiConnectivityNeeded = cjiConnectivityNeeded; this.cjiPluginId = cjiPluginId; this.cjiAttemptCount = cjiAttemptCount; this.cjiParentCjiUid = cjiParentCjiUid; this.cjiServerJobId = cjiServerJobId; this.cjiStartTime = cjiStartTime; this.cjiFinishTime = cjiFinishTime; this.cjiUploadSessionUid = cjiUploadSessionUid; this.cjiContentDeletedOnCancellation = cjiContentDeletedOnCancellation; this.cjiContainerProcessed = cjiContainerProcessed; } ContentJobItem.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentJobItem', interfaces: []}; ContentJobItem.prototype.component1 = function () { return this.cjiUid; }; ContentJobItem.prototype.component2 = function () { return this.cjiJobUid; }; ContentJobItem.prototype.component3 = function () { return this.sourceUri; }; ContentJobItem.prototype.component4 = function () { return this.cjiIsLeaf; }; ContentJobItem.prototype.component5 = function () { return this.cjiContentEntryUid; }; ContentJobItem.prototype.component6 = function () { return this.cjiParentContentEntryUid; }; ContentJobItem.prototype.component7 = function () { return this.cjiContainerUid; }; ContentJobItem.prototype.component8 = function () { return this.cjiItemProgress; }; ContentJobItem.prototype.component9 = function () { return this.cjiItemTotal; }; ContentJobItem.prototype.component10 = function () { return this.cjiRecursiveProgress; }; ContentJobItem.prototype.component11 = function () { return this.cjiRecursiveTotal; }; ContentJobItem.prototype.component12 = function () { return this.cjiStatus; }; ContentJobItem.prototype.component13 = function () { return this.cjiRecursiveStatus; }; ContentJobItem.prototype.component14 = function () { return this.cjiConnectivityNeeded; }; ContentJobItem.prototype.component15 = function () { return this.cjiPluginId; }; ContentJobItem.prototype.component16 = function () { return this.cjiAttemptCount; }; ContentJobItem.prototype.component17 = function () { return this.cjiParentCjiUid; }; ContentJobItem.prototype.component18 = function () { return this.cjiServerJobId; }; ContentJobItem.prototype.component19 = function () { return this.cjiStartTime; }; ContentJobItem.prototype.component20 = function () { return this.cjiFinishTime; }; ContentJobItem.prototype.component21 = function () { return this.cjiUploadSessionUid; }; ContentJobItem.prototype.component22 = function () { return this.cjiContentDeletedOnCancellation; }; ContentJobItem.prototype.component23 = function () { return this.cjiContainerProcessed; }; ContentJobItem.prototype.copy_33jkg3$ = function (cjiUid, cjiJobUid, sourceUri, cjiIsLeaf, cjiContentEntryUid, cjiParentContentEntryUid, cjiContainerUid, cjiItemProgress, cjiItemTotal, cjiRecursiveProgress, cjiRecursiveTotal, cjiStatus, cjiRecursiveStatus, cjiConnectivityNeeded, cjiPluginId, cjiAttemptCount, cjiParentCjiUid, cjiServerJobId, cjiStartTime, cjiFinishTime, cjiUploadSessionUid, cjiContentDeletedOnCancellation, cjiContainerProcessed) { return new ContentJobItem(cjiUid === void 0 ? this.cjiUid : cjiUid, cjiJobUid === void 0 ? this.cjiJobUid : cjiJobUid, sourceUri === void 0 ? this.sourceUri : sourceUri, cjiIsLeaf === void 0 ? this.cjiIsLeaf : cjiIsLeaf, cjiContentEntryUid === void 0 ? this.cjiContentEntryUid : cjiContentEntryUid, cjiParentContentEntryUid === void 0 ? this.cjiParentContentEntryUid : cjiParentContentEntryUid, cjiContainerUid === void 0 ? this.cjiContainerUid : cjiContainerUid, cjiItemProgress === void 0 ? this.cjiItemProgress : cjiItemProgress, cjiItemTotal === void 0 ? this.cjiItemTotal : cjiItemTotal, cjiRecursiveProgress === void 0 ? this.cjiRecursiveProgress : cjiRecursiveProgress, cjiRecursiveTotal === void 0 ? this.cjiRecursiveTotal : cjiRecursiveTotal, cjiStatus === void 0 ? this.cjiStatus : cjiStatus, cjiRecursiveStatus === void 0 ? this.cjiRecursiveStatus : cjiRecursiveStatus, cjiConnectivityNeeded === void 0 ? this.cjiConnectivityNeeded : cjiConnectivityNeeded, cjiPluginId === void 0 ? this.cjiPluginId : cjiPluginId, cjiAttemptCount === void 0 ? this.cjiAttemptCount : cjiAttemptCount, cjiParentCjiUid === void 0 ? this.cjiParentCjiUid : cjiParentCjiUid, cjiServerJobId === void 0 ? this.cjiServerJobId : cjiServerJobId, cjiStartTime === void 0 ? this.cjiStartTime : cjiStartTime, cjiFinishTime === void 0 ? this.cjiFinishTime : cjiFinishTime, cjiUploadSessionUid === void 0 ? this.cjiUploadSessionUid : cjiUploadSessionUid, cjiContentDeletedOnCancellation === void 0 ? this.cjiContentDeletedOnCancellation : cjiContentDeletedOnCancellation, cjiContainerProcessed === void 0 ? this.cjiContainerProcessed : cjiContainerProcessed); }; ContentJobItem.prototype.toString = function () { return 'ContentJobItem(cjiUid=' + Kotlin.toString(this.cjiUid) + (', cjiJobUid=' + Kotlin.toString(this.cjiJobUid)) + (', sourceUri=' + Kotlin.toString(this.sourceUri)) + (', cjiIsLeaf=' + Kotlin.toString(this.cjiIsLeaf)) + (', cjiContentEntryUid=' + Kotlin.toString(this.cjiContentEntryUid)) + (', cjiParentContentEntryUid=' + Kotlin.toString(this.cjiParentContentEntryUid)) + (', cjiContainerUid=' + Kotlin.toString(this.cjiContainerUid)) + (', cjiItemProgress=' + Kotlin.toString(this.cjiItemProgress)) + (', cjiItemTotal=' + Kotlin.toString(this.cjiItemTotal)) + (', cjiRecursiveProgress=' + Kotlin.toString(this.cjiRecursiveProgress)) + (', cjiRecursiveTotal=' + Kotlin.toString(this.cjiRecursiveTotal)) + (', cjiStatus=' + Kotlin.toString(this.cjiStatus)) + (', cjiRecursiveStatus=' + Kotlin.toString(this.cjiRecursiveStatus)) + (', cjiConnectivityNeeded=' + Kotlin.toString(this.cjiConnectivityNeeded)) + (', cjiPluginId=' + Kotlin.toString(this.cjiPluginId)) + (', cjiAttemptCount=' + Kotlin.toString(this.cjiAttemptCount)) + (', cjiParentCjiUid=' + Kotlin.toString(this.cjiParentCjiUid)) + (', cjiServerJobId=' + Kotlin.toString(this.cjiServerJobId)) + (', cjiStartTime=' + Kotlin.toString(this.cjiStartTime)) + (', cjiFinishTime=' + Kotlin.toString(this.cjiFinishTime)) + (', cjiUploadSessionUid=' + Kotlin.toString(this.cjiUploadSessionUid)) + (', cjiContentDeletedOnCancellation=' + Kotlin.toString(this.cjiContentDeletedOnCancellation)) + (', cjiContainerProcessed=' + Kotlin.toString(this.cjiContainerProcessed)) + ')'; }; ContentJobItem.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.cjiUid) | 0; result = result * 31 + Kotlin.hashCode(this.cjiJobUid) | 0; result = result * 31 + Kotlin.hashCode(this.sourceUri) | 0; result = result * 31 + Kotlin.hashCode(this.cjiIsLeaf) | 0; result = result * 31 + Kotlin.hashCode(this.cjiContentEntryUid) | 0; result = result * 31 + Kotlin.hashCode(this.cjiParentContentEntryUid) | 0; result = result * 31 + Kotlin.hashCode(this.cjiContainerUid) | 0; result = result * 31 + Kotlin.hashCode(this.cjiItemProgress) | 0; result = result * 31 + Kotlin.hashCode(this.cjiItemTotal) | 0; result = result * 31 + Kotlin.hashCode(this.cjiRecursiveProgress) | 0; result = result * 31 + Kotlin.hashCode(this.cjiRecursiveTotal) | 0; result = result * 31 + Kotlin.hashCode(this.cjiStatus) | 0; result = result * 31 + Kotlin.hashCode(this.cjiRecursiveStatus) | 0; result = result * 31 + Kotlin.hashCode(this.cjiConnectivityNeeded) | 0; result = result * 31 + Kotlin.hashCode(this.cjiPluginId) | 0; result = result * 31 + Kotlin.hashCode(this.cjiAttemptCount) | 0; result = result * 31 + Kotlin.hashCode(this.cjiParentCjiUid) | 0; result = result * 31 + Kotlin.hashCode(this.cjiServerJobId) | 0; result = result * 31 + Kotlin.hashCode(this.cjiStartTime) | 0; result = result * 31 + Kotlin.hashCode(this.cjiFinishTime) | 0; result = result * 31 + Kotlin.hashCode(this.cjiUploadSessionUid) | 0; result = result * 31 + Kotlin.hashCode(this.cjiContentDeletedOnCancellation) | 0; result = result * 31 + Kotlin.hashCode(this.cjiContainerProcessed) | 0; return result; }; ContentJobItem.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.cjiUid, other.cjiUid) && Kotlin.equals(this.cjiJobUid, other.cjiJobUid) && Kotlin.equals(this.sourceUri, other.sourceUri) && Kotlin.equals(this.cjiIsLeaf, other.cjiIsLeaf) && Kotlin.equals(this.cjiContentEntryUid, other.cjiContentEntryUid) && Kotlin.equals(this.cjiParentContentEntryUid, other.cjiParentContentEntryUid) && Kotlin.equals(this.cjiContainerUid, other.cjiContainerUid) && Kotlin.equals(this.cjiItemProgress, other.cjiItemProgress) && Kotlin.equals(this.cjiItemTotal, other.cjiItemTotal) && Kotlin.equals(this.cjiRecursiveProgress, other.cjiRecursiveProgress) && Kotlin.equals(this.cjiRecursiveTotal, other.cjiRecursiveTotal) && Kotlin.equals(this.cjiStatus, other.cjiStatus) && Kotlin.equals(this.cjiRecursiveStatus, other.cjiRecursiveStatus) && Kotlin.equals(this.cjiConnectivityNeeded, other.cjiConnectivityNeeded) && Kotlin.equals(this.cjiPluginId, other.cjiPluginId) && Kotlin.equals(this.cjiAttemptCount, other.cjiAttemptCount) && Kotlin.equals(this.cjiParentCjiUid, other.cjiParentCjiUid) && Kotlin.equals(this.cjiServerJobId, other.cjiServerJobId) && Kotlin.equals(this.cjiStartTime, other.cjiStartTime) && Kotlin.equals(this.cjiFinishTime, other.cjiFinishTime) && Kotlin.equals(this.cjiUploadSessionUid, other.cjiUploadSessionUid) && Kotlin.equals(this.cjiContentDeletedOnCancellation, other.cjiContentDeletedOnCancellation) && Kotlin.equals(this.cjiContainerProcessed, other.cjiContainerProcessed))))); }; function ContentJobItemAndContentJob() { this.contentJobItem = null; this.contentJob = null; } ContentJobItemAndContentJob.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentJobItemAndContentJob', interfaces: []}; function ContentJobItemProgress() { this.progress = 0; this.total = 0; this.progressTitle = null; this.cjiUid = L0; } ContentJobItemProgress.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentJobItemProgress', interfaces: []}; function ContentJobItemProgressAndStatus(status, progress, total) { if (status === void 0) status = 0; if (progress === void 0) progress = L0; if (total === void 0) total = L0; this.status = status; this.progress = progress; this.total = total; } ContentJobItemProgressAndStatus.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContentJobItemProgressAndStatus', interfaces: []}; ContentJobItemProgressAndStatus.prototype.component1 = function () { return this.status; }; ContentJobItemProgressAndStatus.prototype.component2 = function () { return this.progress; }; ContentJobItemProgressAndStatus.prototype.component3 = function () { return this.total; }; ContentJobItemProgressAndStatus.prototype.copy_h639zw$ = function (status, progress, total) { return new ContentJobItemProgressAndStatus(status === void 0 ? this.status : status, progress === void 0 ? this.progress : progress, total === void 0 ? this.total : total); }; ContentJobItemProgressAndStatus.prototype.toString = function () { return 'ContentJobItemProgressAndStatus(status=' + Kotlin.toString(this.status) + (', progress=' + Kotlin.toString(this.progress)) + (', total=' + Kotlin.toString(this.total)) + ')'; }; ContentJobItemProgressAndStatus.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.status) | 0; result = result * 31 + Kotlin.hashCode(this.progress) | 0; result = result * 31 + Kotlin.hashCode(this.total) | 0; return result; }; ContentJobItemProgressAndStatus.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.status, other.status) && Kotlin.equals(this.progress, other.progress) && Kotlin.equals(this.total, other.total))))); }; var ContentWithAttemptSummary$Companion_instance = null; function ContentWithAttemptSummary$$serializer() { this.descriptor_4jnctl$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContentWithAttemptSummary', this, 8); this.descriptor.addElement_ivxn3r$('contentEntryUid', true); this.descriptor.addElement_ivxn3r$('contentEntryTitle', true); this.descriptor.addElement_ivxn3r$('contentEntryThumbnailUrl', true); this.descriptor.addElement_ivxn3r$('attempts', true); this.descriptor.addElement_ivxn3r$('startDate', true); this.descriptor.addElement_ivxn3r$('endDate', true); this.descriptor.addElement_ivxn3r$('duration', true); this.descriptor.addElement_ivxn3r$('scoreProgress', true); ContentWithAttemptSummary$$serializer_instance = this; } var ContentWithAttemptSummary$$serializer_instance = null; function ContextXObjectStatementJoin() { ContextXObjectStatementJoin$Companion_getInstance(); this.contextXObjectStatementJoinUid = L0; this.contextActivityFlag = 0; this.contextStatementUid = L0; this.contextXObjectUid = L0; this.verbMasterChangeSeqNum = L0; this.verbLocalChangeSeqNum = L0; this.verbLastChangedBy = 0; this.contextXObjectLct = L0; } function ContextXObjectStatementJoin$Companion() { ContextXObjectStatementJoin$Companion_instance = this; this.TABLE_ID = 66; } ContextXObjectStatementJoin$Companion.prototype.serializer = function () { return ContextXObjectStatementJoin$$serializer_getInstance(); }; ContextXObjectStatementJoin$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContextXObjectStatementJoin$Companion_instance = null; function ContextXObjectStatementJoin$Companion_getInstance() { if (ContextXObjectStatementJoin$Companion_instance === null) { new ContextXObjectStatementJoin$Companion(); } return ContextXObjectStatementJoin$Companion_instance; } function ContextXObjectStatementJoin$$serializer() { this.descriptor_aws6b4$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContextXObjectStatementJoin', this, 8); this.descriptor.addElement_ivxn3r$('contextXObjectStatementJoinUid', true); this.descriptor.addElement_ivxn3r$('contextActivityFlag', true); this.descriptor.addElement_ivxn3r$('contextStatementUid', true); this.descriptor.addElement_ivxn3r$('contextXObjectUid', true); this.descriptor.addElement_ivxn3r$('verbMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('verbLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('verbLastChangedBy', true); this.descriptor.addElement_ivxn3r$('contextXObjectLct', true); ContextXObjectStatementJoin$$serializer_instance = this; } Object.defineProperty(ContextXObjectStatementJoin$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_aws6b4$_0; }}); ContextXObjectStatementJoin$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.contextXObjectStatementJoinUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.contextXObjectStatementJoinUid); if (!equals(value.contextActivityFlag, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeIntElement_ptg7oe$(this.descriptor, 1, value.contextActivityFlag); if (!equals(value.contextStatementUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.contextStatementUid); if (!equals(value.contextXObjectUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.contextXObjectUid); if (!equals(value.verbMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.verbMasterChangeSeqNum); if (!equals(value.verbLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.verbLocalChangeSeqNum); if (!equals(value.verbLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.verbLastChangedBy); if (!equals(value.contextXObjectLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.contextXObjectLct); output.endStructure_24f42q$(this.descriptor); }; ContextXObjectStatementJoin$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeIntElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ContextXObjectStatementJoin_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; ContextXObjectStatementJoin$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; ContextXObjectStatementJoin$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ContextXObjectStatementJoin$$serializer_instance = null; function ContextXObjectStatementJoin$$serializer_getInstance() { if (ContextXObjectStatementJoin$$serializer_instance === null) { new ContextXObjectStatementJoin$$serializer(); } return ContextXObjectStatementJoin$$serializer_instance; } function ContextXObjectStatementJoin_init(seen1, contextXObjectStatementJoinUid, contextActivityFlag, contextStatementUid, contextXObjectUid, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, contextXObjectLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ContextXObjectStatementJoin.prototype); if ((seen1 & 1) === 0) $this.contextXObjectStatementJoinUid = L0; else $this.contextXObjectStatementJoinUid = contextXObjectStatementJoinUid; if ((seen1 & 2) === 0) $this.contextActivityFlag = 0; else $this.contextActivityFlag = contextActivityFlag; if ((seen1 & 4) === 0) $this.contextStatementUid = L0; else $this.contextStatementUid = contextStatementUid; if ((seen1 & 8) === 0) $this.contextXObjectUid = L0; else $this.contextXObjectUid = contextXObjectUid; if ((seen1 & 16) === 0) $this.verbMasterChangeSeqNum = L0; else $this.verbMasterChangeSeqNum = verbMasterChangeSeqNum; if ((seen1 & 32) === 0) $this.verbLocalChangeSeqNum = L0; else $this.verbLocalChangeSeqNum = verbLocalChangeSeqNum; if ((seen1 & 64) === 0) $this.verbLastChangedBy = 0; else $this.verbLastChangedBy = verbLastChangedBy; if ((seen1 & 128) === 0) $this.contextXObjectLct = L0; else $this.contextXObjectLct = contextXObjectLct; return $this; } ContextXObjectStatementJoin.$metadata$ = {kind: Kind_CLASS, simpleName: 'ContextXObjectStatementJoin', interfaces: []}; var ContextXObjectStatementJoinReplicate$Companion_instance = null; function ContextXObjectStatementJoinReplicate$$serializer() { this.descriptor_7r9oxp$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ContextXObjectStatementJoinReplicate', this, 4); this.descriptor.addElement_ivxn3r$('cxosjPk', true); this.descriptor.addElement_ivxn3r$('cxosjVersionId', true); this.descriptor.addElement_ivxn3r$('cxosjDestination', true); this.descriptor.addElement_ivxn3r$('cxosjPending', true); ContextXObjectStatementJoinReplicate$$serializer_instance = this; } var ContextXObjectStatementJoinReplicate$$serializer_instance = null; function CourseAssignmentMark() { CourseAssignmentMark$Companion_getInstance(); this.camUid = L0; this.camAssignmentUid = L0; this.camSubmitterUid = L0; this.camMark = 0.0; this.camPenalty = 0; this.camLct = L0; } function CourseAssignmentMark$Companion() { CourseAssignmentMark$Companion_instance = this; this.TABLE_ID = 523; } CourseAssignmentMark$Companion.prototype.serializer = function () { return CourseAssignmentMark$$serializer_getInstance(); }; CourseAssignmentMark$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CourseAssignmentMark$Companion_instance = null; function CourseAssignmentMark$Companion_getInstance() { if (CourseAssignmentMark$Companion_instance === null) { new CourseAssignmentMark$Companion(); } return CourseAssignmentMark$Companion_instance; } function CourseAssignmentMark$$serializer() { this.descriptor_izkakg$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CourseAssignmentMark', this, 6); this.descriptor.addElement_ivxn3r$('camUid', true); this.descriptor.addElement_ivxn3r$('camAssignmentUid', true); this.descriptor.addElement_ivxn3r$('camSubmitterUid', true); this.descriptor.addElement_ivxn3r$('camMark', true); this.descriptor.addElement_ivxn3r$('camPenalty', true); this.descriptor.addElement_ivxn3r$('camLct', true); CourseAssignmentMark$$serializer_instance = this; } Object.defineProperty(CourseAssignmentMark$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_izkakg$_0; }}); CourseAssignmentMark$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.camUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.camUid); if (!equals(value.camAssignmentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.camAssignmentUid); if (!equals(value.camSubmitterUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.camSubmitterUid); if (!equals(value.camMark, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeFloatElement_lf6hpt$(this.descriptor, 3, value.camMark); if (!equals(value.camPenalty, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeIntElement_ptg7oe$(this.descriptor, 4, value.camPenalty); if (!equals(value.camLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.camLct); output.endStructure_24f42q$(this.descriptor); }; CourseAssignmentMark$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeFloatElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeIntElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CourseAssignmentMark_init(bitMask0, local0, local1, local2, local3, local4, local5, null); }; CourseAssignmentMark$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.FloatSerializer, internal.IntSerializer, internal.LongSerializer]; }; CourseAssignmentMark$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CourseAssignmentMark$$serializer_instance = null; function CourseAssignmentMark$$serializer_getInstance() { if (CourseAssignmentMark$$serializer_instance === null) { new CourseAssignmentMark$$serializer(); } return CourseAssignmentMark$$serializer_instance; } function CourseAssignmentMark_init(seen1, camUid, camAssignmentUid, camSubmitterUid, camMark, camPenalty, camLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CourseAssignmentMark.prototype); if ((seen1 & 1) === 0) $this.camUid = L0; else $this.camUid = camUid; if ((seen1 & 2) === 0) $this.camAssignmentUid = L0; else $this.camAssignmentUid = camAssignmentUid; if ((seen1 & 4) === 0) $this.camSubmitterUid = L0; else $this.camSubmitterUid = camSubmitterUid; if ((seen1 & 8) === 0) $this.camMark = 0.0; else $this.camMark = camMark; if ((seen1 & 16) === 0) $this.camPenalty = 0; else $this.camPenalty = camPenalty; if ((seen1 & 32) === 0) $this.camLct = L0; else $this.camLct = camLct; return $this; } CourseAssignmentMark.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentMark', interfaces: []}; function CourseAssignmentSubmission() { CourseAssignmentSubmission$Companion_getInstance(); this.casUid = L0; this.casAssignmentUid = L0; this.casSubmitterUid = L0; this.casSubmitterPersonUid = L0; this.casText = null; this.casType = 0; this.casTimestamp = L0; } function CourseAssignmentSubmission$Companion() { CourseAssignmentSubmission$Companion_instance = this; this.TABLE_ID = 522; this.SUBMISSION_TYPE_TEXT = 1; this.SUBMISSION_TYPE_FILE = 2; this.NOT_SUBMITTED = 0; this.SUBMITTED = 1; this.MARKED = 2; } CourseAssignmentSubmission$Companion.prototype.serializer = function () { return CourseAssignmentSubmission$$serializer_getInstance(); }; CourseAssignmentSubmission$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CourseAssignmentSubmission$Companion_instance = null; function CourseAssignmentSubmission$Companion_getInstance() { if (CourseAssignmentSubmission$Companion_instance === null) { new CourseAssignmentSubmission$Companion(); } return CourseAssignmentSubmission$Companion_instance; } function CourseAssignmentSubmission$$serializer() { this.descriptor_9n8jgf$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CourseAssignmentSubmission', this, 7); this.descriptor.addElement_ivxn3r$('casUid', true); this.descriptor.addElement_ivxn3r$('casAssignmentUid', true); this.descriptor.addElement_ivxn3r$('casSubmitterUid', true); this.descriptor.addElement_ivxn3r$('casSubmitterPersonUid', true); this.descriptor.addElement_ivxn3r$('casText', true); this.descriptor.addElement_ivxn3r$('casType', true); this.descriptor.addElement_ivxn3r$('casTimestamp', true); CourseAssignmentSubmission$$serializer_instance = this; } Object.defineProperty(CourseAssignmentSubmission$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_9n8jgf$_0; }}); CourseAssignmentSubmission$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.casUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.casUid); if (!equals(value.casAssignmentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.casAssignmentUid); if (!equals(value.casSubmitterUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.casSubmitterUid); if (!equals(value.casSubmitterPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.casSubmitterPersonUid); if (!equals(value.casText, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.casText); if (!equals(value.casType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.casType); if (!equals(value.casTimestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.casTimestamp); output.endStructure_24f42q$(this.descriptor); }; CourseAssignmentSubmission$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CourseAssignmentSubmission_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, null); }; CourseAssignmentSubmission$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer]; }; CourseAssignmentSubmission$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CourseAssignmentSubmission$$serializer_instance = null; function CourseAssignmentSubmission$$serializer_getInstance() { if (CourseAssignmentSubmission$$serializer_instance === null) { new CourseAssignmentSubmission$$serializer(); } return CourseAssignmentSubmission$$serializer_instance; } function CourseAssignmentSubmission_init(seen1, casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CourseAssignmentSubmission.prototype); if ((seen1 & 1) === 0) $this.casUid = L0; else $this.casUid = casUid; if ((seen1 & 2) === 0) $this.casAssignmentUid = L0; else $this.casAssignmentUid = casAssignmentUid; if ((seen1 & 4) === 0) $this.casSubmitterUid = L0; else $this.casSubmitterUid = casSubmitterUid; if ((seen1 & 8) === 0) $this.casSubmitterPersonUid = L0; else $this.casSubmitterPersonUid = casSubmitterPersonUid; if ((seen1 & 16) === 0) $this.casText = null; else $this.casText = casText; if ((seen1 & 32) === 0) $this.casType = 0; else $this.casType = casType; if ((seen1 & 64) === 0) $this.casTimestamp = L0; else $this.casTimestamp = casTimestamp; return $this; } CourseAssignmentSubmission.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmission', interfaces: []}; function CourseAssignmentSubmissionAttachment() { CourseAssignmentSubmissionAttachment$Companion_getInstance(); this.casaUid = L0; this.casaSubmissionUid = L0; this.casaMimeType = null; this.casaFileName = null; this.casaUri = null; this.casaMd5 = null; this.casaSize = 0; this.casaTimestamp = L0; } function CourseAssignmentSubmissionAttachment$Companion() { CourseAssignmentSubmissionAttachment$Companion_instance = this; this.TABLE_ID = 90; } CourseAssignmentSubmissionAttachment$Companion.prototype.serializer = function () { return CourseAssignmentSubmissionAttachment$$serializer_getInstance(); }; CourseAssignmentSubmissionAttachment$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CourseAssignmentSubmissionAttachment$Companion_instance = null; function CourseAssignmentSubmissionAttachment$Companion_getInstance() { if (CourseAssignmentSubmissionAttachment$Companion_instance === null) { new CourseAssignmentSubmissionAttachment$Companion(); } return CourseAssignmentSubmissionAttachment$Companion_instance; } function CourseAssignmentSubmissionAttachment$$serializer() { this.descriptor_ymu27y$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CourseAssignmentSubmissionAttachment', this, 8); this.descriptor.addElement_ivxn3r$('casaUid', true); this.descriptor.addElement_ivxn3r$('casaSubmissionUid', true); this.descriptor.addElement_ivxn3r$('casaMimeType', true); this.descriptor.addElement_ivxn3r$('casaFileName', true); this.descriptor.addElement_ivxn3r$('casaUri', true); this.descriptor.addElement_ivxn3r$('casaMd5', true); this.descriptor.addElement_ivxn3r$('casaSize', true); this.descriptor.addElement_ivxn3r$('casaTimestamp', true); CourseAssignmentSubmissionAttachment$$serializer_instance = this; } Object.defineProperty(CourseAssignmentSubmissionAttachment$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ymu27y$_0; }}); CourseAssignmentSubmissionAttachment$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.casaUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.casaUid); if (!equals(value.casaSubmissionUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.casaSubmissionUid); if (!equals(value.casaMimeType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.casaMimeType); if (!equals(value.casaFileName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.casaFileName); if (!equals(value.casaUri, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.casaUri); if (!equals(value.casaMd5, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.casaMd5); if (!equals(value.casaSize, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.casaSize); if (!equals(value.casaTimestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.casaTimestamp); output.endStructure_24f42q$(this.descriptor); }; CourseAssignmentSubmissionAttachment$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CourseAssignmentSubmissionAttachment_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; CourseAssignmentSubmissionAttachment$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer]; }; CourseAssignmentSubmissionAttachment$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CourseAssignmentSubmissionAttachment$$serializer_instance = null; function CourseAssignmentSubmissionAttachment$$serializer_getInstance() { if (CourseAssignmentSubmissionAttachment$$serializer_instance === null) { new CourseAssignmentSubmissionAttachment$$serializer(); } return CourseAssignmentSubmissionAttachment$$serializer_instance; } function CourseAssignmentSubmissionAttachment_init(seen1, casaUid, casaSubmissionUid, casaMimeType, casaFileName, casaUri, casaMd5, casaSize, casaTimestamp, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CourseAssignmentSubmissionAttachment.prototype); if ((seen1 & 1) === 0) $this.casaUid = L0; else $this.casaUid = casaUid; if ((seen1 & 2) === 0) $this.casaSubmissionUid = L0; else $this.casaSubmissionUid = casaSubmissionUid; if ((seen1 & 4) === 0) $this.casaMimeType = null; else $this.casaMimeType = casaMimeType; if ((seen1 & 8) === 0) $this.casaFileName = null; else $this.casaFileName = casaFileName; if ((seen1 & 16) === 0) $this.casaUri = null; else $this.casaUri = casaUri; if ((seen1 & 32) === 0) $this.casaMd5 = null; else $this.casaMd5 = casaMd5; if ((seen1 & 64) === 0) $this.casaSize = 0; else $this.casaSize = casaSize; if ((seen1 & 128) === 0) $this.casaTimestamp = L0; else $this.casaTimestamp = casaTimestamp; return $this; } CourseAssignmentSubmissionAttachment.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionAttachment', interfaces: []}; function CourseAssignmentSubmissionWithAttachment() { CourseAssignmentSubmissionWithAttachment$Companion_getInstance(); CourseAssignmentSubmission.call(this); this.attachment = null; } function CourseAssignmentSubmissionWithAttachment$Companion() { CourseAssignmentSubmissionWithAttachment$Companion_instance = this; } CourseAssignmentSubmissionWithAttachment$Companion.prototype.serializer = function () { return CourseAssignmentSubmissionWithAttachment$$serializer_getInstance(); }; CourseAssignmentSubmissionWithAttachment$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CourseAssignmentSubmissionWithAttachment$Companion_instance = null; function CourseAssignmentSubmissionWithAttachment$Companion_getInstance() { if (CourseAssignmentSubmissionWithAttachment$Companion_instance === null) { new CourseAssignmentSubmissionWithAttachment$Companion(); } return CourseAssignmentSubmissionWithAttachment$Companion_instance; } function CourseAssignmentSubmissionWithAttachment$$serializer() { this.descriptor_kkknu0$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CourseAssignmentSubmissionWithAttachment', this, 8); this.descriptor.addElement_ivxn3r$('casUid', true); this.descriptor.addElement_ivxn3r$('casAssignmentUid', true); this.descriptor.addElement_ivxn3r$('casSubmitterUid', true); this.descriptor.addElement_ivxn3r$('casSubmitterPersonUid', true); this.descriptor.addElement_ivxn3r$('casText', true); this.descriptor.addElement_ivxn3r$('casType', true); this.descriptor.addElement_ivxn3r$('casTimestamp', true); this.descriptor.addElement_ivxn3r$('attachment', true); CourseAssignmentSubmissionWithAttachment$$serializer_instance = this; } Object.defineProperty(CourseAssignmentSubmissionWithAttachment$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_kkknu0$_0; }}); CourseAssignmentSubmissionWithAttachment$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.casUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.casUid); if (!equals(value.casAssignmentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.casAssignmentUid); if (!equals(value.casSubmitterUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.casSubmitterUid); if (!equals(value.casSubmitterPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.casSubmitterPersonUid); if (!equals(value.casText, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.casText); if (!equals(value.casType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.casType); if (!equals(value.casTimestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.casTimestamp); if (!equals(value.attachment, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 7, CourseAssignmentSubmissionAttachment$$serializer_getInstance(), value.attachment); output.endStructure_24f42q$(this.descriptor); }; CourseAssignmentSubmissionWithAttachment$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 7, CourseAssignmentSubmissionAttachment$$serializer_getInstance(), local7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CourseAssignmentSubmissionWithAttachment_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; CourseAssignmentSubmissionWithAttachment$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, new NullableSerializer(CourseAssignmentSubmissionAttachment$$serializer_getInstance())]; }; CourseAssignmentSubmissionWithAttachment$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CourseAssignmentSubmissionWithAttachment$$serializer_instance = null; function CourseAssignmentSubmissionWithAttachment$$serializer_getInstance() { if (CourseAssignmentSubmissionWithAttachment$$serializer_instance === null) { new CourseAssignmentSubmissionWithAttachment$$serializer(); } return CourseAssignmentSubmissionWithAttachment$$serializer_instance; } function CourseAssignmentSubmissionWithAttachment_init(seen1, casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp, attachment, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CourseAssignmentSubmissionWithAttachment.prototype); $this = CourseAssignmentSubmission_init(seen1, casUid, casAssignmentUid, casSubmitterUid, casSubmitterPersonUid, casText, casType, casTimestamp, $this); if ((seen1 & 128) === 0) $this.attachment = null; else $this.attachment = attachment; return $this; } CourseAssignmentSubmissionWithAttachment.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseAssignmentSubmissionWithAttachment', interfaces: [CourseAssignmentSubmission]}; function CourseBlock() { CourseBlock$Companion_getInstance(); this.cbUid = L0; this.cbType = 0; this.cbIndentLevel = 0; this.cbModuleParentBlockUid = L0; this.cbTitle = null; this.cbDescription = null; this.cbCompletionCriteria = 0; this.cbHideUntilDate = L0; this.cbDeadlineDate = Long$Companion$MAX_VALUE; this.cbLateSubmissionPenalty = 0; this.cbGracePeriodDate = Long$Companion$MAX_VALUE; this.cbMaxPoints = 10; this.cbMinPoints = 0; this.cbIndex = 0; this.cbClazzUid = L0; this.cbActive = true; this.cbHidden = false; this.cbEntityUid = L0; this.cbLct = L0; } CourseBlock.prototype.equals = function (other) { if (this === other) return true; if (!Kotlin.isType(other, CourseBlock)) return false; if (!equals(this.cbUid, other.cbUid)) return false; if (this.cbType !== other.cbType) return false; if (this.cbIndentLevel !== other.cbIndentLevel) return false; if (!equals(this.cbModuleParentBlockUid, other.cbModuleParentBlockUid)) return false; if (!equals(this.cbTitle, other.cbTitle)) return false; if (!equals(this.cbDescription, other.cbDescription)) return false; if (this.cbCompletionCriteria !== other.cbCompletionCriteria) return false; if (!equals(this.cbHideUntilDate, other.cbHideUntilDate)) return false; if (!equals(this.cbDeadlineDate, other.cbDeadlineDate)) return false; if (this.cbLateSubmissionPenalty !== other.cbLateSubmissionPenalty) return false; if (!equals(this.cbGracePeriodDate, other.cbGracePeriodDate)) return false; if (this.cbMaxPoints !== other.cbMaxPoints) return false; if (this.cbMinPoints !== other.cbMinPoints) return false; if (this.cbIndex !== other.cbIndex) return false; if (!equals(this.cbClazzUid, other.cbClazzUid)) return false; if (this.cbActive !== other.cbActive) return false; if (this.cbHidden !== other.cbHidden) return false; if (!equals(this.cbEntityUid, other.cbEntityUid)) return false; if (!equals(this.cbLct, other.cbLct)) return false; return true; }; CourseBlock.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2; var result = hashCode(this.cbUid); result = (31 * result | 0) + this.cbType | 0; result = (31 * result | 0) + this.cbIndentLevel | 0; result = (31 * result | 0) + hashCode(this.cbModuleParentBlockUid) | 0; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.cbTitle) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.cbDescription) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + this.cbCompletionCriteria | 0; result = (31 * result | 0) + hashCode(this.cbHideUntilDate) | 0; result = (31 * result | 0) + hashCode(this.cbDeadlineDate) | 0; result = (31 * result | 0) + this.cbLateSubmissionPenalty | 0; result = (31 * result | 0) + hashCode(this.cbGracePeriodDate) | 0; result = (31 * result | 0) + this.cbMaxPoints | 0; result = (31 * result | 0) + this.cbMinPoints | 0; result = (31 * result | 0) + this.cbIndex | 0; result = (31 * result | 0) + hashCode(this.cbClazzUid) | 0; result = (31 * result | 0) + hashCode(this.cbActive) | 0; result = (31 * result | 0) + hashCode(this.cbHidden) | 0; result = (31 * result | 0) + hashCode(this.cbEntityUid) | 0; result = (31 * result | 0) + hashCode(this.cbLct) | 0; return result; }; function CourseBlock$Companion() { CourseBlock$Companion_instance = this; this.TABLE_ID = 124; this.BLOCK_MODULE_TYPE = 100; this.BLOCK_TEXT_TYPE = 102; this.BLOCK_ASSIGNMENT_TYPE = 103; this.BLOCK_CONTENT_TYPE = 104; this.BLOCK_DISCUSSION_TYPE = 105; } CourseBlock$Companion.prototype.serializer = function () { return CourseBlock$$serializer_getInstance(); }; CourseBlock$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CourseBlock$Companion_instance = null; function CourseBlock$Companion_getInstance() { if (CourseBlock$Companion_instance === null) { new CourseBlock$Companion(); } return CourseBlock$Companion_instance; } function CourseBlock$$serializer() { this.descriptor_g015fz$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CourseBlock', this, 19); this.descriptor.addElement_ivxn3r$('cbUid', true); this.descriptor.addElement_ivxn3r$('cbType', true); this.descriptor.addElement_ivxn3r$('cbIndentLevel', true); this.descriptor.addElement_ivxn3r$('cbModuleParentBlockUid', true); this.descriptor.addElement_ivxn3r$('cbTitle', true); this.descriptor.addElement_ivxn3r$('cbDescription', true); this.descriptor.addElement_ivxn3r$('cbCompletionCriteria', true); this.descriptor.addElement_ivxn3r$('cbHideUntilDate', true); this.descriptor.addElement_ivxn3r$('cbDeadlineDate', true); this.descriptor.addElement_ivxn3r$('cbLateSubmissionPenalty', true); this.descriptor.addElement_ivxn3r$('cbGracePeriodDate', true); this.descriptor.addElement_ivxn3r$('cbMaxPoints', true); this.descriptor.addElement_ivxn3r$('cbMinPoints', true); this.descriptor.addElement_ivxn3r$('cbIndex', true); this.descriptor.addElement_ivxn3r$('cbClazzUid', true); this.descriptor.addElement_ivxn3r$('cbActive', true); this.descriptor.addElement_ivxn3r$('cbHidden', true); this.descriptor.addElement_ivxn3r$('cbEntityUid', true); this.descriptor.addElement_ivxn3r$('cbLct', true); CourseBlock$$serializer_instance = this; } Object.defineProperty(CourseBlock$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_g015fz$_0; }}); CourseBlock$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.cbUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.cbUid); if (!equals(value.cbType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeIntElement_ptg7oe$(this.descriptor, 1, value.cbType); if (!equals(value.cbIndentLevel, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.cbIndentLevel); if (!equals(value.cbModuleParentBlockUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.cbModuleParentBlockUid); if (!equals(value.cbTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.cbTitle); if (!equals(value.cbDescription, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.cbDescription); if (!equals(value.cbCompletionCriteria, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.cbCompletionCriteria); if (!equals(value.cbHideUntilDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.cbHideUntilDate); if (!equals(value.cbDeadlineDate, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.cbDeadlineDate); if (!equals(value.cbLateSubmissionPenalty, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.cbLateSubmissionPenalty); if (!equals(value.cbGracePeriodDate, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.cbGracePeriodDate); if (!equals(value.cbMaxPoints, 10) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.cbMaxPoints); if (!equals(value.cbMinPoints, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.cbMinPoints); if (!equals(value.cbIndex, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeIntElement_ptg7oe$(this.descriptor, 13, value.cbIndex); if (!equals(value.cbClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.cbClazzUid); if (!equals(value.cbActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 15, value.cbActive); if (!equals(value.cbHidden, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 16, value.cbHidden); if (!equals(value.cbEntityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.cbEntityUid); if (!equals(value.cbLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.cbLct); output.endStructure_24f42q$(this.descriptor); }; CourseBlock$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeIntElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeIntElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeBooleanElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeBooleanElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CourseBlock_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, null); }; CourseBlock$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer]; }; CourseBlock$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CourseBlock$$serializer_instance = null; function CourseBlock$$serializer_getInstance() { if (CourseBlock$$serializer_instance === null) { new CourseBlock$$serializer(); } return CourseBlock$$serializer_instance; } function CourseBlock_init(seen1, cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints, cbMinPoints, cbIndex, cbClazzUid, cbActive, cbHidden, cbEntityUid, cbLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CourseBlock.prototype); if ((seen1 & 1) === 0) $this.cbUid = L0; else $this.cbUid = cbUid; if ((seen1 & 2) === 0) $this.cbType = 0; else $this.cbType = cbType; if ((seen1 & 4) === 0) $this.cbIndentLevel = 0; else $this.cbIndentLevel = cbIndentLevel; if ((seen1 & 8) === 0) $this.cbModuleParentBlockUid = L0; else $this.cbModuleParentBlockUid = cbModuleParentBlockUid; if ((seen1 & 16) === 0) $this.cbTitle = null; else $this.cbTitle = cbTitle; if ((seen1 & 32) === 0) $this.cbDescription = null; else $this.cbDescription = cbDescription; if ((seen1 & 64) === 0) $this.cbCompletionCriteria = 0; else $this.cbCompletionCriteria = cbCompletionCriteria; if ((seen1 & 128) === 0) $this.cbHideUntilDate = L0; else $this.cbHideUntilDate = cbHideUntilDate; if ((seen1 & 256) === 0) $this.cbDeadlineDate = Long$Companion$MAX_VALUE; else $this.cbDeadlineDate = cbDeadlineDate; if ((seen1 & 512) === 0) $this.cbLateSubmissionPenalty = 0; else $this.cbLateSubmissionPenalty = cbLateSubmissionPenalty; if ((seen1 & 1024) === 0) $this.cbGracePeriodDate = Long$Companion$MAX_VALUE; else $this.cbGracePeriodDate = cbGracePeriodDate; if ((seen1 & 2048) === 0) $this.cbMaxPoints = 10; else $this.cbMaxPoints = cbMaxPoints; if ((seen1 & 4096) === 0) $this.cbMinPoints = 0; else $this.cbMinPoints = cbMinPoints; if ((seen1 & 8192) === 0) $this.cbIndex = 0; else $this.cbIndex = cbIndex; if ((seen1 & 16384) === 0) $this.cbClazzUid = L0; else $this.cbClazzUid = cbClazzUid; if ((seen1 & 32768) === 0) $this.cbActive = true; else $this.cbActive = cbActive; if ((seen1 & 65536) === 0) $this.cbHidden = false; else $this.cbHidden = cbHidden; if ((seen1 & 131072) === 0) $this.cbEntityUid = L0; else $this.cbEntityUid = cbEntityUid; if ((seen1 & 262144) === 0) $this.cbLct = L0; else $this.cbLct = cbLct; return $this; } CourseBlock.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseBlock', interfaces: []}; function CourseBlockWithCompleteEntity() { CourseBlock.call(this); this.assignment = null; this.entry = null; this.courseDiscussion = null; this.expanded = true; } CourseBlockWithCompleteEntity.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseBlockWithCompleteEntity', interfaces: [CourseBlock]}; function CourseBlockWithEntity() { CourseBlockWithEntity$Companion_getInstance(); CourseBlockWithEntityDb.call(this); this.topics = null; this.topicUidsToRemove = null; } CourseBlockWithEntity.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; if (!CourseBlockWithEntityDb.prototype.equals.call(this, other)) return false; Kotlin.isType(tmp$_0 = other, CourseBlockWithEntity) ? tmp$_0 : throwCCE(); if (!equals(this.topics, other.topics)) return false; if (!equals(this.topicUidsToRemove, other.topicUidsToRemove)) return false; return true; }; CourseBlockWithEntity.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2; var result = CourseBlockWithEntityDb.prototype.hashCode.call(this); result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.topics) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.topicUidsToRemove) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; return result; }; CourseBlockWithEntity.prototype.createFromDb_taxqj1$ = function (dbEntity) { this.assignment = dbEntity.assignment; this.entry = dbEntity.entry; this.courseDiscussion = dbEntity.courseDiscussion; this.language = dbEntity.language; this.cbUid = dbEntity.cbUid; this.cbType = dbEntity.cbType; this.cbIndentLevel = dbEntity.cbIndentLevel; this.cbModuleParentBlockUid = dbEntity.cbModuleParentBlockUid; this.cbTitle = dbEntity.cbTitle; this.cbDescription = dbEntity.cbDescription; this.cbCompletionCriteria = dbEntity.cbCompletionCriteria; this.cbHideUntilDate = dbEntity.cbHideUntilDate; this.cbDeadlineDate = dbEntity.cbDeadlineDate; this.cbLateSubmissionPenalty = dbEntity.cbLateSubmissionPenalty; this.cbGracePeriodDate = dbEntity.cbGracePeriodDate; this.cbMaxPoints = dbEntity.cbMaxPoints; this.cbIndex = dbEntity.cbIndex; this.cbClazzUid = dbEntity.cbClazzUid; this.cbActive = dbEntity.cbActive; this.cbHidden = dbEntity.cbHidden; this.cbEntityUid = dbEntity.cbEntityUid; this.cbLct = dbEntity.cbLct; }; function CourseBlockWithEntity$Companion() { CourseBlockWithEntity$Companion_instance = this; } CourseBlockWithEntity$Companion.prototype.serializer = function () { return CourseBlockWithEntity$$serializer_getInstance(); }; CourseBlockWithEntity$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CourseBlockWithEntity$Companion_instance = null; function CourseBlockWithEntity$Companion_getInstance() { if (CourseBlockWithEntity$Companion_instance === null) { new CourseBlockWithEntity$Companion(); } return CourseBlockWithEntity$Companion_instance; } function CourseBlockWithEntity$$serializer() { this.descriptor_is2w6e$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CourseBlockWithEntity', this, 25); this.descriptor.addElement_ivxn3r$('cbUid', true); this.descriptor.addElement_ivxn3r$('cbType', true); this.descriptor.addElement_ivxn3r$('cbIndentLevel', true); this.descriptor.addElement_ivxn3r$('cbModuleParentBlockUid', true); this.descriptor.addElement_ivxn3r$('cbTitle', true); this.descriptor.addElement_ivxn3r$('cbDescription', true); this.descriptor.addElement_ivxn3r$('cbCompletionCriteria', true); this.descriptor.addElement_ivxn3r$('cbHideUntilDate', true); this.descriptor.addElement_ivxn3r$('cbDeadlineDate', true); this.descriptor.addElement_ivxn3r$('cbLateSubmissionPenalty', true); this.descriptor.addElement_ivxn3r$('cbGracePeriodDate', true); this.descriptor.addElement_ivxn3r$('cbMaxPoints', true); this.descriptor.addElement_ivxn3r$('cbMinPoints', true); this.descriptor.addElement_ivxn3r$('cbIndex', true); this.descriptor.addElement_ivxn3r$('cbClazzUid', true); this.descriptor.addElement_ivxn3r$('cbActive', true); this.descriptor.addElement_ivxn3r$('cbHidden', true); this.descriptor.addElement_ivxn3r$('cbEntityUid', true); this.descriptor.addElement_ivxn3r$('cbLct', true); this.descriptor.addElement_ivxn3r$('assignment', true); this.descriptor.addElement_ivxn3r$('entry', true); this.descriptor.addElement_ivxn3r$('courseDiscussion', true); this.descriptor.addElement_ivxn3r$('language', true); this.descriptor.addElement_ivxn3r$('topics', true); this.descriptor.addElement_ivxn3r$('topicUidsToRemove', true); CourseBlockWithEntity$$serializer_instance = this; } Object.defineProperty(CourseBlockWithEntity$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_is2w6e$_0; }}); CourseBlockWithEntity$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.cbUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.cbUid); if (!equals(value.cbType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeIntElement_ptg7oe$(this.descriptor, 1, value.cbType); if (!equals(value.cbIndentLevel, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.cbIndentLevel); if (!equals(value.cbModuleParentBlockUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.cbModuleParentBlockUid); if (!equals(value.cbTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.cbTitle); if (!equals(value.cbDescription, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.cbDescription); if (!equals(value.cbCompletionCriteria, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.cbCompletionCriteria); if (!equals(value.cbHideUntilDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.cbHideUntilDate); if (!equals(value.cbDeadlineDate, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.cbDeadlineDate); if (!equals(value.cbLateSubmissionPenalty, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.cbLateSubmissionPenalty); if (!equals(value.cbGracePeriodDate, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.cbGracePeriodDate); if (!equals(value.cbMaxPoints, 10) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.cbMaxPoints); if (!equals(value.cbMinPoints, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.cbMinPoints); if (!equals(value.cbIndex, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeIntElement_ptg7oe$(this.descriptor, 13, value.cbIndex); if (!equals(value.cbClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.cbClazzUid); if (!equals(value.cbActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 15, value.cbActive); if (!equals(value.cbHidden, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 16, value.cbHidden); if (!equals(value.cbEntityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.cbEntityUid); if (!equals(value.cbLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.cbLct); if (!equals(value.assignment, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 19, ClazzAssignment$$serializer_getInstance(), value.assignment); if (!equals(value.entry, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 20, ContentEntry$$serializer_getInstance(), value.entry); if (!equals(value.courseDiscussion, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 21, CourseDiscussion$$serializer_getInstance(), value.courseDiscussion); if (!equals(value.language, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 22, Language$$serializer_getInstance(), value.language); if (!equals(value.topics, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 23, new ArrayListSerializer(DiscussionTopic$$serializer_getInstance()), value.topics); if (!equals(value.topicUidsToRemove, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 24, new ArrayListSerializer(internal.LongSerializer), value.topicUidsToRemove); output.endStructure_24f42q$(this.descriptor); }; CourseBlockWithEntity$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeIntElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeIntElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeBooleanElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeBooleanElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 19, ClazzAssignment$$serializer_getInstance(), local19); bitMask0 |= 524288; break; case 20: local20 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 20, ContentEntry$$serializer_getInstance(), local20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 21, CourseDiscussion$$serializer_getInstance(), local21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 22, Language$$serializer_getInstance(), local22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 23, new ArrayListSerializer(DiscussionTopic$$serializer_getInstance()), local23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 24, new ArrayListSerializer(internal.LongSerializer), local24); bitMask0 |= 16777216; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CourseBlockWithEntity_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, null); }; CourseBlockWithEntity$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(ClazzAssignment$$serializer_getInstance()), new NullableSerializer(ContentEntry$$serializer_getInstance()), new NullableSerializer(CourseDiscussion$$serializer_getInstance()), new NullableSerializer(Language$$serializer_getInstance()), new NullableSerializer(new ArrayListSerializer(DiscussionTopic$$serializer_getInstance())), new NullableSerializer(new ArrayListSerializer(internal.LongSerializer))]; }; CourseBlockWithEntity$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CourseBlockWithEntity$$serializer_instance = null; function CourseBlockWithEntity$$serializer_getInstance() { if (CourseBlockWithEntity$$serializer_instance === null) { new CourseBlockWithEntity$$serializer(); } return CourseBlockWithEntity$$serializer_instance; } function CourseBlockWithEntity_init(seen1, cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints, cbMinPoints, cbIndex, cbClazzUid, cbActive, cbHidden, cbEntityUid, cbLct, assignment, entry, courseDiscussion, language, topics, topicUidsToRemove, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CourseBlockWithEntity.prototype); $this = CourseBlockWithEntityDb_init(seen1, cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints, cbMinPoints, cbIndex, cbClazzUid, cbActive, cbHidden, cbEntityUid, cbLct, assignment, entry, courseDiscussion, language, $this); if ((seen1 & 8388608) === 0) $this.topics = null; else $this.topics = topics; if ((seen1 & 16777216) === 0) $this.topicUidsToRemove = null; else $this.topicUidsToRemove = topicUidsToRemove; return $this; } CourseBlockWithEntity.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseBlockWithEntity', interfaces: [CourseBlockWithEntityDb]}; function CourseBlockWithEntityDb() { CourseBlockWithEntityDb$Companion_getInstance(); CourseBlock.call(this); this.assignment = null; this.entry = null; this.courseDiscussion = null; this.language = null; } CourseBlockWithEntityDb.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; if (!CourseBlock.prototype.equals.call(this, other)) return false; Kotlin.isType(tmp$_0 = other, CourseBlockWithEntityDb) ? tmp$_0 : throwCCE(); if (!equals(this.assignment, other.assignment)) return false; if (!equals(this.entry, other.entry)) return false; if (!equals(this.courseDiscussion, other.courseDiscussion)) return false; if (!equals(this.language, other.language)) return false; return true; }; CourseBlockWithEntityDb.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5, tmp$_6; var result = CourseBlock.prototype.hashCode.call(this); result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.assignment) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.entry) != null ? tmp$_1.hashCode() : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + ((tmp$_4 = (tmp$_3 = this.courseDiscussion) != null ? hashCode(tmp$_3) : null) != null ? tmp$_4 : 0) | 0; result = (31 * result | 0) + ((tmp$_6 = (tmp$_5 = this.language) != null ? tmp$_5.hashCode() : null) != null ? tmp$_6 : 0) | 0; return result; }; function CourseBlockWithEntityDb$Companion() { CourseBlockWithEntityDb$Companion_instance = this; } CourseBlockWithEntityDb$Companion.prototype.serializer = function () { return CourseBlockWithEntityDb$$serializer_getInstance(); }; CourseBlockWithEntityDb$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CourseBlockWithEntityDb$Companion_instance = null; function CourseBlockWithEntityDb$Companion_getInstance() { if (CourseBlockWithEntityDb$Companion_instance === null) { new CourseBlockWithEntityDb$Companion(); } return CourseBlockWithEntityDb$Companion_instance; } function CourseBlockWithEntityDb$$serializer() { this.descriptor_cj0nc$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CourseBlockWithEntityDb', this, 23); this.descriptor.addElement_ivxn3r$('cbUid', true); this.descriptor.addElement_ivxn3r$('cbType', true); this.descriptor.addElement_ivxn3r$('cbIndentLevel', true); this.descriptor.addElement_ivxn3r$('cbModuleParentBlockUid', true); this.descriptor.addElement_ivxn3r$('cbTitle', true); this.descriptor.addElement_ivxn3r$('cbDescription', true); this.descriptor.addElement_ivxn3r$('cbCompletionCriteria', true); this.descriptor.addElement_ivxn3r$('cbHideUntilDate', true); this.descriptor.addElement_ivxn3r$('cbDeadlineDate', true); this.descriptor.addElement_ivxn3r$('cbLateSubmissionPenalty', true); this.descriptor.addElement_ivxn3r$('cbGracePeriodDate', true); this.descriptor.addElement_ivxn3r$('cbMaxPoints', true); this.descriptor.addElement_ivxn3r$('cbMinPoints', true); this.descriptor.addElement_ivxn3r$('cbIndex', true); this.descriptor.addElement_ivxn3r$('cbClazzUid', true); this.descriptor.addElement_ivxn3r$('cbActive', true); this.descriptor.addElement_ivxn3r$('cbHidden', true); this.descriptor.addElement_ivxn3r$('cbEntityUid', true); this.descriptor.addElement_ivxn3r$('cbLct', true); this.descriptor.addElement_ivxn3r$('assignment', true); this.descriptor.addElement_ivxn3r$('entry', true); this.descriptor.addElement_ivxn3r$('courseDiscussion', true); this.descriptor.addElement_ivxn3r$('language', true); CourseBlockWithEntityDb$$serializer_instance = this; } Object.defineProperty(CourseBlockWithEntityDb$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_cj0nc$_0; }}); CourseBlockWithEntityDb$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.cbUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.cbUid); if (!equals(value.cbType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeIntElement_ptg7oe$(this.descriptor, 1, value.cbType); if (!equals(value.cbIndentLevel, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.cbIndentLevel); if (!equals(value.cbModuleParentBlockUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.cbModuleParentBlockUid); if (!equals(value.cbTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.cbTitle); if (!equals(value.cbDescription, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.cbDescription); if (!equals(value.cbCompletionCriteria, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.cbCompletionCriteria); if (!equals(value.cbHideUntilDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.cbHideUntilDate); if (!equals(value.cbDeadlineDate, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.cbDeadlineDate); if (!equals(value.cbLateSubmissionPenalty, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.cbLateSubmissionPenalty); if (!equals(value.cbGracePeriodDate, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.cbGracePeriodDate); if (!equals(value.cbMaxPoints, 10) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.cbMaxPoints); if (!equals(value.cbMinPoints, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.cbMinPoints); if (!equals(value.cbIndex, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeIntElement_ptg7oe$(this.descriptor, 13, value.cbIndex); if (!equals(value.cbClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.cbClazzUid); if (!equals(value.cbActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 15, value.cbActive); if (!equals(value.cbHidden, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 16, value.cbHidden); if (!equals(value.cbEntityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.cbEntityUid); if (!equals(value.cbLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.cbLct); if (!equals(value.assignment, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 19, ClazzAssignment$$serializer_getInstance(), value.assignment); if (!equals(value.entry, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 20, ContentEntry$$serializer_getInstance(), value.entry); if (!equals(value.courseDiscussion, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 21, CourseDiscussion$$serializer_getInstance(), value.courseDiscussion); if (!equals(value.language, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 22, Language$$serializer_getInstance(), value.language); output.endStructure_24f42q$(this.descriptor); }; CourseBlockWithEntityDb$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeIntElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeIntElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeBooleanElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeBooleanElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 19, ClazzAssignment$$serializer_getInstance(), local19); bitMask0 |= 524288; break; case 20: local20 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 20, ContentEntry$$serializer_getInstance(), local20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 21, CourseDiscussion$$serializer_getInstance(), local21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 22, Language$$serializer_getInstance(), local22); bitMask0 |= 4194304; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CourseBlockWithEntityDb_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, null); }; CourseBlockWithEntityDb$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(ClazzAssignment$$serializer_getInstance()), new NullableSerializer(ContentEntry$$serializer_getInstance()), new NullableSerializer(CourseDiscussion$$serializer_getInstance()), new NullableSerializer(Language$$serializer_getInstance())]; }; CourseBlockWithEntityDb$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CourseBlockWithEntityDb$$serializer_instance = null; function CourseBlockWithEntityDb$$serializer_getInstance() { if (CourseBlockWithEntityDb$$serializer_instance === null) { new CourseBlockWithEntityDb$$serializer(); } return CourseBlockWithEntityDb$$serializer_instance; } function CourseBlockWithEntityDb_init(seen1, cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints, cbMinPoints, cbIndex, cbClazzUid, cbActive, cbHidden, cbEntityUid, cbLct, assignment, entry, courseDiscussion, language, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CourseBlockWithEntityDb.prototype); $this = CourseBlock_init(seen1, cbUid, cbType, cbIndentLevel, cbModuleParentBlockUid, cbTitle, cbDescription, cbCompletionCriteria, cbHideUntilDate, cbDeadlineDate, cbLateSubmissionPenalty, cbGracePeriodDate, cbMaxPoints, cbMinPoints, cbIndex, cbClazzUid, cbActive, cbHidden, cbEntityUid, cbLct, $this); if ((seen1 & 524288) === 0) $this.assignment = null; else $this.assignment = assignment; if ((seen1 & 1048576) === 0) $this.entry = null; else $this.entry = entry; if ((seen1 & 2097152) === 0) $this.courseDiscussion = null; else $this.courseDiscussion = courseDiscussion; if ((seen1 & 4194304) === 0) $this.language = null; else $this.language = language; return $this; } CourseBlockWithEntityDb.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseBlockWithEntityDb', interfaces: [CourseBlock]}; function CourseDiscussion() { CourseDiscussion$Companion_getInstance(); this.courseDiscussionUid = L0; this.courseDiscussionTitle = null; this.courseDiscussionDesc = null; this.courseDiscussionClazzUid = L0; this.courseDiscussionActive = true; this.courseDiscussionLct = L0; } function CourseDiscussion$Companion() { CourseDiscussion$Companion_instance = this; this.TABLE_ID = 130; } CourseDiscussion$Companion.prototype.serializer = function () { return CourseDiscussion$$serializer_getInstance(); }; CourseDiscussion$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CourseDiscussion$Companion_instance = null; function CourseDiscussion$Companion_getInstance() { if (CourseDiscussion$Companion_instance === null) { new CourseDiscussion$Companion(); } return CourseDiscussion$Companion_instance; } function CourseDiscussion$$serializer() { this.descriptor_6it8gi$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CourseDiscussion', this, 6); this.descriptor.addElement_ivxn3r$('courseDiscussionUid', true); this.descriptor.addElement_ivxn3r$('courseDiscussionTitle', true); this.descriptor.addElement_ivxn3r$('courseDiscussionDesc', true); this.descriptor.addElement_ivxn3r$('courseDiscussionClazzUid', true); this.descriptor.addElement_ivxn3r$('courseDiscussionActive', true); this.descriptor.addElement_ivxn3r$('courseDiscussionLct', true); CourseDiscussion$$serializer_instance = this; } Object.defineProperty(CourseDiscussion$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_6it8gi$_0; }}); CourseDiscussion$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.courseDiscussionUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.courseDiscussionUid); if (!equals(value.courseDiscussionTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.courseDiscussionTitle); if (!equals(value.courseDiscussionDesc, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.courseDiscussionDesc); if (!equals(value.courseDiscussionClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.courseDiscussionClazzUid); if (!equals(value.courseDiscussionActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.courseDiscussionActive); if (!equals(value.courseDiscussionLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.courseDiscussionLct); output.endStructure_24f42q$(this.descriptor); }; CourseDiscussion$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CourseDiscussion_init(bitMask0, local0, local1, local2, local3, local4, local5, null); }; CourseDiscussion$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.BooleanSerializer, internal.LongSerializer]; }; CourseDiscussion$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CourseDiscussion$$serializer_instance = null; function CourseDiscussion$$serializer_getInstance() { if (CourseDiscussion$$serializer_instance === null) { new CourseDiscussion$$serializer(); } return CourseDiscussion$$serializer_instance; } function CourseDiscussion_init(seen1, courseDiscussionUid, courseDiscussionTitle, courseDiscussionDesc, courseDiscussionClazzUid, courseDiscussionActive, courseDiscussionLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CourseDiscussion.prototype); if ((seen1 & 1) === 0) $this.courseDiscussionUid = L0; else $this.courseDiscussionUid = courseDiscussionUid; if ((seen1 & 2) === 0) $this.courseDiscussionTitle = null; else $this.courseDiscussionTitle = courseDiscussionTitle; if ((seen1 & 4) === 0) $this.courseDiscussionDesc = null; else $this.courseDiscussionDesc = courseDiscussionDesc; if ((seen1 & 8) === 0) $this.courseDiscussionClazzUid = L0; else $this.courseDiscussionClazzUid = courseDiscussionClazzUid; if ((seen1 & 16) === 0) $this.courseDiscussionActive = true; else $this.courseDiscussionActive = courseDiscussionActive; if ((seen1 & 32) === 0) $this.courseDiscussionLct = L0; else $this.courseDiscussionLct = courseDiscussionLct; return $this; } CourseDiscussion.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseDiscussion', interfaces: []}; var CourseDiscussionReplicate$Companion_instance = null; function CourseDiscussionReplicate$$serializer() { this.descriptor_e2ntxh$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CourseDiscussionReplicate', this, 4); this.descriptor.addElement_ivxn3r$('courseDiscussionPk', true); this.descriptor.addElement_ivxn3r$('courseDiscussionVersionId', true); this.descriptor.addElement_ivxn3r$('courseDiscussionDestination', true); this.descriptor.addElement_ivxn3r$('courseDiscussionPending', true); CourseDiscussionReplicate$$serializer_instance = this; } var CourseDiscussionReplicate$$serializer_instance = null; function CourseGroupMember() { CourseGroupMember$Companion_getInstance(); this.cgmUid = L0; this.cgmSetUid = L0; this.cgmGroupNumber = 0; this.cgmPersonUid = L0; this.cgmLct = L0; } function CourseGroupMember$Companion() { CourseGroupMember$Companion_instance = this; this.TABLE_ID = 243; } CourseGroupMember$Companion.prototype.serializer = function () { return CourseGroupMember$$serializer_getInstance(); }; CourseGroupMember$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CourseGroupMember$Companion_instance = null; function CourseGroupMember$Companion_getInstance() { if (CourseGroupMember$Companion_instance === null) { new CourseGroupMember$Companion(); } return CourseGroupMember$Companion_instance; } function CourseGroupMember$$serializer() { this.descriptor_m4hk0z$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CourseGroupMember', this, 5); this.descriptor.addElement_ivxn3r$('cgmUid', true); this.descriptor.addElement_ivxn3r$('cgmSetUid', true); this.descriptor.addElement_ivxn3r$('cgmGroupNumber', true); this.descriptor.addElement_ivxn3r$('cgmPersonUid', true); this.descriptor.addElement_ivxn3r$('cgmLct', true); CourseGroupMember$$serializer_instance = this; } Object.defineProperty(CourseGroupMember$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_m4hk0z$_0; }}); CourseGroupMember$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.cgmUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.cgmUid); if (!equals(value.cgmSetUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.cgmSetUid); if (!equals(value.cgmGroupNumber, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.cgmGroupNumber); if (!equals(value.cgmPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.cgmPersonUid); if (!equals(value.cgmLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.cgmLct); output.endStructure_24f42q$(this.descriptor); }; CourseGroupMember$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CourseGroupMember_init(bitMask0, local0, local1, local2, local3, local4, null); }; CourseGroupMember$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer]; }; CourseGroupMember$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CourseGroupMember$$serializer_instance = null; function CourseGroupMember$$serializer_getInstance() { if (CourseGroupMember$$serializer_instance === null) { new CourseGroupMember$$serializer(); } return CourseGroupMember$$serializer_instance; } function CourseGroupMember_init(seen1, cgmUid, cgmSetUid, cgmGroupNumber, cgmPersonUid, cgmLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CourseGroupMember.prototype); if ((seen1 & 1) === 0) $this.cgmUid = L0; else $this.cgmUid = cgmUid; if ((seen1 & 2) === 0) $this.cgmSetUid = L0; else $this.cgmSetUid = cgmSetUid; if ((seen1 & 4) === 0) $this.cgmGroupNumber = 0; else $this.cgmGroupNumber = cgmGroupNumber; if ((seen1 & 8) === 0) $this.cgmPersonUid = L0; else $this.cgmPersonUid = cgmPersonUid; if ((seen1 & 16) === 0) $this.cgmLct = L0; else $this.cgmLct = cgmLct; return $this; } CourseGroupMember.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupMember', interfaces: []}; function CourseGroupMemberPerson() { CourseGroupMemberPerson$Companion_getInstance(); Person.call(this); this.member = null; } function CourseGroupMemberPerson$Companion() { CourseGroupMemberPerson$Companion_instance = this; } CourseGroupMemberPerson$Companion.prototype.serializer = function () { return CourseGroupMemberPerson$$serializer_getInstance(); }; CourseGroupMemberPerson$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CourseGroupMemberPerson$Companion_instance = null; function CourseGroupMemberPerson$Companion_getInstance() { if (CourseGroupMemberPerson$Companion_instance === null) { new CourseGroupMemberPerson$Companion(); } return CourseGroupMemberPerson$Companion_instance; } function CourseGroupMemberPerson$$serializer() { this.descriptor_9i5n82$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CourseGroupMemberPerson', this, 25); this.descriptor.addElement_ivxn3r$('personUid', true); this.descriptor.addElement_ivxn3r$('username', true); this.descriptor.addElement_ivxn3r$('firstNames', true); this.descriptor.addElement_ivxn3r$('lastName', true); this.descriptor.addElement_ivxn3r$('emailAddr', true); this.descriptor.addElement_ivxn3r$('phoneNum', true); this.descriptor.addElement_ivxn3r$('gender', true); this.descriptor.addElement_ivxn3r$('active', true); this.descriptor.addElement_ivxn3r$('admin', true); this.descriptor.addElement_ivxn3r$('personNotes', true); this.descriptor.addElement_ivxn3r$('fatherName', true); this.descriptor.addElement_ivxn3r$('fatherNumber', true); this.descriptor.addElement_ivxn3r$('motherName', true); this.descriptor.addElement_ivxn3r$('motherNum', true); this.descriptor.addElement_ivxn3r$('dateOfBirth', true); this.descriptor.addElement_ivxn3r$('personAddress', true); this.descriptor.addElement_ivxn3r$('personOrgId', true); this.descriptor.addElement_ivxn3r$('personGroupUid', true); this.descriptor.addElement_ivxn3r$('personMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('personLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('personLastChangedBy', true); this.descriptor.addElement_ivxn3r$('personLct', true); this.descriptor.addElement_ivxn3r$('personCountry', true); this.descriptor.addElement_ivxn3r$('personType', true); this.descriptor.addElement_ivxn3r$('member', true); CourseGroupMemberPerson$$serializer_instance = this; } Object.defineProperty(CourseGroupMemberPerson$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_9i5n82$_0; }}); CourseGroupMemberPerson$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.personUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.personUid); if (!equals(value.username, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.username); if (!equals(value.firstNames, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.firstNames); if (!equals(value.lastName, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.lastName); if (!equals(value.emailAddr, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.emailAddr); if (!equals(value.phoneNum, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.phoneNum); if (!equals(value.gender, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.gender); if (!equals(value.active, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 7, value.active); if (!equals(value.admin, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 8, value.admin); if (!equals(value.personNotes, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.personNotes); if (!equals(value.fatherName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.fatherName); if (!equals(value.fatherNumber, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, internal.StringSerializer, value.fatherNumber); if (!equals(value.motherName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 12, internal.StringSerializer, value.motherName); if (!equals(value.motherNum, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 13, internal.StringSerializer, value.motherNum); if (!equals(value.dateOfBirth, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.dateOfBirth); if (!equals(value.personAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 15, internal.StringSerializer, value.personAddress); if (!equals(value.personOrgId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 16, internal.StringSerializer, value.personOrgId); if (!equals(value.personGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.personGroupUid); if (!equals(value.personMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.personMasterChangeSeqNum); if (!equals(value.personLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.personLocalChangeSeqNum); if (!equals(value.personLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeIntElement_ptg7oe$(this.descriptor, 20, value.personLastChangedBy); if (!equals(value.personLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.personLct); if (!equals(value.personCountry, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 22, internal.StringSerializer, value.personCountry); if (!equals(value.personType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeIntElement_ptg7oe$(this.descriptor, 23, value.personType); if (!equals(value.member, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 24, CourseGroupMember$$serializer_getInstance(), value.member); output.endStructure_24f42q$(this.descriptor); }; CourseGroupMemberPerson$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeBooleanElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeBooleanElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, internal.StringSerializer, local11); bitMask0 |= 2048; break; case 12: local12 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 12, internal.StringSerializer, local12); bitMask0 |= 4096; break; case 13: local13 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 13, internal.StringSerializer, local13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 15, internal.StringSerializer, local15); bitMask0 |= 32768; break; case 16: local16 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 16, internal.StringSerializer, local16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeIntElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 22, internal.StringSerializer, local22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeIntElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 24, CourseGroupMember$$serializer_getInstance(), local24); bitMask0 |= 16777216; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CourseGroupMemberPerson_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, null); }; CourseGroupMemberPerson$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.BooleanSerializer, internal.BooleanSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, new NullableSerializer(CourseGroupMember$$serializer_getInstance())]; }; CourseGroupMemberPerson$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CourseGroupMemberPerson$$serializer_instance = null; function CourseGroupMemberPerson$$serializer_getInstance() { if (CourseGroupMemberPerson$$serializer_instance === null) { new CourseGroupMemberPerson$$serializer(); } return CourseGroupMemberPerson$$serializer_instance; } function CourseGroupMemberPerson_init(seen1, personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType, member, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CourseGroupMemberPerson.prototype); $this = Person_init(seen1, personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType, $this); if ((seen1 & 16777216) === 0) $this.member = null; else $this.member = member; return $this; } CourseGroupMemberPerson.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupMemberPerson', interfaces: [Person]}; function CourseGroupSet() { CourseGroupSet$Companion_getInstance(); this.cgsUid = L0; this.cgsName = null; this.cgsTotalGroups = 4; this.cgsActive = true; this.cgsClazzUid = L0; this.cgsLct = L0; } function CourseGroupSet$Companion() { CourseGroupSet$Companion_instance = this; this.TABLE_ID = 242; } CourseGroupSet$Companion.prototype.serializer = function () { return CourseGroupSet$$serializer_getInstance(); }; CourseGroupSet$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CourseGroupSet$Companion_instance = null; function CourseGroupSet$Companion_getInstance() { if (CourseGroupSet$Companion_instance === null) { new CourseGroupSet$Companion(); } return CourseGroupSet$Companion_instance; } function CourseGroupSet$$serializer() { this.descriptor_bdkokp$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CourseGroupSet', this, 6); this.descriptor.addElement_ivxn3r$('cgsUid', true); this.descriptor.addElement_ivxn3r$('cgsName', true); this.descriptor.addElement_ivxn3r$('cgsTotalGroups', true); this.descriptor.addElement_ivxn3r$('cgsActive', true); this.descriptor.addElement_ivxn3r$('cgsClazzUid', true); this.descriptor.addElement_ivxn3r$('cgsLct', true); CourseGroupSet$$serializer_instance = this; } Object.defineProperty(CourseGroupSet$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_bdkokp$_0; }}); CourseGroupSet$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.cgsUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.cgsUid); if (!equals(value.cgsName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.cgsName); if (!equals(value.cgsTotalGroups, 4) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.cgsTotalGroups); if (!equals(value.cgsActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 3, value.cgsActive); if (!equals(value.cgsClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.cgsClazzUid); if (!equals(value.cgsLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.cgsLct); output.endStructure_24f42q$(this.descriptor); }; CourseGroupSet$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeBooleanElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CourseGroupSet_init(bitMask0, local0, local1, local2, local3, local4, local5, null); }; CourseGroupSet$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer]; }; CourseGroupSet$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CourseGroupSet$$serializer_instance = null; function CourseGroupSet$$serializer_getInstance() { if (CourseGroupSet$$serializer_instance === null) { new CourseGroupSet$$serializer(); } return CourseGroupSet$$serializer_instance; } function CourseGroupSet_init(seen1, cgsUid, cgsName, cgsTotalGroups, cgsActive, cgsClazzUid, cgsLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CourseGroupSet.prototype); if ((seen1 & 1) === 0) $this.cgsUid = L0; else $this.cgsUid = cgsUid; if ((seen1 & 2) === 0) $this.cgsName = null; else $this.cgsName = cgsName; if ((seen1 & 4) === 0) $this.cgsTotalGroups = 4; else $this.cgsTotalGroups = cgsTotalGroups; if ((seen1 & 8) === 0) $this.cgsActive = true; else $this.cgsActive = cgsActive; if ((seen1 & 16) === 0) $this.cgsClazzUid = L0; else $this.cgsClazzUid = cgsClazzUid; if ((seen1 & 32) === 0) $this.cgsLct = L0; else $this.cgsLct = cgsLct; return $this; } CourseGroupSet.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseGroupSet', interfaces: []}; function CoursePicture() { CoursePicture$Companion_getInstance(); this.coursePictureUid = L0; this.coursePictureClazzUid = L0; this.coursePictureMasterCsn = L0; this.coursePictureLocalCsn = L0; this.coursePictureLastChangedBy = 0; this.coursePictureLct = L0; this.coursePictureUri = null; this.coursePictureMd5 = null; this.coursePictureFileSize = 0; this.coursePictureTimestamp = L0; this.coursePictureMimeType = null; this.coursePictureActive = true; } function CoursePicture$Companion() { CoursePicture$Companion_instance = this; this.TABLE_ID = 125; } CoursePicture$Companion.prototype.serializer = function () { return CoursePicture$$serializer_getInstance(); }; CoursePicture$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CoursePicture$Companion_instance = null; function CoursePicture$Companion_getInstance() { if (CoursePicture$Companion_instance === null) { new CoursePicture$Companion(); } return CoursePicture$Companion_instance; } CoursePicture.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, CoursePicture) ? tmp$_0 : throwCCE(); if (!equals(this.coursePictureUid, other.coursePictureUid)) return false; if (!equals(this.coursePictureClazzUid, other.coursePictureClazzUid)) return false; if (!equals(this.coursePictureMasterCsn, other.coursePictureMasterCsn)) return false; if (!equals(this.coursePictureLocalCsn, other.coursePictureLocalCsn)) return false; if (this.coursePictureLastChangedBy !== other.coursePictureLastChangedBy) return false; if (!equals(this.coursePictureLct, other.coursePictureLct)) return false; if (!equals(this.coursePictureUri, other.coursePictureUri)) return false; if (!equals(this.coursePictureMd5, other.coursePictureMd5)) return false; if (this.coursePictureFileSize !== other.coursePictureFileSize) return false; if (!equals(this.coursePictureTimestamp, other.coursePictureTimestamp)) return false; if (!equals(this.coursePictureMimeType, other.coursePictureMimeType)) return false; if (this.coursePictureActive !== other.coursePictureActive) return false; return true; }; CoursePicture.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4; var result = hashCode(this.coursePictureUid); result = (31 * result | 0) + hashCode(this.coursePictureClazzUid) | 0; result = (31 * result | 0) + hashCode(this.coursePictureMasterCsn) | 0; result = (31 * result | 0) + hashCode(this.coursePictureLocalCsn) | 0; result = (31 * result | 0) + this.coursePictureLastChangedBy | 0; result = (31 * result | 0) + hashCode(this.coursePictureLct) | 0; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.coursePictureUri) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.coursePictureMd5) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + this.coursePictureFileSize | 0; result = (31 * result | 0) + hashCode(this.coursePictureTimestamp) | 0; result = (31 * result | 0) + ((tmp$_4 = (tmp$_3 = this.coursePictureMimeType) != null ? hashCode(tmp$_3) : null) != null ? tmp$_4 : 0) | 0; result = (31 * result | 0) + hashCode(this.coursePictureActive) | 0; return result; }; function CoursePicture$$serializer() { this.descriptor_6oxhr2$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CoursePicture', this, 12); this.descriptor.addElement_ivxn3r$('coursePictureUid', true); this.descriptor.addElement_ivxn3r$('coursePictureClazzUid', true); this.descriptor.addElement_ivxn3r$('coursePictureMasterCsn', true); this.descriptor.addElement_ivxn3r$('coursePictureLocalCsn', true); this.descriptor.addElement_ivxn3r$('coursePictureLastChangedBy', true); this.descriptor.addElement_ivxn3r$('coursePictureLct', true); this.descriptor.addElement_ivxn3r$('coursePictureUri', true); this.descriptor.addElement_ivxn3r$('coursePictureMd5', true); this.descriptor.addElement_ivxn3r$('coursePictureFileSize', true); this.descriptor.addElement_ivxn3r$('coursePictureTimestamp', true); this.descriptor.addElement_ivxn3r$('coursePictureMimeType', true); this.descriptor.addElement_ivxn3r$('coursePictureActive', true); CoursePicture$$serializer_instance = this; } Object.defineProperty(CoursePicture$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_6oxhr2$_0; }}); CoursePicture$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.coursePictureUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.coursePictureUid); if (!equals(value.coursePictureClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.coursePictureClazzUid); if (!equals(value.coursePictureMasterCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.coursePictureMasterCsn); if (!equals(value.coursePictureLocalCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.coursePictureLocalCsn); if (!equals(value.coursePictureLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeIntElement_ptg7oe$(this.descriptor, 4, value.coursePictureLastChangedBy); if (!equals(value.coursePictureLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.coursePictureLct); if (!equals(value.coursePictureUri, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 6, internal.StringSerializer, value.coursePictureUri); if (!equals(value.coursePictureMd5, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 7, internal.StringSerializer, value.coursePictureMd5); if (!equals(value.coursePictureFileSize, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeIntElement_ptg7oe$(this.descriptor, 8, value.coursePictureFileSize); if (!equals(value.coursePictureTimestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.coursePictureTimestamp); if (!equals(value.coursePictureMimeType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.coursePictureMimeType); if (!equals(value.coursePictureActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 11, value.coursePictureActive); output.endStructure_24f42q$(this.descriptor); }; CoursePicture$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeIntElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 6, internal.StringSerializer, local6); bitMask0 |= 64; break; case 7: local7 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 7, internal.StringSerializer, local7); bitMask0 |= 128; break; case 8: local8 = input.decodeIntElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeBooleanElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CoursePicture_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, null); }; CoursePicture$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer]; }; CoursePicture$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CoursePicture$$serializer_instance = null; function CoursePicture$$serializer_getInstance() { if (CoursePicture$$serializer_instance === null) { new CoursePicture$$serializer(); } return CoursePicture$$serializer_instance; } function CoursePicture_init(seen1, coursePictureUid, coursePictureClazzUid, coursePictureMasterCsn, coursePictureLocalCsn, coursePictureLastChangedBy, coursePictureLct, coursePictureUri, coursePictureMd5, coursePictureFileSize, coursePictureTimestamp, coursePictureMimeType, coursePictureActive, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CoursePicture.prototype); if ((seen1 & 1) === 0) $this.coursePictureUid = L0; else $this.coursePictureUid = coursePictureUid; if ((seen1 & 2) === 0) $this.coursePictureClazzUid = L0; else $this.coursePictureClazzUid = coursePictureClazzUid; if ((seen1 & 4) === 0) $this.coursePictureMasterCsn = L0; else $this.coursePictureMasterCsn = coursePictureMasterCsn; if ((seen1 & 8) === 0) $this.coursePictureLocalCsn = L0; else $this.coursePictureLocalCsn = coursePictureLocalCsn; if ((seen1 & 16) === 0) $this.coursePictureLastChangedBy = 0; else $this.coursePictureLastChangedBy = coursePictureLastChangedBy; if ((seen1 & 32) === 0) $this.coursePictureLct = L0; else $this.coursePictureLct = coursePictureLct; if ((seen1 & 64) === 0) $this.coursePictureUri = null; else $this.coursePictureUri = coursePictureUri; if ((seen1 & 128) === 0) $this.coursePictureMd5 = null; else $this.coursePictureMd5 = coursePictureMd5; if ((seen1 & 256) === 0) $this.coursePictureFileSize = 0; else $this.coursePictureFileSize = coursePictureFileSize; if ((seen1 & 512) === 0) $this.coursePictureTimestamp = L0; else $this.coursePictureTimestamp = coursePictureTimestamp; if ((seen1 & 1024) === 0) $this.coursePictureMimeType = null; else $this.coursePictureMimeType = coursePictureMimeType; if ((seen1 & 2048) === 0) $this.coursePictureActive = true; else $this.coursePictureActive = coursePictureActive; return $this; } CoursePicture.$metadata$ = {kind: Kind_CLASS, simpleName: 'CoursePicture', interfaces: []}; var CoursePictureReplicate$Companion_instance = null; function CoursePictureReplicate$$serializer() { this.descriptor_k5jsxb$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CoursePictureReplicate', this, 4); this.descriptor.addElement_ivxn3r$('cpPk', true); this.descriptor.addElement_ivxn3r$('cpVersionId', true); this.descriptor.addElement_ivxn3r$('cpDestination', true); this.descriptor.addElement_ivxn3r$('cpPending', true); CoursePictureReplicate$$serializer_instance = this; } var CoursePictureReplicate$$serializer_instance = null; function CourseTerminology() { CourseTerminology$Companion_getInstance(); this.ctUid = L0; this.ctTitle = null; this.ctTerminology = null; this.ctLct = L0; } function CourseTerminology$Companion() { CourseTerminology$Companion_instance = this; this.TABLE_ID = 450; } CourseTerminology$Companion.prototype.serializer = function () { return CourseTerminology$$serializer_getInstance(); }; CourseTerminology$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var CourseTerminology$Companion_instance = null; function CourseTerminology$Companion_getInstance() { if (CourseTerminology$Companion_instance === null) { new CourseTerminology$Companion(); } return CourseTerminology$Companion_instance; } function CourseTerminology$$serializer() { this.descriptor_hh7kkp$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CourseTerminology', this, 4); this.descriptor.addElement_ivxn3r$('ctUid', true); this.descriptor.addElement_ivxn3r$('ctTitle', true); this.descriptor.addElement_ivxn3r$('ctTerminology', true); this.descriptor.addElement_ivxn3r$('ctLct', true); CourseTerminology$$serializer_instance = this; } Object.defineProperty(CourseTerminology$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_hh7kkp$_0; }}); CourseTerminology$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.ctUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.ctUid); if (!equals(value.ctTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.ctTitle); if (!equals(value.ctTerminology, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.ctTerminology); if (!equals(value.ctLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.ctLct); output.endStructure_24f42q$(this.descriptor); }; CourseTerminology$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return CourseTerminology_init(bitMask0, local0, local1, local2, local3, null); }; CourseTerminology$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer]; }; CourseTerminology$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var CourseTerminology$$serializer_instance = null; function CourseTerminology$$serializer_getInstance() { if (CourseTerminology$$serializer_instance === null) { new CourseTerminology$$serializer(); } return CourseTerminology$$serializer_instance; } function CourseTerminology_init(seen1, ctUid, ctTitle, ctTerminology, ctLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(CourseTerminology.prototype); if ((seen1 & 1) === 0) $this.ctUid = L0; else $this.ctUid = ctUid; if ((seen1 & 2) === 0) $this.ctTitle = null; else $this.ctTitle = ctTitle; if ((seen1 & 4) === 0) $this.ctTerminology = null; else $this.ctTerminology = ctTerminology; if ((seen1 & 8) === 0) $this.ctLct = L0; else $this.ctLct = ctLct; return $this; } CourseTerminology.$metadata$ = {kind: Kind_CLASS, simpleName: 'CourseTerminology', interfaces: []}; var DeviceSession$Companion_instance = null; function DeviceSession$$serializer() { this.descriptor_pa9o2p$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.DeviceSession', this, 4); this.descriptor.addElement_ivxn3r$('deviceSessionUid', true); this.descriptor.addElement_ivxn3r$('dsDeviceId', true); this.descriptor.addElement_ivxn3r$('dsPersonUid', true); this.descriptor.addElement_ivxn3r$('expires', true); DeviceSession$$serializer_instance = this; } var DeviceSession$$serializer_instance = null; function DiscussionPost() { DiscussionPost$Companion_getInstance(); this.discussionPostUid = L0; this.discussionPostTitle = null; this.discussionPostMessage = null; this.discussionPostStartDate = L0; this.discussionPostDiscussionTopicUid = L0; this.discussionPostVisible = true; this.discussionPostArchive = false; this.discussionPostStartedPersonUid = L0; this.discussionPostClazzUid = L0; this.discussionPostLct = L0; } function DiscussionPost$Companion() { DiscussionPost$Companion_instance = this; this.TABLE_ID = 132; } DiscussionPost$Companion.prototype.serializer = function () { return DiscussionPost$$serializer_getInstance(); }; DiscussionPost$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var DiscussionPost$Companion_instance = null; function DiscussionPost$Companion_getInstance() { if (DiscussionPost$Companion_instance === null) { new DiscussionPost$Companion(); } return DiscussionPost$Companion_instance; } function DiscussionPost$$serializer() { this.descriptor_mf0i43$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.DiscussionPost', this, 10); this.descriptor.addElement_ivxn3r$('discussionPostUid', true); this.descriptor.addElement_ivxn3r$('discussionPostTitle', true); this.descriptor.addElement_ivxn3r$('discussionPostMessage', true); this.descriptor.addElement_ivxn3r$('discussionPostStartDate', true); this.descriptor.addElement_ivxn3r$('discussionPostDiscussionTopicUid', true); this.descriptor.addElement_ivxn3r$('discussionPostVisible', true); this.descriptor.addElement_ivxn3r$('discussionPostArchive', true); this.descriptor.addElement_ivxn3r$('discussionPostStartedPersonUid', true); this.descriptor.addElement_ivxn3r$('discussionPostClazzUid', true); this.descriptor.addElement_ivxn3r$('discussionPostLct', true); DiscussionPost$$serializer_instance = this; } Object.defineProperty(DiscussionPost$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_mf0i43$_0; }}); DiscussionPost$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.discussionPostUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.discussionPostUid); if (!equals(value.discussionPostTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.discussionPostTitle); if (!equals(value.discussionPostMessage, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.discussionPostMessage); if (!equals(value.discussionPostStartDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.discussionPostStartDate); if (!equals(value.discussionPostDiscussionTopicUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.discussionPostDiscussionTopicUid); if (!equals(value.discussionPostVisible, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 5, value.discussionPostVisible); if (!equals(value.discussionPostArchive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.discussionPostArchive); if (!equals(value.discussionPostStartedPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.discussionPostStartedPersonUid); if (!equals(value.discussionPostClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.discussionPostClazzUid); if (!equals(value.discussionPostLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.discussionPostLct); output.endStructure_24f42q$(this.descriptor); }; DiscussionPost$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeBooleanElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return DiscussionPost_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, null); }; DiscussionPost$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer]; }; DiscussionPost$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var DiscussionPost$$serializer_instance = null; function DiscussionPost$$serializer_getInstance() { if (DiscussionPost$$serializer_instance === null) { new DiscussionPost$$serializer(); } return DiscussionPost$$serializer_instance; } function DiscussionPost_init(seen1, discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(DiscussionPost.prototype); if ((seen1 & 1) === 0) $this.discussionPostUid = L0; else $this.discussionPostUid = discussionPostUid; if ((seen1 & 2) === 0) $this.discussionPostTitle = null; else $this.discussionPostTitle = discussionPostTitle; if ((seen1 & 4) === 0) $this.discussionPostMessage = null; else $this.discussionPostMessage = discussionPostMessage; if ((seen1 & 8) === 0) $this.discussionPostStartDate = L0; else $this.discussionPostStartDate = discussionPostStartDate; if ((seen1 & 16) === 0) $this.discussionPostDiscussionTopicUid = L0; else $this.discussionPostDiscussionTopicUid = discussionPostDiscussionTopicUid; if ((seen1 & 32) === 0) $this.discussionPostVisible = true; else $this.discussionPostVisible = discussionPostVisible; if ((seen1 & 64) === 0) $this.discussionPostArchive = false; else $this.discussionPostArchive = discussionPostArchive; if ((seen1 & 128) === 0) $this.discussionPostStartedPersonUid = L0; else $this.discussionPostStartedPersonUid = discussionPostStartedPersonUid; if ((seen1 & 256) === 0) $this.discussionPostClazzUid = L0; else $this.discussionPostClazzUid = discussionPostClazzUid; if ((seen1 & 512) === 0) $this.discussionPostLct = L0; else $this.discussionPostLct = discussionPostLct; return $this; } DiscussionPost.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionPost', interfaces: []}; var DiscussionPostReplicate$Companion_instance = null; function DiscussionPostReplicate$$serializer() { this.descriptor_xr6otc$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.DiscussionPostReplicate', this, 4); this.descriptor.addElement_ivxn3r$('discussionPostPk', true); this.descriptor.addElement_ivxn3r$('discussionPostVersionId', true); this.descriptor.addElement_ivxn3r$('discussionPostDestination', true); this.descriptor.addElement_ivxn3r$('discussionPostPending', true); DiscussionPostReplicate$$serializer_instance = this; } var DiscussionPostReplicate$$serializer_instance = null; function DiscussionPostWithDetails() { DiscussionPostWithDetails$Companion_getInstance(); DiscussionPost.call(this); this.authorPersonFirstNames = null; this.authorPersonLastName = null; this.postLatestMessage = null; this.postRepliesCount = 0; this.postLatestMessageTimestamp = L0; } function DiscussionPostWithDetails$Companion() { DiscussionPostWithDetails$Companion_instance = this; } DiscussionPostWithDetails$Companion.prototype.serializer = function () { return DiscussionPostWithDetails$$serializer_getInstance(); }; DiscussionPostWithDetails$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var DiscussionPostWithDetails$Companion_instance = null; function DiscussionPostWithDetails$Companion_getInstance() { if (DiscussionPostWithDetails$Companion_instance === null) { new DiscussionPostWithDetails$Companion(); } return DiscussionPostWithDetails$Companion_instance; } function DiscussionPostWithDetails$$serializer() { this.descriptor_l7n6y5$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.DiscussionPostWithDetails', this, 15); this.descriptor.addElement_ivxn3r$('discussionPostUid', true); this.descriptor.addElement_ivxn3r$('discussionPostTitle', true); this.descriptor.addElement_ivxn3r$('discussionPostMessage', true); this.descriptor.addElement_ivxn3r$('discussionPostStartDate', true); this.descriptor.addElement_ivxn3r$('discussionPostDiscussionTopicUid', true); this.descriptor.addElement_ivxn3r$('discussionPostVisible', true); this.descriptor.addElement_ivxn3r$('discussionPostArchive', true); this.descriptor.addElement_ivxn3r$('discussionPostStartedPersonUid', true); this.descriptor.addElement_ivxn3r$('discussionPostClazzUid', true); this.descriptor.addElement_ivxn3r$('discussionPostLct', true); this.descriptor.addElement_ivxn3r$('authorPersonFirstNames', true); this.descriptor.addElement_ivxn3r$('authorPersonLastName', true); this.descriptor.addElement_ivxn3r$('postLatestMessage', true); this.descriptor.addElement_ivxn3r$('postRepliesCount', true); this.descriptor.addElement_ivxn3r$('postLatestMessageTimestamp', true); DiscussionPostWithDetails$$serializer_instance = this; } Object.defineProperty(DiscussionPostWithDetails$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_l7n6y5$_0; }}); DiscussionPostWithDetails$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.discussionPostUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.discussionPostUid); if (!equals(value.discussionPostTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.discussionPostTitle); if (!equals(value.discussionPostMessage, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.discussionPostMessage); if (!equals(value.discussionPostStartDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.discussionPostStartDate); if (!equals(value.discussionPostDiscussionTopicUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.discussionPostDiscussionTopicUid); if (!equals(value.discussionPostVisible, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 5, value.discussionPostVisible); if (!equals(value.discussionPostArchive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.discussionPostArchive); if (!equals(value.discussionPostStartedPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.discussionPostStartedPersonUid); if (!equals(value.discussionPostClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.discussionPostClazzUid); if (!equals(value.discussionPostLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.discussionPostLct); if (!equals(value.authorPersonFirstNames, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.authorPersonFirstNames); if (!equals(value.authorPersonLastName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, internal.StringSerializer, value.authorPersonLastName); if (!equals(value.postLatestMessage, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 12, internal.StringSerializer, value.postLatestMessage); if (!equals(value.postRepliesCount, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeIntElement_ptg7oe$(this.descriptor, 13, value.postRepliesCount); if (!equals(value.postLatestMessageTimestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.postLatestMessageTimestamp); output.endStructure_24f42q$(this.descriptor); }; DiscussionPostWithDetails$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeBooleanElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, internal.StringSerializer, local11); bitMask0 |= 2048; break; case 12: local12 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 12, internal.StringSerializer, local12); bitMask0 |= 4096; break; case 13: local13 = input.decodeIntElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return DiscussionPostWithDetails_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, null); }; DiscussionPostWithDetails$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer]; }; DiscussionPostWithDetails$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var DiscussionPostWithDetails$$serializer_instance = null; function DiscussionPostWithDetails$$serializer_getInstance() { if (DiscussionPostWithDetails$$serializer_instance === null) { new DiscussionPostWithDetails$$serializer(); } return DiscussionPostWithDetails$$serializer_instance; } function DiscussionPostWithDetails_init(seen1, discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct, authorPersonFirstNames, authorPersonLastName, postLatestMessage, postRepliesCount, postLatestMessageTimestamp, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(DiscussionPostWithDetails.prototype); $this = DiscussionPost_init(seen1, discussionPostUid, discussionPostTitle, discussionPostMessage, discussionPostStartDate, discussionPostDiscussionTopicUid, discussionPostVisible, discussionPostArchive, discussionPostStartedPersonUid, discussionPostClazzUid, discussionPostLct, $this); if ((seen1 & 1024) === 0) $this.authorPersonFirstNames = null; else $this.authorPersonFirstNames = authorPersonFirstNames; if ((seen1 & 2048) === 0) $this.authorPersonLastName = null; else $this.authorPersonLastName = authorPersonLastName; if ((seen1 & 4096) === 0) $this.postLatestMessage = null; else $this.postLatestMessage = postLatestMessage; if ((seen1 & 8192) === 0) $this.postRepliesCount = 0; else $this.postRepliesCount = postRepliesCount; if ((seen1 & 16384) === 0) $this.postLatestMessageTimestamp = L0; else $this.postLatestMessageTimestamp = postLatestMessageTimestamp; return $this; } DiscussionPostWithDetails.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionPostWithDetails', interfaces: [DiscussionPost]}; function DiscussionTopic() { DiscussionTopic$Companion_getInstance(); this.discussionTopicUid = L0; this.discussionTopicTitle = null; this.discussionTopicDesc = null; this.discussionTopicStartDate = L0; this.discussionTopicCourseDiscussionUid = L0; this.discussionTopicVisible = true; this.discussionTopicArchive = false; this.discussionTopicIndex = 0; this.discussionTopicClazzUid = L0; this.discussionTopicLct = L0; } function DiscussionTopic$Companion() { DiscussionTopic$Companion_instance = this; this.TABLE_ID = 131; } DiscussionTopic$Companion.prototype.serializer = function () { return DiscussionTopic$$serializer_getInstance(); }; DiscussionTopic$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var DiscussionTopic$Companion_instance = null; function DiscussionTopic$Companion_getInstance() { if (DiscussionTopic$Companion_instance === null) { new DiscussionTopic$Companion(); } return DiscussionTopic$Companion_instance; } function DiscussionTopic$$serializer() { this.descriptor_yf6dwm$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.DiscussionTopic', this, 10); this.descriptor.addElement_ivxn3r$('discussionTopicUid', true); this.descriptor.addElement_ivxn3r$('discussionTopicTitle', true); this.descriptor.addElement_ivxn3r$('discussionTopicDesc', true); this.descriptor.addElement_ivxn3r$('discussionTopicStartDate', true); this.descriptor.addElement_ivxn3r$('discussionTopicCourseDiscussionUid', true); this.descriptor.addElement_ivxn3r$('discussionTopicVisible', true); this.descriptor.addElement_ivxn3r$('discussionTopicArchive', true); this.descriptor.addElement_ivxn3r$('discussionTopicIndex', true); this.descriptor.addElement_ivxn3r$('discussionTopicClazzUid', true); this.descriptor.addElement_ivxn3r$('discussionTopicLct', true); DiscussionTopic$$serializer_instance = this; } Object.defineProperty(DiscussionTopic$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_yf6dwm$_0; }}); DiscussionTopic$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.discussionTopicUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.discussionTopicUid); if (!equals(value.discussionTopicTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.discussionTopicTitle); if (!equals(value.discussionTopicDesc, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.discussionTopicDesc); if (!equals(value.discussionTopicStartDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.discussionTopicStartDate); if (!equals(value.discussionTopicCourseDiscussionUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.discussionTopicCourseDiscussionUid); if (!equals(value.discussionTopicVisible, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 5, value.discussionTopicVisible); if (!equals(value.discussionTopicArchive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.discussionTopicArchive); if (!equals(value.discussionTopicIndex, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.discussionTopicIndex); if (!equals(value.discussionTopicClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.discussionTopicClazzUid); if (!equals(value.discussionTopicLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.discussionTopicLct); output.endStructure_24f42q$(this.descriptor); }; DiscussionTopic$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeBooleanElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return DiscussionTopic_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, null); }; DiscussionTopic$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer]; }; DiscussionTopic$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var DiscussionTopic$$serializer_instance = null; function DiscussionTopic$$serializer_getInstance() { if (DiscussionTopic$$serializer_instance === null) { new DiscussionTopic$$serializer(); } return DiscussionTopic$$serializer_instance; } function DiscussionTopic_init(seen1, discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(DiscussionTopic.prototype); if ((seen1 & 1) === 0) $this.discussionTopicUid = L0; else $this.discussionTopicUid = discussionTopicUid; if ((seen1 & 2) === 0) $this.discussionTopicTitle = null; else $this.discussionTopicTitle = discussionTopicTitle; if ((seen1 & 4) === 0) $this.discussionTopicDesc = null; else $this.discussionTopicDesc = discussionTopicDesc; if ((seen1 & 8) === 0) $this.discussionTopicStartDate = L0; else $this.discussionTopicStartDate = discussionTopicStartDate; if ((seen1 & 16) === 0) $this.discussionTopicCourseDiscussionUid = L0; else $this.discussionTopicCourseDiscussionUid = discussionTopicCourseDiscussionUid; if ((seen1 & 32) === 0) $this.discussionTopicVisible = true; else $this.discussionTopicVisible = discussionTopicVisible; if ((seen1 & 64) === 0) $this.discussionTopicArchive = false; else $this.discussionTopicArchive = discussionTopicArchive; if ((seen1 & 128) === 0) $this.discussionTopicIndex = 0; else $this.discussionTopicIndex = discussionTopicIndex; if ((seen1 & 256) === 0) $this.discussionTopicClazzUid = L0; else $this.discussionTopicClazzUid = discussionTopicClazzUid; if ((seen1 & 512) === 0) $this.discussionTopicLct = L0; else $this.discussionTopicLct = discussionTopicLct; return $this; } DiscussionTopic.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionTopic', interfaces: []}; function DiscussionTopicListDetail() { DiscussionTopicListDetail$Companion_getInstance(); DiscussionTopic.call(this); this.numPosts = 0; this.lastActiveTimestamp = L0; } DiscussionTopicListDetail.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, DiscussionTopicListDetail) ? tmp$_0 : throwCCE(); if (this.numPosts !== other.numPosts) return false; if (!equals(this.lastActiveTimestamp, other.lastActiveTimestamp)) return false; return true; }; DiscussionTopicListDetail.prototype.hashCode = function () { var result = this.numPosts; result = (31 * result | 0) + hashCode(this.lastActiveTimestamp) | 0; return result; }; function DiscussionTopicListDetail$Companion() { DiscussionTopicListDetail$Companion_instance = this; } DiscussionTopicListDetail$Companion.prototype.serializer = function () { return DiscussionTopicListDetail$$serializer_getInstance(); }; DiscussionTopicListDetail$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var DiscussionTopicListDetail$Companion_instance = null; function DiscussionTopicListDetail$Companion_getInstance() { if (DiscussionTopicListDetail$Companion_instance === null) { new DiscussionTopicListDetail$Companion(); } return DiscussionTopicListDetail$Companion_instance; } function DiscussionTopicListDetail$$serializer() { this.descriptor_d0t0ob$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.DiscussionTopicListDetail', this, 12); this.descriptor.addElement_ivxn3r$('discussionTopicUid', true); this.descriptor.addElement_ivxn3r$('discussionTopicTitle', true); this.descriptor.addElement_ivxn3r$('discussionTopicDesc', true); this.descriptor.addElement_ivxn3r$('discussionTopicStartDate', true); this.descriptor.addElement_ivxn3r$('discussionTopicCourseDiscussionUid', true); this.descriptor.addElement_ivxn3r$('discussionTopicVisible', true); this.descriptor.addElement_ivxn3r$('discussionTopicArchive', true); this.descriptor.addElement_ivxn3r$('discussionTopicIndex', true); this.descriptor.addElement_ivxn3r$('discussionTopicClazzUid', true); this.descriptor.addElement_ivxn3r$('discussionTopicLct', true); this.descriptor.addElement_ivxn3r$('numPosts', true); this.descriptor.addElement_ivxn3r$('lastActiveTimestamp', true); DiscussionTopicListDetail$$serializer_instance = this; } Object.defineProperty(DiscussionTopicListDetail$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_d0t0ob$_0; }}); DiscussionTopicListDetail$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.discussionTopicUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.discussionTopicUid); if (!equals(value.discussionTopicTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.discussionTopicTitle); if (!equals(value.discussionTopicDesc, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.discussionTopicDesc); if (!equals(value.discussionTopicStartDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.discussionTopicStartDate); if (!equals(value.discussionTopicCourseDiscussionUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.discussionTopicCourseDiscussionUid); if (!equals(value.discussionTopicVisible, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 5, value.discussionTopicVisible); if (!equals(value.discussionTopicArchive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.discussionTopicArchive); if (!equals(value.discussionTopicIndex, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.discussionTopicIndex); if (!equals(value.discussionTopicClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.discussionTopicClazzUid); if (!equals(value.discussionTopicLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.discussionTopicLct); if (!equals(value.numPosts, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeIntElement_ptg7oe$(this.descriptor, 10, value.numPosts); if (!equals(value.lastActiveTimestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.lastActiveTimestamp); output.endStructure_24f42q$(this.descriptor); }; DiscussionTopicListDetail$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeBooleanElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeIntElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return DiscussionTopicListDetail_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, null); }; DiscussionTopicListDetail$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; DiscussionTopicListDetail$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var DiscussionTopicListDetail$$serializer_instance = null; function DiscussionTopicListDetail$$serializer_getInstance() { if (DiscussionTopicListDetail$$serializer_instance === null) { new DiscussionTopicListDetail$$serializer(); } return DiscussionTopicListDetail$$serializer_instance; } function DiscussionTopicListDetail_init(seen1, discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct, numPosts, lastActiveTimestamp, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(DiscussionTopicListDetail.prototype); $this = DiscussionTopic_init(seen1, discussionTopicUid, discussionTopicTitle, discussionTopicDesc, discussionTopicStartDate, discussionTopicCourseDiscussionUid, discussionTopicVisible, discussionTopicArchive, discussionTopicIndex, discussionTopicClazzUid, discussionTopicLct, $this); if ((seen1 & 1024) === 0) $this.numPosts = 0; else $this.numPosts = numPosts; if ((seen1 & 2048) === 0) $this.lastActiveTimestamp = L0; else $this.lastActiveTimestamp = lastActiveTimestamp; return $this; } DiscussionTopicListDetail.$metadata$ = {kind: Kind_CLASS, simpleName: 'DiscussionTopicListDetail', interfaces: [DiscussionTopic]}; var DiscussionTopicReplicate$Companion_instance = null; function DiscussionTopicReplicate$$serializer() { this.descriptor_fd6onh$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.DiscussionTopicReplicate', this, 4); this.descriptor.addElement_ivxn3r$('discussionTopicPk', true); this.descriptor.addElement_ivxn3r$('discussionTopicVersionId', true); this.descriptor.addElement_ivxn3r$('discussionTopicDestination', true); this.descriptor.addElement_ivxn3r$('discussionTopicPending', true); DiscussionTopicReplicate$$serializer_instance = this; } var DiscussionTopicReplicate$$serializer_instance = null; function DistinctCategorySchema() { DistinctCategorySchema$Companion_getInstance(); this.contentCategoryUid = L0; this.categoryName = null; this.contentCategorySchemaUid = L0; this.schemaName = null; } DistinctCategorySchema.prototype.toString = function () { return toString(this.categoryName); }; DistinctCategorySchema.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, DistinctCategorySchema) ? tmp$_0 : throwCCE(); if (!equals(this.contentCategoryUid, other.contentCategoryUid)) return false; if (!equals(this.categoryName, other.categoryName)) return false; if (!equals(this.contentCategorySchemaUid, other.contentCategorySchemaUid)) return false; if (!equals(this.schemaName, other.schemaName)) return false; return true; }; DistinctCategorySchema.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2; var result = hashCode(this.contentCategoryUid); result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.categoryName) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + hashCode(this.contentCategorySchemaUid) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.schemaName) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; return result; }; function DistinctCategorySchema$Companion() { DistinctCategorySchema$Companion_instance = this; } DistinctCategorySchema$Companion.prototype.serializer = function () { return DistinctCategorySchema$$serializer_getInstance(); }; DistinctCategorySchema$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var DistinctCategorySchema$Companion_instance = null; function DistinctCategorySchema$Companion_getInstance() { if (DistinctCategorySchema$Companion_instance === null) { new DistinctCategorySchema$Companion(); } return DistinctCategorySchema$Companion_instance; } function DistinctCategorySchema$$serializer() { this.descriptor_qlm4h2$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.DistinctCategorySchema', this, 4); this.descriptor.addElement_ivxn3r$('contentCategoryUid', true); this.descriptor.addElement_ivxn3r$('categoryName', true); this.descriptor.addElement_ivxn3r$('contentCategorySchemaUid', true); this.descriptor.addElement_ivxn3r$('schemaName', true); DistinctCategorySchema$$serializer_instance = this; } Object.defineProperty(DistinctCategorySchema$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_qlm4h2$_0; }}); DistinctCategorySchema$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.contentCategoryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.contentCategoryUid); if (!equals(value.categoryName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.categoryName); if (!equals(value.contentCategorySchemaUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.contentCategorySchemaUid); if (!equals(value.schemaName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.schemaName); output.endStructure_24f42q$(this.descriptor); }; DistinctCategorySchema$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return DistinctCategorySchema_init(bitMask0, local0, local1, local2, local3, null); }; DistinctCategorySchema$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, new NullableSerializer(internal.StringSerializer)]; }; DistinctCategorySchema$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var DistinctCategorySchema$$serializer_instance = null; function DistinctCategorySchema$$serializer_getInstance() { if (DistinctCategorySchema$$serializer_instance === null) { new DistinctCategorySchema$$serializer(); } return DistinctCategorySchema$$serializer_instance; } function DistinctCategorySchema_init(seen1, contentCategoryUid, categoryName, contentCategorySchemaUid, schemaName, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(DistinctCategorySchema.prototype); if ((seen1 & 1) === 0) $this.contentCategoryUid = L0; else $this.contentCategoryUid = contentCategoryUid; if ((seen1 & 2) === 0) $this.categoryName = null; else $this.categoryName = categoryName; if ((seen1 & 4) === 0) $this.contentCategorySchemaUid = L0; else $this.contentCategorySchemaUid = contentCategorySchemaUid; if ((seen1 & 8) === 0) $this.schemaName = null; else $this.schemaName = schemaName; return $this; } DistinctCategorySchema.$metadata$ = {kind: Kind_CLASS, simpleName: 'DistinctCategorySchema', interfaces: []}; function DownloadJobSizeInfo(numEntries, totalSize) { if (numEntries === void 0) numEntries = 0; if (totalSize === void 0) totalSize = L0; this.numEntries = numEntries; this.totalSize = totalSize; } DownloadJobSizeInfo.$metadata$ = {kind: Kind_CLASS, simpleName: 'DownloadJobSizeInfo', interfaces: []}; DownloadJobSizeInfo.prototype.component1 = function () { return this.numEntries; }; DownloadJobSizeInfo.prototype.component2 = function () { return this.totalSize; }; DownloadJobSizeInfo.prototype.copy_6svq3l$ = function (numEntries, totalSize) { return new DownloadJobSizeInfo(numEntries === void 0 ? this.numEntries : numEntries, totalSize === void 0 ? this.totalSize : totalSize); }; DownloadJobSizeInfo.prototype.toString = function () { return 'DownloadJobSizeInfo(numEntries=' + Kotlin.toString(this.numEntries) + (', totalSize=' + Kotlin.toString(this.totalSize)) + ')'; }; DownloadJobSizeInfo.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.numEntries) | 0; result = result * 31 + Kotlin.hashCode(this.totalSize) | 0; return result; }; DownloadJobSizeInfo.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.numEntries, other.numEntries) && Kotlin.equals(this.totalSize, other.totalSize))))); }; function EntityRole() { EntityRole$Companion_getInstance(); this.erUid = L0; this.erMasterCsn = L0; this.erLocalCsn = L0; this.erLastChangedBy = 0; this.erLct = L0; this.erTableId = 0; this.erEntityUid = L0; this.erGroupUid = L0; this.erRoleUid = L0; this.erActive = false; } function EntityRole$Companion() { EntityRole$Companion_instance = this; this.TABLE_ID = 47; } EntityRole$Companion.prototype.serializer = function () { return EntityRole$$serializer_getInstance(); }; EntityRole$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var EntityRole$Companion_instance = null; function EntityRole$Companion_getInstance() { if (EntityRole$Companion_instance === null) { new EntityRole$Companion(); } return EntityRole$Companion_instance; } function EntityRole$$serializer() { this.descriptor_ri570k$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.EntityRole', this, 10); this.descriptor.addElement_ivxn3r$('erUid', true); this.descriptor.addElement_ivxn3r$('erMasterCsn', true); this.descriptor.addElement_ivxn3r$('erLocalCsn', true); this.descriptor.addElement_ivxn3r$('erLastChangedBy', true); this.descriptor.addElement_ivxn3r$('erLct', true); this.descriptor.addElement_ivxn3r$('erTableId', true); this.descriptor.addElement_ivxn3r$('erEntityUid', true); this.descriptor.addElement_ivxn3r$('erGroupUid', true); this.descriptor.addElement_ivxn3r$('erRoleUid', true); this.descriptor.addElement_ivxn3r$('erActive', true); EntityRole$$serializer_instance = this; } Object.defineProperty(EntityRole$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ri570k$_0; }}); EntityRole$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.erUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.erUid); if (!equals(value.erMasterCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.erMasterCsn); if (!equals(value.erLocalCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.erLocalCsn); if (!equals(value.erLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.erLastChangedBy); if (!equals(value.erLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.erLct); if (!equals(value.erTableId, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.erTableId); if (!equals(value.erEntityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.erEntityUid); if (!equals(value.erGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.erGroupUid); if (!equals(value.erRoleUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.erRoleUid); if (!equals(value.erActive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 9, value.erActive); output.endStructure_24f42q$(this.descriptor); }; EntityRole$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeBooleanElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return EntityRole_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, null); }; EntityRole$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer]; }; EntityRole$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var EntityRole$$serializer_instance = null; function EntityRole$$serializer_getInstance() { if (EntityRole$$serializer_instance === null) { new EntityRole$$serializer(); } return EntityRole$$serializer_instance; } function EntityRole_init(seen1, erUid, erMasterCsn, erLocalCsn, erLastChangedBy, erLct, erTableId, erEntityUid, erGroupUid, erRoleUid, erActive, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(EntityRole.prototype); if ((seen1 & 1) === 0) $this.erUid = L0; else $this.erUid = erUid; if ((seen1 & 2) === 0) $this.erMasterCsn = L0; else $this.erMasterCsn = erMasterCsn; if ((seen1 & 4) === 0) $this.erLocalCsn = L0; else $this.erLocalCsn = erLocalCsn; if ((seen1 & 8) === 0) $this.erLastChangedBy = 0; else $this.erLastChangedBy = erLastChangedBy; if ((seen1 & 16) === 0) $this.erLct = L0; else $this.erLct = erLct; if ((seen1 & 32) === 0) $this.erTableId = 0; else $this.erTableId = erTableId; if ((seen1 & 64) === 0) $this.erEntityUid = L0; else $this.erEntityUid = erEntityUid; if ((seen1 & 128) === 0) $this.erGroupUid = L0; else $this.erGroupUid = erGroupUid; if ((seen1 & 256) === 0) $this.erRoleUid = L0; else $this.erRoleUid = erRoleUid; if ((seen1 & 512) === 0) $this.erActive = false; else $this.erActive = erActive; return $this; } EntityRole.$metadata$ = {kind: Kind_CLASS, simpleName: 'EntityRole', interfaces: []}; function EntityRoleWithNameAndRole() { EntityRoleWithNameAndRole$Companion_getInstance(); EntityRole.call(this); this.entityRoleRole = null; this.entityRoleScopeName = null; } EntityRoleWithNameAndRole.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, EntityRoleWithNameAndRole) ? tmp$_0 : throwCCE(); if (!equals(this.entityRoleRole, other.entityRoleRole)) return false; if (!equals(this.entityRoleScopeName, other.entityRoleScopeName)) return false; return true; }; EntityRoleWithNameAndRole.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2; var result = (tmp$_0 = (tmp$ = this.entityRoleRole) != null ? tmp$.hashCode() : null) != null ? tmp$_0 : 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.entityRoleScopeName) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; return result; }; function EntityRoleWithNameAndRole$Companion() { EntityRoleWithNameAndRole$Companion_instance = this; } EntityRoleWithNameAndRole$Companion.prototype.serializer = function () { return EntityRoleWithNameAndRole$$serializer_getInstance(); }; EntityRoleWithNameAndRole$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var EntityRoleWithNameAndRole$Companion_instance = null; function EntityRoleWithNameAndRole$Companion_getInstance() { if (EntityRoleWithNameAndRole$Companion_instance === null) { new EntityRoleWithNameAndRole$Companion(); } return EntityRoleWithNameAndRole$Companion_instance; } function EntityRoleWithNameAndRole$$serializer() { this.descriptor_qvh4u$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.EntityRoleWithNameAndRole', this, 12); this.descriptor.addElement_ivxn3r$('erUid', true); this.descriptor.addElement_ivxn3r$('erMasterCsn', true); this.descriptor.addElement_ivxn3r$('erLocalCsn', true); this.descriptor.addElement_ivxn3r$('erLastChangedBy', true); this.descriptor.addElement_ivxn3r$('erLct', true); this.descriptor.addElement_ivxn3r$('erTableId', true); this.descriptor.addElement_ivxn3r$('erEntityUid', true); this.descriptor.addElement_ivxn3r$('erGroupUid', true); this.descriptor.addElement_ivxn3r$('erRoleUid', true); this.descriptor.addElement_ivxn3r$('erActive', true); this.descriptor.addElement_ivxn3r$('entityRoleRole', true); this.descriptor.addElement_ivxn3r$('entityRoleScopeName', true); EntityRoleWithNameAndRole$$serializer_instance = this; } Object.defineProperty(EntityRoleWithNameAndRole$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_qvh4u$_0; }}); EntityRoleWithNameAndRole$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.erUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.erUid); if (!equals(value.erMasterCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.erMasterCsn); if (!equals(value.erLocalCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.erLocalCsn); if (!equals(value.erLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.erLastChangedBy); if (!equals(value.erLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.erLct); if (!equals(value.erTableId, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.erTableId); if (!equals(value.erEntityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.erEntityUid); if (!equals(value.erGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.erGroupUid); if (!equals(value.erRoleUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.erRoleUid); if (!equals(value.erActive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 9, value.erActive); if (!equals(value.entityRoleRole, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, Role$$serializer_getInstance(), value.entityRoleRole); if (!equals(value.entityRoleScopeName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, internal.StringSerializer, value.entityRoleScopeName); output.endStructure_24f42q$(this.descriptor); }; EntityRoleWithNameAndRole$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeBooleanElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, Role$$serializer_getInstance(), local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, internal.StringSerializer, local11); bitMask0 |= 2048; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return EntityRoleWithNameAndRole_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, null); }; EntityRoleWithNameAndRole$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, new NullableSerializer(Role$$serializer_getInstance()), new NullableSerializer(internal.StringSerializer)]; }; EntityRoleWithNameAndRole$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var EntityRoleWithNameAndRole$$serializer_instance = null; function EntityRoleWithNameAndRole$$serializer_getInstance() { if (EntityRoleWithNameAndRole$$serializer_instance === null) { new EntityRoleWithNameAndRole$$serializer(); } return EntityRoleWithNameAndRole$$serializer_instance; } function EntityRoleWithNameAndRole_init(seen1, erUid, erMasterCsn, erLocalCsn, erLastChangedBy, erLct, erTableId, erEntityUid, erGroupUid, erRoleUid, erActive, entityRoleRole, entityRoleScopeName, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(EntityRoleWithNameAndRole.prototype); $this = EntityRole_init(seen1, erUid, erMasterCsn, erLocalCsn, erLastChangedBy, erLct, erTableId, erEntityUid, erGroupUid, erRoleUid, erActive, $this); if ((seen1 & 1024) === 0) $this.entityRoleRole = null; else $this.entityRoleRole = entityRoleRole; if ((seen1 & 2048) === 0) $this.entityRoleScopeName = null; else $this.entityRoleScopeName = entityRoleScopeName; return $this; } EntityRoleWithNameAndRole.$metadata$ = {kind: Kind_CLASS, simpleName: 'EntityRoleWithNameAndRole', interfaces: [EntityRole]}; var EntryStatusResponse$Companion_instance = null; function EntryStatusResponse$$serializer() { this.descriptor_qx7gpw$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.EntryStatusResponse', this, 5); this.descriptor.addElement_ivxn3r$('erContainerUid', true); this.descriptor.addElement_ivxn3r$('available', true); this.descriptor.addElement_ivxn3r$('erId', true); this.descriptor.addElement_ivxn3r$('responseTime', true); this.descriptor.addElement_ivxn3r$('erNodeId', true); EntryStatusResponse$$serializer_instance = this; } var EntryStatusResponse$$serializer_instance = null; function ErrorReport() { ErrorReport$Companion_getInstance(); this.errUid = L0; this.errPcsn = L0; this.errLcsn = L0; this.errLcb = 0; this.errLct = L0; this.severity = 0; this.timestamp = L0; this.presenterUri = null; this.appVersion = null; this.versionCode = 0; this.errorCode = 0; this.operatingSys = null; this.osVersion = null; this.stackTrace = null; this.message = null; } function ErrorReport$Companion() { ErrorReport$Companion_instance = this; this.SEVERITY_WARNING = 1; this.SEVERITY_ERROR = 2; this.SEVERITY_WTF = 3; } ErrorReport$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ErrorReport$Companion_instance = null; function ErrorReport$Companion_getInstance() { if (ErrorReport$Companion_instance === null) { new ErrorReport$Companion(); } return ErrorReport$Companion_instance; } ErrorReport.$metadata$ = {kind: Kind_CLASS, simpleName: 'ErrorReport', interfaces: []}; var ErrorReportReplicate$Companion_instance = null; function ErrorReportReplicate$$serializer() { this.descriptor_18nk3c$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ErrorReportReplicate', this, 4); this.descriptor.addElement_ivxn3r$('erPk', true); this.descriptor.addElement_ivxn3r$('erVersionId', true); this.descriptor.addElement_ivxn3r$('erDestination', true); this.descriptor.addElement_ivxn3r$('erPending', true); ErrorReportReplicate$$serializer_instance = this; } var ErrorReportReplicate$$serializer_instance = null; function GroupLearningSession() { GroupLearningSession$Companion_getInstance(); this.groupLearningSessionUid = L0; this.groupLearningSessionContentUid = L0; this.groupLearningSessionLearnerGroupUid = L0; this.groupLearningSessionInactive = false; this.groupLearningSessionMCSN = L0; this.groupLearningSessionCSN = L0; this.groupLearningSessionLCB = 0; this.groupLearningSessionLct = L0; } function GroupLearningSession$Companion() { GroupLearningSession$Companion_instance = this; this.TABLE_ID = 302; } GroupLearningSession$Companion.prototype.serializer = function () { return GroupLearningSession$$serializer_getInstance(); }; GroupLearningSession$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var GroupLearningSession$Companion_instance = null; function GroupLearningSession$Companion_getInstance() { if (GroupLearningSession$Companion_instance === null) { new GroupLearningSession$Companion(); } return GroupLearningSession$Companion_instance; } function GroupLearningSession$$serializer() { this.descriptor_b561zw$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.GroupLearningSession', this, 8); this.descriptor.addElement_ivxn3r$('groupLearningSessionUid', true); this.descriptor.addElement_ivxn3r$('groupLearningSessionContentUid', true); this.descriptor.addElement_ivxn3r$('groupLearningSessionLearnerGroupUid', true); this.descriptor.addElement_ivxn3r$('groupLearningSessionInactive', true); this.descriptor.addElement_ivxn3r$('groupLearningSessionMCSN', true); this.descriptor.addElement_ivxn3r$('groupLearningSessionCSN', true); this.descriptor.addElement_ivxn3r$('groupLearningSessionLCB', true); this.descriptor.addElement_ivxn3r$('groupLearningSessionLct', true); GroupLearningSession$$serializer_instance = this; } Object.defineProperty(GroupLearningSession$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_b561zw$_0; }}); GroupLearningSession$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.groupLearningSessionUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.groupLearningSessionUid); if (!equals(value.groupLearningSessionContentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.groupLearningSessionContentUid); if (!equals(value.groupLearningSessionLearnerGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.groupLearningSessionLearnerGroupUid); if (!equals(value.groupLearningSessionInactive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 3, value.groupLearningSessionInactive); if (!equals(value.groupLearningSessionMCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.groupLearningSessionMCSN); if (!equals(value.groupLearningSessionCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.groupLearningSessionCSN); if (!equals(value.groupLearningSessionLCB, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.groupLearningSessionLCB); if (!equals(value.groupLearningSessionLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.groupLearningSessionLct); output.endStructure_24f42q$(this.descriptor); }; GroupLearningSession$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeBooleanElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return GroupLearningSession_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; GroupLearningSession$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; GroupLearningSession$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var GroupLearningSession$$serializer_instance = null; function GroupLearningSession$$serializer_getInstance() { if (GroupLearningSession$$serializer_instance === null) { new GroupLearningSession$$serializer(); } return GroupLearningSession$$serializer_instance; } function GroupLearningSession_init(seen1, groupLearningSessionUid, groupLearningSessionContentUid, groupLearningSessionLearnerGroupUid, groupLearningSessionInactive, groupLearningSessionMCSN, groupLearningSessionCSN, groupLearningSessionLCB, groupLearningSessionLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(GroupLearningSession.prototype); if ((seen1 & 1) === 0) $this.groupLearningSessionUid = L0; else $this.groupLearningSessionUid = groupLearningSessionUid; if ((seen1 & 2) === 0) $this.groupLearningSessionContentUid = L0; else $this.groupLearningSessionContentUid = groupLearningSessionContentUid; if ((seen1 & 4) === 0) $this.groupLearningSessionLearnerGroupUid = L0; else $this.groupLearningSessionLearnerGroupUid = groupLearningSessionLearnerGroupUid; if ((seen1 & 8) === 0) $this.groupLearningSessionInactive = false; else $this.groupLearningSessionInactive = groupLearningSessionInactive; if ((seen1 & 16) === 0) $this.groupLearningSessionMCSN = L0; else $this.groupLearningSessionMCSN = groupLearningSessionMCSN; if ((seen1 & 32) === 0) $this.groupLearningSessionCSN = L0; else $this.groupLearningSessionCSN = groupLearningSessionCSN; if ((seen1 & 64) === 0) $this.groupLearningSessionLCB = 0; else $this.groupLearningSessionLCB = groupLearningSessionLCB; if ((seen1 & 128) === 0) $this.groupLearningSessionLct = L0; else $this.groupLearningSessionLct = groupLearningSessionLct; return $this; } GroupLearningSession.$metadata$ = {kind: Kind_CLASS, simpleName: 'GroupLearningSession', interfaces: []}; var GroupLearningSessionReplicate$Companion_instance = null; function GroupLearningSessionReplicate$$serializer() { this.descriptor_o20hvz$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.GroupLearningSessionReplicate', this, 4); this.descriptor.addElement_ivxn3r$('glsPk', true); this.descriptor.addElement_ivxn3r$('glsVersionId', true); this.descriptor.addElement_ivxn3r$('glsDestination', true); this.descriptor.addElement_ivxn3r$('glsPending', true); GroupLearningSessionReplicate$$serializer_instance = this; } var GroupLearningSessionReplicate$$serializer_instance = null; function Holiday() { Holiday$Companion_getInstance(); this.holUid = L0; this.holMasterCsn = L0; this.holLocalCsn = L0; this.holLastModBy = 0; this.holLct = L0; this.holActive = true; this.holHolidayCalendarUid = L0; this.holStartTime = L0; this.holEndTime = L0; this.holName = null; } function Holiday$Companion() { Holiday$Companion_instance = this; this.TABLE_ID = 99; } Holiday$Companion.prototype.serializer = function () { return Holiday$$serializer_getInstance(); }; Holiday$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var Holiday$Companion_instance = null; function Holiday$Companion_getInstance() { if (Holiday$Companion_instance === null) { new Holiday$Companion(); } return Holiday$Companion_instance; } Holiday.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, Holiday) ? tmp$_0 : throwCCE(); if (!equals(this.holUid, other.holUid)) return false; if (!equals(this.holMasterCsn, other.holMasterCsn)) return false; if (!equals(this.holLocalCsn, other.holLocalCsn)) return false; if (this.holLastModBy !== other.holLastModBy) return false; if (this.holActive !== other.holActive) return false; if (!equals(this.holHolidayCalendarUid, other.holHolidayCalendarUid)) return false; if (!equals(this.holStartTime, other.holStartTime)) return false; if (!equals(this.holEndTime, other.holEndTime)) return false; if (!equals(this.holName, other.holName)) return false; return true; }; Holiday.prototype.hashCode = function () { var tmp$, tmp$_0; var result = hashCode(this.holUid); result = (31 * result | 0) + hashCode(this.holMasterCsn) | 0; result = (31 * result | 0) + hashCode(this.holLocalCsn) | 0; result = (31 * result | 0) + this.holLastModBy | 0; result = (31 * result | 0) + hashCode(this.holActive) | 0; result = (31 * result | 0) + hashCode(this.holHolidayCalendarUid) | 0; result = (31 * result | 0) + hashCode(this.holStartTime) | 0; result = (31 * result | 0) + hashCode(this.holEndTime) | 0; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.holName) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; return result; }; function Holiday$$serializer() { this.descriptor_qg6qmv$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.Holiday', this, 10); this.descriptor.addElement_ivxn3r$('holUid', true); this.descriptor.addElement_ivxn3r$('holMasterCsn', true); this.descriptor.addElement_ivxn3r$('holLocalCsn', true); this.descriptor.addElement_ivxn3r$('holLastModBy', true); this.descriptor.addElement_ivxn3r$('holLct', true); this.descriptor.addElement_ivxn3r$('holActive', true); this.descriptor.addElement_ivxn3r$('holHolidayCalendarUid', true); this.descriptor.addElement_ivxn3r$('holStartTime', true); this.descriptor.addElement_ivxn3r$('holEndTime', true); this.descriptor.addElement_ivxn3r$('holName', true); Holiday$$serializer_instance = this; } Object.defineProperty(Holiday$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_qg6qmv$_0; }}); Holiday$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.holUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.holUid); if (!equals(value.holMasterCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.holMasterCsn); if (!equals(value.holLocalCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.holLocalCsn); if (!equals(value.holLastModBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.holLastModBy); if (!equals(value.holLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.holLct); if (!equals(value.holActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 5, value.holActive); if (!equals(value.holHolidayCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.holHolidayCalendarUid); if (!equals(value.holStartTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.holStartTime); if (!equals(value.holEndTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.holEndTime); if (!equals(value.holName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.holName); output.endStructure_24f42q$(this.descriptor); }; Holiday$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeBooleanElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return Holiday_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, null); }; Holiday$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer)]; }; Holiday$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var Holiday$$serializer_instance = null; function Holiday$$serializer_getInstance() { if (Holiday$$serializer_instance === null) { new Holiday$$serializer(); } return Holiday$$serializer_instance; } function Holiday_init(seen1, holUid, holMasterCsn, holLocalCsn, holLastModBy, holLct, holActive, holHolidayCalendarUid, holStartTime, holEndTime, holName, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(Holiday.prototype); if ((seen1 & 1) === 0) $this.holUid = L0; else $this.holUid = holUid; if ((seen1 & 2) === 0) $this.holMasterCsn = L0; else $this.holMasterCsn = holMasterCsn; if ((seen1 & 4) === 0) $this.holLocalCsn = L0; else $this.holLocalCsn = holLocalCsn; if ((seen1 & 8) === 0) $this.holLastModBy = 0; else $this.holLastModBy = holLastModBy; if ((seen1 & 16) === 0) $this.holLct = L0; else $this.holLct = holLct; if ((seen1 & 32) === 0) $this.holActive = true; else $this.holActive = holActive; if ((seen1 & 64) === 0) $this.holHolidayCalendarUid = L0; else $this.holHolidayCalendarUid = holHolidayCalendarUid; if ((seen1 & 128) === 0) $this.holStartTime = L0; else $this.holStartTime = holStartTime; if ((seen1 & 256) === 0) $this.holEndTime = L0; else $this.holEndTime = holEndTime; if ((seen1 & 512) === 0) $this.holName = null; else $this.holName = holName; return $this; } Holiday.$metadata$ = {kind: Kind_CLASS, simpleName: 'Holiday', interfaces: []}; function HolidayCalendar() { HolidayCalendar$Companion_getInstance(); this.umCalendarUid = L0; this.umCalendarName = null; this.umCalendarCategory = 1; this.umCalendarActive = true; this.umCalendarMasterChangeSeqNum = L0; this.umCalendarLocalChangeSeqNum = L0; this.umCalendarLastChangedBy = 0; this.umCalendarLct = L0; } function HolidayCalendar$Companion() { HolidayCalendar$Companion_instance = this; this.TABLE_ID = 28; this.CATEGORY_HOLIDAY = 1; } HolidayCalendar$Companion.prototype.serializer = function () { return HolidayCalendar$$serializer_getInstance(); }; HolidayCalendar$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var HolidayCalendar$Companion_instance = null; function HolidayCalendar$Companion_getInstance() { if (HolidayCalendar$Companion_instance === null) { new HolidayCalendar$Companion(); } return HolidayCalendar$Companion_instance; } function HolidayCalendar$$serializer() { this.descriptor_p75c51$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.HolidayCalendar', this, 8); this.descriptor.addElement_ivxn3r$('umCalendarUid', true); this.descriptor.addElement_ivxn3r$('umCalendarName', true); this.descriptor.addElement_ivxn3r$('umCalendarCategory', true); this.descriptor.addElement_ivxn3r$('umCalendarActive', true); this.descriptor.addElement_ivxn3r$('umCalendarMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('umCalendarLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('umCalendarLastChangedBy', true); this.descriptor.addElement_ivxn3r$('umCalendarLct', true); HolidayCalendar$$serializer_instance = this; } Object.defineProperty(HolidayCalendar$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_p75c51$_0; }}); HolidayCalendar$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.umCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.umCalendarUid); if (!equals(value.umCalendarName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.umCalendarName); if (!equals(value.umCalendarCategory, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.umCalendarCategory); if (!equals(value.umCalendarActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 3, value.umCalendarActive); if (!equals(value.umCalendarMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.umCalendarMasterChangeSeqNum); if (!equals(value.umCalendarLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.umCalendarLocalChangeSeqNum); if (!equals(value.umCalendarLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.umCalendarLastChangedBy); if (!equals(value.umCalendarLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.umCalendarLct); output.endStructure_24f42q$(this.descriptor); }; HolidayCalendar$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeBooleanElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return HolidayCalendar_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; HolidayCalendar$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; HolidayCalendar$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var HolidayCalendar$$serializer_instance = null; function HolidayCalendar$$serializer_getInstance() { if (HolidayCalendar$$serializer_instance === null) { new HolidayCalendar$$serializer(); } return HolidayCalendar$$serializer_instance; } function HolidayCalendar_init(seen1, umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(HolidayCalendar.prototype); if ((seen1 & 1) === 0) $this.umCalendarUid = L0; else $this.umCalendarUid = umCalendarUid; if ((seen1 & 2) === 0) $this.umCalendarName = null; else $this.umCalendarName = umCalendarName; if ((seen1 & 4) === 0) $this.umCalendarCategory = 1; else $this.umCalendarCategory = umCalendarCategory; if ((seen1 & 8) === 0) $this.umCalendarActive = true; else $this.umCalendarActive = umCalendarActive; if ((seen1 & 16) === 0) $this.umCalendarMasterChangeSeqNum = L0; else $this.umCalendarMasterChangeSeqNum = umCalendarMasterChangeSeqNum; if ((seen1 & 32) === 0) $this.umCalendarLocalChangeSeqNum = L0; else $this.umCalendarLocalChangeSeqNum = umCalendarLocalChangeSeqNum; if ((seen1 & 64) === 0) $this.umCalendarLastChangedBy = 0; else $this.umCalendarLastChangedBy = umCalendarLastChangedBy; if ((seen1 & 128) === 0) $this.umCalendarLct = L0; else $this.umCalendarLct = umCalendarLct; return $this; } HolidayCalendar.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayCalendar', interfaces: []}; var HolidayCalendarReplicate$Companion_instance = null; function HolidayCalendarReplicate$$serializer() { this.descriptor_q7rxcy$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.HolidayCalendarReplicate', this, 4); this.descriptor.addElement_ivxn3r$('hcPk', true); this.descriptor.addElement_ivxn3r$('hcVersionId', true); this.descriptor.addElement_ivxn3r$('hcDestination', true); this.descriptor.addElement_ivxn3r$('hcPending', true); HolidayCalendarReplicate$$serializer_instance = this; } var HolidayCalendarReplicate$$serializer_instance = null; function HolidayCalendarWithNumEntries() { HolidayCalendarWithNumEntries$Companion_getInstance(); HolidayCalendar.call(this); this.numEntries = 0; } function HolidayCalendarWithNumEntries$Companion() { HolidayCalendarWithNumEntries$Companion_instance = this; } HolidayCalendarWithNumEntries$Companion.prototype.serializer = function () { return HolidayCalendarWithNumEntries$$serializer_getInstance(); }; HolidayCalendarWithNumEntries$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var HolidayCalendarWithNumEntries$Companion_instance = null; function HolidayCalendarWithNumEntries$Companion_getInstance() { if (HolidayCalendarWithNumEntries$Companion_instance === null) { new HolidayCalendarWithNumEntries$Companion(); } return HolidayCalendarWithNumEntries$Companion_instance; } function HolidayCalendarWithNumEntries$$serializer() { this.descriptor_j8zuxx$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.HolidayCalendarWithNumEntries', this, 9); this.descriptor.addElement_ivxn3r$('umCalendarUid', true); this.descriptor.addElement_ivxn3r$('umCalendarName', true); this.descriptor.addElement_ivxn3r$('umCalendarCategory', true); this.descriptor.addElement_ivxn3r$('umCalendarActive', true); this.descriptor.addElement_ivxn3r$('umCalendarMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('umCalendarLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('umCalendarLastChangedBy', true); this.descriptor.addElement_ivxn3r$('umCalendarLct', true); this.descriptor.addElement_ivxn3r$('numEntries', true); HolidayCalendarWithNumEntries$$serializer_instance = this; } Object.defineProperty(HolidayCalendarWithNumEntries$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_j8zuxx$_0; }}); HolidayCalendarWithNumEntries$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.umCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.umCalendarUid); if (!equals(value.umCalendarName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.umCalendarName); if (!equals(value.umCalendarCategory, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.umCalendarCategory); if (!equals(value.umCalendarActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 3, value.umCalendarActive); if (!equals(value.umCalendarMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.umCalendarMasterChangeSeqNum); if (!equals(value.umCalendarLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.umCalendarLocalChangeSeqNum); if (!equals(value.umCalendarLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.umCalendarLastChangedBy); if (!equals(value.umCalendarLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.umCalendarLct); if (!equals(value.numEntries, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeIntElement_ptg7oe$(this.descriptor, 8, value.numEntries); output.endStructure_24f42q$(this.descriptor); }; HolidayCalendarWithNumEntries$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeBooleanElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeIntElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return HolidayCalendarWithNumEntries_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, null); }; HolidayCalendarWithNumEntries$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer]; }; HolidayCalendarWithNumEntries$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var HolidayCalendarWithNumEntries$$serializer_instance = null; function HolidayCalendarWithNumEntries$$serializer_getInstance() { if (HolidayCalendarWithNumEntries$$serializer_instance === null) { new HolidayCalendarWithNumEntries$$serializer(); } return HolidayCalendarWithNumEntries$$serializer_instance; } function HolidayCalendarWithNumEntries_init(seen1, umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct, numEntries, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(HolidayCalendarWithNumEntries.prototype); $this = HolidayCalendar_init(seen1, umCalendarUid, umCalendarName, umCalendarCategory, umCalendarActive, umCalendarMasterChangeSeqNum, umCalendarLocalChangeSeqNum, umCalendarLastChangedBy, umCalendarLct, $this); if ((seen1 & 256) === 0) $this.numEntries = 0; else $this.numEntries = numEntries; return $this; } HolidayCalendarWithNumEntries.$metadata$ = {kind: Kind_CLASS, simpleName: 'HolidayCalendarWithNumEntries', interfaces: [HolidayCalendar]}; var HolidayReplicate$Companion_instance = null; function HolidayReplicate$$serializer() { this.descriptor_3ip5ok$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.HolidayReplicate', this, 4); this.descriptor.addElement_ivxn3r$('holidayPk', true); this.descriptor.addElement_ivxn3r$('holidayVersionId', true); this.descriptor.addElement_ivxn3r$('holidayDestination', true); this.descriptor.addElement_ivxn3r$('holidayPending', true); HolidayReplicate$$serializer_instance = this; } var HolidayReplicate$$serializer_instance = null; function LangUidAndName() { LangUidAndName$Companion_getInstance(); this.langUid = L0; this.langName = null; } LangUidAndName.prototype.toString = function () { return toString(this.langName); }; LangUidAndName.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, LangUidAndName) ? tmp$_0 : throwCCE(); if (!equals(this.langUid, other.langUid)) return false; if (!equals(this.langName, other.langName)) return false; return true; }; LangUidAndName.prototype.hashCode = function () { var tmp$, tmp$_0; var result = hashCode(this.langUid); result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.langName) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; return result; }; function LangUidAndName$Companion() { LangUidAndName$Companion_instance = this; } LangUidAndName$Companion.prototype.serializer = function () { return LangUidAndName$$serializer_getInstance(); }; LangUidAndName$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var LangUidAndName$Companion_instance = null; function LangUidAndName$Companion_getInstance() { if (LangUidAndName$Companion_instance === null) { new LangUidAndName$Companion(); } return LangUidAndName$Companion_instance; } function LangUidAndName$$serializer() { this.descriptor_aalamt$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.LangUidAndName', this, 2); this.descriptor.addElement_ivxn3r$('langUid', true); this.descriptor.addElement_ivxn3r$('langName', true); LangUidAndName$$serializer_instance = this; } Object.defineProperty(LangUidAndName$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_aalamt$_0; }}); LangUidAndName$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.langUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.langUid); if (!equals(value.langName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.langName); output.endStructure_24f42q$(this.descriptor); }; LangUidAndName$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return LangUidAndName_init(bitMask0, local0, local1, null); }; LangUidAndName$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer)]; }; LangUidAndName$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var LangUidAndName$$serializer_instance = null; function LangUidAndName$$serializer_getInstance() { if (LangUidAndName$$serializer_instance === null) { new LangUidAndName$$serializer(); } return LangUidAndName$$serializer_instance; } function LangUidAndName_init(seen1, langUid, langName, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(LangUidAndName.prototype); if ((seen1 & 1) === 0) $this.langUid = L0; else $this.langUid = langUid; if ((seen1 & 2) === 0) $this.langName = null; else $this.langName = langName; return $this; } LangUidAndName.$metadata$ = {kind: Kind_CLASS, simpleName: 'LangUidAndName', interfaces: []}; function Language() { Language$Companion_getInstance(); this.langUid = L0; this.name = null; this.iso_639_1_standard = null; this.iso_639_2_standard = null; this.iso_639_3_standard = null; this.Language_Type = null; this.languageActive = true; this.langLocalChangeSeqNum = L0; this.langMasterChangeSeqNum = L0; this.langLastChangedBy = 0; this.langLct = L0; } Language.prototype.toString = function () { return toString(this.name); }; Language.prototype.equals = function (other) { var tmp$; if (this === other) return true; var language = (tmp$ = other) == null || Kotlin.isType(tmp$, Language) ? tmp$ : throwCCE(); if (!equals(this.langUid, ensureNotNull(language).langUid)) return false; if (this.name != null ? !equals(this.name, language.name) : language.name != null) return false; if (this.iso_639_1_standard != null ? !equals(this.iso_639_1_standard, language.iso_639_1_standard) : language.iso_639_1_standard != null) return false; if (this.iso_639_2_standard != null ? !equals(this.iso_639_2_standard, language.iso_639_2_standard) : language.iso_639_2_standard != null) return false; return this.iso_639_3_standard != null ? equals(this.iso_639_3_standard, language.iso_639_3_standard) : language.iso_639_3_standard == null; }; Language.prototype.hashCode = function () { var result = this.langUid.xor(this.langUid.shiftRightUnsigned(32)).toInt(); result = (31 * result | 0) + (this.name != null ? hashCode(ensureNotNull(this.name)) : 0) | 0; result = (31 * result | 0) + (this.iso_639_1_standard != null ? hashCode(ensureNotNull(this.iso_639_1_standard)) : 0) | 0; result = (31 * result | 0) + (this.iso_639_2_standard != null ? hashCode(ensureNotNull(this.iso_639_2_standard)) : 0) | 0; result = (31 * result | 0) + (this.iso_639_3_standard != null ? hashCode(ensureNotNull(this.iso_639_3_standard)) : 0) | 0; return result; }; function Language$Companion() { Language$Companion_instance = this; this.TABLE_ID = 13; this.ENGLISH_LANG_UID = L10000; this.ARABIC_LANG_UID = L10001; this.BENGALI_LANG_UID = L10002; this.BURMESE_LANG_UID = L10003; this.KINYARWANDA_LANG_UID = L10004; this.NEPALI_LANG_UID = L10005; this.PASHTO_LANG_UID = L10006; this.PERSIAN_LANG_UID = L10007; this.RUSSIAN_LANG_UID = L10008; this.TAJIK_LANG_UID = L10009; var $receiver = new Language(); $receiver.name = 'English'; $receiver.langUid = this.ENGLISH_LANG_UID; $receiver.iso_639_1_standard = 'en'; $receiver.iso_639_2_standard = 'eng'; $receiver.iso_639_3_standard = 'eng'; var $receiver_0 = new Language(); $receiver_0.name = '\u0627\u0644\u0639\u0631\u0628\u064A\u0629'; $receiver_0.langUid = this.ARABIC_LANG_UID; $receiver_0.iso_639_1_standard = 'ar'; $receiver_0.iso_639_2_standard = 'ara'; $receiver_0.iso_639_3_standard = 'ara'; var $receiver_1 = new Language(); $receiver_1.name = '\u09AC\u09BE\u0982\u09B2\u09BE'; $receiver_1.langUid = this.BENGALI_LANG_UID; $receiver_1.iso_639_1_standard = 'bn'; $receiver_1.iso_639_2_standard = 'ben'; $receiver_1.iso_639_3_standard = 'ben'; var $receiver_2 = new Language(); $receiver_2.name = '\u1019\u103C\u1014\u103A\u1019\u102C'; $receiver_2.langUid = this.BURMESE_LANG_UID; $receiver_2.iso_639_1_standard = 'my'; $receiver_2.iso_639_2_standard = 'bur'; $receiver_2.iso_639_3_standard = 'mya'; var $receiver_3 = new Language(); $receiver_3.name = 'Ikinyarwanda'; $receiver_3.langUid = this.KINYARWANDA_LANG_UID; $receiver_3.iso_639_1_standard = 'rw'; $receiver_3.iso_639_2_standard = 'kin'; $receiver_3.iso_639_3_standard = 'kin'; var $receiver_4 = new Language(); $receiver_4.name = '\u0928\u0947\u092A\u093E\u0932\u0940'; $receiver_4.langUid = this.NEPALI_LANG_UID; $receiver_4.iso_639_1_standard = 'ne'; $receiver_4.iso_639_2_standard = 'nep'; $receiver_4.iso_639_3_standard = 'nep'; var $receiver_5 = new Language(); $receiver_5.name = '\u067E\u069A\u062A\u0648'; $receiver_5.langUid = this.PASHTO_LANG_UID; $receiver_5.iso_639_1_standard = 'ps'; $receiver_5.iso_639_2_standard = 'pus'; $receiver_5.iso_639_3_standard = 'pus'; var $receiver_6 = new Language(); $receiver_6.name = '\u0641\u0627\u0631\u0633\u06CC'; $receiver_6.langUid = this.PERSIAN_LANG_UID; $receiver_6.iso_639_1_standard = 'fa'; $receiver_6.iso_639_2_standard = 'per'; $receiver_6.iso_639_3_standard = 'fas'; var $receiver_7 = new Language(); $receiver_7.name = '\u0440\u0443\u0441\u0441\u043A\u0438\u0439'; $receiver_7.langUid = this.RUSSIAN_LANG_UID; $receiver_7.iso_639_1_standard = 'ru'; $receiver_7.iso_639_2_standard = 'rus'; $receiver_7.iso_639_3_standard = 'rus'; var $receiver_8 = new Language(); $receiver_8.name = '\u0422\u043E\u04B7\u0438\u043A\u04E3'; $receiver_8.langUid = this.TAJIK_LANG_UID; $receiver_8.iso_639_1_standard = 'tg'; $receiver_8.iso_639_2_standard = 'tgk'; $receiver_8.iso_639_3_standard = 'tgk'; this.FIXED_LANGUAGES = listOf([$receiver, $receiver_0, $receiver_1, $receiver_2, $receiver_3, $receiver_4, $receiver_5, $receiver_6, $receiver_7, $receiver_8]); } Language$Companion.prototype.serializer = function () { return Language$$serializer_getInstance(); }; Language$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var Language$Companion_instance = null; function Language$Companion_getInstance() { if (Language$Companion_instance === null) { new Language$Companion(); } return Language$Companion_instance; } function Language$$serializer() { this.descriptor_6a234t$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.Language', this, 11); this.descriptor.addElement_ivxn3r$('langUid', true); this.descriptor.addElement_ivxn3r$('name', true); this.descriptor.addElement_ivxn3r$('iso_639_1_standard', true); this.descriptor.addElement_ivxn3r$('iso_639_2_standard', true); this.descriptor.addElement_ivxn3r$('iso_639_3_standard', true); this.descriptor.addElement_ivxn3r$('Language_Type', true); this.descriptor.addElement_ivxn3r$('languageActive', true); this.descriptor.addElement_ivxn3r$('langLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('langMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('langLastChangedBy', true); this.descriptor.addElement_ivxn3r$('langLct', true); Language$$serializer_instance = this; } Object.defineProperty(Language$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_6a234t$_0; }}); Language$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.langUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.langUid); if (!equals(value.name, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.name); if (!equals(value.iso_639_1_standard, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.iso_639_1_standard); if (!equals(value.iso_639_2_standard, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.iso_639_2_standard); if (!equals(value.iso_639_3_standard, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.iso_639_3_standard); if (!equals(value.Language_Type, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.Language_Type); if (!equals(value.languageActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.languageActive); if (!equals(value.langLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.langLocalChangeSeqNum); if (!equals(value.langMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.langMasterChangeSeqNum); if (!equals(value.langLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.langLastChangedBy); if (!equals(value.langLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.langLct); output.endStructure_24f42q$(this.descriptor); }; Language$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return Language_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, null); }; Language$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; Language$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var Language$$serializer_instance = null; function Language$$serializer_getInstance() { if (Language$$serializer_instance === null) { new Language$$serializer(); } return Language$$serializer_instance; } function Language_init(seen1, langUid, name, iso_639_1_standard, iso_639_2_standard, iso_639_3_standard, Language_Type, languageActive, langLocalChangeSeqNum, langMasterChangeSeqNum, langLastChangedBy, langLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(Language.prototype); if ((seen1 & 1) === 0) $this.langUid = L0; else $this.langUid = langUid; if ((seen1 & 2) === 0) $this.name = null; else $this.name = name; if ((seen1 & 4) === 0) $this.iso_639_1_standard = null; else $this.iso_639_1_standard = iso_639_1_standard; if ((seen1 & 8) === 0) $this.iso_639_2_standard = null; else $this.iso_639_2_standard = iso_639_2_standard; if ((seen1 & 16) === 0) $this.iso_639_3_standard = null; else $this.iso_639_3_standard = iso_639_3_standard; if ((seen1 & 32) === 0) $this.Language_Type = null; else $this.Language_Type = Language_Type; if ((seen1 & 64) === 0) $this.languageActive = true; else $this.languageActive = languageActive; if ((seen1 & 128) === 0) $this.langLocalChangeSeqNum = L0; else $this.langLocalChangeSeqNum = langLocalChangeSeqNum; if ((seen1 & 256) === 0) $this.langMasterChangeSeqNum = L0; else $this.langMasterChangeSeqNum = langMasterChangeSeqNum; if ((seen1 & 512) === 0) $this.langLastChangedBy = 0; else $this.langLastChangedBy = langLastChangedBy; if ((seen1 & 1024) === 0) $this.langLct = L0; else $this.langLct = langLct; return $this; } Language.$metadata$ = {kind: Kind_CLASS, simpleName: 'Language', interfaces: []}; var LanguageReplicate$Companion_instance = null; function LanguageReplicate$$serializer() { this.descriptor_9u8ts$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.LanguageReplicate', this, 4); this.descriptor.addElement_ivxn3r$('languagePk', true); this.descriptor.addElement_ivxn3r$('languageVersionId', true); this.descriptor.addElement_ivxn3r$('languageDestination', true); this.descriptor.addElement_ivxn3r$('languagePending', true); LanguageReplicate$$serializer_instance = this; } var LanguageReplicate$$serializer_instance = null; function LanguageVariant() { LanguageVariant$Companion_getInstance(); this.langVariantUid = L0; this.langUid = L0; this.countryCode = null; this.name = null; this.langVariantLocalChangeSeqNum = L0; this.langVariantMasterChangeSeqNum = L0; this.langVariantLastChangedBy = 0; this.langVariantLct = L0; } LanguageVariant.prototype.equals = function (other) { var tmp$; if (this === other) return true; var that = (tmp$ = other) == null || Kotlin.isType(tmp$, LanguageVariant) ? tmp$ : throwCCE(); if (!equals(this.langVariantUid, ensureNotNull(that).langVariantUid)) return false; if (!equals(this.langUid, that.langUid)) return false; if (this.countryCode != null ? !equals(this.countryCode, that.countryCode) : that.countryCode != null) return false; return this.name != null ? equals(this.name, that.name) : that.name == null; }; LanguageVariant.prototype.hashCode = function () { var result = this.langVariantUid.xor(this.langVariantUid.shiftRightUnsigned(32)).toInt(); result = (31 * result | 0) + this.langUid.xor(this.langUid.shiftRightUnsigned(32)).toInt() | 0; result = (31 * result | 0) + (this.countryCode != null ? hashCode(ensureNotNull(this.countryCode)) : 0) | 0; result = (31 * result | 0) + (this.name != null ? hashCode(ensureNotNull(this.name)) : 0) | 0; return result; }; function LanguageVariant$Companion() { LanguageVariant$Companion_instance = this; this.TABLE_ID = 10; } LanguageVariant$Companion.prototype.serializer = function () { return LanguageVariant$$serializer_getInstance(); }; LanguageVariant$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var LanguageVariant$Companion_instance = null; function LanguageVariant$Companion_getInstance() { if (LanguageVariant$Companion_instance === null) { new LanguageVariant$Companion(); } return LanguageVariant$Companion_instance; } function LanguageVariant$$serializer() { this.descriptor_t2mgwc$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.LanguageVariant', this, 8); this.descriptor.addElement_ivxn3r$('langVariantUid', true); this.descriptor.addElement_ivxn3r$('langUid', true); this.descriptor.addElement_ivxn3r$('countryCode', true); this.descriptor.addElement_ivxn3r$('name', true); this.descriptor.addElement_ivxn3r$('langVariantLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('langVariantMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('langVariantLastChangedBy', true); this.descriptor.addElement_ivxn3r$('langVariantLct', true); LanguageVariant$$serializer_instance = this; } Object.defineProperty(LanguageVariant$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_t2mgwc$_0; }}); LanguageVariant$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.langVariantUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.langVariantUid); if (!equals(value.langUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.langUid); if (!equals(value.countryCode, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.countryCode); if (!equals(value.name, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.name); if (!equals(value.langVariantLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.langVariantLocalChangeSeqNum); if (!equals(value.langVariantMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.langVariantMasterChangeSeqNum); if (!equals(value.langVariantLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.langVariantLastChangedBy); if (!equals(value.langVariantLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.langVariantLct); output.endStructure_24f42q$(this.descriptor); }; LanguageVariant$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return LanguageVariant_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; LanguageVariant$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; LanguageVariant$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var LanguageVariant$$serializer_instance = null; function LanguageVariant$$serializer_getInstance() { if (LanguageVariant$$serializer_instance === null) { new LanguageVariant$$serializer(); } return LanguageVariant$$serializer_instance; } function LanguageVariant_init(seen1, langVariantUid, langUid, countryCode, name, langVariantLocalChangeSeqNum, langVariantMasterChangeSeqNum, langVariantLastChangedBy, langVariantLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(LanguageVariant.prototype); if ((seen1 & 1) === 0) $this.langVariantUid = L0; else $this.langVariantUid = langVariantUid; if ((seen1 & 2) === 0) $this.langUid = L0; else $this.langUid = langUid; if ((seen1 & 4) === 0) $this.countryCode = null; else $this.countryCode = countryCode; if ((seen1 & 8) === 0) $this.name = null; else $this.name = name; if ((seen1 & 16) === 0) $this.langVariantLocalChangeSeqNum = L0; else $this.langVariantLocalChangeSeqNum = langVariantLocalChangeSeqNum; if ((seen1 & 32) === 0) $this.langVariantMasterChangeSeqNum = L0; else $this.langVariantMasterChangeSeqNum = langVariantMasterChangeSeqNum; if ((seen1 & 64) === 0) $this.langVariantLastChangedBy = 0; else $this.langVariantLastChangedBy = langVariantLastChangedBy; if ((seen1 & 128) === 0) $this.langVariantLct = L0; else $this.langVariantLct = langVariantLct; return $this; } LanguageVariant.$metadata$ = {kind: Kind_CLASS, simpleName: 'LanguageVariant', interfaces: []}; var LanguageVariantReplicate$Companion_instance = null; function LanguageVariantReplicate$$serializer() { this.descriptor_2bintl$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.LanguageVariantReplicate', this, 4); this.descriptor.addElement_ivxn3r$('lvPk', true); this.descriptor.addElement_ivxn3r$('lvVersionId', true); this.descriptor.addElement_ivxn3r$('lvDestination', true); this.descriptor.addElement_ivxn3r$('lvPending', true); LanguageVariantReplicate$$serializer_instance = this; } var LanguageVariantReplicate$$serializer_instance = null; function LearnerGroup() { LearnerGroup$Companion_getInstance(); this.learnerGroupUid = L0; this.learnerGroupName = null; this.learnerGroupDescription = null; this.learnerGroupActive = true; this.learnerGroupMCSN = L0; this.learnerGroupCSN = L0; this.learnerGroupLCB = 0; this.learnerGroupLct = L0; } function LearnerGroup$Companion() { LearnerGroup$Companion_instance = this; this.TABLE_ID = 301; } LearnerGroup$Companion.prototype.serializer = function () { return LearnerGroup$$serializer_getInstance(); }; LearnerGroup$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var LearnerGroup$Companion_instance = null; function LearnerGroup$Companion_getInstance() { if (LearnerGroup$Companion_instance === null) { new LearnerGroup$Companion(); } return LearnerGroup$Companion_instance; } function LearnerGroup$$serializer() { this.descriptor_6m2mcn$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.LearnerGroup', this, 8); this.descriptor.addElement_ivxn3r$('learnerGroupUid', true); this.descriptor.addElement_ivxn3r$('learnerGroupName', true); this.descriptor.addElement_ivxn3r$('learnerGroupDescription', true); this.descriptor.addElement_ivxn3r$('learnerGroupActive', true); this.descriptor.addElement_ivxn3r$('learnerGroupMCSN', true); this.descriptor.addElement_ivxn3r$('learnerGroupCSN', true); this.descriptor.addElement_ivxn3r$('learnerGroupLCB', true); this.descriptor.addElement_ivxn3r$('learnerGroupLct', true); LearnerGroup$$serializer_instance = this; } Object.defineProperty(LearnerGroup$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_6m2mcn$_0; }}); LearnerGroup$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.learnerGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.learnerGroupUid); if (!equals(value.learnerGroupName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.learnerGroupName); if (!equals(value.learnerGroupDescription, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.learnerGroupDescription); if (!equals(value.learnerGroupActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 3, value.learnerGroupActive); if (!equals(value.learnerGroupMCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.learnerGroupMCSN); if (!equals(value.learnerGroupCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.learnerGroupCSN); if (!equals(value.learnerGroupLCB, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.learnerGroupLCB); if (!equals(value.learnerGroupLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.learnerGroupLct); output.endStructure_24f42q$(this.descriptor); }; LearnerGroup$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeBooleanElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return LearnerGroup_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; LearnerGroup$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; LearnerGroup$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var LearnerGroup$$serializer_instance = null; function LearnerGroup$$serializer_getInstance() { if (LearnerGroup$$serializer_instance === null) { new LearnerGroup$$serializer(); } return LearnerGroup$$serializer_instance; } function LearnerGroup_init(seen1, learnerGroupUid, learnerGroupName, learnerGroupDescription, learnerGroupActive, learnerGroupMCSN, learnerGroupCSN, learnerGroupLCB, learnerGroupLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(LearnerGroup.prototype); if ((seen1 & 1) === 0) $this.learnerGroupUid = L0; else $this.learnerGroupUid = learnerGroupUid; if ((seen1 & 2) === 0) $this.learnerGroupName = null; else $this.learnerGroupName = learnerGroupName; if ((seen1 & 4) === 0) $this.learnerGroupDescription = null; else $this.learnerGroupDescription = learnerGroupDescription; if ((seen1 & 8) === 0) $this.learnerGroupActive = true; else $this.learnerGroupActive = learnerGroupActive; if ((seen1 & 16) === 0) $this.learnerGroupMCSN = L0; else $this.learnerGroupMCSN = learnerGroupMCSN; if ((seen1 & 32) === 0) $this.learnerGroupCSN = L0; else $this.learnerGroupCSN = learnerGroupCSN; if ((seen1 & 64) === 0) $this.learnerGroupLCB = 0; else $this.learnerGroupLCB = learnerGroupLCB; if ((seen1 & 128) === 0) $this.learnerGroupLct = L0; else $this.learnerGroupLct = learnerGroupLct; return $this; } LearnerGroup.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroup', interfaces: []}; function LearnerGroupMember() { LearnerGroupMember$Companion_getInstance(); this.learnerGroupMemberUid = L0; this.learnerGroupMemberPersonUid = L0; this.learnerGroupMemberLgUid = L0; this.learnerGroupMemberRole = 2; this.learnerGroupMemberActive = true; this.learnerGroupMemberMCSN = L0; this.learnerGroupMemberCSN = L0; this.learnerGroupMemberLCB = 0; this.learnerGroupMemberLct = L0; } function LearnerGroupMember$Companion() { LearnerGroupMember$Companion_instance = this; this.TABLE_ID = 300; this.PRIMARY_ROLE = 1; this.PARTICIPANT_ROLE = 2; } LearnerGroupMember$Companion.prototype.serializer = function () { return LearnerGroupMember$$serializer_getInstance(); }; LearnerGroupMember$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var LearnerGroupMember$Companion_instance = null; function LearnerGroupMember$Companion_getInstance() { if (LearnerGroupMember$Companion_instance === null) { new LearnerGroupMember$Companion(); } return LearnerGroupMember$Companion_instance; } function LearnerGroupMember$$serializer() { this.descriptor_jv19m5$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.LearnerGroupMember', this, 9); this.descriptor.addElement_ivxn3r$('learnerGroupMemberUid', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberPersonUid', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberLgUid', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberRole', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberActive', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberMCSN', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberCSN', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberLCB', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberLct', true); LearnerGroupMember$$serializer_instance = this; } Object.defineProperty(LearnerGroupMember$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_jv19m5$_0; }}); LearnerGroupMember$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.learnerGroupMemberUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.learnerGroupMemberUid); if (!equals(value.learnerGroupMemberPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.learnerGroupMemberPersonUid); if (!equals(value.learnerGroupMemberLgUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.learnerGroupMemberLgUid); if (!equals(value.learnerGroupMemberRole, 2) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.learnerGroupMemberRole); if (!equals(value.learnerGroupMemberActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.learnerGroupMemberActive); if (!equals(value.learnerGroupMemberMCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.learnerGroupMemberMCSN); if (!equals(value.learnerGroupMemberCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.learnerGroupMemberCSN); if (!equals(value.learnerGroupMemberLCB, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.learnerGroupMemberLCB); if (!equals(value.learnerGroupMemberLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.learnerGroupMemberLct); output.endStructure_24f42q$(this.descriptor); }; LearnerGroupMember$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return LearnerGroupMember_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, null); }; LearnerGroupMember$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; LearnerGroupMember$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var LearnerGroupMember$$serializer_instance = null; function LearnerGroupMember$$serializer_getInstance() { if (LearnerGroupMember$$serializer_instance === null) { new LearnerGroupMember$$serializer(); } return LearnerGroupMember$$serializer_instance; } function LearnerGroupMember_init(seen1, learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(LearnerGroupMember.prototype); if ((seen1 & 1) === 0) $this.learnerGroupMemberUid = L0; else $this.learnerGroupMemberUid = learnerGroupMemberUid; if ((seen1 & 2) === 0) $this.learnerGroupMemberPersonUid = L0; else $this.learnerGroupMemberPersonUid = learnerGroupMemberPersonUid; if ((seen1 & 4) === 0) $this.learnerGroupMemberLgUid = L0; else $this.learnerGroupMemberLgUid = learnerGroupMemberLgUid; if ((seen1 & 8) === 0) $this.learnerGroupMemberRole = 2; else $this.learnerGroupMemberRole = learnerGroupMemberRole; if ((seen1 & 16) === 0) $this.learnerGroupMemberActive = true; else $this.learnerGroupMemberActive = learnerGroupMemberActive; if ((seen1 & 32) === 0) $this.learnerGroupMemberMCSN = L0; else $this.learnerGroupMemberMCSN = learnerGroupMemberMCSN; if ((seen1 & 64) === 0) $this.learnerGroupMemberCSN = L0; else $this.learnerGroupMemberCSN = learnerGroupMemberCSN; if ((seen1 & 128) === 0) $this.learnerGroupMemberLCB = 0; else $this.learnerGroupMemberLCB = learnerGroupMemberLCB; if ((seen1 & 256) === 0) $this.learnerGroupMemberLct = L0; else $this.learnerGroupMemberLct = learnerGroupMemberLct; return $this; } LearnerGroupMember.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupMember', interfaces: []}; var LearnerGroupMemberReplicate$Companion_instance = null; function LearnerGroupMemberReplicate$$serializer() { this.descriptor_lye340$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.LearnerGroupMemberReplicate', this, 4); this.descriptor.addElement_ivxn3r$('lgmPk', true); this.descriptor.addElement_ivxn3r$('lgmVersionId', true); this.descriptor.addElement_ivxn3r$('lgmDestination', true); this.descriptor.addElement_ivxn3r$('lgmPending', true); LearnerGroupMemberReplicate$$serializer_instance = this; } var LearnerGroupMemberReplicate$$serializer_instance = null; function LearnerGroupMemberWithPerson() { LearnerGroupMemberWithPerson$Companion_getInstance(); LearnerGroupMember.call(this); this.person = null; } function LearnerGroupMemberWithPerson$Companion() { LearnerGroupMemberWithPerson$Companion_instance = this; } LearnerGroupMemberWithPerson$Companion.prototype.serializer = function () { return LearnerGroupMemberWithPerson$$serializer_getInstance(); }; LearnerGroupMemberWithPerson$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var LearnerGroupMemberWithPerson$Companion_instance = null; function LearnerGroupMemberWithPerson$Companion_getInstance() { if (LearnerGroupMemberWithPerson$Companion_instance === null) { new LearnerGroupMemberWithPerson$Companion(); } return LearnerGroupMemberWithPerson$Companion_instance; } function LearnerGroupMemberWithPerson$$serializer() { this.descriptor_2mes9e$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.LearnerGroupMemberWithPerson', this, 10); this.descriptor.addElement_ivxn3r$('learnerGroupMemberUid', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberPersonUid', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberLgUid', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberRole', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberActive', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberMCSN', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberCSN', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberLCB', true); this.descriptor.addElement_ivxn3r$('learnerGroupMemberLct', true); this.descriptor.addElement_ivxn3r$('person', true); LearnerGroupMemberWithPerson$$serializer_instance = this; } Object.defineProperty(LearnerGroupMemberWithPerson$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_2mes9e$_0; }}); LearnerGroupMemberWithPerson$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.learnerGroupMemberUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.learnerGroupMemberUid); if (!equals(value.learnerGroupMemberPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.learnerGroupMemberPersonUid); if (!equals(value.learnerGroupMemberLgUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.learnerGroupMemberLgUid); if (!equals(value.learnerGroupMemberRole, 2) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.learnerGroupMemberRole); if (!equals(value.learnerGroupMemberActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.learnerGroupMemberActive); if (!equals(value.learnerGroupMemberMCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.learnerGroupMemberMCSN); if (!equals(value.learnerGroupMemberCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.learnerGroupMemberCSN); if (!equals(value.learnerGroupMemberLCB, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.learnerGroupMemberLCB); if (!equals(value.learnerGroupMemberLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.learnerGroupMemberLct); if (!equals(value.person, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, Person$$serializer_getInstance(), value.person); output.endStructure_24f42q$(this.descriptor); }; LearnerGroupMemberWithPerson$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, Person$$serializer_getInstance(), local9); bitMask0 |= 512; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return LearnerGroupMemberWithPerson_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, null); }; LearnerGroupMemberWithPerson$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(Person$$serializer_getInstance())]; }; LearnerGroupMemberWithPerson$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var LearnerGroupMemberWithPerson$$serializer_instance = null; function LearnerGroupMemberWithPerson$$serializer_getInstance() { if (LearnerGroupMemberWithPerson$$serializer_instance === null) { new LearnerGroupMemberWithPerson$$serializer(); } return LearnerGroupMemberWithPerson$$serializer_instance; } function LearnerGroupMemberWithPerson_init(seen1, learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct, person, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(LearnerGroupMemberWithPerson.prototype); $this = LearnerGroupMember_init(seen1, learnerGroupMemberUid, learnerGroupMemberPersonUid, learnerGroupMemberLgUid, learnerGroupMemberRole, learnerGroupMemberActive, learnerGroupMemberMCSN, learnerGroupMemberCSN, learnerGroupMemberLCB, learnerGroupMemberLct, $this); if ((seen1 & 512) === 0) $this.person = null; else $this.person = person; return $this; } LearnerGroupMemberWithPerson.$metadata$ = {kind: Kind_CLASS, simpleName: 'LearnerGroupMemberWithPerson', interfaces: [LearnerGroupMember]}; var LearnerGroupReplicate$Companion_instance = null; function LearnerGroupReplicate$$serializer() { this.descriptor_icpgp2$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.LearnerGroupReplicate', this, 4); this.descriptor.addElement_ivxn3r$('lgPk', true); this.descriptor.addElement_ivxn3r$('lgVersionId', true); this.descriptor.addElement_ivxn3r$('lgDestination', true); this.descriptor.addElement_ivxn3r$('lgPending', true); LearnerGroupReplicate$$serializer_instance = this; } var LearnerGroupReplicate$$serializer_instance = null; function LeavingReason() { LeavingReason$Companion_getInstance(); this.leavingReasonUid = L0; this.leavingReasonTitle = null; this.leavingReasonMCSN = L0; this.leavingReasonCSN = L0; this.leavingReasonLCB = 0; this.leavingReasonLct = L0; } function LeavingReason$Companion() { LeavingReason$Companion_instance = this; this.TABLE_ID = 410; this.MOVED_TITLE = 'Moved'; this.MOVED_UID = L10000; this.MEDICAL_TITLE = 'Medical'; this.MEDICAL_UID = L10001; this.TRANSPORT_PROBLEM_TITLE = 'Transportation problem'; this.TRANSPORT_PROBLEM_UID = L10002; this.FAMILY_PROBLEM_TITLE = 'Family economic problem'; this.FAMILY_PROBLEM_UID = L10003; this.FAILED_TITLE = 'Failed test'; this.FAILED_UID = L10004; this.PASSED_TITLE = 'Passed test'; this.PASSED_UID = L10005; this.FIXED_UIDS = mapOf([to(this.MOVED_TITLE, this.MOVED_UID), to(this.MEDICAL_TITLE, this.MEDICAL_UID), to(this.TRANSPORT_PROBLEM_TITLE, this.TRANSPORT_PROBLEM_UID), to(this.FAMILY_PROBLEM_TITLE, this.FAMILY_PROBLEM_UID), to(this.FAILED_TITLE, this.FAILED_UID), to(this.PASSED_TITLE, this.PASSED_UID)]); } LeavingReason$Companion.prototype.serializer = function () { return LeavingReason$$serializer_getInstance(); }; LeavingReason$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var LeavingReason$Companion_instance = null; function LeavingReason$Companion_getInstance() { if (LeavingReason$Companion_instance === null) { new LeavingReason$Companion(); } return LeavingReason$Companion_instance; } function LeavingReason$$serializer() { this.descriptor_kuv53r$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.LeavingReason', this, 6); this.descriptor.addElement_ivxn3r$('leavingReasonUid', true); this.descriptor.addElement_ivxn3r$('leavingReasonTitle', true); this.descriptor.addElement_ivxn3r$('leavingReasonMCSN', true); this.descriptor.addElement_ivxn3r$('leavingReasonCSN', true); this.descriptor.addElement_ivxn3r$('leavingReasonLCB', true); this.descriptor.addElement_ivxn3r$('leavingReasonLct', true); LeavingReason$$serializer_instance = this; } Object.defineProperty(LeavingReason$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_kuv53r$_0; }}); LeavingReason$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.leavingReasonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.leavingReasonUid); if (!equals(value.leavingReasonTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.leavingReasonTitle); if (!equals(value.leavingReasonMCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.leavingReasonMCSN); if (!equals(value.leavingReasonCSN, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.leavingReasonCSN); if (!equals(value.leavingReasonLCB, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeIntElement_ptg7oe$(this.descriptor, 4, value.leavingReasonLCB); if (!equals(value.leavingReasonLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.leavingReasonLct); output.endStructure_24f42q$(this.descriptor); }; LeavingReason$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeIntElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return LeavingReason_init(bitMask0, local0, local1, local2, local3, local4, local5, null); }; LeavingReason$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; LeavingReason$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var LeavingReason$$serializer_instance = null; function LeavingReason$$serializer_getInstance() { if (LeavingReason$$serializer_instance === null) { new LeavingReason$$serializer(); } return LeavingReason$$serializer_instance; } function LeavingReason_init(seen1, leavingReasonUid, leavingReasonTitle, leavingReasonMCSN, leavingReasonCSN, leavingReasonLCB, leavingReasonLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(LeavingReason.prototype); if ((seen1 & 1) === 0) $this.leavingReasonUid = L0; else $this.leavingReasonUid = leavingReasonUid; if ((seen1 & 2) === 0) $this.leavingReasonTitle = null; else $this.leavingReasonTitle = leavingReasonTitle; if ((seen1 & 4) === 0) $this.leavingReasonMCSN = L0; else $this.leavingReasonMCSN = leavingReasonMCSN; if ((seen1 & 8) === 0) $this.leavingReasonCSN = L0; else $this.leavingReasonCSN = leavingReasonCSN; if ((seen1 & 16) === 0) $this.leavingReasonLCB = 0; else $this.leavingReasonLCB = leavingReasonLCB; if ((seen1 & 32) === 0) $this.leavingReasonLct = L0; else $this.leavingReasonLct = leavingReasonLct; return $this; } LeavingReason.$metadata$ = {kind: Kind_CLASS, simpleName: 'LeavingReason', interfaces: []}; var LeavingReasonReplicate$Companion_instance = null; function LeavingReasonReplicate$$serializer() { this.descriptor_m10zb0$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.LeavingReasonReplicate', this, 4); this.descriptor.addElement_ivxn3r$('lrPk', true); this.descriptor.addElement_ivxn3r$('lrVersionId', true); this.descriptor.addElement_ivxn3r$('lrDestination', true); this.descriptor.addElement_ivxn3r$('lrPending', true); LeavingReasonReplicate$$serializer_instance = this; } var LeavingReasonReplicate$$serializer_instance = null; var LocallyAvailableContainer$Companion_instance = null; function LocallyAvailableContainer$$serializer() { this.descriptor_oej9td$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.LocallyAvailableContainer', this, 1); this.descriptor.addElement_ivxn3r$('laContainerUid', true); LocallyAvailableContainer$$serializer_instance = this; } var LocallyAvailableContainer$$serializer_instance = null; function Message() { Message$Companion_getInstance(); this.messageUid = L0; this.messageSenderPersonUid = L0; this.messageTableId = 0; this.messageEntityUid = L0; this.messageText = null; this.messageTimestamp = L0; this.messageClazzUid = L0; this.messageLct = L0; } function Message$Companion() { Message$Companion_instance = this; this.TABLE_ID = 126; } Message$Companion.prototype.serializer = function () { return Message$$serializer_getInstance(); }; Message$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var Message$Companion_instance = null; function Message$Companion_getInstance() { if (Message$Companion_instance === null) { new Message$Companion(); } return Message$Companion_instance; } function Message$$serializer() { this.descriptor_ntiakm$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.Message', this, 8); this.descriptor.addElement_ivxn3r$('messageUid', true); this.descriptor.addElement_ivxn3r$('messageSenderPersonUid', true); this.descriptor.addElement_ivxn3r$('messageTableId', true); this.descriptor.addElement_ivxn3r$('messageEntityUid', true); this.descriptor.addElement_ivxn3r$('messageText', true); this.descriptor.addElement_ivxn3r$('messageTimestamp', true); this.descriptor.addElement_ivxn3r$('messageClazzUid', true); this.descriptor.addElement_ivxn3r$('messageLct', true); Message$$serializer_instance = this; } Object.defineProperty(Message$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ntiakm$_0; }}); Message$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.messageUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.messageUid); if (!equals(value.messageSenderPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.messageSenderPersonUid); if (!equals(value.messageTableId, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.messageTableId); if (!equals(value.messageEntityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.messageEntityUid); if (!equals(value.messageText, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.messageText); if (!equals(value.messageTimestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.messageTimestamp); if (!equals(value.messageClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.messageClazzUid); if (!equals(value.messageLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.messageLct); output.endStructure_24f42q$(this.descriptor); }; Message$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return Message_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; Message$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer]; }; Message$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var Message$$serializer_instance = null; function Message$$serializer_getInstance() { if (Message$$serializer_instance === null) { new Message$$serializer(); } return Message$$serializer_instance; } function Message_init(seen1, messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(Message.prototype); if ((seen1 & 1) === 0) $this.messageUid = L0; else $this.messageUid = messageUid; if ((seen1 & 2) === 0) $this.messageSenderPersonUid = L0; else $this.messageSenderPersonUid = messageSenderPersonUid; if ((seen1 & 4) === 0) $this.messageTableId = 0; else $this.messageTableId = messageTableId; if ((seen1 & 8) === 0) $this.messageEntityUid = L0; else $this.messageEntityUid = messageEntityUid; if ((seen1 & 16) === 0) $this.messageText = null; else $this.messageText = messageText; if ((seen1 & 32) === 0) $this.messageTimestamp = L0; else $this.messageTimestamp = messageTimestamp; if ((seen1 & 64) === 0) $this.messageClazzUid = L0; else $this.messageClazzUid = messageClazzUid; if ((seen1 & 128) === 0) $this.messageLct = L0; else $this.messageLct = messageLct; return $this; } Message.$metadata$ = {kind: Kind_CLASS, simpleName: 'Message', interfaces: []}; function Message_init_0(personUid, table, entityUid, text, clazzUid, $this) { $this = $this || Object.create(Message.prototype); Message.call($this); $this.messageSenderPersonUid = personUid; $this.messageTableId = table; $this.messageEntityUid = entityUid; $this.messageText = text; $this.messageTimestamp = systemTimeInMillis(); $this.messageClazzUid = clazzUid; return $this; } function Message_init_1(personUid, table, entityUid, text, $this) { $this = $this || Object.create(Message.prototype); Message.call($this); $this.messageSenderPersonUid = personUid; $this.messageTableId = table; $this.messageEntityUid = entityUid; $this.messageText = text; $this.messageTimestamp = systemTimeInMillis(); return $this; } function MessageRead() { MessageRead$Companion_getInstance(); this.messageReadUid = L0; this.messageReadPersonUid = L0; this.messageReadMessageUid = L0; this.messageReadEntityUid = L0; this.messageReadLct = L0; } function MessageRead$Companion() { MessageRead$Companion_instance = this; this.TABLE_ID = 129; } MessageRead$Companion.prototype.serializer = function () { return MessageRead$$serializer_getInstance(); }; MessageRead$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var MessageRead$Companion_instance = null; function MessageRead$Companion_getInstance() { if (MessageRead$Companion_instance === null) { new MessageRead$Companion(); } return MessageRead$Companion_instance; } function MessageRead$$serializer() { this.descriptor_dfy7k4$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.MessageRead', this, 5); this.descriptor.addElement_ivxn3r$('messageReadUid', true); this.descriptor.addElement_ivxn3r$('messageReadPersonUid', true); this.descriptor.addElement_ivxn3r$('messageReadMessageUid', true); this.descriptor.addElement_ivxn3r$('messageReadEntityUid', true); this.descriptor.addElement_ivxn3r$('messageReadLct', true); MessageRead$$serializer_instance = this; } Object.defineProperty(MessageRead$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_dfy7k4$_0; }}); MessageRead$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.messageReadUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.messageReadUid); if (!equals(value.messageReadPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.messageReadPersonUid); if (!equals(value.messageReadMessageUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.messageReadMessageUid); if (!equals(value.messageReadEntityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.messageReadEntityUid); if (!equals(value.messageReadLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.messageReadLct); output.endStructure_24f42q$(this.descriptor); }; MessageRead$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return MessageRead_init(bitMask0, local0, local1, local2, local3, local4, null); }; MessageRead$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer]; }; MessageRead$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var MessageRead$$serializer_instance = null; function MessageRead$$serializer_getInstance() { if (MessageRead$$serializer_instance === null) { new MessageRead$$serializer(); } return MessageRead$$serializer_instance; } function MessageRead_init(seen1, messageReadUid, messageReadPersonUid, messageReadMessageUid, messageReadEntityUid, messageReadLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(MessageRead.prototype); if ((seen1 & 1) === 0) $this.messageReadUid = L0; else $this.messageReadUid = messageReadUid; if ((seen1 & 2) === 0) $this.messageReadPersonUid = L0; else $this.messageReadPersonUid = messageReadPersonUid; if ((seen1 & 4) === 0) $this.messageReadMessageUid = L0; else $this.messageReadMessageUid = messageReadMessageUid; if ((seen1 & 8) === 0) $this.messageReadEntityUid = L0; else $this.messageReadEntityUid = messageReadEntityUid; if ((seen1 & 16) === 0) $this.messageReadLct = L0; else $this.messageReadLct = messageReadLct; return $this; } MessageRead.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageRead', interfaces: []}; function MessageRead_init_0(personUid, messageUid, entityUid, $this) { $this = $this || Object.create(MessageRead.prototype); MessageRead.call($this); $this.messageReadPersonUid = personUid; $this.messageReadMessageUid = messageUid; $this.messageReadEntityUid = entityUid; return $this; } var MessageReadReplicate$Companion_instance = null; function MessageReadReplicate$$serializer() { this.descriptor_6xmma1$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.MessageReadReplicate', this, 4); this.descriptor.addElement_ivxn3r$('messageReadPk', true); this.descriptor.addElement_ivxn3r$('messageReadVersionId', true); this.descriptor.addElement_ivxn3r$('messageReadDestination', true); this.descriptor.addElement_ivxn3r$('messageReadPending', true); MessageReadReplicate$$serializer_instance = this; } var MessageReadReplicate$$serializer_instance = null; var MessageReplicate$Companion_instance = null; function MessageReplicate$$serializer() { this.descriptor_zd7npv$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.MessageReplicate', this, 4); this.descriptor.addElement_ivxn3r$('messagePk', true); this.descriptor.addElement_ivxn3r$('messageVersionId', true); this.descriptor.addElement_ivxn3r$('messageDestination', true); this.descriptor.addElement_ivxn3r$('messagePending', true); MessageReplicate$$serializer_instance = this; } var MessageReplicate$$serializer_instance = null; function MessageWithPerson() { MessageWithPerson$Companion_getInstance(); Message.call(this); this.messagePerson = null; this.messageRead = null; } function MessageWithPerson$Companion() { MessageWithPerson$Companion_instance = this; } MessageWithPerson$Companion.prototype.serializer = function () { return MessageWithPerson$$serializer_getInstance(); }; MessageWithPerson$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var MessageWithPerson$Companion_instance = null; function MessageWithPerson$Companion_getInstance() { if (MessageWithPerson$Companion_instance === null) { new MessageWithPerson$Companion(); } return MessageWithPerson$Companion_instance; } function MessageWithPerson$$serializer() { this.descriptor_7sssrl$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.MessageWithPerson', this, 10); this.descriptor.addElement_ivxn3r$('messageUid', true); this.descriptor.addElement_ivxn3r$('messageSenderPersonUid', true); this.descriptor.addElement_ivxn3r$('messageTableId', true); this.descriptor.addElement_ivxn3r$('messageEntityUid', true); this.descriptor.addElement_ivxn3r$('messageText', true); this.descriptor.addElement_ivxn3r$('messageTimestamp', true); this.descriptor.addElement_ivxn3r$('messageClazzUid', true); this.descriptor.addElement_ivxn3r$('messageLct', true); this.descriptor.addElement_ivxn3r$('messagePerson', true); this.descriptor.addElement_ivxn3r$('messageRead', true); MessageWithPerson$$serializer_instance = this; } Object.defineProperty(MessageWithPerson$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_7sssrl$_0; }}); MessageWithPerson$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.messageUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.messageUid); if (!equals(value.messageSenderPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.messageSenderPersonUid); if (!equals(value.messageTableId, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.messageTableId); if (!equals(value.messageEntityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.messageEntityUid); if (!equals(value.messageText, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.messageText); if (!equals(value.messageTimestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.messageTimestamp); if (!equals(value.messageClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.messageClazzUid); if (!equals(value.messageLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.messageLct); if (!equals(value.messagePerson, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, Person$$serializer_getInstance(), value.messagePerson); if (!equals(value.messageRead, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, MessageRead$$serializer_getInstance(), value.messageRead); output.endStructure_24f42q$(this.descriptor); }; MessageWithPerson$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, Person$$serializer_getInstance(), local8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, MessageRead$$serializer_getInstance(), local9); bitMask0 |= 512; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return MessageWithPerson_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, null); }; MessageWithPerson$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(Person$$serializer_getInstance()), new NullableSerializer(MessageRead$$serializer_getInstance())]; }; MessageWithPerson$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var MessageWithPerson$$serializer_instance = null; function MessageWithPerson$$serializer_getInstance() { if (MessageWithPerson$$serializer_instance === null) { new MessageWithPerson$$serializer(); } return MessageWithPerson$$serializer_instance; } function MessageWithPerson_init(seen1, messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct, messagePerson, messageRead, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(MessageWithPerson.prototype); $this = Message_init(seen1, messageUid, messageSenderPersonUid, messageTableId, messageEntityUid, messageText, messageTimestamp, messageClazzUid, messageLct, $this); if ((seen1 & 256) === 0) $this.messagePerson = null; else $this.messagePerson = messagePerson; if ((seen1 & 512) === 0) $this.messageRead = null; else $this.messageRead = messageRead; return $this; } MessageWithPerson.$metadata$ = {kind: Kind_CLASS, simpleName: 'MessageWithPerson', interfaces: [Message]}; function Moment() { Moment$Companion_getInstance(); this.typeFlag = 0; this.fixedTime = L0; this.relTo = 0; this.relOffSet = 0; this.relUnit = 1; } function Moment$Companion() { Moment$Companion_instance = this; this.TYPE_FLAG_FIXED = 0; this.TYPE_FLAG_RELATIVE = 1; this.DAYS_REL_UNIT = 1; this.WEEKS_REL_UNIT = 2; this.MONTHS_REL_UNIT = 3; this.YEARS_REL_UNIT = 4; this.TODAY_REL_TO = 0; } Moment$Companion.prototype.serializer = function () { return Moment$$serializer_getInstance(); }; Moment$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var Moment$Companion_instance = null; function Moment$Companion_getInstance() { if (Moment$Companion_instance === null) { new Moment$Companion(); } return Moment$Companion_instance; } Moment.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, Moment) ? tmp$_0 : throwCCE(); if (this.typeFlag !== other.typeFlag) return false; if (!equals(this.fixedTime, other.fixedTime)) return false; if (this.relTo !== other.relTo) return false; if (this.relOffSet !== other.relOffSet) return false; if (this.relUnit !== other.relUnit) return false; return true; }; Moment.prototype.hashCode = function () { var result = this.typeFlag; result = (31 * result | 0) + hashCode(this.fixedTime) | 0; result = (31 * result | 0) + this.relTo | 0; result = (31 * result | 0) + this.relOffSet | 0; result = (31 * result | 0) + this.relUnit | 0; return result; }; function Moment$$serializer() { this.descriptor_m0sx11$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.Moment', this, 5); this.descriptor.addElement_ivxn3r$('typeFlag', true); this.descriptor.addElement_ivxn3r$('fixedTime', true); this.descriptor.addElement_ivxn3r$('relTo', true); this.descriptor.addElement_ivxn3r$('relOffSet', true); this.descriptor.addElement_ivxn3r$('relUnit', true); Moment$$serializer_instance = this; } Object.defineProperty(Moment$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_m0sx11$_0; }}); Moment$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.typeFlag, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeIntElement_ptg7oe$(this.descriptor, 0, value.typeFlag); if (!equals(value.fixedTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.fixedTime); if (!equals(value.relTo, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.relTo); if (!equals(value.relOffSet, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.relOffSet); if (!equals(value.relUnit, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeIntElement_ptg7oe$(this.descriptor, 4, value.relUnit); output.endStructure_24f42q$(this.descriptor); }; Moment$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeIntElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeIntElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return Moment_init(bitMask0, local0, local1, local2, local3, local4, null); }; Moment$$serializer.prototype.childSerializers = function () { return [internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer]; }; Moment$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var Moment$$serializer_instance = null; function Moment$$serializer_getInstance() { if (Moment$$serializer_instance === null) { new Moment$$serializer(); } return Moment$$serializer_instance; } function Moment_init(seen1, typeFlag, fixedTime, relTo, relOffSet, relUnit, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(Moment.prototype); if ((seen1 & 1) === 0) $this.typeFlag = 0; else $this.typeFlag = typeFlag; if ((seen1 & 2) === 0) $this.fixedTime = L0; else $this.fixedTime = fixedTime; if ((seen1 & 4) === 0) $this.relTo = 0; else $this.relTo = relTo; if ((seen1 & 8) === 0) $this.relOffSet = 0; else $this.relOffSet = relOffSet; if ((seen1 & 16) === 0) $this.relUnit = 1; else $this.relUnit = relUnit; return $this; } Moment.$metadata$ = {kind: Kind_CLASS, simpleName: 'Moment', interfaces: []}; function DateRangeMoment(fromMoment, toMoment) { DateRangeMoment$Companion_getInstance(); this.fromMoment = fromMoment; this.toMoment = toMoment; } function DateRangeMoment$Companion() { DateRangeMoment$Companion_instance = this; } DateRangeMoment$Companion.prototype.serializer = function () { return DateRangeMoment$$serializer_getInstance(); }; DateRangeMoment$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var DateRangeMoment$Companion_instance = null; function DateRangeMoment$Companion_getInstance() { if (DateRangeMoment$Companion_instance === null) { new DateRangeMoment$Companion(); } return DateRangeMoment$Companion_instance; } function DateRangeMoment$$serializer() { this.descriptor_xgf9ji$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.DateRangeMoment', this, 2); this.descriptor.addElement_ivxn3r$('fromMoment', false); this.descriptor.addElement_ivxn3r$('toMoment', false); DateRangeMoment$$serializer_instance = this; } Object.defineProperty(DateRangeMoment$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_xgf9ji$_0; }}); DateRangeMoment$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); output.encodeSerializableElement_r4qlx7$(this.descriptor, 0, Moment$$serializer_getInstance(), value.fromMoment); output.encodeSerializableElement_r4qlx7$(this.descriptor, 1, Moment$$serializer_getInstance(), value.toMoment); output.endStructure_24f42q$(this.descriptor); }; DateRangeMoment$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeSerializableElement_12e8id$(this.descriptor, 0, Moment$$serializer_getInstance(), local0); bitMask0 |= 1; break; case 1: local1 = input.decodeSerializableElement_12e8id$(this.descriptor, 1, Moment$$serializer_getInstance(), local1); bitMask0 |= 2; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return DateRangeMoment_init(bitMask0, local0, local1, null); }; DateRangeMoment$$serializer.prototype.childSerializers = function () { return [Moment$$serializer_getInstance(), Moment$$serializer_getInstance()]; }; DateRangeMoment$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var DateRangeMoment$$serializer_instance = null; function DateRangeMoment$$serializer_getInstance() { if (DateRangeMoment$$serializer_instance === null) { new DateRangeMoment$$serializer(); } return DateRangeMoment$$serializer_instance; } function DateRangeMoment_init(seen1, fromMoment, toMoment, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(DateRangeMoment.prototype); if ((seen1 & 1) === 0) throw MissingFieldException_init('fromMoment'); else $this.fromMoment = fromMoment; if ((seen1 & 2) === 0) throw MissingFieldException_init('toMoment'); else $this.toMoment = toMoment; return $this; } DateRangeMoment.$metadata$ = {kind: Kind_CLASS, simpleName: 'DateRangeMoment', interfaces: []}; DateRangeMoment.prototype.component1 = function () { return this.fromMoment; }; DateRangeMoment.prototype.component2 = function () { return this.toMoment; }; DateRangeMoment.prototype.copy_qz585w$ = function (fromMoment, toMoment) { return new DateRangeMoment(fromMoment === void 0 ? this.fromMoment : fromMoment, toMoment === void 0 ? this.toMoment : toMoment); }; DateRangeMoment.prototype.toString = function () { return 'DateRangeMoment(fromMoment=' + Kotlin.toString(this.fromMoment) + (', toMoment=' + Kotlin.toString(this.toMoment)) + ')'; }; DateRangeMoment.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.fromMoment) | 0; result = result * 31 + Kotlin.hashCode(this.toMoment) | 0; return result; }; DateRangeMoment.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.fromMoment, other.fromMoment) && Kotlin.equals(this.toMoment, other.toMoment))))); }; function NetworkNode() { NetworkNode$Companion_getInstance(); this.nodeId = L0; this.bluetoothMacAddress = null; this.ipAddress = null; this.wifiDirectMacAddress = null; this.deviceWifiDirectName = null; this.endpointUrl = null; this.lastUpdateTimeStamp = L0; this.networkServiceLastUpdated = L0; this.nsdServiceName = null; this.port = 0; this.numFailureCount = 0; this.wifiDirectDeviceStatus = 0; this.groupSsid = null; } NetworkNode.prototype.setNetworkNodeLastUpdated_s8cxhz$ = function (lastUpdateTimeStamp) { this.lastUpdateTimeStamp = lastUpdateTimeStamp; }; NetworkNode.prototype.equals = function (other) { return Kotlin.isType(other, NetworkNode) && (this.wifiDirectMacAddress != null && equals(this.wifiDirectMacAddress, this.wifiDirectMacAddress) || (this.ipAddress != null && equals(this.ipAddress, this.ipAddress))); }; function NetworkNode$Companion() { NetworkNode$Companion_instance = this; this.STATUS_CONNECTED = 0; this.STATUS_INVITED = 1; this.STATUS_FAILED = 2; this.STATUS_AVAILABLE = 3; this.STATUS_UNAVAILABLE = 4; this.WIFI_DIRECT_TIMEOUT = 390000; } NetworkNode$Companion.prototype.serializer = function () { return NetworkNode$$serializer_getInstance(); }; NetworkNode$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var NetworkNode$Companion_instance = null; function NetworkNode$Companion_getInstance() { if (NetworkNode$Companion_instance === null) { new NetworkNode$Companion(); } return NetworkNode$Companion_instance; } function NetworkNode$$serializer() { this.descriptor_xfzqp$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.NetworkNode', this, 13); this.descriptor.addElement_ivxn3r$('nodeId', true); this.descriptor.addElement_ivxn3r$('bluetoothMacAddress', true); this.descriptor.addElement_ivxn3r$('ipAddress', true); this.descriptor.addElement_ivxn3r$('wifiDirectMacAddress', true); this.descriptor.addElement_ivxn3r$('deviceWifiDirectName', true); this.descriptor.addElement_ivxn3r$('endpointUrl', true); this.descriptor.addElement_ivxn3r$('lastUpdateTimeStamp', true); this.descriptor.addElement_ivxn3r$('networkServiceLastUpdated', true); this.descriptor.addElement_ivxn3r$('nsdServiceName', true); this.descriptor.addElement_ivxn3r$('port', true); this.descriptor.addElement_ivxn3r$('numFailureCount', true); this.descriptor.addElement_ivxn3r$('wifiDirectDeviceStatus', true); this.descriptor.addElement_ivxn3r$('groupSsid', true); NetworkNode$$serializer_instance = this; } Object.defineProperty(NetworkNode$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_xfzqp$_0; }}); NetworkNode$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.nodeId, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.nodeId); if (!equals(value.bluetoothMacAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.bluetoothMacAddress); if (!equals(value.ipAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.ipAddress); if (!equals(value.wifiDirectMacAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.wifiDirectMacAddress); if (!equals(value.deviceWifiDirectName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.deviceWifiDirectName); if (!equals(value.endpointUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.endpointUrl); if (!equals(value.lastUpdateTimeStamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.lastUpdateTimeStamp); if (!equals(value.networkServiceLastUpdated, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.networkServiceLastUpdated); if (!equals(value.nsdServiceName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, internal.StringSerializer, value.nsdServiceName); if (!equals(value.port, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.port); if (!equals(value.numFailureCount, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeIntElement_ptg7oe$(this.descriptor, 10, value.numFailureCount); if (!equals(value.wifiDirectDeviceStatus, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.wifiDirectDeviceStatus); if (!equals(value.groupSsid, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 12, internal.StringSerializer, value.groupSsid); output.endStructure_24f42q$(this.descriptor); }; NetworkNode$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, internal.StringSerializer, local8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeIntElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 12, internal.StringSerializer, local12); bitMask0 |= 4096; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return NetworkNode_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, null); }; NetworkNode$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer)]; }; NetworkNode$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var NetworkNode$$serializer_instance = null; function NetworkNode$$serializer_getInstance() { if (NetworkNode$$serializer_instance === null) { new NetworkNode$$serializer(); } return NetworkNode$$serializer_instance; } function NetworkNode_init(seen1, nodeId, bluetoothMacAddress, ipAddress, wifiDirectMacAddress, deviceWifiDirectName, endpointUrl, lastUpdateTimeStamp, networkServiceLastUpdated, nsdServiceName, port, numFailureCount, wifiDirectDeviceStatus, groupSsid, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(NetworkNode.prototype); if ((seen1 & 1) === 0) $this.nodeId = L0; else $this.nodeId = nodeId; if ((seen1 & 2) === 0) $this.bluetoothMacAddress = null; else $this.bluetoothMacAddress = bluetoothMacAddress; if ((seen1 & 4) === 0) $this.ipAddress = null; else $this.ipAddress = ipAddress; if ((seen1 & 8) === 0) $this.wifiDirectMacAddress = null; else $this.wifiDirectMacAddress = wifiDirectMacAddress; if ((seen1 & 16) === 0) $this.deviceWifiDirectName = null; else $this.deviceWifiDirectName = deviceWifiDirectName; if ((seen1 & 32) === 0) $this.endpointUrl = null; else $this.endpointUrl = endpointUrl; if ((seen1 & 64) === 0) $this.lastUpdateTimeStamp = L0; else $this.lastUpdateTimeStamp = lastUpdateTimeStamp; if ((seen1 & 128) === 0) $this.networkServiceLastUpdated = L0; else $this.networkServiceLastUpdated = networkServiceLastUpdated; if ((seen1 & 256) === 0) $this.nsdServiceName = null; else $this.nsdServiceName = nsdServiceName; if ((seen1 & 512) === 0) $this.port = 0; else $this.port = port; if ((seen1 & 1024) === 0) $this.numFailureCount = 0; else $this.numFailureCount = numFailureCount; if ((seen1 & 2048) === 0) $this.wifiDirectDeviceStatus = 0; else $this.wifiDirectDeviceStatus = wifiDirectDeviceStatus; if ((seen1 & 4096) === 0) $this.groupSsid = null; else $this.groupSsid = groupSsid; return $this; } NetworkNode.$metadata$ = {kind: Kind_CLASS, simpleName: 'NetworkNode', interfaces: []}; function ParentEnrolmentRequired(parentPersonUid, clazzUid) { if (parentPersonUid === void 0) parentPersonUid = L0; if (clazzUid === void 0) clazzUid = L0; this.parentPersonUid = parentPersonUid; this.clazzUid = clazzUid; } ParentEnrolmentRequired.$metadata$ = {kind: Kind_CLASS, simpleName: 'ParentEnrolmentRequired', interfaces: []}; ParentEnrolmentRequired.prototype.component1 = function () { return this.parentPersonUid; }; ParentEnrolmentRequired.prototype.component2 = function () { return this.clazzUid; }; ParentEnrolmentRequired.prototype.copy_3pjtqy$ = function (parentPersonUid, clazzUid) { return new ParentEnrolmentRequired(parentPersonUid === void 0 ? this.parentPersonUid : parentPersonUid, clazzUid === void 0 ? this.clazzUid : clazzUid); }; ParentEnrolmentRequired.prototype.toString = function () { return 'ParentEnrolmentRequired(parentPersonUid=' + Kotlin.toString(this.parentPersonUid) + (', clazzUid=' + Kotlin.toString(this.clazzUid)) + ')'; }; ParentEnrolmentRequired.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.parentPersonUid) | 0; result = result * 31 + Kotlin.hashCode(this.clazzUid) | 0; return result; }; ParentEnrolmentRequired.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.parentPersonUid, other.parentPersonUid) && Kotlin.equals(this.clazzUid, other.clazzUid))))); }; function Person() { Person$Companion_getInstance(); this.personUid = L0; this.username = null; this.firstNames = ''; this.lastName = ''; this.emailAddr = null; this.phoneNum = null; this.gender = 0; this.active = true; this.admin = false; this.personNotes = null; this.fatherName = null; this.fatherNumber = null; this.motherName = null; this.motherNum = null; this.dateOfBirth = L0; this.personAddress = null; this.personOrgId = null; this.personGroupUid = L0; this.personMasterChangeSeqNum = L0; this.personLocalChangeSeqNum = L0; this.personLastChangedBy = 0; this.personLct = L0; this.personCountry = null; this.personType = 0; } Person.prototype.fullName = function () { var tmp$, tmp$_0; var f = ''; var l = ''; if (this.firstNames != null) { f = typeof (tmp$ = this.firstNames) === 'string' ? tmp$ : throwCCE(); } if (this.lastName != null) { l = typeof (tmp$_0 = this.lastName) === 'string' ? tmp$_0 : throwCCE(); } return f + ' ' + l; }; Person.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, Person) ? tmp$_0 : throwCCE(); if (!equals(this.personUid, other.personUid)) return false; if (!equals(this.username, other.username)) return false; if (!equals(this.firstNames, other.firstNames)) return false; if (!equals(this.lastName, other.lastName)) return false; if (!equals(this.emailAddr, other.emailAddr)) return false; if (!equals(this.phoneNum, other.phoneNum)) return false; if (this.gender !== other.gender) return false; if (this.active !== other.active) return false; if (this.admin !== other.admin) return false; if (!equals(this.personNotes, other.personNotes)) return false; if (!equals(this.fatherName, other.fatherName)) return false; if (!equals(this.fatherNumber, other.fatherNumber)) return false; if (!equals(this.motherName, other.motherName)) return false; if (!equals(this.motherNum, other.motherNum)) return false; if (!equals(this.dateOfBirth, other.dateOfBirth)) return false; if (!equals(this.personAddress, other.personAddress)) return false; return true; }; Person.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5, tmp$_6, tmp$_7, tmp$_8, tmp$_9, tmp$_10, tmp$_11, tmp$_12, tmp$_13, tmp$_14, tmp$_15, tmp$_16, tmp$_17, tmp$_18, tmp$_19, tmp$_20; var result = hashCode(this.personUid); result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.username) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.firstNames) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + ((tmp$_4 = (tmp$_3 = this.lastName) != null ? hashCode(tmp$_3) : null) != null ? tmp$_4 : 0) | 0; result = (31 * result | 0) + ((tmp$_6 = (tmp$_5 = this.emailAddr) != null ? hashCode(tmp$_5) : null) != null ? tmp$_6 : 0) | 0; result = (31 * result | 0) + ((tmp$_8 = (tmp$_7 = this.phoneNum) != null ? hashCode(tmp$_7) : null) != null ? tmp$_8 : 0) | 0; result = (31 * result | 0) + this.gender | 0; result = (31 * result | 0) + hashCode(this.active) | 0; result = (31 * result | 0) + hashCode(this.admin) | 0; result = (31 * result | 0) + ((tmp$_10 = (tmp$_9 = this.personNotes) != null ? hashCode(tmp$_9) : null) != null ? tmp$_10 : 0) | 0; result = (31 * result | 0) + ((tmp$_12 = (tmp$_11 = this.fatherName) != null ? hashCode(tmp$_11) : null) != null ? tmp$_12 : 0) | 0; result = (31 * result | 0) + ((tmp$_14 = (tmp$_13 = this.fatherNumber) != null ? hashCode(tmp$_13) : null) != null ? tmp$_14 : 0) | 0; result = (31 * result | 0) + ((tmp$_16 = (tmp$_15 = this.motherName) != null ? hashCode(tmp$_15) : null) != null ? tmp$_16 : 0) | 0; result = (31 * result | 0) + ((tmp$_18 = (tmp$_17 = this.motherNum) != null ? hashCode(tmp$_17) : null) != null ? tmp$_18 : 0) | 0; result = (31 * result | 0) + hashCode(this.dateOfBirth) | 0; result = (31 * result | 0) + ((tmp$_20 = (tmp$_19 = this.personAddress) != null ? hashCode(tmp$_19) : null) != null ? tmp$_20 : 0) | 0; return result; }; function Person$Companion() { Person$Companion_instance = this; this.TABLE_ID = 9; this.GENDER_UNSET = 0; this.GENDER_FEMALE = 1; this.GENDER_MALE = 2; this.GENDER_OTHER = 4; this.TYPE_NORMAL_PERSON = 0; this.TYPE_SYSTEM = 1; this.JOIN_FROM_PERSONGROUPMEMBER_TO_PERSON_VIA_SCOPEDGRANT_PT1 = '\n JOIN ScopedGrant\n ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n AND (ScopedGrant.sgPermissions &'; this.FROM_PERSON_TO_SCOPEDGRANT_JOIN_ON_CLAUSE = '\n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 9\n AND ScopedGrant.sgEntityUid = Person.personUid)\n OR (ScopedGrant.sgTableId = 6 \n AND Person.personUid IN (\n SELECT DISTINCT clazzEnrolmentPersonUid\n FROM ClazzEnrolment\n WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n AND ClazzEnrolment.clazzEnrolmentActive))\n OR (ScopedGrant.sgTableId = 164\n AND Person.personUid IN (\n SELECT DISTINCT schoolMemberPersonUid\n FROM SchoolMember\n WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n AND schoolMemberActive))\n ) \n '; this.JOIN_FROM_PERSONGROUPMEMBER_TO_PERSON_VIA_SCOPEDGRANT_PT2 = '\n ) > 0\n JOIN Person \n ON \n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 9\n AND ScopedGrant.sgEntityUid = Person.personUid)\n OR (ScopedGrant.sgTableId = 6 \n AND Person.personUid IN (\n SELECT DISTINCT clazzEnrolmentPersonUid\n FROM ClazzEnrolment\n WHERE clazzEnrolmentClazzUid =ScopedGrant.sgEntityUid \n AND ClazzEnrolment.clazzEnrolmentActive))\n OR (ScopedGrant.sgTableId = 164\n AND Person.personUid IN (\n SELECT DISTINCT schoolMemberPersonUid\n FROM SchoolMember\n WHERE schoolMemberSchoolUid = ScopedGrant.sgEntityUid\n AND schoolMemberActive))\n ) \n \n '; this.FROM_SCOPEDGRANT_TO_PERSON_JOIN_ON_CLAUSE = '\n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 9\n AND ScopedGrant.sgEntityUid = Person.personUid)\n OR (ScopedGrant.sgTableId = 6 \n AND ScopedGrant.sgEntityUid IN (\n SELECT DISTINCT clazzEnrolmentClazzUid\n FROM ClazzEnrolment\n WHERE clazzEnrolmentPersonUid = Person.personUid \n AND ClazzEnrolment.clazzEnrolmentActive))\n OR (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid IN (\n SELECT DISTINCT schoolMemberSchoolUid\n FROM SchoolMember\n WHERE schoolMemberPersonUid = Person.personUid\n AND schoolMemberActive))\n )\n '; this.JOIN_FROM_PERSON_TO_USERSESSION_VIA_SCOPEDGRANT_PT1 = '\n JOIN ScopedGrant \n ON \n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 9\n AND ScopedGrant.sgEntityUid = Person.personUid)\n OR (ScopedGrant.sgTableId = 6 \n AND ScopedGrant.sgEntityUid IN (\n SELECT DISTINCT clazzEnrolmentClazzUid\n FROM ClazzEnrolment\n WHERE clazzEnrolmentPersonUid = Person.personUid \n AND ClazzEnrolment.clazzEnrolmentActive))\n OR (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid IN (\n SELECT DISTINCT schoolMemberSchoolUid\n FROM SchoolMember\n WHERE schoolMemberPersonUid = Person.personUid\n AND schoolMemberActive))\n )\n \n AND (ScopedGrant.sgPermissions & \n '; this.JOIN_FROM_PERSON_TO_USERSESSION_VIA_SCOPEDGRANT_PT2 = '\n ) > 0\n JOIN PersonGroupMember AS PrsGrpMbr\n ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n JOIN UserSession\n ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n AND UserSession.usStatus = 1\n '; } Person$Companion.prototype.serializer = function () { return Person$$serializer_getInstance(); }; Person$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var Person$Companion_instance = null; function Person$Companion_getInstance() { if (Person$Companion_instance === null) { new Person$Companion(); } return Person$Companion_instance; } function Person$$serializer() { this.descriptor_bzuuao$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.Person', this, 24); this.descriptor.addElement_ivxn3r$('personUid', true); this.descriptor.addElement_ivxn3r$('username', true); this.descriptor.addElement_ivxn3r$('firstNames', true); this.descriptor.addElement_ivxn3r$('lastName', true); this.descriptor.addElement_ivxn3r$('emailAddr', true); this.descriptor.addElement_ivxn3r$('phoneNum', true); this.descriptor.addElement_ivxn3r$('gender', true); this.descriptor.addElement_ivxn3r$('active', true); this.descriptor.addElement_ivxn3r$('admin', true); this.descriptor.addElement_ivxn3r$('personNotes', true); this.descriptor.addElement_ivxn3r$('fatherName', true); this.descriptor.addElement_ivxn3r$('fatherNumber', true); this.descriptor.addElement_ivxn3r$('motherName', true); this.descriptor.addElement_ivxn3r$('motherNum', true); this.descriptor.addElement_ivxn3r$('dateOfBirth', true); this.descriptor.addElement_ivxn3r$('personAddress', true); this.descriptor.addElement_ivxn3r$('personOrgId', true); this.descriptor.addElement_ivxn3r$('personGroupUid', true); this.descriptor.addElement_ivxn3r$('personMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('personLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('personLastChangedBy', true); this.descriptor.addElement_ivxn3r$('personLct', true); this.descriptor.addElement_ivxn3r$('personCountry', true); this.descriptor.addElement_ivxn3r$('personType', true); Person$$serializer_instance = this; } Object.defineProperty(Person$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_bzuuao$_0; }}); Person$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.personUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.personUid); if (!equals(value.username, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.username); if (!equals(value.firstNames, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.firstNames); if (!equals(value.lastName, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.lastName); if (!equals(value.emailAddr, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.emailAddr); if (!equals(value.phoneNum, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.phoneNum); if (!equals(value.gender, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.gender); if (!equals(value.active, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 7, value.active); if (!equals(value.admin, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 8, value.admin); if (!equals(value.personNotes, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.personNotes); if (!equals(value.fatherName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.fatherName); if (!equals(value.fatherNumber, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, internal.StringSerializer, value.fatherNumber); if (!equals(value.motherName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 12, internal.StringSerializer, value.motherName); if (!equals(value.motherNum, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 13, internal.StringSerializer, value.motherNum); if (!equals(value.dateOfBirth, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.dateOfBirth); if (!equals(value.personAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 15, internal.StringSerializer, value.personAddress); if (!equals(value.personOrgId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 16, internal.StringSerializer, value.personOrgId); if (!equals(value.personGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.personGroupUid); if (!equals(value.personMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.personMasterChangeSeqNum); if (!equals(value.personLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.personLocalChangeSeqNum); if (!equals(value.personLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeIntElement_ptg7oe$(this.descriptor, 20, value.personLastChangedBy); if (!equals(value.personLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.personLct); if (!equals(value.personCountry, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 22, internal.StringSerializer, value.personCountry); if (!equals(value.personType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeIntElement_ptg7oe$(this.descriptor, 23, value.personType); output.endStructure_24f42q$(this.descriptor); }; Person$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeBooleanElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeBooleanElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, internal.StringSerializer, local11); bitMask0 |= 2048; break; case 12: local12 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 12, internal.StringSerializer, local12); bitMask0 |= 4096; break; case 13: local13 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 13, internal.StringSerializer, local13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 15, internal.StringSerializer, local15); bitMask0 |= 32768; break; case 16: local16 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 16, internal.StringSerializer, local16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeIntElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 22, internal.StringSerializer, local22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeIntElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return Person_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, null); }; Person$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.BooleanSerializer, internal.BooleanSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer]; }; Person$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var Person$$serializer_instance = null; function Person$$serializer_getInstance() { if (Person$$serializer_instance === null) { new Person$$serializer(); } return Person$$serializer_instance; } function Person_init(seen1, personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(Person.prototype); if ((seen1 & 1) === 0) $this.personUid = L0; else $this.personUid = personUid; if ((seen1 & 2) === 0) $this.username = null; else $this.username = username; if ((seen1 & 4) === 0) $this.firstNames = ''; else $this.firstNames = firstNames; if ((seen1 & 8) === 0) $this.lastName = ''; else $this.lastName = lastName; if ((seen1 & 16) === 0) $this.emailAddr = null; else $this.emailAddr = emailAddr; if ((seen1 & 32) === 0) $this.phoneNum = null; else $this.phoneNum = phoneNum; if ((seen1 & 64) === 0) $this.gender = 0; else $this.gender = gender; if ((seen1 & 128) === 0) $this.active = true; else $this.active = active; if ((seen1 & 256) === 0) $this.admin = false; else $this.admin = admin; if ((seen1 & 512) === 0) $this.personNotes = null; else $this.personNotes = personNotes; if ((seen1 & 1024) === 0) $this.fatherName = null; else $this.fatherName = fatherName; if ((seen1 & 2048) === 0) $this.fatherNumber = null; else $this.fatherNumber = fatherNumber; if ((seen1 & 4096) === 0) $this.motherName = null; else $this.motherName = motherName; if ((seen1 & 8192) === 0) $this.motherNum = null; else $this.motherNum = motherNum; if ((seen1 & 16384) === 0) $this.dateOfBirth = L0; else $this.dateOfBirth = dateOfBirth; if ((seen1 & 32768) === 0) $this.personAddress = null; else $this.personAddress = personAddress; if ((seen1 & 65536) === 0) $this.personOrgId = null; else $this.personOrgId = personOrgId; if ((seen1 & 131072) === 0) $this.personGroupUid = L0; else $this.personGroupUid = personGroupUid; if ((seen1 & 262144) === 0) $this.personMasterChangeSeqNum = L0; else $this.personMasterChangeSeqNum = personMasterChangeSeqNum; if ((seen1 & 524288) === 0) $this.personLocalChangeSeqNum = L0; else $this.personLocalChangeSeqNum = personLocalChangeSeqNum; if ((seen1 & 1048576) === 0) $this.personLastChangedBy = 0; else $this.personLastChangedBy = personLastChangedBy; if ((seen1 & 2097152) === 0) $this.personLct = L0; else $this.personLct = personLct; if ((seen1 & 4194304) === 0) $this.personCountry = null; else $this.personCountry = personCountry; if ((seen1 & 8388608) === 0) $this.personType = 0; else $this.personType = personType; return $this; } Person.$metadata$ = {kind: Kind_CLASS, simpleName: 'Person', interfaces: []}; function PersonAuth() { PersonAuth$Companion_getInstance(); this.personAuthUid = L0; this.passwordHash = null; this.personAuthStatus = 0; } function PersonAuth$Companion() { PersonAuth$Companion_instance = this; this.STATUS_SENT = 1; this.STATUS_NOT_SENT = 0; } PersonAuth$Companion.prototype.serializer = function () { return PersonAuth$$serializer_getInstance(); }; PersonAuth$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var PersonAuth$Companion_instance = null; function PersonAuth$Companion_getInstance() { if (PersonAuth$Companion_instance === null) { new PersonAuth$Companion(); } return PersonAuth$Companion_instance; } function PersonAuth$$serializer() { this.descriptor_ymng60$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonAuth', this, 3); this.descriptor.addElement_ivxn3r$('personAuthUid', true); this.descriptor.addElement_ivxn3r$('passwordHash', true); this.descriptor.addElement_ivxn3r$('personAuthStatus', true); PersonAuth$$serializer_instance = this; } Object.defineProperty(PersonAuth$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ymng60$_0; }}); PersonAuth$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.personAuthUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.personAuthUid); if (!equals(value.passwordHash, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.passwordHash); if (!equals(value.personAuthStatus, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.personAuthStatus); output.endStructure_24f42q$(this.descriptor); }; PersonAuth$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return PersonAuth_init(bitMask0, local0, local1, local2, null); }; PersonAuth$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer]; }; PersonAuth$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var PersonAuth$$serializer_instance = null; function PersonAuth$$serializer_getInstance() { if (PersonAuth$$serializer_instance === null) { new PersonAuth$$serializer(); } return PersonAuth$$serializer_instance; } function PersonAuth_init(seen1, personAuthUid, passwordHash, personAuthStatus, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(PersonAuth.prototype); if ((seen1 & 1) === 0) $this.personAuthUid = L0; else $this.personAuthUid = personAuthUid; if ((seen1 & 2) === 0) $this.passwordHash = null; else $this.passwordHash = passwordHash; if ((seen1 & 4) === 0) $this.personAuthStatus = 0; else $this.personAuthStatus = personAuthStatus; return $this; } PersonAuth.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonAuth', interfaces: []}; function PersonAuth2() { PersonAuth2$Companion_getInstance(); this.pauthUid = L0; this.pauthMechanism = null; this.pauthAuth = null; this.pauthLcsn = L0; this.pauthPcsn = L0; this.pauthLcb = L0; this.pauthLct = L0; } function PersonAuth2$Companion() { PersonAuth2$Companion_instance = this; this.AUTH_MECH_PBKDF2_DOUBLE = 'PBKDF2x2'; this.TABLE_ID = 678; } PersonAuth2$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var PersonAuth2$Companion_instance = null; function PersonAuth2$Companion_getInstance() { if (PersonAuth2$Companion_instance === null) { new PersonAuth2$Companion(); } return PersonAuth2$Companion_instance; } PersonAuth2.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonAuth2', interfaces: []}; var PersonAuth2Replicate$Companion_instance = null; function PersonAuth2Replicate$$serializer() { this.descriptor_7fpy9r$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonAuth2Replicate', this, 4); this.descriptor.addElement_ivxn3r$('paPk', true); this.descriptor.addElement_ivxn3r$('paVersionId', true); this.descriptor.addElement_ivxn3r$('paDestination', true); this.descriptor.addElement_ivxn3r$('paPending', true); PersonAuth2Replicate$$serializer_instance = this; } var PersonAuth2Replicate$$serializer_instance = null; function PersonGroup() { PersonGroup$Companion_getInstance(); this.groupUid = L0; this.groupMasterCsn = L0; this.groupLocalCsn = L0; this.groupLastChangedBy = 0; this.groupLct = L0; this.groupName = null; this.groupActive = true; this.personGroupFlag = 0; } function PersonGroup$Companion() { PersonGroup$Companion_instance = this; this.TABLE_ID = 43; this.PERSONGROUP_FLAG_DEFAULT = 0; this.PERSONGROUP_FLAG_PERSONGROUP = 1; this.PERSONGROUP_FLAG_PARENT_GROUP = 2; this.PERSONGROUP_FLAG_STUDENTGROUP = 4; this.PERSONGROUP_FLAG_TEACHERGROUP = 8; this.PERSONGROUP_FLAG_GUESTPERSON = 16; } PersonGroup$Companion.prototype.serializer = function () { return PersonGroup$$serializer_getInstance(); }; PersonGroup$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var PersonGroup$Companion_instance = null; function PersonGroup$Companion_getInstance() { if (PersonGroup$Companion_instance === null) { new PersonGroup$Companion(); } return PersonGroup$Companion_instance; } function PersonGroup$$serializer() { this.descriptor_xlvwev$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonGroup', this, 8); this.descriptor.addElement_ivxn3r$('groupUid', true); this.descriptor.addElement_ivxn3r$('groupMasterCsn', true); this.descriptor.addElement_ivxn3r$('groupLocalCsn', true); this.descriptor.addElement_ivxn3r$('groupLastChangedBy', true); this.descriptor.addElement_ivxn3r$('groupLct', true); this.descriptor.addElement_ivxn3r$('groupName', true); this.descriptor.addElement_ivxn3r$('groupActive', true); this.descriptor.addElement_ivxn3r$('personGroupFlag', true); PersonGroup$$serializer_instance = this; } Object.defineProperty(PersonGroup$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_xlvwev$_0; }}); PersonGroup$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.groupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.groupUid); if (!equals(value.groupMasterCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.groupMasterCsn); if (!equals(value.groupLocalCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.groupLocalCsn); if (!equals(value.groupLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.groupLastChangedBy); if (!equals(value.groupLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.groupLct); if (!equals(value.groupName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.groupName); if (!equals(value.groupActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.groupActive); if (!equals(value.personGroupFlag, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.personGroupFlag); output.endStructure_24f42q$(this.descriptor); }; PersonGroup$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return PersonGroup_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; PersonGroup$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.IntSerializer]; }; PersonGroup$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var PersonGroup$$serializer_instance = null; function PersonGroup$$serializer_getInstance() { if (PersonGroup$$serializer_instance === null) { new PersonGroup$$serializer(); } return PersonGroup$$serializer_instance; } function PersonGroup_init(seen1, groupUid, groupMasterCsn, groupLocalCsn, groupLastChangedBy, groupLct, groupName, groupActive, personGroupFlag, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(PersonGroup.prototype); if ((seen1 & 1) === 0) $this.groupUid = L0; else $this.groupUid = groupUid; if ((seen1 & 2) === 0) $this.groupMasterCsn = L0; else $this.groupMasterCsn = groupMasterCsn; if ((seen1 & 4) === 0) $this.groupLocalCsn = L0; else $this.groupLocalCsn = groupLocalCsn; if ((seen1 & 8) === 0) $this.groupLastChangedBy = 0; else $this.groupLastChangedBy = groupLastChangedBy; if ((seen1 & 16) === 0) $this.groupLct = L0; else $this.groupLct = groupLct; if ((seen1 & 32) === 0) $this.groupName = null; else $this.groupName = groupName; if ((seen1 & 64) === 0) $this.groupActive = true; else $this.groupActive = groupActive; if ((seen1 & 128) === 0) $this.personGroupFlag = 0; else $this.personGroupFlag = personGroupFlag; return $this; } PersonGroup.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroup', interfaces: []}; function PersonGroup_init_0(name, $this) { $this = $this || Object.create(PersonGroup.prototype); PersonGroup.call($this); $this.groupName = name; return $this; } function PersonGroupAssignmentSummary() { this.submitterUid = L0; this.name = null; this.latestPrivateComment = null; this.fileSubmissionStatus = 0; this.isGroupAssignment = false; } PersonGroupAssignmentSummary.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupAssignmentSummary', interfaces: []}; function PersonGroupMember() { PersonGroupMember$Companion_getInstance(); this.groupMemberUid = L0; this.groupMemberActive = true; this.groupMemberPersonUid = L0; this.groupMemberGroupUid = L0; this.groupMemberMasterCsn = L0; this.groupMemberLocalCsn = L0; this.groupMemberLastChangedBy = 0; this.groupMemberLct = L0; } function PersonGroupMember$Companion() { PersonGroupMember$Companion_instance = this; this.TABLE_ID = 44; } PersonGroupMember$Companion.prototype.serializer = function () { return PersonGroupMember$$serializer_getInstance(); }; PersonGroupMember$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var PersonGroupMember$Companion_instance = null; function PersonGroupMember$Companion_getInstance() { if (PersonGroupMember$Companion_instance === null) { new PersonGroupMember$Companion(); } return PersonGroupMember$Companion_instance; } function PersonGroupMember$$serializer() { this.descriptor_gepaeb$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonGroupMember', this, 8); this.descriptor.addElement_ivxn3r$('groupMemberUid', true); this.descriptor.addElement_ivxn3r$('groupMemberActive', true); this.descriptor.addElement_ivxn3r$('groupMemberPersonUid', true); this.descriptor.addElement_ivxn3r$('groupMemberGroupUid', true); this.descriptor.addElement_ivxn3r$('groupMemberMasterCsn', true); this.descriptor.addElement_ivxn3r$('groupMemberLocalCsn', true); this.descriptor.addElement_ivxn3r$('groupMemberLastChangedBy', true); this.descriptor.addElement_ivxn3r$('groupMemberLct', true); PersonGroupMember$$serializer_instance = this; } Object.defineProperty(PersonGroupMember$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_gepaeb$_0; }}); PersonGroupMember$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.groupMemberUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.groupMemberUid); if (!equals(value.groupMemberActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 1, value.groupMemberActive); if (!equals(value.groupMemberPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.groupMemberPersonUid); if (!equals(value.groupMemberGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.groupMemberGroupUid); if (!equals(value.groupMemberMasterCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.groupMemberMasterCsn); if (!equals(value.groupMemberLocalCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.groupMemberLocalCsn); if (!equals(value.groupMemberLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.groupMemberLastChangedBy); if (!equals(value.groupMemberLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.groupMemberLct); output.endStructure_24f42q$(this.descriptor); }; PersonGroupMember$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeBooleanElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return PersonGroupMember_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; PersonGroupMember$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; PersonGroupMember$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var PersonGroupMember$$serializer_instance = null; function PersonGroupMember$$serializer_getInstance() { if (PersonGroupMember$$serializer_instance === null) { new PersonGroupMember$$serializer(); } return PersonGroupMember$$serializer_instance; } function PersonGroupMember_init(seen1, groupMemberUid, groupMemberActive, groupMemberPersonUid, groupMemberGroupUid, groupMemberMasterCsn, groupMemberLocalCsn, groupMemberLastChangedBy, groupMemberLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(PersonGroupMember.prototype); if ((seen1 & 1) === 0) $this.groupMemberUid = L0; else $this.groupMemberUid = groupMemberUid; if ((seen1 & 2) === 0) $this.groupMemberActive = true; else $this.groupMemberActive = groupMemberActive; if ((seen1 & 4) === 0) $this.groupMemberPersonUid = L0; else $this.groupMemberPersonUid = groupMemberPersonUid; if ((seen1 & 8) === 0) $this.groupMemberGroupUid = L0; else $this.groupMemberGroupUid = groupMemberGroupUid; if ((seen1 & 16) === 0) $this.groupMemberMasterCsn = L0; else $this.groupMemberMasterCsn = groupMemberMasterCsn; if ((seen1 & 32) === 0) $this.groupMemberLocalCsn = L0; else $this.groupMemberLocalCsn = groupMemberLocalCsn; if ((seen1 & 64) === 0) $this.groupMemberLastChangedBy = 0; else $this.groupMemberLastChangedBy = groupMemberLastChangedBy; if ((seen1 & 128) === 0) $this.groupMemberLct = L0; else $this.groupMemberLct = groupMemberLct; return $this; } PersonGroupMember.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonGroupMember', interfaces: []}; function PersonGroupMember_init_0(personUid, groupUid, $this) { $this = $this || Object.create(PersonGroupMember.prototype); PersonGroupMember.call($this); $this.groupMemberPersonUid = personUid; $this.groupMemberGroupUid = groupUid; return $this; } var PersonGroupMemberReplicate$Companion_instance = null; function PersonGroupMemberReplicate$$serializer() { this.descriptor_8qw8a8$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonGroupMemberReplicate', this, 4); this.descriptor.addElement_ivxn3r$('pgmPk', true); this.descriptor.addElement_ivxn3r$('pgmVersionId', true); this.descriptor.addElement_ivxn3r$('pgmDestination', true); this.descriptor.addElement_ivxn3r$('pgmPending', true); PersonGroupMemberReplicate$$serializer_instance = this; } var PersonGroupMemberReplicate$$serializer_instance = null; var PersonGroupReplicate$Companion_instance = null; function PersonGroupReplicate$$serializer() { this.descriptor_6bddau$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonGroupReplicate', this, 4); this.descriptor.addElement_ivxn3r$('pgPk', true); this.descriptor.addElement_ivxn3r$('pgVersionId', true); this.descriptor.addElement_ivxn3r$('pgDestination', true); this.descriptor.addElement_ivxn3r$('pgPending', true); PersonGroupReplicate$$serializer_instance = this; } var PersonGroupReplicate$$serializer_instance = null; var PersonGroupWithMemberCount$Companion_instance = null; function PersonGroupWithMemberCount$$serializer() { this.descriptor_a1wy7k$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonGroupWithMemberCount', this, 9); this.descriptor.addElement_ivxn3r$('groupUid', true); this.descriptor.addElement_ivxn3r$('groupMasterCsn', true); this.descriptor.addElement_ivxn3r$('groupLocalCsn', true); this.descriptor.addElement_ivxn3r$('groupLastChangedBy', true); this.descriptor.addElement_ivxn3r$('groupLct', true); this.descriptor.addElement_ivxn3r$('groupName', true); this.descriptor.addElement_ivxn3r$('groupActive', true); this.descriptor.addElement_ivxn3r$('personGroupFlag', true); this.descriptor.addElement_ivxn3r$('memberCount', true); PersonGroupWithMemberCount$$serializer_instance = this; } var PersonGroupWithMemberCount$$serializer_instance = null; var PersonNameAndUid$Companion_instance = null; function PersonNameAndUid$$serializer() { this.descriptor_6uuwws$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonNameAndUid', this, 2); this.descriptor.addElement_ivxn3r$('personUid', true); this.descriptor.addElement_ivxn3r$('name', true); PersonNameAndUid$$serializer_instance = this; } var PersonNameAndUid$$serializer_instance = null; function PersonParentJoin() { PersonParentJoin$Companion_getInstance(); this.ppjUid = L0; this.ppjPcsn = L0; this.ppjLcsn = L0; this.ppjLcb = 0; this.ppjLct = L0; this.ppjParentPersonUid = L0; this.ppjMinorPersonUid = L0; this.ppjRelationship = 0; this.ppjEmail = null; this.ppjPhone = null; this.ppjInactive = false; this.ppjStatus = 0; this.ppjApprovalTiemstamp = L0; this.ppjApprovalIpAddr = null; } function PersonParentJoin$Companion() { PersonParentJoin$Companion_instance = this; this.TABLE_ID = 512; this.STATUS_UNSET = 0; this.STATUS_APPROVED = 1; this.STATUS_REJECTED = 2; this.RELATIONSHIP_MOTHER = 1; this.RELATIONSHIP_FATHER = 2; this.RELATIONSHIP_OTHER = 4; } PersonParentJoin$Companion.prototype.serializer = function () { return PersonParentJoin$$serializer_getInstance(); }; PersonParentJoin$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var PersonParentJoin$Companion_instance = null; function PersonParentJoin$Companion_getInstance() { if (PersonParentJoin$Companion_instance === null) { new PersonParentJoin$Companion(); } return PersonParentJoin$Companion_instance; } function PersonParentJoin$$serializer() { this.descriptor_oj2zrg$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonParentJoin', this, 14); this.descriptor.addElement_ivxn3r$('ppjUid', true); this.descriptor.addElement_ivxn3r$('ppjPcsn', true); this.descriptor.addElement_ivxn3r$('ppjLcsn', true); this.descriptor.addElement_ivxn3r$('ppjLcb', true); this.descriptor.addElement_ivxn3r$('ppjLct', true); this.descriptor.addElement_ivxn3r$('ppjParentPersonUid', true); this.descriptor.addElement_ivxn3r$('ppjMinorPersonUid', true); this.descriptor.addElement_ivxn3r$('ppjRelationship', true); this.descriptor.addElement_ivxn3r$('ppjEmail', true); this.descriptor.addElement_ivxn3r$('ppjPhone', true); this.descriptor.addElement_ivxn3r$('ppjInactive', true); this.descriptor.addElement_ivxn3r$('ppjStatus', true); this.descriptor.addElement_ivxn3r$('ppjApprovalTiemstamp', true); this.descriptor.addElement_ivxn3r$('ppjApprovalIpAddr', true); PersonParentJoin$$serializer_instance = this; } Object.defineProperty(PersonParentJoin$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_oj2zrg$_0; }}); PersonParentJoin$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.ppjUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.ppjUid); if (!equals(value.ppjPcsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.ppjPcsn); if (!equals(value.ppjLcsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.ppjLcsn); if (!equals(value.ppjLcb, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.ppjLcb); if (!equals(value.ppjLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.ppjLct); if (!equals(value.ppjParentPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.ppjParentPersonUid); if (!equals(value.ppjMinorPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.ppjMinorPersonUid); if (!equals(value.ppjRelationship, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.ppjRelationship); if (!equals(value.ppjEmail, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, internal.StringSerializer, value.ppjEmail); if (!equals(value.ppjPhone, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.ppjPhone); if (!equals(value.ppjInactive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 10, value.ppjInactive); if (!equals(value.ppjStatus, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.ppjStatus); if (!equals(value.ppjApprovalTiemstamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.ppjApprovalTiemstamp); if (!equals(value.ppjApprovalIpAddr, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 13, internal.StringSerializer, value.ppjApprovalIpAddr); output.endStructure_24f42q$(this.descriptor); }; PersonParentJoin$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, internal.StringSerializer, local8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeBooleanElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 13, internal.StringSerializer, local13); bitMask0 |= 8192; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return PersonParentJoin_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, null); }; PersonParentJoin$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer)]; }; PersonParentJoin$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var PersonParentJoin$$serializer_instance = null; function PersonParentJoin$$serializer_getInstance() { if (PersonParentJoin$$serializer_instance === null) { new PersonParentJoin$$serializer(); } return PersonParentJoin$$serializer_instance; } function PersonParentJoin_init(seen1, ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(PersonParentJoin.prototype); if ((seen1 & 1) === 0) $this.ppjUid = L0; else $this.ppjUid = ppjUid; if ((seen1 & 2) === 0) $this.ppjPcsn = L0; else $this.ppjPcsn = ppjPcsn; if ((seen1 & 4) === 0) $this.ppjLcsn = L0; else $this.ppjLcsn = ppjLcsn; if ((seen1 & 8) === 0) $this.ppjLcb = 0; else $this.ppjLcb = ppjLcb; if ((seen1 & 16) === 0) $this.ppjLct = L0; else $this.ppjLct = ppjLct; if ((seen1 & 32) === 0) $this.ppjParentPersonUid = L0; else $this.ppjParentPersonUid = ppjParentPersonUid; if ((seen1 & 64) === 0) $this.ppjMinorPersonUid = L0; else $this.ppjMinorPersonUid = ppjMinorPersonUid; if ((seen1 & 128) === 0) $this.ppjRelationship = 0; else $this.ppjRelationship = ppjRelationship; if ((seen1 & 256) === 0) $this.ppjEmail = null; else $this.ppjEmail = ppjEmail; if ((seen1 & 512) === 0) $this.ppjPhone = null; else $this.ppjPhone = ppjPhone; if ((seen1 & 1024) === 0) $this.ppjInactive = false; else $this.ppjInactive = ppjInactive; if ((seen1 & 2048) === 0) $this.ppjStatus = 0; else $this.ppjStatus = ppjStatus; if ((seen1 & 4096) === 0) $this.ppjApprovalTiemstamp = L0; else $this.ppjApprovalTiemstamp = ppjApprovalTiemstamp; if ((seen1 & 8192) === 0) $this.ppjApprovalIpAddr = null; else $this.ppjApprovalIpAddr = ppjApprovalIpAddr; return $this; } PersonParentJoin.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonParentJoin', interfaces: []}; var PersonParentJoinReplicate$Companion_instance = null; function PersonParentJoinReplicate$$serializer() { this.descriptor_sah94v$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonParentJoinReplicate', this, 4); this.descriptor.addElement_ivxn3r$('ppjPk', true); this.descriptor.addElement_ivxn3r$('ppjVersionId', true); this.descriptor.addElement_ivxn3r$('ppjDestination', true); this.descriptor.addElement_ivxn3r$('ppjPending', true); PersonParentJoinReplicate$$serializer_instance = this; } var PersonParentJoinReplicate$$serializer_instance = null; function PersonParentJoinWithMinorPerson() { PersonParentJoinWithMinorPerson$Companion_getInstance(); PersonParentJoin.call(this); this.minorPerson = null; } function PersonParentJoinWithMinorPerson$Companion() { PersonParentJoinWithMinorPerson$Companion_instance = this; } PersonParentJoinWithMinorPerson$Companion.prototype.serializer = function () { return PersonParentJoinWithMinorPerson$$serializer_getInstance(); }; PersonParentJoinWithMinorPerson$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var PersonParentJoinWithMinorPerson$Companion_instance = null; function PersonParentJoinWithMinorPerson$Companion_getInstance() { if (PersonParentJoinWithMinorPerson$Companion_instance === null) { new PersonParentJoinWithMinorPerson$Companion(); } return PersonParentJoinWithMinorPerson$Companion_instance; } function PersonParentJoinWithMinorPerson$$serializer() { this.descriptor_vg1odi$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonParentJoinWithMinorPerson', this, 15); this.descriptor.addElement_ivxn3r$('ppjUid', true); this.descriptor.addElement_ivxn3r$('ppjPcsn', true); this.descriptor.addElement_ivxn3r$('ppjLcsn', true); this.descriptor.addElement_ivxn3r$('ppjLcb', true); this.descriptor.addElement_ivxn3r$('ppjLct', true); this.descriptor.addElement_ivxn3r$('ppjParentPersonUid', true); this.descriptor.addElement_ivxn3r$('ppjMinorPersonUid', true); this.descriptor.addElement_ivxn3r$('ppjRelationship', true); this.descriptor.addElement_ivxn3r$('ppjEmail', true); this.descriptor.addElement_ivxn3r$('ppjPhone', true); this.descriptor.addElement_ivxn3r$('ppjInactive', true); this.descriptor.addElement_ivxn3r$('ppjStatus', true); this.descriptor.addElement_ivxn3r$('ppjApprovalTiemstamp', true); this.descriptor.addElement_ivxn3r$('ppjApprovalIpAddr', true); this.descriptor.addElement_ivxn3r$('minorPerson', true); PersonParentJoinWithMinorPerson$$serializer_instance = this; } Object.defineProperty(PersonParentJoinWithMinorPerson$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_vg1odi$_0; }}); PersonParentJoinWithMinorPerson$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.ppjUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.ppjUid); if (!equals(value.ppjPcsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.ppjPcsn); if (!equals(value.ppjLcsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.ppjLcsn); if (!equals(value.ppjLcb, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.ppjLcb); if (!equals(value.ppjLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.ppjLct); if (!equals(value.ppjParentPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.ppjParentPersonUid); if (!equals(value.ppjMinorPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.ppjMinorPersonUid); if (!equals(value.ppjRelationship, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.ppjRelationship); if (!equals(value.ppjEmail, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, internal.StringSerializer, value.ppjEmail); if (!equals(value.ppjPhone, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.ppjPhone); if (!equals(value.ppjInactive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 10, value.ppjInactive); if (!equals(value.ppjStatus, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.ppjStatus); if (!equals(value.ppjApprovalTiemstamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.ppjApprovalTiemstamp); if (!equals(value.ppjApprovalIpAddr, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 13, internal.StringSerializer, value.ppjApprovalIpAddr); if (!equals(value.minorPerson, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 14, Person$$serializer_getInstance(), value.minorPerson); output.endStructure_24f42q$(this.descriptor); }; PersonParentJoinWithMinorPerson$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, internal.StringSerializer, local8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeBooleanElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 13, internal.StringSerializer, local13); bitMask0 |= 8192; break; case 14: local14 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 14, Person$$serializer_getInstance(), local14); bitMask0 |= 16384; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return PersonParentJoinWithMinorPerson_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, null); }; PersonParentJoinWithMinorPerson$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(Person$$serializer_getInstance())]; }; PersonParentJoinWithMinorPerson$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var PersonParentJoinWithMinorPerson$$serializer_instance = null; function PersonParentJoinWithMinorPerson$$serializer_getInstance() { if (PersonParentJoinWithMinorPerson$$serializer_instance === null) { new PersonParentJoinWithMinorPerson$$serializer(); } return PersonParentJoinWithMinorPerson$$serializer_instance; } function PersonParentJoinWithMinorPerson_init(seen1, ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr, minorPerson, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(PersonParentJoinWithMinorPerson.prototype); $this = PersonParentJoin_init(seen1, ppjUid, ppjPcsn, ppjLcsn, ppjLcb, ppjLct, ppjParentPersonUid, ppjMinorPersonUid, ppjRelationship, ppjEmail, ppjPhone, ppjInactive, ppjStatus, ppjApprovalTiemstamp, ppjApprovalIpAddr, $this); if ((seen1 & 16384) === 0) $this.minorPerson = null; else $this.minorPerson = minorPerson; return $this; } PersonParentJoinWithMinorPerson.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonParentJoinWithMinorPerson', interfaces: [PersonParentJoin]}; function PersonPicture() { PersonPicture$Companion_getInstance(); this.personPictureUid = L0; this.personPicturePersonUid = L0; this.personPictureMasterCsn = L0; this.personPictureLocalCsn = L0; this.personPictureLastChangedBy = 0; this.personPictureLct = L0; this.personPictureUri = null; this.personPictureMd5 = null; this.fileSize = 0; this.picTimestamp = L0; this.mimeType = null; this.personPictureActive = true; } function PersonPicture$Companion() { PersonPicture$Companion_instance = this; this.TABLE_ID = 50; } PersonPicture$Companion.prototype.serializer = function () { return PersonPicture$$serializer_getInstance(); }; PersonPicture$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var PersonPicture$Companion_instance = null; function PersonPicture$Companion_getInstance() { if (PersonPicture$Companion_instance === null) { new PersonPicture$Companion(); } return PersonPicture$Companion_instance; } PersonPicture.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, PersonPicture) ? tmp$_0 : throwCCE(); if (!equals(this.personPictureUid, other.personPictureUid)) return false; if (!equals(this.personPicturePersonUid, other.personPicturePersonUid)) return false; if (!equals(this.personPictureMasterCsn, other.personPictureMasterCsn)) return false; if (!equals(this.personPictureLocalCsn, other.personPictureLocalCsn)) return false; if (this.personPictureLastChangedBy !== other.personPictureLastChangedBy) return false; if (this.fileSize !== other.fileSize) return false; if (!equals(this.picTimestamp, other.picTimestamp)) return false; if (!equals(this.mimeType, other.mimeType)) return false; if (this.personPictureActive !== other.personPictureActive) return false; return true; }; PersonPicture.prototype.hashCode = function () { var tmp$, tmp$_0; var result = hashCode(this.personPictureUid); result = (31 * result | 0) + hashCode(this.personPicturePersonUid) | 0; result = (31 * result | 0) + hashCode(this.personPictureMasterCsn) | 0; result = (31 * result | 0) + hashCode(this.personPictureLocalCsn) | 0; result = (31 * result | 0) + this.personPictureLastChangedBy | 0; result = (31 * result | 0) + this.fileSize | 0; result = (31 * result | 0) + hashCode(this.picTimestamp) | 0; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.mimeType) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + (this.personPictureActive ? 1 : 0) | 0; return result; }; function PersonPicture$$serializer() { this.descriptor_fhshns$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonPicture', this, 12); this.descriptor.addElement_ivxn3r$('personPictureUid', true); this.descriptor.addElement_ivxn3r$('personPicturePersonUid', true); this.descriptor.addElement_ivxn3r$('personPictureMasterCsn', true); this.descriptor.addElement_ivxn3r$('personPictureLocalCsn', true); this.descriptor.addElement_ivxn3r$('personPictureLastChangedBy', true); this.descriptor.addElement_ivxn3r$('personPictureLct', true); this.descriptor.addElement_ivxn3r$('personPictureUri', true); this.descriptor.addElement_ivxn3r$('personPictureMd5', true); this.descriptor.addElement_ivxn3r$('fileSize', true); this.descriptor.addElement_ivxn3r$('picTimestamp', true); this.descriptor.addElement_ivxn3r$('mimeType', true); this.descriptor.addElement_ivxn3r$('personPictureActive', true); PersonPicture$$serializer_instance = this; } Object.defineProperty(PersonPicture$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_fhshns$_0; }}); PersonPicture$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.personPictureUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.personPictureUid); if (!equals(value.personPicturePersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.personPicturePersonUid); if (!equals(value.personPictureMasterCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.personPictureMasterCsn); if (!equals(value.personPictureLocalCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.personPictureLocalCsn); if (!equals(value.personPictureLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeIntElement_ptg7oe$(this.descriptor, 4, value.personPictureLastChangedBy); if (!equals(value.personPictureLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.personPictureLct); if (!equals(value.personPictureUri, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 6, internal.StringSerializer, value.personPictureUri); if (!equals(value.personPictureMd5, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 7, internal.StringSerializer, value.personPictureMd5); if (!equals(value.fileSize, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeIntElement_ptg7oe$(this.descriptor, 8, value.fileSize); if (!equals(value.picTimestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.picTimestamp); if (!equals(value.mimeType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.mimeType); if (!equals(value.personPictureActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 11, value.personPictureActive); output.endStructure_24f42q$(this.descriptor); }; PersonPicture$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeIntElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 6, internal.StringSerializer, local6); bitMask0 |= 64; break; case 7: local7 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 7, internal.StringSerializer, local7); bitMask0 |= 128; break; case 8: local8 = input.decodeIntElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeBooleanElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return PersonPicture_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, null); }; PersonPicture$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer]; }; PersonPicture$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var PersonPicture$$serializer_instance = null; function PersonPicture$$serializer_getInstance() { if (PersonPicture$$serializer_instance === null) { new PersonPicture$$serializer(); } return PersonPicture$$serializer_instance; } function PersonPicture_init(seen1, personPictureUid, personPicturePersonUid, personPictureMasterCsn, personPictureLocalCsn, personPictureLastChangedBy, personPictureLct, personPictureUri, personPictureMd5, fileSize, picTimestamp, mimeType, personPictureActive, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(PersonPicture.prototype); if ((seen1 & 1) === 0) $this.personPictureUid = L0; else $this.personPictureUid = personPictureUid; if ((seen1 & 2) === 0) $this.personPicturePersonUid = L0; else $this.personPicturePersonUid = personPicturePersonUid; if ((seen1 & 4) === 0) $this.personPictureMasterCsn = L0; else $this.personPictureMasterCsn = personPictureMasterCsn; if ((seen1 & 8) === 0) $this.personPictureLocalCsn = L0; else $this.personPictureLocalCsn = personPictureLocalCsn; if ((seen1 & 16) === 0) $this.personPictureLastChangedBy = 0; else $this.personPictureLastChangedBy = personPictureLastChangedBy; if ((seen1 & 32) === 0) $this.personPictureLct = L0; else $this.personPictureLct = personPictureLct; if ((seen1 & 64) === 0) $this.personPictureUri = null; else $this.personPictureUri = personPictureUri; if ((seen1 & 128) === 0) $this.personPictureMd5 = null; else $this.personPictureMd5 = personPictureMd5; if ((seen1 & 256) === 0) $this.fileSize = 0; else $this.fileSize = fileSize; if ((seen1 & 512) === 0) $this.picTimestamp = L0; else $this.picTimestamp = picTimestamp; if ((seen1 & 1024) === 0) $this.mimeType = null; else $this.mimeType = mimeType; if ((seen1 & 2048) === 0) $this.personPictureActive = true; else $this.personPictureActive = personPictureActive; return $this; } PersonPicture.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonPicture', interfaces: []}; var PersonPictureReplicate$Companion_instance = null; function PersonPictureReplicate$$serializer() { this.descriptor_x3rgtx$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonPictureReplicate', this, 4); this.descriptor.addElement_ivxn3r$('ppPk', true); this.descriptor.addElement_ivxn3r$('ppVersionId', true); this.descriptor.addElement_ivxn3r$('ppDestination', true); this.descriptor.addElement_ivxn3r$('ppPending', true); PersonPictureReplicate$$serializer_instance = this; } var PersonPictureReplicate$$serializer_instance = null; var PersonReplicate$Companion_instance = null; function PersonReplicate$$serializer() { this.descriptor_vvg90t$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonReplicate', this, 4); this.descriptor.addElement_ivxn3r$('personPk', true); this.descriptor.addElement_ivxn3r$('personVersionId', true); this.descriptor.addElement_ivxn3r$('personDestination', true); this.descriptor.addElement_ivxn3r$('personPending', true); PersonReplicate$$serializer_instance = this; } var PersonReplicate$$serializer_instance = null; function PersonUidAndPasswordHash() { this.passwordHash = null; this.personUid = L0; this.firstNames = null; this.lastName = null; this.admin = false; } PersonUidAndPasswordHash.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonUidAndPasswordHash', interfaces: []}; function PersonWithAccount() { PersonWithAccount$Companion_getInstance(); Person.call(this); this.currentPassword = null; this.newPassword = null; this.confirmedPassword = null; } function PersonWithAccount$Companion() { PersonWithAccount$Companion_instance = this; } PersonWithAccount$Companion.prototype.serializer = function () { return PersonWithAccount$$serializer_getInstance(); }; PersonWithAccount$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var PersonWithAccount$Companion_instance = null; function PersonWithAccount$Companion_getInstance() { if (PersonWithAccount$Companion_instance === null) { new PersonWithAccount$Companion(); } return PersonWithAccount$Companion_instance; } function PersonWithAccount$$serializer() { this.descriptor_cw84mp$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonWithAccount', this, 27); this.descriptor.addElement_ivxn3r$('personUid', true); this.descriptor.addElement_ivxn3r$('username', true); this.descriptor.addElement_ivxn3r$('firstNames', true); this.descriptor.addElement_ivxn3r$('lastName', true); this.descriptor.addElement_ivxn3r$('emailAddr', true); this.descriptor.addElement_ivxn3r$('phoneNum', true); this.descriptor.addElement_ivxn3r$('gender', true); this.descriptor.addElement_ivxn3r$('active', true); this.descriptor.addElement_ivxn3r$('admin', true); this.descriptor.addElement_ivxn3r$('personNotes', true); this.descriptor.addElement_ivxn3r$('fatherName', true); this.descriptor.addElement_ivxn3r$('fatherNumber', true); this.descriptor.addElement_ivxn3r$('motherName', true); this.descriptor.addElement_ivxn3r$('motherNum', true); this.descriptor.addElement_ivxn3r$('dateOfBirth', true); this.descriptor.addElement_ivxn3r$('personAddress', true); this.descriptor.addElement_ivxn3r$('personOrgId', true); this.descriptor.addElement_ivxn3r$('personGroupUid', true); this.descriptor.addElement_ivxn3r$('personMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('personLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('personLastChangedBy', true); this.descriptor.addElement_ivxn3r$('personLct', true); this.descriptor.addElement_ivxn3r$('personCountry', true); this.descriptor.addElement_ivxn3r$('personType', true); this.descriptor.addElement_ivxn3r$('currentPassword', true); this.descriptor.addElement_ivxn3r$('newPassword', true); this.descriptor.addElement_ivxn3r$('confirmedPassword', true); PersonWithAccount$$serializer_instance = this; } Object.defineProperty(PersonWithAccount$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_cw84mp$_0; }}); PersonWithAccount$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.personUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.personUid); if (!equals(value.username, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.username); if (!equals(value.firstNames, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.firstNames); if (!equals(value.lastName, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.lastName); if (!equals(value.emailAddr, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.emailAddr); if (!equals(value.phoneNum, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.phoneNum); if (!equals(value.gender, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.gender); if (!equals(value.active, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 7, value.active); if (!equals(value.admin, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 8, value.admin); if (!equals(value.personNotes, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.personNotes); if (!equals(value.fatherName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.fatherName); if (!equals(value.fatherNumber, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, internal.StringSerializer, value.fatherNumber); if (!equals(value.motherName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 12, internal.StringSerializer, value.motherName); if (!equals(value.motherNum, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 13, internal.StringSerializer, value.motherNum); if (!equals(value.dateOfBirth, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.dateOfBirth); if (!equals(value.personAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 15, internal.StringSerializer, value.personAddress); if (!equals(value.personOrgId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 16, internal.StringSerializer, value.personOrgId); if (!equals(value.personGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.personGroupUid); if (!equals(value.personMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.personMasterChangeSeqNum); if (!equals(value.personLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.personLocalChangeSeqNum); if (!equals(value.personLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeIntElement_ptg7oe$(this.descriptor, 20, value.personLastChangedBy); if (!equals(value.personLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.personLct); if (!equals(value.personCountry, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 22, internal.StringSerializer, value.personCountry); if (!equals(value.personType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeIntElement_ptg7oe$(this.descriptor, 23, value.personType); if (!equals(value.currentPassword, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 24, internal.StringSerializer, value.currentPassword); if (!equals(value.newPassword, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 25, internal.StringSerializer, value.newPassword); if (!equals(value.confirmedPassword, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 26)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 26, internal.StringSerializer, value.confirmedPassword); output.endStructure_24f42q$(this.descriptor); }; PersonWithAccount$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeBooleanElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeBooleanElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, internal.StringSerializer, local11); bitMask0 |= 2048; break; case 12: local12 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 12, internal.StringSerializer, local12); bitMask0 |= 4096; break; case 13: local13 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 13, internal.StringSerializer, local13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 15, internal.StringSerializer, local15); bitMask0 |= 32768; break; case 16: local16 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 16, internal.StringSerializer, local16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeIntElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 22, internal.StringSerializer, local22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeIntElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 24, internal.StringSerializer, local24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 25, internal.StringSerializer, local25); bitMask0 |= 33554432; break; case 26: local26 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 26, internal.StringSerializer, local26); bitMask0 |= 67108864; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return PersonWithAccount_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, null); }; PersonWithAccount$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.BooleanSerializer, internal.BooleanSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer)]; }; PersonWithAccount$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var PersonWithAccount$$serializer_instance = null; function PersonWithAccount$$serializer_getInstance() { if (PersonWithAccount$$serializer_instance === null) { new PersonWithAccount$$serializer(); } return PersonWithAccount$$serializer_instance; } function PersonWithAccount_init(seen1, personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType, currentPassword, newPassword, confirmedPassword, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(PersonWithAccount.prototype); $this = Person_init(seen1, personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType, $this); if ((seen1 & 16777216) === 0) $this.currentPassword = null; else $this.currentPassword = currentPassword; if ((seen1 & 33554432) === 0) $this.newPassword = null; else $this.newPassword = newPassword; if ((seen1 & 67108864) === 0) $this.confirmedPassword = null; else $this.confirmedPassword = confirmedPassword; return $this; } PersonWithAccount.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonWithAccount', interfaces: [Person]}; function PersonWithAttemptsSummary() { PersonWithAttemptsSummary$Companion_getInstance(); this.personUid = L0; this.firstNames = null; this.lastName = null; this.attempts = 0; this.startDate = L0; this.endDate = Long$Companion$MAX_VALUE; this.duration = L0; this.latestPrivateComment = null; this.fileSubmissionStatus = 0; this.scoreProgress = null; } function PersonWithAttemptsSummary$Companion() { PersonWithAttemptsSummary$Companion_instance = this; } PersonWithAttemptsSummary$Companion.prototype.serializer = function () { return PersonWithAttemptsSummary$$serializer_getInstance(); }; PersonWithAttemptsSummary$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var PersonWithAttemptsSummary$Companion_instance = null; function PersonWithAttemptsSummary$Companion_getInstance() { if (PersonWithAttemptsSummary$Companion_instance === null) { new PersonWithAttemptsSummary$Companion(); } return PersonWithAttemptsSummary$Companion_instance; } function PersonWithAttemptsSummary$$serializer() { this.descriptor_pxo9j0$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonWithAttemptsSummary', this, 10); this.descriptor.addElement_ivxn3r$('personUid', true); this.descriptor.addElement_ivxn3r$('firstNames', true); this.descriptor.addElement_ivxn3r$('lastName', true); this.descriptor.addElement_ivxn3r$('attempts', true); this.descriptor.addElement_ivxn3r$('startDate', true); this.descriptor.addElement_ivxn3r$('endDate', true); this.descriptor.addElement_ivxn3r$('duration', true); this.descriptor.addElement_ivxn3r$('latestPrivateComment', true); this.descriptor.addElement_ivxn3r$('fileSubmissionStatus', true); this.descriptor.addElement_ivxn3r$('scoreProgress', true); PersonWithAttemptsSummary$$serializer_instance = this; } Object.defineProperty(PersonWithAttemptsSummary$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_pxo9j0$_0; }}); PersonWithAttemptsSummary$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.personUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.personUid); if (!equals(value.firstNames, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.firstNames); if (!equals(value.lastName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.lastName); if (!equals(value.attempts, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.attempts); if (!equals(value.startDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.startDate); if (!equals(value.endDate, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.endDate); if (!equals(value.duration, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.duration); if (!equals(value.latestPrivateComment, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 7, internal.StringSerializer, value.latestPrivateComment); if (!equals(value.fileSubmissionStatus, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeIntElement_ptg7oe$(this.descriptor, 8, value.fileSubmissionStatus); if (!equals(value.scoreProgress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, ContentEntryStatementScoreProgress$$serializer_getInstance(), value.scoreProgress); output.endStructure_24f42q$(this.descriptor); }; PersonWithAttemptsSummary$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 7, internal.StringSerializer, local7); bitMask0 |= 128; break; case 8: local8 = input.decodeIntElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, ContentEntryStatementScoreProgress$$serializer_getInstance(), local9); bitMask0 |= 512; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return PersonWithAttemptsSummary_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, null); }; PersonWithAttemptsSummary$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, new NullableSerializer(ContentEntryStatementScoreProgress$$serializer_getInstance())]; }; PersonWithAttemptsSummary$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var PersonWithAttemptsSummary$$serializer_instance = null; function PersonWithAttemptsSummary$$serializer_getInstance() { if (PersonWithAttemptsSummary$$serializer_instance === null) { new PersonWithAttemptsSummary$$serializer(); } return PersonWithAttemptsSummary$$serializer_instance; } function PersonWithAttemptsSummary_init(seen1, personUid, firstNames, lastName, attempts, startDate, endDate, duration, latestPrivateComment, fileSubmissionStatus, scoreProgress, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(PersonWithAttemptsSummary.prototype); if ((seen1 & 1) === 0) $this.personUid = L0; else $this.personUid = personUid; if ((seen1 & 2) === 0) $this.firstNames = null; else $this.firstNames = firstNames; if ((seen1 & 4) === 0) $this.lastName = null; else $this.lastName = lastName; if ((seen1 & 8) === 0) $this.attempts = 0; else $this.attempts = attempts; if ((seen1 & 16) === 0) $this.startDate = L0; else $this.startDate = startDate; if ((seen1 & 32) === 0) $this.endDate = Long$Companion$MAX_VALUE; else $this.endDate = endDate; if ((seen1 & 64) === 0) $this.duration = L0; else $this.duration = duration; if ((seen1 & 128) === 0) $this.latestPrivateComment = null; else $this.latestPrivateComment = latestPrivateComment; if ((seen1 & 256) === 0) $this.fileSubmissionStatus = 0; else $this.fileSubmissionStatus = fileSubmissionStatus; if ((seen1 & 512) === 0) $this.scoreProgress = null; else $this.scoreProgress = scoreProgress; return $this; } PersonWithAttemptsSummary.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonWithAttemptsSummary', interfaces: []}; function PersonWithClazzEnrolmentDetails() { PersonWithClazzEnrolmentDetails$Companion_getInstance(); Person.call(this); this.attendance = 0.0; this.earliestJoinDate = L0; this.latestDateLeft = L0; this.enrolmentRole = 0; } function PersonWithClazzEnrolmentDetails$Companion() { PersonWithClazzEnrolmentDetails$Companion_instance = this; } PersonWithClazzEnrolmentDetails$Companion.prototype.serializer = function () { return PersonWithClazzEnrolmentDetails$$serializer_getInstance(); }; PersonWithClazzEnrolmentDetails$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var PersonWithClazzEnrolmentDetails$Companion_instance = null; function PersonWithClazzEnrolmentDetails$Companion_getInstance() { if (PersonWithClazzEnrolmentDetails$Companion_instance === null) { new PersonWithClazzEnrolmentDetails$Companion(); } return PersonWithClazzEnrolmentDetails$Companion_instance; } function PersonWithClazzEnrolmentDetails$$serializer() { this.descriptor_e9g6re$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonWithClazzEnrolmentDetails', this, 28); this.descriptor.addElement_ivxn3r$('personUid', true); this.descriptor.addElement_ivxn3r$('username', true); this.descriptor.addElement_ivxn3r$('firstNames', true); this.descriptor.addElement_ivxn3r$('lastName', true); this.descriptor.addElement_ivxn3r$('emailAddr', true); this.descriptor.addElement_ivxn3r$('phoneNum', true); this.descriptor.addElement_ivxn3r$('gender', true); this.descriptor.addElement_ivxn3r$('active', true); this.descriptor.addElement_ivxn3r$('admin', true); this.descriptor.addElement_ivxn3r$('personNotes', true); this.descriptor.addElement_ivxn3r$('fatherName', true); this.descriptor.addElement_ivxn3r$('fatherNumber', true); this.descriptor.addElement_ivxn3r$('motherName', true); this.descriptor.addElement_ivxn3r$('motherNum', true); this.descriptor.addElement_ivxn3r$('dateOfBirth', true); this.descriptor.addElement_ivxn3r$('personAddress', true); this.descriptor.addElement_ivxn3r$('personOrgId', true); this.descriptor.addElement_ivxn3r$('personGroupUid', true); this.descriptor.addElement_ivxn3r$('personMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('personLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('personLastChangedBy', true); this.descriptor.addElement_ivxn3r$('personLct', true); this.descriptor.addElement_ivxn3r$('personCountry', true); this.descriptor.addElement_ivxn3r$('personType', true); this.descriptor.addElement_ivxn3r$('attendance', true); this.descriptor.addElement_ivxn3r$('earliestJoinDate', true); this.descriptor.addElement_ivxn3r$('latestDateLeft', true); this.descriptor.addElement_ivxn3r$('enrolmentRole', true); PersonWithClazzEnrolmentDetails$$serializer_instance = this; } Object.defineProperty(PersonWithClazzEnrolmentDetails$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_e9g6re$_0; }}); PersonWithClazzEnrolmentDetails$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.personUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.personUid); if (!equals(value.username, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.username); if (!equals(value.firstNames, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.firstNames); if (!equals(value.lastName, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.lastName); if (!equals(value.emailAddr, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.emailAddr); if (!equals(value.phoneNum, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.phoneNum); if (!equals(value.gender, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.gender); if (!equals(value.active, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 7, value.active); if (!equals(value.admin, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 8, value.admin); if (!equals(value.personNotes, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.personNotes); if (!equals(value.fatherName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.fatherName); if (!equals(value.fatherNumber, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, internal.StringSerializer, value.fatherNumber); if (!equals(value.motherName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 12, internal.StringSerializer, value.motherName); if (!equals(value.motherNum, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 13, internal.StringSerializer, value.motherNum); if (!equals(value.dateOfBirth, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.dateOfBirth); if (!equals(value.personAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 15, internal.StringSerializer, value.personAddress); if (!equals(value.personOrgId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 16, internal.StringSerializer, value.personOrgId); if (!equals(value.personGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.personGroupUid); if (!equals(value.personMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.personMasterChangeSeqNum); if (!equals(value.personLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.personLocalChangeSeqNum); if (!equals(value.personLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeIntElement_ptg7oe$(this.descriptor, 20, value.personLastChangedBy); if (!equals(value.personLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.personLct); if (!equals(value.personCountry, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 22, internal.StringSerializer, value.personCountry); if (!equals(value.personType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeIntElement_ptg7oe$(this.descriptor, 23, value.personType); if (!equals(value.attendance, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeFloatElement_lf6hpt$(this.descriptor, 24, value.attendance); if (!equals(value.earliestJoinDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeLongElement_j0o2mv$(this.descriptor, 25, value.earliestJoinDate); if (!equals(value.latestDateLeft, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 26)) output.encodeLongElement_j0o2mv$(this.descriptor, 26, value.latestDateLeft); if (!equals(value.enrolmentRole, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 27)) output.encodeIntElement_ptg7oe$(this.descriptor, 27, value.enrolmentRole); output.endStructure_24f42q$(this.descriptor); }; PersonWithClazzEnrolmentDetails$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeBooleanElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeBooleanElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, internal.StringSerializer, local11); bitMask0 |= 2048; break; case 12: local12 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 12, internal.StringSerializer, local12); bitMask0 |= 4096; break; case 13: local13 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 13, internal.StringSerializer, local13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 15, internal.StringSerializer, local15); bitMask0 |= 32768; break; case 16: local16 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 16, internal.StringSerializer, local16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeIntElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 22, internal.StringSerializer, local22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeIntElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeFloatElement_szpzho$(this.descriptor, 24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeLongElement_szpzho$(this.descriptor, 25); bitMask0 |= 33554432; break; case 26: local26 = input.decodeLongElement_szpzho$(this.descriptor, 26); bitMask0 |= 67108864; break; case 27: local27 = input.decodeIntElement_szpzho$(this.descriptor, 27); bitMask0 |= 134217728; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return PersonWithClazzEnrolmentDetails_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, null); }; PersonWithClazzEnrolmentDetails$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.BooleanSerializer, internal.BooleanSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.FloatSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer]; }; PersonWithClazzEnrolmentDetails$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var PersonWithClazzEnrolmentDetails$$serializer_instance = null; function PersonWithClazzEnrolmentDetails$$serializer_getInstance() { if (PersonWithClazzEnrolmentDetails$$serializer_instance === null) { new PersonWithClazzEnrolmentDetails$$serializer(); } return PersonWithClazzEnrolmentDetails$$serializer_instance; } function PersonWithClazzEnrolmentDetails_init(seen1, personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType, attendance, earliestJoinDate, latestDateLeft, enrolmentRole, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(PersonWithClazzEnrolmentDetails.prototype); $this = Person_init(seen1, personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType, $this); if ((seen1 & 16777216) === 0) $this.attendance = 0.0; else $this.attendance = attendance; if ((seen1 & 33554432) === 0) $this.earliestJoinDate = L0; else $this.earliestJoinDate = earliestJoinDate; if ((seen1 & 67108864) === 0) $this.latestDateLeft = L0; else $this.latestDateLeft = latestDateLeft; if ((seen1 & 134217728) === 0) $this.enrolmentRole = 0; else $this.enrolmentRole = enrolmentRole; return $this; } PersonWithClazzEnrolmentDetails.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonWithClazzEnrolmentDetails', interfaces: [Person]}; function PersonWithDisplayDetails() { PersonWithDisplayDetails$Companion_getInstance(); Person.call(this); } function PersonWithDisplayDetails$Companion() { PersonWithDisplayDetails$Companion_instance = this; } PersonWithDisplayDetails$Companion.prototype.serializer = function () { return PersonWithDisplayDetails$$serializer_getInstance(); }; PersonWithDisplayDetails$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var PersonWithDisplayDetails$Companion_instance = null; function PersonWithDisplayDetails$Companion_getInstance() { if (PersonWithDisplayDetails$Companion_instance === null) { new PersonWithDisplayDetails$Companion(); } return PersonWithDisplayDetails$Companion_instance; } function PersonWithDisplayDetails$$serializer() { this.descriptor_ed61om$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonWithDisplayDetails', this, 24); this.descriptor.addElement_ivxn3r$('personUid', true); this.descriptor.addElement_ivxn3r$('username', true); this.descriptor.addElement_ivxn3r$('firstNames', true); this.descriptor.addElement_ivxn3r$('lastName', true); this.descriptor.addElement_ivxn3r$('emailAddr', true); this.descriptor.addElement_ivxn3r$('phoneNum', true); this.descriptor.addElement_ivxn3r$('gender', true); this.descriptor.addElement_ivxn3r$('active', true); this.descriptor.addElement_ivxn3r$('admin', true); this.descriptor.addElement_ivxn3r$('personNotes', true); this.descriptor.addElement_ivxn3r$('fatherName', true); this.descriptor.addElement_ivxn3r$('fatherNumber', true); this.descriptor.addElement_ivxn3r$('motherName', true); this.descriptor.addElement_ivxn3r$('motherNum', true); this.descriptor.addElement_ivxn3r$('dateOfBirth', true); this.descriptor.addElement_ivxn3r$('personAddress', true); this.descriptor.addElement_ivxn3r$('personOrgId', true); this.descriptor.addElement_ivxn3r$('personGroupUid', true); this.descriptor.addElement_ivxn3r$('personMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('personLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('personLastChangedBy', true); this.descriptor.addElement_ivxn3r$('personLct', true); this.descriptor.addElement_ivxn3r$('personCountry', true); this.descriptor.addElement_ivxn3r$('personType', true); PersonWithDisplayDetails$$serializer_instance = this; } Object.defineProperty(PersonWithDisplayDetails$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ed61om$_0; }}); PersonWithDisplayDetails$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.personUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.personUid); if (!equals(value.username, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.username); if (!equals(value.firstNames, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.firstNames); if (!equals(value.lastName, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.lastName); if (!equals(value.emailAddr, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.emailAddr); if (!equals(value.phoneNum, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.phoneNum); if (!equals(value.gender, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.gender); if (!equals(value.active, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 7, value.active); if (!equals(value.admin, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 8, value.admin); if (!equals(value.personNotes, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.personNotes); if (!equals(value.fatherName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.fatherName); if (!equals(value.fatherNumber, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, internal.StringSerializer, value.fatherNumber); if (!equals(value.motherName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 12, internal.StringSerializer, value.motherName); if (!equals(value.motherNum, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 13, internal.StringSerializer, value.motherNum); if (!equals(value.dateOfBirth, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.dateOfBirth); if (!equals(value.personAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 15, internal.StringSerializer, value.personAddress); if (!equals(value.personOrgId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 16, internal.StringSerializer, value.personOrgId); if (!equals(value.personGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.personGroupUid); if (!equals(value.personMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.personMasterChangeSeqNum); if (!equals(value.personLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.personLocalChangeSeqNum); if (!equals(value.personLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeIntElement_ptg7oe$(this.descriptor, 20, value.personLastChangedBy); if (!equals(value.personLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.personLct); if (!equals(value.personCountry, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 22, internal.StringSerializer, value.personCountry); if (!equals(value.personType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeIntElement_ptg7oe$(this.descriptor, 23, value.personType); output.endStructure_24f42q$(this.descriptor); }; PersonWithDisplayDetails$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeBooleanElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeBooleanElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, internal.StringSerializer, local11); bitMask0 |= 2048; break; case 12: local12 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 12, internal.StringSerializer, local12); bitMask0 |= 4096; break; case 13: local13 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 13, internal.StringSerializer, local13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 15, internal.StringSerializer, local15); bitMask0 |= 32768; break; case 16: local16 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 16, internal.StringSerializer, local16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeIntElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 22, internal.StringSerializer, local22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeIntElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return PersonWithDisplayDetails_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, null); }; PersonWithDisplayDetails$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.BooleanSerializer, internal.BooleanSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer]; }; PersonWithDisplayDetails$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var PersonWithDisplayDetails$$serializer_instance = null; function PersonWithDisplayDetails$$serializer_getInstance() { if (PersonWithDisplayDetails$$serializer_instance === null) { new PersonWithDisplayDetails$$serializer(); } return PersonWithDisplayDetails$$serializer_instance; } function PersonWithDisplayDetails_init(seen1, personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(PersonWithDisplayDetails.prototype); $this = Person_init(seen1, personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType, $this); return $this; } PersonWithDisplayDetails.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonWithDisplayDetails', interfaces: [Person]}; function PersonWithPersonParentJoin() { PersonWithPersonParentJoin$Companion_getInstance(); Person.call(this); this.parentJoin = null; } function PersonWithPersonParentJoin$Companion() { PersonWithPersonParentJoin$Companion_instance = this; } PersonWithPersonParentJoin$Companion.prototype.serializer = function () { return PersonWithPersonParentJoin$$serializer_getInstance(); }; PersonWithPersonParentJoin$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var PersonWithPersonParentJoin$Companion_instance = null; function PersonWithPersonParentJoin$Companion_getInstance() { if (PersonWithPersonParentJoin$Companion_instance === null) { new PersonWithPersonParentJoin$Companion(); } return PersonWithPersonParentJoin$Companion_instance; } function PersonWithPersonParentJoin$$serializer() { this.descriptor_purrnz$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonWithPersonParentJoin', this, 25); this.descriptor.addElement_ivxn3r$('personUid', true); this.descriptor.addElement_ivxn3r$('username', true); this.descriptor.addElement_ivxn3r$('firstNames', true); this.descriptor.addElement_ivxn3r$('lastName', true); this.descriptor.addElement_ivxn3r$('emailAddr', true); this.descriptor.addElement_ivxn3r$('phoneNum', true); this.descriptor.addElement_ivxn3r$('gender', true); this.descriptor.addElement_ivxn3r$('active', true); this.descriptor.addElement_ivxn3r$('admin', true); this.descriptor.addElement_ivxn3r$('personNotes', true); this.descriptor.addElement_ivxn3r$('fatherName', true); this.descriptor.addElement_ivxn3r$('fatherNumber', true); this.descriptor.addElement_ivxn3r$('motherName', true); this.descriptor.addElement_ivxn3r$('motherNum', true); this.descriptor.addElement_ivxn3r$('dateOfBirth', true); this.descriptor.addElement_ivxn3r$('personAddress', true); this.descriptor.addElement_ivxn3r$('personOrgId', true); this.descriptor.addElement_ivxn3r$('personGroupUid', true); this.descriptor.addElement_ivxn3r$('personMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('personLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('personLastChangedBy', true); this.descriptor.addElement_ivxn3r$('personLct', true); this.descriptor.addElement_ivxn3r$('personCountry', true); this.descriptor.addElement_ivxn3r$('personType', true); this.descriptor.addElement_ivxn3r$('parentJoin', true); PersonWithPersonParentJoin$$serializer_instance = this; } Object.defineProperty(PersonWithPersonParentJoin$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_purrnz$_0; }}); PersonWithPersonParentJoin$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.personUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.personUid); if (!equals(value.username, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.username); if (!equals(value.firstNames, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.firstNames); if (!equals(value.lastName, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.lastName); if (!equals(value.emailAddr, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.emailAddr); if (!equals(value.phoneNum, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.phoneNum); if (!equals(value.gender, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.gender); if (!equals(value.active, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 7, value.active); if (!equals(value.admin, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 8, value.admin); if (!equals(value.personNotes, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.personNotes); if (!equals(value.fatherName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 10, internal.StringSerializer, value.fatherName); if (!equals(value.fatherNumber, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, internal.StringSerializer, value.fatherNumber); if (!equals(value.motherName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 12, internal.StringSerializer, value.motherName); if (!equals(value.motherNum, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 13, internal.StringSerializer, value.motherNum); if (!equals(value.dateOfBirth, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.dateOfBirth); if (!equals(value.personAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 15, internal.StringSerializer, value.personAddress); if (!equals(value.personOrgId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 16, internal.StringSerializer, value.personOrgId); if (!equals(value.personGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.personGroupUid); if (!equals(value.personMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.personMasterChangeSeqNum); if (!equals(value.personLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.personLocalChangeSeqNum); if (!equals(value.personLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeIntElement_ptg7oe$(this.descriptor, 20, value.personLastChangedBy); if (!equals(value.personLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.personLct); if (!equals(value.personCountry, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 22, internal.StringSerializer, value.personCountry); if (!equals(value.personType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeIntElement_ptg7oe$(this.descriptor, 23, value.personType); if (!equals(value.parentJoin, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 24, PersonParentJoin$$serializer_getInstance(), value.parentJoin); output.endStructure_24f42q$(this.descriptor); }; PersonWithPersonParentJoin$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeBooleanElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeBooleanElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 10, internal.StringSerializer, local10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, internal.StringSerializer, local11); bitMask0 |= 2048; break; case 12: local12 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 12, internal.StringSerializer, local12); bitMask0 |= 4096; break; case 13: local13 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 13, internal.StringSerializer, local13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 15, internal.StringSerializer, local15); bitMask0 |= 32768; break; case 16: local16 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 16, internal.StringSerializer, local16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeIntElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 22, internal.StringSerializer, local22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeIntElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 24, PersonParentJoin$$serializer_getInstance(), local24); bitMask0 |= 16777216; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return PersonWithPersonParentJoin_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, null); }; PersonWithPersonParentJoin$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.BooleanSerializer, internal.BooleanSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, new NullableSerializer(PersonParentJoin$$serializer_getInstance())]; }; PersonWithPersonParentJoin$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var PersonWithPersonParentJoin$$serializer_instance = null; function PersonWithPersonParentJoin$$serializer_getInstance() { if (PersonWithPersonParentJoin$$serializer_instance === null) { new PersonWithPersonParentJoin$$serializer(); } return PersonWithPersonParentJoin$$serializer_instance; } function PersonWithPersonParentJoin_init(seen1, personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType, parentJoin, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(PersonWithPersonParentJoin.prototype); $this = Person_init(seen1, personUid, username, firstNames, lastName, emailAddr, phoneNum, gender, active, admin, personNotes, fatherName, fatherNumber, motherName, motherNum, dateOfBirth, personAddress, personOrgId, personGroupUid, personMasterChangeSeqNum, personLocalChangeSeqNum, personLastChangedBy, personLct, personCountry, personType, $this); if ((seen1 & 16777216) === 0) $this.parentJoin = null; else $this.parentJoin = parentJoin; return $this; } PersonWithPersonParentJoin.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonWithPersonParentJoin', interfaces: [Person]}; function PersonWithSessionsDisplay() { PersonWithSessionsDisplay$Companion_getInstance(); this.startDate = L0; this.contextRegistration = null; this.duration = L0; this.resultSuccess = StatementEntity$Companion_getInstance().RESULT_UNSET; this.resultComplete = false; this.resultScoreScaled = 0.0; this.resultMax = 0; this.resultScore = 0; } function PersonWithSessionsDisplay$Companion() { PersonWithSessionsDisplay$Companion_instance = this; } PersonWithSessionsDisplay$Companion.prototype.serializer = function () { return PersonWithSessionsDisplay$$serializer_getInstance(); }; PersonWithSessionsDisplay$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var PersonWithSessionsDisplay$Companion_instance = null; function PersonWithSessionsDisplay$Companion_getInstance() { if (PersonWithSessionsDisplay$Companion_instance === null) { new PersonWithSessionsDisplay$Companion(); } return PersonWithSessionsDisplay$Companion_instance; } function PersonWithSessionsDisplay$$serializer() { this.descriptor_u52gmh$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.PersonWithSessionsDisplay', this, 8); this.descriptor.addElement_ivxn3r$('startDate', true); this.descriptor.addElement_ivxn3r$('contextRegistration', true); this.descriptor.addElement_ivxn3r$('duration', true); this.descriptor.addElement_ivxn3r$('resultSuccess', true); this.descriptor.addElement_ivxn3r$('resultComplete', true); this.descriptor.addElement_ivxn3r$('resultScoreScaled', true); this.descriptor.addElement_ivxn3r$('resultMax', true); this.descriptor.addElement_ivxn3r$('resultScore', true); PersonWithSessionsDisplay$$serializer_instance = this; } Object.defineProperty(PersonWithSessionsDisplay$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_u52gmh$_0; }}); PersonWithSessionsDisplay$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.startDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.startDate); if (!equals(value.contextRegistration, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.contextRegistration); if (!equals(value.duration, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.duration); if (!equals(value.resultSuccess, StatementEntity$Companion_getInstance().RESULT_UNSET) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeByteElement_j0u8y3$(this.descriptor, 3, value.resultSuccess); if (!equals(value.resultComplete, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.resultComplete); if (!equals(value.resultScoreScaled, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeFloatElement_lf6hpt$(this.descriptor, 5, value.resultScoreScaled); if (!equals(value.resultMax, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.resultMax); if (!equals(value.resultScore, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.resultScore); output.endStructure_24f42q$(this.descriptor); }; PersonWithSessionsDisplay$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeByteElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeFloatElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return PersonWithSessionsDisplay_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; PersonWithSessionsDisplay$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.ByteSerializer, internal.BooleanSerializer, internal.FloatSerializer, internal.IntSerializer, internal.IntSerializer]; }; PersonWithSessionsDisplay$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var PersonWithSessionsDisplay$$serializer_instance = null; function PersonWithSessionsDisplay$$serializer_getInstance() { if (PersonWithSessionsDisplay$$serializer_instance === null) { new PersonWithSessionsDisplay$$serializer(); } return PersonWithSessionsDisplay$$serializer_instance; } function PersonWithSessionsDisplay_init(seen1, startDate, contextRegistration, duration, resultSuccess, resultComplete, resultScoreScaled, resultMax, resultScore, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(PersonWithSessionsDisplay.prototype); if ((seen1 & 1) === 0) $this.startDate = L0; else $this.startDate = startDate; if ((seen1 & 2) === 0) $this.contextRegistration = null; else $this.contextRegistration = contextRegistration; if ((seen1 & 4) === 0) $this.duration = L0; else $this.duration = duration; if ((seen1 & 8) === 0) $this.resultSuccess = StatementEntity$Companion_getInstance().RESULT_UNSET; else $this.resultSuccess = resultSuccess; if ((seen1 & 16) === 0) $this.resultComplete = false; else $this.resultComplete = resultComplete; if ((seen1 & 32) === 0) $this.resultScoreScaled = 0.0; else $this.resultScoreScaled = resultScoreScaled; if ((seen1 & 64) === 0) $this.resultMax = 0; else $this.resultMax = resultMax; if ((seen1 & 128) === 0) $this.resultScore = 0; else $this.resultScore = resultScore; return $this; } PersonWithSessionsDisplay.$metadata$ = {kind: Kind_CLASS, simpleName: 'PersonWithSessionsDisplay', interfaces: []}; function Report() { Report$Companion_getInstance(); this.reportUid = L0; this.reportOwnerUid = L0; this.xAxis = 300; this.reportDateRangeSelection = 0; this.fromDate = L0; this.fromRelTo = 0; this.fromRelOffSet = 0; this.fromRelUnit = 0; this.toDate = L0; this.toRelTo = 0; this.toRelOffSet = 0; this.toRelUnit = 0; this.reportTitle = null; this.reportDescription = null; this.reportSeries = null; this.reportInactive = false; this.isTemplate = false; this.priority = 1; this.reportTitleId = 0; this.reportDescId = 0; this.reportMasterChangeSeqNum = L0; this.reportLocalChangeSeqNum = L0; this.reportLastChangedBy = 0; this.reportLct = L0; } function Report$Companion() { Report$Companion_instance = this; this.TABLE_ID = 101; this.DAY = 300; this.WEEK = 301; this.MONTH = 302; this.CONTENT_ENTRY = 304; this.GENDER = 306; this.CLASS = 307; this.ENROLMENT_OUTCOME = 308; this.ENROLMENT_LEAVING_REASON = 309; this.EVERYTHING = 0; this.LAST_WEEK_DATE = 800; this.LAST_TWO_WEEKS_DATE = 801; this.LAST_MONTH_DATE = 802; this.LAST_THREE_MONTHS_DATE = 803; this.NEW_CUSTOM_RANGE_DATE = 804; this.CUSTOM_RANGE = 805; this.TEMPLATE_BLANK_REPORT_UID = L100000; this.TEMPLATE_CONTENT_USAGE_OVER_TIME_UID = L100001; this.TEMPLATE_UNIQUE_CONTENT_USERS_UID = L100002; this.TEMPLATE_ATTENDANCE_OVER_TIME_BY_CLASS_UID = L100003; this.TEMPLATE_CONTENT_USAGE_BY_CLASS_UID = L100004; this.TEMPLATE_CONTENT_COMPLETION_UID = L100005; this.BLANK_REPORT = 1; this.BLANK_REPORT_DESC = 2; this.CONTENT_USAGE_OVER_TIME = 3; this.CONTENT_USAGE_OVER_TIME_DESC = 4; this.UNIQUE_CONTENT_USERS_OVER_TIME = 5; this.UNIQUE_CONTENT_USERS_OVER_TIME_DESC = 6; this.ATTENDANCE_OVER_TIME_BY_CLASS = 7; this.ATTENDANCE_OVER_TIME_BY_CLASS_DESC = 8; this.CONTENT_USAGE_BY_CLASS = 9; this.CONTENT_USAGE_BY_CLASS_DESC = 10; this.CONTENT_COMPLETION = 11; this.CONTENT_COMPLETION_DESC = 12; var $receiver = new Report(); $receiver.reportUid = this.TEMPLATE_BLANK_REPORT_UID; $receiver.reportTitle = 'Blank report'; $receiver.reportDescription = 'Start '; $receiver.isTemplate = true; $receiver.priority = 0; $receiver.reportTitleId = 1; $receiver.reportDescId = 2; $receiver.reportSeries = trimIndent(' \n [{\n "reportSeriesUid": 0,\n "reportSeriesName": "Series 1",\n "reportSeriesYAxis": 200,\n "reportSeriesVisualType": 100,\n "reportSeriesSubGroup": 0\n }]\n '); var $receiver_0 = new Report(); $receiver_0.reportUid = this.TEMPLATE_CONTENT_USAGE_OVER_TIME_UID; $receiver_0.reportTitle = 'Content usage over time'; $receiver_0.reportDescription = 'Total content '; $receiver_0.xAxis = 306; $receiver_0.isTemplate = true; $receiver_0.reportTitleId = 3; $receiver_0.reportDescId = 4; $receiver_0.reportSeries = trimIndent(' \n [{\n "reportSeriesUid": 0,\n "reportSeriesName": "Series 1",\n "reportSeriesYAxis": 200,\n "reportSeriesVisualType": 100,\n "reportSeriesSubGroup": 0\n }]\n '); var $receiver_1 = new Report(); $receiver_1.reportUid = this.TEMPLATE_UNIQUE_CONTENT_USERS_UID; $receiver_1.reportTitle = 'Unique content users over time'; $receiver_1.reportDescription = 'Number of active users over time'; $receiver_1.xAxis = 302; $receiver_1.isTemplate = true; $receiver_1.reportTitleId = 5; $receiver_1.reportDescId = 6; $receiver_1.reportSeries = trimIndent(' \n [{\n "reportSeriesUid": 0,\n "reportSeriesName": "Series 1",\n "reportSeriesYAxis": 204,\n "reportSeriesVisualType": 100,\n "reportSeriesSubGroup": 0\n }]\n '); var $receiver_2 = new Report(); $receiver_2.reportUid = this.TEMPLATE_ATTENDANCE_OVER_TIME_BY_CLASS_UID; $receiver_2.reportTitle = 'Attendance over time by class'; $receiver_2.reportDescription = 'Percentage of students attending over time'; $receiver_2.isTemplate = true; $receiver_2.xAxis = 307; $receiver_2.reportTitleId = 7; $receiver_2.reportDescId = 8; $receiver_2.reportSeries = trimIndent(' \n [{\n "reportSeriesUid": 0,\n "reportSeriesName": "Series 1",\n "reportSeriesYAxis": 211,\n "reportSeriesVisualType": 100,\n "reportSeriesSubGroup": 0\n }]\n '); var $receiver_3 = new Report(); $receiver_3.reportUid = this.TEMPLATE_CONTENT_USAGE_BY_CLASS_UID; $receiver_3.reportTitle = 'Content usage by class'; $receiver_3.reportDescription = 'Total content usage duration subgroup by class'; $receiver_3.xAxis = 307; $receiver_3.isTemplate = true; $receiver_3.reportTitleId = 9; $receiver_3.reportDescId = 10; $receiver_3.reportSeries = trimIndent('\n [{\n "reportSeriesUid ": 0,\n "reportSeriesName ": " Series 1",\n "reportSeriesYAxis": 200,\n "reportSeriesVisualType": 100,\n "reportSeriesSubGroup": 0\n }]\n '); var $receiver_4 = new Report(); $receiver_4.reportUid = this.TEMPLATE_CONTENT_COMPLETION_UID; $receiver_4.reportTitle = 'Content completion'; $receiver_4.reportDescription = 'Number of students who have completed selected content'; $receiver_4.isTemplate = true; $receiver_4.xAxis = 304; $receiver_4.reportTitleId = 11; $receiver_4.reportDescId = 12; $receiver_4.reportSeries = trimIndent('\n [{\n "reportSeriesUid": 0,\n "reportSeriesName": "Series 1",\n "reportSeriesYAxis": 206,\n "reportSeriesVisualType": 100,\n "reportSeriesSubGroup": 0\n }]\n '); this.FIXED_TEMPLATES = listOf([$receiver, $receiver_0, $receiver_1, $receiver_2, $receiver_3, $receiver_4]); } Report$Companion.prototype.serializer = function () { return Report$$serializer_getInstance(); }; Report$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var Report$Companion_instance = null; function Report$Companion_getInstance() { if (Report$Companion_instance === null) { new Report$Companion(); } return Report$Companion_instance; } Report.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, Report) ? tmp$_0 : throwCCE(); if (!equals(this.reportUid, other.reportUid)) return false; if (!equals(this.reportOwnerUid, other.reportOwnerUid)) return false; if (this.xAxis !== other.xAxis) return false; if (!equals(this.fromDate, other.fromDate)) return false; if (this.fromRelTo !== other.fromRelTo) return false; if (this.fromRelOffSet !== other.fromRelOffSet) return false; if (this.fromRelUnit !== other.fromRelUnit) return false; if (!equals(this.toDate, other.toDate)) return false; if (this.toRelTo !== other.toRelTo) return false; if (this.toRelOffSet !== other.toRelOffSet) return false; if (this.toRelUnit !== other.toRelUnit) return false; if (!equals(this.reportTitle, other.reportTitle)) return false; if (!equals(this.reportDescription, other.reportDescription)) return false; if (!equals(this.reportSeries, other.reportSeries)) return false; if (this.reportInactive !== other.reportInactive) return false; if (this.isTemplate !== other.isTemplate) return false; if (this.priority !== other.priority) return false; if (!equals(this.reportMasterChangeSeqNum, other.reportMasterChangeSeqNum)) return false; if (!equals(this.reportLocalChangeSeqNum, other.reportLocalChangeSeqNum)) return false; if (this.reportLastChangedBy !== other.reportLastChangedBy) return false; return true; }; Report.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4; var result = hashCode(this.reportUid); result = (31 * result | 0) + hashCode(this.reportOwnerUid) | 0; result = (31 * result | 0) + this.xAxis | 0; result = (31 * result | 0) + hashCode(this.fromDate) | 0; result = (31 * result | 0) + this.fromRelTo | 0; result = (31 * result | 0) + this.fromRelOffSet | 0; result = (31 * result | 0) + this.fromRelUnit | 0; result = (31 * result | 0) + hashCode(this.toDate) | 0; result = (31 * result | 0) + this.toRelTo | 0; result = (31 * result | 0) + this.toRelOffSet | 0; result = (31 * result | 0) + this.toRelUnit | 0; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.reportTitle) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.reportDescription) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + ((tmp$_4 = (tmp$_3 = this.reportSeries) != null ? hashCode(tmp$_3) : null) != null ? tmp$_4 : 0) | 0; result = (31 * result | 0) + hashCode(this.reportInactive) | 0; result = (31 * result | 0) + hashCode(this.isTemplate) | 0; result = (31 * result | 0) + hashCode(this.priority) | 0; result = (31 * result | 0) + hashCode(this.reportMasterChangeSeqNum) | 0; result = (31 * result | 0) + hashCode(this.reportLocalChangeSeqNum) | 0; result = (31 * result | 0) + this.reportLastChangedBy | 0; return result; }; function Report$$serializer() { this.descriptor_cqf3en$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.Report', this, 24); this.descriptor.addElement_ivxn3r$('reportUid', true); this.descriptor.addElement_ivxn3r$('reportOwnerUid', true); this.descriptor.addElement_ivxn3r$('xAxis', true); this.descriptor.addElement_ivxn3r$('reportDateRangeSelection', true); this.descriptor.addElement_ivxn3r$('fromDate', true); this.descriptor.addElement_ivxn3r$('fromRelTo', true); this.descriptor.addElement_ivxn3r$('fromRelOffSet', true); this.descriptor.addElement_ivxn3r$('fromRelUnit', true); this.descriptor.addElement_ivxn3r$('toDate', true); this.descriptor.addElement_ivxn3r$('toRelTo', true); this.descriptor.addElement_ivxn3r$('toRelOffSet', true); this.descriptor.addElement_ivxn3r$('toRelUnit', true); this.descriptor.addElement_ivxn3r$('reportTitle', true); this.descriptor.addElement_ivxn3r$('reportDescription', true); this.descriptor.addElement_ivxn3r$('reportSeries', true); this.descriptor.addElement_ivxn3r$('reportInactive', true); this.descriptor.addElement_ivxn3r$('isTemplate', true); this.descriptor.addElement_ivxn3r$('priority', true); this.descriptor.addElement_ivxn3r$('reportTitleId', true); this.descriptor.addElement_ivxn3r$('reportDescId', true); this.descriptor.addElement_ivxn3r$('reportMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('reportLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('reportLastChangedBy', true); this.descriptor.addElement_ivxn3r$('reportLct', true); Report$$serializer_instance = this; } Object.defineProperty(Report$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_cqf3en$_0; }}); Report$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.reportUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.reportUid); if (!equals(value.reportOwnerUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.reportOwnerUid); if (!equals(value.xAxis, 300) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.xAxis); if (!equals(value.reportDateRangeSelection, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.reportDateRangeSelection); if (!equals(value.fromDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.fromDate); if (!equals(value.fromRelTo, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.fromRelTo); if (!equals(value.fromRelOffSet, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.fromRelOffSet); if (!equals(value.fromRelUnit, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.fromRelUnit); if (!equals(value.toDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.toDate); if (!equals(value.toRelTo, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.toRelTo); if (!equals(value.toRelOffSet, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeIntElement_ptg7oe$(this.descriptor, 10, value.toRelOffSet); if (!equals(value.toRelUnit, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.toRelUnit); if (!equals(value.reportTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 12, internal.StringSerializer, value.reportTitle); if (!equals(value.reportDescription, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 13, internal.StringSerializer, value.reportDescription); if (!equals(value.reportSeries, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 14, internal.StringSerializer, value.reportSeries); if (!equals(value.reportInactive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 15, value.reportInactive); if (!equals(value.isTemplate, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 16, value.isTemplate); if (!equals(value.priority, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeIntElement_ptg7oe$(this.descriptor, 17, value.priority); if (!equals(value.reportTitleId, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeIntElement_ptg7oe$(this.descriptor, 18, value.reportTitleId); if (!equals(value.reportDescId, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeIntElement_ptg7oe$(this.descriptor, 19, value.reportDescId); if (!equals(value.reportMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeLongElement_j0o2mv$(this.descriptor, 20, value.reportMasterChangeSeqNum); if (!equals(value.reportLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.reportLocalChangeSeqNum); if (!equals(value.reportLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeIntElement_ptg7oe$(this.descriptor, 22, value.reportLastChangedBy); if (!equals(value.reportLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeLongElement_j0o2mv$(this.descriptor, 23, value.reportLct); output.endStructure_24f42q$(this.descriptor); }; Report$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeIntElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 12, internal.StringSerializer, local12); bitMask0 |= 4096; break; case 13: local13 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 13, internal.StringSerializer, local13); bitMask0 |= 8192; break; case 14: local14 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 14, internal.StringSerializer, local14); bitMask0 |= 16384; break; case 15: local15 = input.decodeBooleanElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeBooleanElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeIntElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeIntElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeIntElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeLongElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeIntElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeLongElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return Report_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, null); }; Report$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; Report$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var Report$$serializer_instance = null; function Report$$serializer_getInstance() { if (Report$$serializer_instance === null) { new Report$$serializer(); } return Report$$serializer_instance; } function Report_init(seen1, reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(Report.prototype); if ((seen1 & 1) === 0) $this.reportUid = L0; else $this.reportUid = reportUid; if ((seen1 & 2) === 0) $this.reportOwnerUid = L0; else $this.reportOwnerUid = reportOwnerUid; if ((seen1 & 4) === 0) $this.xAxis = 300; else $this.xAxis = xAxis; if ((seen1 & 8) === 0) $this.reportDateRangeSelection = 0; else $this.reportDateRangeSelection = reportDateRangeSelection; if ((seen1 & 16) === 0) $this.fromDate = L0; else $this.fromDate = fromDate; if ((seen1 & 32) === 0) $this.fromRelTo = 0; else $this.fromRelTo = fromRelTo; if ((seen1 & 64) === 0) $this.fromRelOffSet = 0; else $this.fromRelOffSet = fromRelOffSet; if ((seen1 & 128) === 0) $this.fromRelUnit = 0; else $this.fromRelUnit = fromRelUnit; if ((seen1 & 256) === 0) $this.toDate = L0; else $this.toDate = toDate; if ((seen1 & 512) === 0) $this.toRelTo = 0; else $this.toRelTo = toRelTo; if ((seen1 & 1024) === 0) $this.toRelOffSet = 0; else $this.toRelOffSet = toRelOffSet; if ((seen1 & 2048) === 0) $this.toRelUnit = 0; else $this.toRelUnit = toRelUnit; if ((seen1 & 4096) === 0) $this.reportTitle = null; else $this.reportTitle = reportTitle; if ((seen1 & 8192) === 0) $this.reportDescription = null; else $this.reportDescription = reportDescription; if ((seen1 & 16384) === 0) $this.reportSeries = null; else $this.reportSeries = reportSeries; if ((seen1 & 32768) === 0) $this.reportInactive = false; else $this.reportInactive = reportInactive; if ((seen1 & 65536) === 0) $this.isTemplate = false; else $this.isTemplate = isTemplate; if ((seen1 & 131072) === 0) $this.priority = 1; else $this.priority = priority; if ((seen1 & 262144) === 0) $this.reportTitleId = 0; else $this.reportTitleId = reportTitleId; if ((seen1 & 524288) === 0) $this.reportDescId = 0; else $this.reportDescId = reportDescId; if ((seen1 & 1048576) === 0) $this.reportMasterChangeSeqNum = L0; else $this.reportMasterChangeSeqNum = reportMasterChangeSeqNum; if ((seen1 & 2097152) === 0) $this.reportLocalChangeSeqNum = L0; else $this.reportLocalChangeSeqNum = reportLocalChangeSeqNum; if ((seen1 & 4194304) === 0) $this.reportLastChangedBy = 0; else $this.reportLastChangedBy = reportLastChangedBy; if ((seen1 & 8388608) === 0) $this.reportLct = L0; else $this.reportLct = reportLct; return $this; } Report.$metadata$ = {kind: Kind_CLASS, simpleName: 'Report', interfaces: []}; function ReportFilter() { ReportFilter$Companion_getInstance(); this.reportFilterUid = 0; this.reportFilterSeriesUid = 0; this.reportFilterField = 100; this.reportFilterCondition = 0; this.reportFilterValue = null; this.reportFilterDropDownValue = 0; this.reportFilterValueBetweenX = null; this.reportFilterValueBetweenY = null; } function ReportFilter$Companion() { ReportFilter$Companion_instance = this; this.FIELD_PERSON_GENDER = 100; this.FIELD_PERSON_AGE = 101; this.FIELD_CONTENT_COMPLETION = 102; this.FIELD_CONTENT_ENTRY = 103; this.FIELD_CONTENT_PROGRESS = 104; this.FIELD_ATTENDANCE_PERCENTAGE = 105; this.FIELD_CLAZZ_ENROLMENT_OUTCOME = 106; this.FIELD_CLAZZ_ENROLMENT_LEAVING_REASON = 107; this.CONDITION_IS = 200; this.CONDITION_IS_NOT = 201; this.CONDITION_GREATER_THAN = 202; this.CONDITION_LESS_THAN = 203; this.CONDITION_BETWEEN = 205; this.CONDITION_IN_LIST = 206; this.CONDITION_NOT_IN_LIST = 207; } ReportFilter$Companion.prototype.serializer = function () { return ReportFilter$$serializer_getInstance(); }; ReportFilter$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ReportFilter$Companion_instance = null; function ReportFilter$Companion_getInstance() { if (ReportFilter$Companion_instance === null) { new ReportFilter$Companion(); } return ReportFilter$Companion_instance; } ReportFilter.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, ReportFilter) ? tmp$_0 : throwCCE(); if (this.reportFilterUid !== other.reportFilterUid) return false; if (this.reportFilterSeriesUid !== other.reportFilterSeriesUid) return false; if (this.reportFilterField !== other.reportFilterField) return false; if (this.reportFilterCondition !== other.reportFilterCondition) return false; if (!equals(this.reportFilterValue, other.reportFilterValue)) return false; if (this.reportFilterDropDownValue !== other.reportFilterDropDownValue) return false; if (!equals(this.reportFilterValueBetweenX, other.reportFilterValueBetweenX)) return false; if (!equals(this.reportFilterValueBetweenY, other.reportFilterValueBetweenY)) return false; return true; }; ReportFilter.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4; var result = this.reportFilterUid; result = (31 * result | 0) + this.reportFilterSeriesUid | 0; result = (31 * result | 0) + this.reportFilterField | 0; result = (31 * result | 0) + this.reportFilterCondition | 0; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.reportFilterValue) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + this.reportFilterDropDownValue | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.reportFilterValueBetweenX) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + ((tmp$_4 = (tmp$_3 = this.reportFilterValueBetweenY) != null ? hashCode(tmp$_3) : null) != null ? tmp$_4 : 0) | 0; return result; }; function ReportFilter$$serializer() { this.descriptor_abpxwp$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ReportFilter', this, 8); this.descriptor.addElement_ivxn3r$('reportFilterUid', true); this.descriptor.addElement_ivxn3r$('reportFilterSeriesUid', true); this.descriptor.addElement_ivxn3r$('reportFilterField', true); this.descriptor.addElement_ivxn3r$('reportFilterCondition', true); this.descriptor.addElement_ivxn3r$('reportFilterValue', true); this.descriptor.addElement_ivxn3r$('reportFilterDropDownValue', true); this.descriptor.addElement_ivxn3r$('reportFilterValueBetweenX', true); this.descriptor.addElement_ivxn3r$('reportFilterValueBetweenY', true); ReportFilter$$serializer_instance = this; } Object.defineProperty(ReportFilter$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_abpxwp$_0; }}); ReportFilter$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.reportFilterUid, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeIntElement_ptg7oe$(this.descriptor, 0, value.reportFilterUid); if (!equals(value.reportFilterSeriesUid, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeIntElement_ptg7oe$(this.descriptor, 1, value.reportFilterSeriesUid); if (!equals(value.reportFilterField, 100) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.reportFilterField); if (!equals(value.reportFilterCondition, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.reportFilterCondition); if (!equals(value.reportFilterValue, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.reportFilterValue); if (!equals(value.reportFilterDropDownValue, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.reportFilterDropDownValue); if (!equals(value.reportFilterValueBetweenX, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 6, internal.StringSerializer, value.reportFilterValueBetweenX); if (!equals(value.reportFilterValueBetweenY, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 7, internal.StringSerializer, value.reportFilterValueBetweenY); output.endStructure_24f42q$(this.descriptor); }; ReportFilter$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeIntElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeIntElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 6, internal.StringSerializer, local6); bitMask0 |= 64; break; case 7: local7 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 7, internal.StringSerializer, local7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ReportFilter_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; ReportFilter$$serializer.prototype.childSerializers = function () { return [internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer)]; }; ReportFilter$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ReportFilter$$serializer_instance = null; function ReportFilter$$serializer_getInstance() { if (ReportFilter$$serializer_instance === null) { new ReportFilter$$serializer(); } return ReportFilter$$serializer_instance; } function ReportFilter_init(seen1, reportFilterUid, reportFilterSeriesUid, reportFilterField, reportFilterCondition, reportFilterValue, reportFilterDropDownValue, reportFilterValueBetweenX, reportFilterValueBetweenY, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ReportFilter.prototype); if ((seen1 & 1) === 0) $this.reportFilterUid = 0; else $this.reportFilterUid = reportFilterUid; if ((seen1 & 2) === 0) $this.reportFilterSeriesUid = 0; else $this.reportFilterSeriesUid = reportFilterSeriesUid; if ((seen1 & 4) === 0) $this.reportFilterField = 100; else $this.reportFilterField = reportFilterField; if ((seen1 & 8) === 0) $this.reportFilterCondition = 0; else $this.reportFilterCondition = reportFilterCondition; if ((seen1 & 16) === 0) $this.reportFilterValue = null; else $this.reportFilterValue = reportFilterValue; if ((seen1 & 32) === 0) $this.reportFilterDropDownValue = 0; else $this.reportFilterDropDownValue = reportFilterDropDownValue; if ((seen1 & 64) === 0) $this.reportFilterValueBetweenX = null; else $this.reportFilterValueBetweenX = reportFilterValueBetweenX; if ((seen1 & 128) === 0) $this.reportFilterValueBetweenY = null; else $this.reportFilterValueBetweenY = reportFilterValueBetweenY; return $this; } ReportFilter.$metadata$ = {kind: Kind_CLASS, simpleName: 'ReportFilter', interfaces: []}; var ReportFilterWithDisplayDetails$Companion_instance = null; function ReportFilterWithDisplayDetails$$serializer() { this.descriptor_o87u4d$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ReportFilterWithDisplayDetails', this, 12); this.descriptor.addElement_ivxn3r$('reportFilterUid', true); this.descriptor.addElement_ivxn3r$('reportFilterSeriesUid', true); this.descriptor.addElement_ivxn3r$('reportFilterField', true); this.descriptor.addElement_ivxn3r$('reportFilterCondition', true); this.descriptor.addElement_ivxn3r$('reportFilterValue', true); this.descriptor.addElement_ivxn3r$('reportFilterDropDownValue', true); this.descriptor.addElement_ivxn3r$('reportFilterValueBetweenX', true); this.descriptor.addElement_ivxn3r$('reportFilterValueBetweenY', true); this.descriptor.addElement_ivxn3r$('person', true); this.descriptor.addElement_ivxn3r$('verb', true); this.descriptor.addElement_ivxn3r$('xlangMapDisplay', true); this.descriptor.addElement_ivxn3r$('contentEntry', true); ReportFilterWithDisplayDetails$$serializer_instance = this; } var ReportFilterWithDisplayDetails$$serializer_instance = null; var ReportReplicate$Companion_instance = null; function ReportReplicate$$serializer() { this.descriptor_ey7hkc$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ReportReplicate', this, 4); this.descriptor.addElement_ivxn3r$('reportPk', true); this.descriptor.addElement_ivxn3r$('reportVersionId', true); this.descriptor.addElement_ivxn3r$('reportDestination', true); this.descriptor.addElement_ivxn3r$('reportPending', true); ReportReplicate$$serializer_instance = this; } var ReportReplicate$$serializer_instance = null; function ReportSeries() { ReportSeries$Companion_getInstance(); this.reportSeriesUid = 0; this.reportSeriesName = null; this.reportSeriesYAxis = 200; this.reportSeriesVisualType = 100; this.reportSeriesSubGroup = 0; this.reportSeriesFilters = null; } function ReportSeries$Companion() { ReportSeries$Companion_instance = this; this.BAR_CHART = 100; this.LINE_GRAPH = 101; this.STATEMENT_QUERY = 100; this.ATTENDANCE_QUERY = 101; this.TOTAL_DURATION = 200; this.AVERAGE_DURATION = 201; this.NUMBER_SESSIONS = 202; this.INTERACTIONS_RECORDED = 203; this.NUMBER_ACTIVE_USERS = 204; this.AVERAGE_USAGE_TIME_PER_USER = 205; this.NUMBER_OF_STUDENTS_COMPLETED_CONTENT = 206; this.PERCENT_OF_STUDENTS_COMPLETED_CONTENT = 207; this.TOTAL_ATTENDANCE = 208; this.TOTAL_ABSENCES = 209; this.TOTAL_LATES = 210; this.PERCENTAGE_STUDENTS_ATTENDED = 211; this.PERCENTAGE_STUDENTS_ATTENDED_OR_LATE = 212; this.TOTAL_CLASSES = 213; this.NUMBER_UNIQUE_STUDENTS_ATTENDING = 214; this.NONE = 0; } ReportSeries$Companion.prototype.serializer = function () { return ReportSeries$$serializer_getInstance(); }; ReportSeries$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ReportSeries$Companion_instance = null; function ReportSeries$Companion_getInstance() { if (ReportSeries$Companion_instance === null) { new ReportSeries$Companion(); } return ReportSeries$Companion_instance; } ReportSeries.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, ReportSeries) ? tmp$_0 : throwCCE(); if (this.reportSeriesUid !== other.reportSeriesUid) return false; if (!equals(this.reportSeriesName, other.reportSeriesName)) return false; if (this.reportSeriesYAxis !== other.reportSeriesYAxis) return false; if (this.reportSeriesVisualType !== other.reportSeriesVisualType) return false; if (this.reportSeriesSubGroup !== other.reportSeriesSubGroup) return false; if (!equals(this.reportSeriesFilters, other.reportSeriesFilters)) return false; return true; }; ReportSeries.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2; var result = this.reportSeriesUid; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.reportSeriesName) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + this.reportSeriesYAxis | 0; result = (31 * result | 0) + this.reportSeriesVisualType | 0; result = (31 * result | 0) + this.reportSeriesSubGroup | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.reportSeriesFilters) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; return result; }; function ReportSeries$$serializer() { this.descriptor_46q2ga$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ReportSeries', this, 6); this.descriptor.addElement_ivxn3r$('reportSeriesUid', true); this.descriptor.addElement_ivxn3r$('reportSeriesName', true); this.descriptor.addElement_ivxn3r$('reportSeriesYAxis', true); this.descriptor.addElement_ivxn3r$('reportSeriesVisualType', true); this.descriptor.addElement_ivxn3r$('reportSeriesSubGroup', true); this.descriptor.addElement_ivxn3r$('reportSeriesFilters', true); ReportSeries$$serializer_instance = this; } Object.defineProperty(ReportSeries$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_46q2ga$_0; }}); ReportSeries$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.reportSeriesUid, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeIntElement_ptg7oe$(this.descriptor, 0, value.reportSeriesUid); if (!equals(value.reportSeriesName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.reportSeriesName); if (!equals(value.reportSeriesYAxis, 200) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.reportSeriesYAxis); if (!equals(value.reportSeriesVisualType, 100) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.reportSeriesVisualType); if (!equals(value.reportSeriesSubGroup, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeIntElement_ptg7oe$(this.descriptor, 4, value.reportSeriesSubGroup); if (!equals(value.reportSeriesFilters, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, new ArrayListSerializer(ReportFilter$$serializer_getInstance()), value.reportSeriesFilters); output.endStructure_24f42q$(this.descriptor); }; ReportSeries$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeIntElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeIntElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, new ArrayListSerializer(ReportFilter$$serializer_getInstance()), local5); bitMask0 |= 32; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ReportSeries_init(bitMask0, local0, local1, local2, local3, local4, local5, null); }; ReportSeries$$serializer.prototype.childSerializers = function () { return [internal.IntSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, new NullableSerializer(new ArrayListSerializer(ReportFilter$$serializer_getInstance()))]; }; ReportSeries$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ReportSeries$$serializer_instance = null; function ReportSeries$$serializer_getInstance() { if (ReportSeries$$serializer_instance === null) { new ReportSeries$$serializer(); } return ReportSeries$$serializer_instance; } function ReportSeries_init(seen1, reportSeriesUid, reportSeriesName, reportSeriesYAxis, reportSeriesVisualType, reportSeriesSubGroup, reportSeriesFilters, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ReportSeries.prototype); if ((seen1 & 1) === 0) $this.reportSeriesUid = 0; else $this.reportSeriesUid = reportSeriesUid; if ((seen1 & 2) === 0) $this.reportSeriesName = null; else $this.reportSeriesName = reportSeriesName; if ((seen1 & 4) === 0) $this.reportSeriesYAxis = 200; else $this.reportSeriesYAxis = reportSeriesYAxis; if ((seen1 & 8) === 0) $this.reportSeriesVisualType = 100; else $this.reportSeriesVisualType = reportSeriesVisualType; if ((seen1 & 16) === 0) $this.reportSeriesSubGroup = 0; else $this.reportSeriesSubGroup = reportSeriesSubGroup; if ((seen1 & 32) === 0) $this.reportSeriesFilters = null; else $this.reportSeriesFilters = reportSeriesFilters; return $this; } ReportSeries.$metadata$ = {kind: Kind_CLASS, simpleName: 'ReportSeries', interfaces: []}; function ReportWithSeriesWithFilters() { ReportWithSeriesWithFilters$Companion_getInstance(); Report.call(this); this.reportSeriesWithFiltersList = null; } ReportWithSeriesWithFilters.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; if (!Report.prototype.equals.call(this, other)) return false; Kotlin.isType(tmp$_0 = other, ReportWithSeriesWithFilters) ? tmp$_0 : throwCCE(); if (!equals(this.reportSeriesWithFiltersList, other.reportSeriesWithFiltersList)) return false; return true; }; ReportWithSeriesWithFilters.prototype.hashCode = function () { var result = Report.prototype.hashCode.call(this); var $receiver = this.reportSeriesWithFiltersList; var tmp$; result = (31 * result | 0) + ((tmp$ = $receiver != null ? hashCode($receiver) : null) != null ? tmp$ : 0) | 0; return result; }; function ReportWithSeriesWithFilters$Companion() { ReportWithSeriesWithFilters$Companion_instance = this; } ReportWithSeriesWithFilters$Companion.prototype.serializer = function () { return ReportWithSeriesWithFilters$$serializer_getInstance(); }; ReportWithSeriesWithFilters$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ReportWithSeriesWithFilters$Companion_instance = null; function ReportWithSeriesWithFilters$Companion_getInstance() { if (ReportWithSeriesWithFilters$Companion_instance === null) { new ReportWithSeriesWithFilters$Companion(); } return ReportWithSeriesWithFilters$Companion_instance; } function ReportWithSeriesWithFilters$$serializer() { this.descriptor_r4ymoz$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ReportWithSeriesWithFilters', this, 25); this.descriptor.addElement_ivxn3r$('reportUid', true); this.descriptor.addElement_ivxn3r$('reportOwnerUid', true); this.descriptor.addElement_ivxn3r$('xAxis', true); this.descriptor.addElement_ivxn3r$('reportDateRangeSelection', true); this.descriptor.addElement_ivxn3r$('fromDate', true); this.descriptor.addElement_ivxn3r$('fromRelTo', true); this.descriptor.addElement_ivxn3r$('fromRelOffSet', true); this.descriptor.addElement_ivxn3r$('fromRelUnit', true); this.descriptor.addElement_ivxn3r$('toDate', true); this.descriptor.addElement_ivxn3r$('toRelTo', true); this.descriptor.addElement_ivxn3r$('toRelOffSet', true); this.descriptor.addElement_ivxn3r$('toRelUnit', true); this.descriptor.addElement_ivxn3r$('reportTitle', true); this.descriptor.addElement_ivxn3r$('reportDescription', true); this.descriptor.addElement_ivxn3r$('reportSeries', true); this.descriptor.addElement_ivxn3r$('reportInactive', true); this.descriptor.addElement_ivxn3r$('isTemplate', true); this.descriptor.addElement_ivxn3r$('priority', true); this.descriptor.addElement_ivxn3r$('reportTitleId', true); this.descriptor.addElement_ivxn3r$('reportDescId', true); this.descriptor.addElement_ivxn3r$('reportMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('reportLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('reportLastChangedBy', true); this.descriptor.addElement_ivxn3r$('reportLct', true); this.descriptor.addElement_ivxn3r$('reportSeriesWithFiltersList', true); ReportWithSeriesWithFilters$$serializer_instance = this; } Object.defineProperty(ReportWithSeriesWithFilters$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_r4ymoz$_0; }}); ReportWithSeriesWithFilters$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.reportUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.reportUid); if (!equals(value.reportOwnerUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.reportOwnerUid); if (!equals(value.xAxis, 300) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.xAxis); if (!equals(value.reportDateRangeSelection, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.reportDateRangeSelection); if (!equals(value.fromDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.fromDate); if (!equals(value.fromRelTo, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.fromRelTo); if (!equals(value.fromRelOffSet, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.fromRelOffSet); if (!equals(value.fromRelUnit, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.fromRelUnit); if (!equals(value.toDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.toDate); if (!equals(value.toRelTo, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.toRelTo); if (!equals(value.toRelOffSet, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeIntElement_ptg7oe$(this.descriptor, 10, value.toRelOffSet); if (!equals(value.toRelUnit, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeIntElement_ptg7oe$(this.descriptor, 11, value.toRelUnit); if (!equals(value.reportTitle, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 12, internal.StringSerializer, value.reportTitle); if (!equals(value.reportDescription, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 13, internal.StringSerializer, value.reportDescription); if (!equals(value.reportSeries, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 14, internal.StringSerializer, value.reportSeries); if (!equals(value.reportInactive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 15, value.reportInactive); if (!equals(value.isTemplate, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 16, value.isTemplate); if (!equals(value.priority, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeIntElement_ptg7oe$(this.descriptor, 17, value.priority); if (!equals(value.reportTitleId, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeIntElement_ptg7oe$(this.descriptor, 18, value.reportTitleId); if (!equals(value.reportDescId, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeIntElement_ptg7oe$(this.descriptor, 19, value.reportDescId); if (!equals(value.reportMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeLongElement_j0o2mv$(this.descriptor, 20, value.reportMasterChangeSeqNum); if (!equals(value.reportLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.reportLocalChangeSeqNum); if (!equals(value.reportLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeIntElement_ptg7oe$(this.descriptor, 22, value.reportLastChangedBy); if (!equals(value.reportLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeLongElement_j0o2mv$(this.descriptor, 23, value.reportLct); if (!equals(value.reportSeriesWithFiltersList, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 24, new ArrayListSerializer(ReportSeries$$serializer_getInstance()), value.reportSeriesWithFiltersList); output.endStructure_24f42q$(this.descriptor); }; ReportWithSeriesWithFilters$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeIntElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeIntElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 12, internal.StringSerializer, local12); bitMask0 |= 4096; break; case 13: local13 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 13, internal.StringSerializer, local13); bitMask0 |= 8192; break; case 14: local14 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 14, internal.StringSerializer, local14); bitMask0 |= 16384; break; case 15: local15 = input.decodeBooleanElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeBooleanElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeIntElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeIntElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeIntElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeLongElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeIntElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeLongElement_szpzho$(this.descriptor, 23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 24, new ArrayListSerializer(ReportSeries$$serializer_getInstance()), local24); bitMask0 |= 16777216; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ReportWithSeriesWithFilters_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, null); }; ReportWithSeriesWithFilters$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(new ArrayListSerializer(ReportSeries$$serializer_getInstance()))]; }; ReportWithSeriesWithFilters$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ReportWithSeriesWithFilters$$serializer_instance = null; function ReportWithSeriesWithFilters$$serializer_getInstance() { if (ReportWithSeriesWithFilters$$serializer_instance === null) { new ReportWithSeriesWithFilters$$serializer(); } return ReportWithSeriesWithFilters$$serializer_instance; } function ReportWithSeriesWithFilters_init(seen1, reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct, reportSeriesWithFiltersList, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ReportWithSeriesWithFilters.prototype); $this = Report_init(seen1, reportUid, reportOwnerUid, xAxis, reportDateRangeSelection, fromDate, fromRelTo, fromRelOffSet, fromRelUnit, toDate, toRelTo, toRelOffSet, toRelUnit, reportTitle, reportDescription, reportSeries, reportInactive, isTemplate, priority, reportTitleId, reportDescId, reportMasterChangeSeqNum, reportLocalChangeSeqNum, reportLastChangedBy, reportLct, $this); if ((seen1 & 16777216) === 0) $this.reportSeriesWithFiltersList = null; else $this.reportSeriesWithFiltersList = reportSeriesWithFiltersList; return $this; } ReportWithSeriesWithFilters.$metadata$ = {kind: Kind_CLASS, simpleName: 'ReportWithSeriesWithFilters', interfaces: [Report]}; function ReportWithSeriesWithFilters_init_0(report, reportSeries, $this) { if (reportSeries === void 0) { reportSeries = emptyList(); } $this = $this || Object.create(ReportWithSeriesWithFilters.prototype); ReportWithSeriesWithFilters.call($this); $this.reportUid = report.reportUid; $this.reportTitle = report.reportTitle; $this.reportOwnerUid = report.reportOwnerUid; $this.reportInactive = report.reportInactive; $this.fromDate = report.fromDate; $this.toDate = report.toDate; $this.xAxis = report.xAxis; $this.reportSeries = report.reportSeries; $this.reportSeriesWithFiltersList = reportSeries; return $this; } function Role() { Role$Companion_getInstance(); this.roleUid = L0; this.roleName = null; this.roleActive = true; this.roleMasterCsn = L0; this.roleLocalCsn = L0; this.roleLastChangedBy = 0; this.roleLct = L0; this.rolePermissions = L0; } Role.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, Role) ? tmp$_0 : throwCCE(); if (!equals(this.roleUid, other.roleUid)) return false; if (!equals(this.roleName, other.roleName)) return false; if (this.roleActive !== other.roleActive) return false; if (!equals(this.roleMasterCsn, other.roleMasterCsn)) return false; if (!equals(this.roleLocalCsn, other.roleLocalCsn)) return false; if (this.roleLastChangedBy !== other.roleLastChangedBy) return false; if (!equals(this.rolePermissions, other.rolePermissions)) return false; return true; }; Role.prototype.hashCode = function () { var tmp$, tmp$_0; var result = hashCode(this.roleUid); result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.roleName) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + hashCode(this.roleActive) | 0; result = (31 * result | 0) + hashCode(this.roleMasterCsn) | 0; result = (31 * result | 0) + hashCode(this.roleLocalCsn) | 0; result = (31 * result | 0) + this.roleLastChangedBy | 0; result = (31 * result | 0) + hashCode(this.rolePermissions) | 0; return result; }; function Role$Companion() { Role$Companion_instance = this; this.TABLE_ID = 45; this.PERMISSION_CLAZZ_SELECT = L2; this.PERMISSION_CLAZZ_INSERT = L2; this.PERMISSION_CLAZZ_UPDATE = L4; this.PERMISSION_CLAZZ_LOG_ATTENDANCE_INSERT = L8; this.PERMISSION_CLAZZ_LOG_ACTIVITY_INSERT = L16; this.PERMISSION_SEL_QUESTION_RESPONSE_INSERT = L32; this.PERMISSION_PERSON_SELECT = L64; this.PERMISSION_PERSON_INSERT = L128; this.PERMISSION_PERSON_UPDATE = L256; this.PERMISSION_CLAZZ_ADD_TEACHER = L512; this.PERMISSION_CLAZZ_ADD_STUDENT = L1024; this.PERMISSION_CLAZZ_LOG_ATTENDANCE_SELECT = L2048; this.PERMISSION_CLAZZ_LOG_ATTENDANCE_UPDATE = L4096; this.PERMISSION_CLAZZ_LOG_ACTIVITY_UPDATE = L8192; this.PERMISSION_CLAZZ_LOG_ACTIVITY_SELECT = L16384; this.PERMISSION_SEL_QUESTION_RESPONSE_SELECT = L32768; this.PERMISSION_SEL_QUESTION_RESPONSE_UPDATE = L65536; this.PERMISSION_SEL_QUESTION_SELECT = L131072; this.PERMISSION_SEL_QUESTION_INSERT = L262144; this.PERMISSION_SEL_QUESTION_UPDATE = L524288; this.PERMISSION_PERSON_PICTURE_SELECT = L1048576; this.PERMISSION_PERSON_PICTURE_INSERT = L2097152; this.PERMISSION_PERSON_PICTURE_UPDATE = L4194304; this.PERMISSION_ASSIGNMENT_SELECT = L8388608; this.PERMISSION_ASSIGNMENT_UPDATE = L16777216; this.PERMISSION_ASSIGNMENT_VIEWSTUDENTPROGRESS = L33554432; this.PERMISSION_CONTENT_SELECT = L67108864; this.PERMISSION_CONTENT_INSERT = L134217728; this.PERMISSION_CONTENT_UPDATE = L268435456; this.PERMISSION_SCHOOL_SELECT = L536870912; this.PERMISSION_SCHOOL_INSERT = L1073741824; this.PERMISSION_SCHOOL_UPDATE = L2147483648; this.PERMISSION_PERSON_DELEGATE = L4294967296; this.PERMISSION_CLAZZ_OPEN = L8589934592; this.PERMISSION_ROLE_SELECT = L17179869184; this.PERMISSION_ROLE_INSERT = L34359738368; this.PERMISSION_RESET_PASSWORD = L68719476736; this.PERMISSION_SCHOOL_ADD_STAFF = L137438953472; this.PERMISSION_SCHOOL_ADD_STUDENT = L274877906944; this.PERMISSION_PERSON_LEARNINGRECORD_SELECT = L549755813888; this.PERMISSION_PERSON_LEARNINGRECORD_INSERT = L1099511627776; this.PERMISSION_PERSON_LEARNINGRECORD_UPDATE = L2199023255552; this.PERMISSION_CLAZZ_CONTENT_SELECT = L4398046511104; this.PERMISSION_CLAZZ_CONTENT_UPDATE = L8796093022208; this.PERMISSION_PERSONCONTACT_SELECT = L17592186044416; this.PERMISSION_PERSONCONTACT_UPDATE = L35184372088832; this.PERMISSION_PERSONSOCIOECONOMIC_SELECT = L70368744177664; this.PERMISSION_PERSONSOCIOECONOMIC_UPDATE = L140737488355328; this.PERMISSION_ADD_CLASS_TO_SCHOOL = L281474976710656; this.PERMISSION_AUTH_SELECT = L562949953421312; this.PERMISSION_AUTH_UPDATE = L1125899906842624; this.ROLE_CLAZZ_TEACHER_NAME = 'Teacher'; this.ROLE_CLAZZ_TEACHER_UID = 1001; this.ROLE_CLAZZ_TEACHER_PERMISSIONS_DEFAULT = L17051045363166; this.ROLE_CLAZZ_STUDENT_NAME = 'Class Student'; this.ROLE_CLAZZ_STUDENT_UID = 1000; this.ROLE_CLAZZ_STUDENT_PERMISSIONS_DEFAULT = L4406644834370; this.ROLE_CLAZZ_STUDENT_PENDING_NAME = 'Student Pending'; this.ROLE_CLAZZ_STUDENT_PENDING_UID = 1002; this.ROLE_CLAZZ_STUDENT_PENDING_PERMISSION_DEFAULT = this.PERMISSION_CLAZZ_SELECT; this.ROLE_SCHOOL_STUDENT_UID = 1003; this.ROLE_SCHOOL_STUDENT_NAME = 'School Student'; this.ROLE_SCHOOL_STUDENT_PERMISSION_DEFAULT = this.PERMISSION_SCHOOL_SELECT; this.ROLE_SCHOOL_STAFF_UID = 1004; this.ROLE_SCHOOL_STAFF_NAME = 'School Staff'; this.ROLE_SCHOOL_STAFF_PERMISSIONS_DEFAULT = L284013120966; this.ROLE_SCHOOL_STUDENT_PENDING_UID = 1005; this.ROLE_SCHOOL_STUDENT_PENDING_NAME = 'School Student Pending'; this.ROLE_SCHOOL_STUDENT_PENDING_PERMISSION_DEFAULT = this.PERMISSION_SCHOOL_SELECT; this.ROLE_PRINCIPAL_UID = 1006; this.ROLE_PRINCIPAL_NAME = 'Principal'; this.ROLE_PRINCIPAL_PERMISSIONS_DEFAULT = L549722259454; this.ROLE_PARENT_PERSON_PERMISSIONS_DEFAULT = L88579406561344; this.ROLE_CLAZZ_PARENT_PERMISSION_DEFAULT = L8598323266; this.ALL_PERMISSIONS = Long$Companion$MAX_VALUE; } Role$Companion.prototype.serializer = function () { return Role$$serializer_getInstance(); }; Role$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var Role$Companion_instance = null; function Role$Companion_getInstance() { if (Role$Companion_instance === null) { new Role$Companion(); } return Role$Companion_instance; } function Role$$serializer() { this.descriptor_39bc8x$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.Role', this, 8); this.descriptor.addElement_ivxn3r$('roleUid', true); this.descriptor.addElement_ivxn3r$('roleName', true); this.descriptor.addElement_ivxn3r$('roleActive', true); this.descriptor.addElement_ivxn3r$('roleMasterCsn', true); this.descriptor.addElement_ivxn3r$('roleLocalCsn', true); this.descriptor.addElement_ivxn3r$('roleLastChangedBy', true); this.descriptor.addElement_ivxn3r$('roleLct', true); this.descriptor.addElement_ivxn3r$('rolePermissions', true); Role$$serializer_instance = this; } Object.defineProperty(Role$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_39bc8x$_0; }}); Role$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.roleUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.roleUid); if (!equals(value.roleName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.roleName); if (!equals(value.roleActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 2, value.roleActive); if (!equals(value.roleMasterCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.roleMasterCsn); if (!equals(value.roleLocalCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.roleLocalCsn); if (!equals(value.roleLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.roleLastChangedBy); if (!equals(value.roleLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.roleLct); if (!equals(value.rolePermissions, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.rolePermissions); output.endStructure_24f42q$(this.descriptor); }; Role$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeBooleanElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return Role_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, null); }; Role$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer]; }; Role$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var Role$$serializer_instance = null; function Role$$serializer_getInstance() { if (Role$$serializer_instance === null) { new Role$$serializer(); } return Role$$serializer_instance; } function Role_init(seen1, roleUid, roleName, roleActive, roleMasterCsn, roleLocalCsn, roleLastChangedBy, roleLct, rolePermissions, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(Role.prototype); if ((seen1 & 1) === 0) $this.roleUid = L0; else $this.roleUid = roleUid; if ((seen1 & 2) === 0) $this.roleName = null; else $this.roleName = roleName; if ((seen1 & 4) === 0) $this.roleActive = true; else $this.roleActive = roleActive; if ((seen1 & 8) === 0) $this.roleMasterCsn = L0; else $this.roleMasterCsn = roleMasterCsn; if ((seen1 & 16) === 0) $this.roleLocalCsn = L0; else $this.roleLocalCsn = roleLocalCsn; if ((seen1 & 32) === 0) $this.roleLastChangedBy = 0; else $this.roleLastChangedBy = roleLastChangedBy; if ((seen1 & 64) === 0) $this.roleLct = L0; else $this.roleLct = roleLct; if ((seen1 & 128) === 0) $this.rolePermissions = L0; else $this.rolePermissions = rolePermissions; return $this; } Role.$metadata$ = {kind: Kind_CLASS, simpleName: 'Role', interfaces: []}; function Schedule() { Schedule$Companion_getInstance(); this.scheduleUid = L0; this.sceduleStartTime = L0; this.scheduleEndTime = L0; this.scheduleDay = 0; this.scheduleMonth = 0; this.scheduleFrequency = 0; this.umCalendarUid = L0; this.scheduleClazzUid = L0; this.scheduleMasterChangeSeqNum = L0; this.scheduleLocalChangeSeqNum = L0; this.scheduleLastChangedBy = 0; this.scheduleLastChangedTime = L0; this.scheduleActive = true; } Schedule.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, Schedule) ? tmp$_0 : throwCCE(); if (!equals(this.scheduleUid, other.scheduleUid)) return false; if (!equals(this.sceduleStartTime, other.sceduleStartTime)) return false; if (!equals(this.scheduleEndTime, other.scheduleEndTime)) return false; if (this.scheduleDay !== other.scheduleDay) return false; if (this.scheduleMonth !== other.scheduleMonth) return false; if (this.scheduleFrequency !== other.scheduleFrequency) return false; if (!equals(this.umCalendarUid, other.umCalendarUid)) return false; if (!equals(this.scheduleClazzUid, other.scheduleClazzUid)) return false; if (!equals(this.scheduleMasterChangeSeqNum, other.scheduleMasterChangeSeqNum)) return false; if (!equals(this.scheduleLocalChangeSeqNum, other.scheduleLocalChangeSeqNum)) return false; if (this.scheduleLastChangedBy !== other.scheduleLastChangedBy) return false; if (this.scheduleActive !== other.scheduleActive) return false; return true; }; Schedule.prototype.hashCode = function () { var result = hashCode(this.scheduleUid); result = (31 * result | 0) + hashCode(this.sceduleStartTime) | 0; result = (31 * result | 0) + hashCode(this.scheduleEndTime) | 0; result = (31 * result | 0) + this.scheduleDay | 0; result = (31 * result | 0) + this.scheduleMonth | 0; result = (31 * result | 0) + this.scheduleFrequency | 0; result = (31 * result | 0) + hashCode(this.umCalendarUid) | 0; result = (31 * result | 0) + hashCode(this.scheduleClazzUid) | 0; result = (31 * result | 0) + hashCode(this.scheduleMasterChangeSeqNum) | 0; result = (31 * result | 0) + hashCode(this.scheduleLocalChangeSeqNum) | 0; result = (31 * result | 0) + this.scheduleLastChangedBy | 0; result = (31 * result | 0) + hashCode(this.scheduleActive) | 0; return result; }; function Schedule$Companion() { Schedule$Companion_instance = this; this.TABLE_ID = 21; this.SCHEDULE_FREQUENCY_DAILY = 1; this.SCHEDULE_FREQUENCY_WEEKLY = 2; this.SCHEDULE_FREQUENCY_ONCE = 3; this.SCHEDULE_FREQUENCY_MONTHLY = 4; this.SCHEDULE_FREQUENCY_YEARLY = 5; this.DAY_SUNDAY = 0; this.DAY_MONDAY = 1; this.DAY_TUESDAY = 2; this.DAY_WEDNESDAY = 3; this.DAY_THURSDAY = 4; this.DAY_FRIDAY = 5; this.DAY_SATURDAY = 6; this.MONTH_JANUARY = 1; this.MONTH_FEBUARY = 2; this.MONTH_MARCH = 3; this.MONTH_APRIL = 4; this.MONTH_MAY = 5; this.MONTH_JUNE = 6; this.MONTH_JULY = 7; this.MONTH_AUGUST = 8; this.MONTH_SEPTEMBER = 9; this.MONTH_OCTOBER = 10; this.MONTH_NOVEMBER = 11; this.MONTH_DECEMBER = 12; } Schedule$Companion.prototype.serializer = function () { return Schedule$$serializer_getInstance(); }; Schedule$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var Schedule$Companion_instance = null; function Schedule$Companion_getInstance() { if (Schedule$Companion_instance === null) { new Schedule$Companion(); } return Schedule$Companion_instance; } function Schedule$$serializer() { this.descriptor_18mh3y$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.Schedule', this, 13); this.descriptor.addElement_ivxn3r$('scheduleUid', true); this.descriptor.addElement_ivxn3r$('sceduleStartTime', true); this.descriptor.addElement_ivxn3r$('scheduleEndTime', true); this.descriptor.addElement_ivxn3r$('scheduleDay', true); this.descriptor.addElement_ivxn3r$('scheduleMonth', true); this.descriptor.addElement_ivxn3r$('scheduleFrequency', true); this.descriptor.addElement_ivxn3r$('umCalendarUid', true); this.descriptor.addElement_ivxn3r$('scheduleClazzUid', true); this.descriptor.addElement_ivxn3r$('scheduleMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('scheduleLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('scheduleLastChangedBy', true); this.descriptor.addElement_ivxn3r$('scheduleLastChangedTime', true); this.descriptor.addElement_ivxn3r$('scheduleActive', true); Schedule$$serializer_instance = this; } Object.defineProperty(Schedule$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_18mh3y$_0; }}); Schedule$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.scheduleUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.scheduleUid); if (!equals(value.sceduleStartTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.sceduleStartTime); if (!equals(value.scheduleEndTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.scheduleEndTime); if (!equals(value.scheduleDay, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.scheduleDay); if (!equals(value.scheduleMonth, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeIntElement_ptg7oe$(this.descriptor, 4, value.scheduleMonth); if (!equals(value.scheduleFrequency, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.scheduleFrequency); if (!equals(value.umCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.umCalendarUid); if (!equals(value.scheduleClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.scheduleClazzUid); if (!equals(value.scheduleMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.scheduleMasterChangeSeqNum); if (!equals(value.scheduleLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.scheduleLocalChangeSeqNum); if (!equals(value.scheduleLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeIntElement_ptg7oe$(this.descriptor, 10, value.scheduleLastChangedBy); if (!equals(value.scheduleLastChangedTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.scheduleLastChangedTime); if (!equals(value.scheduleActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 12, value.scheduleActive); output.endStructure_24f42q$(this.descriptor); }; Schedule$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeIntElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeIntElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeBooleanElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return Schedule_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, null); }; Schedule$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.BooleanSerializer]; }; Schedule$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var Schedule$$serializer_instance = null; function Schedule$$serializer_getInstance() { if (Schedule$$serializer_instance === null) { new Schedule$$serializer(); } return Schedule$$serializer_instance; } function Schedule_init(seen1, scheduleUid, sceduleStartTime, scheduleEndTime, scheduleDay, scheduleMonth, scheduleFrequency, umCalendarUid, scheduleClazzUid, scheduleMasterChangeSeqNum, scheduleLocalChangeSeqNum, scheduleLastChangedBy, scheduleLastChangedTime, scheduleActive, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(Schedule.prototype); if ((seen1 & 1) === 0) $this.scheduleUid = L0; else $this.scheduleUid = scheduleUid; if ((seen1 & 2) === 0) $this.sceduleStartTime = L0; else $this.sceduleStartTime = sceduleStartTime; if ((seen1 & 4) === 0) $this.scheduleEndTime = L0; else $this.scheduleEndTime = scheduleEndTime; if ((seen1 & 8) === 0) $this.scheduleDay = 0; else $this.scheduleDay = scheduleDay; if ((seen1 & 16) === 0) $this.scheduleMonth = 0; else $this.scheduleMonth = scheduleMonth; if ((seen1 & 32) === 0) $this.scheduleFrequency = 0; else $this.scheduleFrequency = scheduleFrequency; if ((seen1 & 64) === 0) $this.umCalendarUid = L0; else $this.umCalendarUid = umCalendarUid; if ((seen1 & 128) === 0) $this.scheduleClazzUid = L0; else $this.scheduleClazzUid = scheduleClazzUid; if ((seen1 & 256) === 0) $this.scheduleMasterChangeSeqNum = L0; else $this.scheduleMasterChangeSeqNum = scheduleMasterChangeSeqNum; if ((seen1 & 512) === 0) $this.scheduleLocalChangeSeqNum = L0; else $this.scheduleLocalChangeSeqNum = scheduleLocalChangeSeqNum; if ((seen1 & 1024) === 0) $this.scheduleLastChangedBy = 0; else $this.scheduleLastChangedBy = scheduleLastChangedBy; if ((seen1 & 2048) === 0) $this.scheduleLastChangedTime = L0; else $this.scheduleLastChangedTime = scheduleLastChangedTime; if ((seen1 & 4096) === 0) $this.scheduleActive = true; else $this.scheduleActive = scheduleActive; return $this; } Schedule.$metadata$ = {kind: Kind_CLASS, simpleName: 'Schedule', interfaces: []}; var ScheduleReplicate$Companion_instance = null; function ScheduleReplicate$$serializer() { this.descriptor_b3yqlr$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ScheduleReplicate', this, 4); this.descriptor.addElement_ivxn3r$('schedulePk', true); this.descriptor.addElement_ivxn3r$('scheduleVersionId', true); this.descriptor.addElement_ivxn3r$('scheduleDestination', true); this.descriptor.addElement_ivxn3r$('schedulePending', true); ScheduleReplicate$$serializer_instance = this; } var ScheduleReplicate$$serializer_instance = null; function School() { School$Companion_getInstance(); this.schoolUid = L0; this.schoolName = null; this.schoolDesc = null; this.schoolAddress = null; this.schoolActive = false; this.schoolPhoneNumber = null; this.schoolGender = 0; this.schoolHolidayCalendarUid = L0; this.schoolFeatures = L0; this.schoolLocationLong = 0.0; this.schoolLocationLatt = 0.0; this.schoolEmailAddress = null; this.schoolTeachersPersonGroupUid = L0; this.schoolStudentsPersonGroupUid = L0; this.schoolPendingStudentsPersonGroupUid = L0; this.schoolCode = null; this.schoolMasterChangeSeqNum = L0; this.schoolLocalChangeSeqNum = L0; this.schoolLastChangedBy = 0; this.schoolLct = L0; this.schoolTimeZone = null; } School.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, School) ? tmp$_0 : throwCCE(); if (!equals(this.schoolUid, other.schoolUid)) return false; if (!equals(this.schoolName, other.schoolName)) return false; if (!equals(this.schoolDesc, other.schoolDesc)) return false; if (this.schoolActive !== other.schoolActive) return false; if (!equals(this.schoolFeatures, other.schoolFeatures)) return false; if (this.schoolLocationLong !== other.schoolLocationLong) return false; if (this.schoolLocationLatt !== other.schoolLocationLatt) return false; if (!equals(this.schoolAddress, other.schoolAddress)) return false; return true; }; School.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2; var result = hashCode(this.schoolUid); result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.schoolName) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.schoolDesc) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + hashCode(this.schoolActive) | 0; result = (31 * result | 0) + hashCode(this.schoolFeatures) | 0; result = (31 * result | 0) + hashCode(this.schoolLocationLong) | 0; result = (31 * result | 0) + hashCode(this.schoolLocationLatt) | 0; var $receiver = this.schoolAddress; var tmp$_3; result = (31 * result | 0) + ((tmp$_3 = $receiver != null ? hashCode($receiver) : null) != null ? tmp$_3 : 0) | 0; return result; }; function School$Companion() { School$Companion_instance = this; this.TABLE_ID = 164; this.SCHOOL_FEATURE_ATTENDANCE = L1; this.SCHOOL_GENDER_MALE = 1; this.SCHOOL_GENDER_FEMALE = 2; this.SCHOOL_GENDER_MIXED = 3; this.JOIN_SCOPEDGRANT_ON_CLAUSE = '\n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid = School.schoolUid))\n '; this.JOIN_FROM_SCHOOL_TO_USERSESSION_VIA_SCOPEDGRANT_PT1 = '\n JOIN ScopedGrant\n ON \n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid = School.schoolUid))\n \n AND (SCopedGrant.sgPermissions &\n '; this.JOIN_FROM_SCHOOL_TO_USERSESSION_VIA_SCOPEDGRANT_PT2 = '\n ) > 0\n JOIN PersonGroupMember AS PrsGrpMbr\n ON ScopedGrant.sgGroupUid = PrsGrpMbr.groupMemberGroupUid\n JOIN UserSession\n ON UserSession.usPersonUid = PrsGrpMbr.groupMemberPersonUid\n AND UserSession.usStatus = 1\n \n '; this.JOIN_FROM_PERSONGROUPMEMBER_TO_SCHOOL_VIA_SCOPEDGRANT_PT1 = '\n JOIN ScopedGrant \n ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n AND (ScopedGrant.sgPermissions &\n \n '; this.JOIN_FROM_PERSONGROUPMEMBER_TO_SCHOOL_VIA_SCOPEDGRANT_PT2 = '\n ) > 0\n JOIN School\n ON \n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid = School.schoolUid))\n \n '; } School$Companion.prototype.serializer = function () { return School$$serializer_getInstance(); }; School$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var School$Companion_instance = null; function School$Companion_getInstance() { if (School$Companion_instance === null) { new School$Companion(); } return School$Companion_instance; } function School$$serializer() { this.descriptor_cv18an$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.School', this, 21); this.descriptor.addElement_ivxn3r$('schoolUid', true); this.descriptor.addElement_ivxn3r$('schoolName', true); this.descriptor.addElement_ivxn3r$('schoolDesc', true); this.descriptor.addElement_ivxn3r$('schoolAddress', true); this.descriptor.addElement_ivxn3r$('schoolActive', true); this.descriptor.addElement_ivxn3r$('schoolPhoneNumber', true); this.descriptor.addElement_ivxn3r$('schoolGender', true); this.descriptor.addElement_ivxn3r$('schoolHolidayCalendarUid', true); this.descriptor.addElement_ivxn3r$('schoolFeatures', true); this.descriptor.addElement_ivxn3r$('schoolLocationLong', true); this.descriptor.addElement_ivxn3r$('schoolLocationLatt', true); this.descriptor.addElement_ivxn3r$('schoolEmailAddress', true); this.descriptor.addElement_ivxn3r$('schoolTeachersPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('schoolStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('schoolPendingStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('schoolCode', true); this.descriptor.addElement_ivxn3r$('schoolMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('schoolLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('schoolLastChangedBy', true); this.descriptor.addElement_ivxn3r$('schoolLct', true); this.descriptor.addElement_ivxn3r$('schoolTimeZone', true); School$$serializer_instance = this; } Object.defineProperty(School$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_cv18an$_0; }}); School$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.schoolUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.schoolUid); if (!equals(value.schoolName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.schoolName); if (!equals(value.schoolDesc, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.schoolDesc); if (!equals(value.schoolAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.schoolAddress); if (!equals(value.schoolActive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.schoolActive); if (!equals(value.schoolPhoneNumber, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.schoolPhoneNumber); if (!equals(value.schoolGender, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.schoolGender); if (!equals(value.schoolHolidayCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.schoolHolidayCalendarUid); if (!equals(value.schoolFeatures, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.schoolFeatures); if (!equals(value.schoolLocationLong, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeDoubleElement_powrwi$(this.descriptor, 9, value.schoolLocationLong); if (!equals(value.schoolLocationLatt, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeDoubleElement_powrwi$(this.descriptor, 10, value.schoolLocationLatt); if (!equals(value.schoolEmailAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, internal.StringSerializer, value.schoolEmailAddress); if (!equals(value.schoolTeachersPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.schoolTeachersPersonGroupUid); if (!equals(value.schoolStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.schoolStudentsPersonGroupUid); if (!equals(value.schoolPendingStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.schoolPendingStudentsPersonGroupUid); if (!equals(value.schoolCode, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 15, internal.StringSerializer, value.schoolCode); if (!equals(value.schoolMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeLongElement_j0o2mv$(this.descriptor, 16, value.schoolMasterChangeSeqNum); if (!equals(value.schoolLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.schoolLocalChangeSeqNum); if (!equals(value.schoolLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeIntElement_ptg7oe$(this.descriptor, 18, value.schoolLastChangedBy); if (!equals(value.schoolLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.schoolLct); if (!equals(value.schoolTimeZone, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 20, internal.StringSerializer, value.schoolTimeZone); output.endStructure_24f42q$(this.descriptor); }; School$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeDoubleElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeDoubleElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, internal.StringSerializer, local11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 15, internal.StringSerializer, local15); bitMask0 |= 32768; break; case 16: local16 = input.decodeLongElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeIntElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 20, internal.StringSerializer, local20); bitMask0 |= 1048576; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return School_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, null); }; School$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.DoubleSerializer, internal.DoubleSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer)]; }; School$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var School$$serializer_instance = null; function School$$serializer_getInstance() { if (School$$serializer_instance === null) { new School$$serializer(); } return School$$serializer_instance; } function School_init(seen1, schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(School.prototype); if ((seen1 & 1) === 0) $this.schoolUid = L0; else $this.schoolUid = schoolUid; if ((seen1 & 2) === 0) $this.schoolName = null; else $this.schoolName = schoolName; if ((seen1 & 4) === 0) $this.schoolDesc = null; else $this.schoolDesc = schoolDesc; if ((seen1 & 8) === 0) $this.schoolAddress = null; else $this.schoolAddress = schoolAddress; if ((seen1 & 16) === 0) $this.schoolActive = false; else $this.schoolActive = schoolActive; if ((seen1 & 32) === 0) $this.schoolPhoneNumber = null; else $this.schoolPhoneNumber = schoolPhoneNumber; if ((seen1 & 64) === 0) $this.schoolGender = 0; else $this.schoolGender = schoolGender; if ((seen1 & 128) === 0) $this.schoolHolidayCalendarUid = L0; else $this.schoolHolidayCalendarUid = schoolHolidayCalendarUid; if ((seen1 & 256) === 0) $this.schoolFeatures = L0; else $this.schoolFeatures = schoolFeatures; if ((seen1 & 512) === 0) $this.schoolLocationLong = 0.0; else $this.schoolLocationLong = schoolLocationLong; if ((seen1 & 1024) === 0) $this.schoolLocationLatt = 0.0; else $this.schoolLocationLatt = schoolLocationLatt; if ((seen1 & 2048) === 0) $this.schoolEmailAddress = null; else $this.schoolEmailAddress = schoolEmailAddress; if ((seen1 & 4096) === 0) $this.schoolTeachersPersonGroupUid = L0; else $this.schoolTeachersPersonGroupUid = schoolTeachersPersonGroupUid; if ((seen1 & 8192) === 0) $this.schoolStudentsPersonGroupUid = L0; else $this.schoolStudentsPersonGroupUid = schoolStudentsPersonGroupUid; if ((seen1 & 16384) === 0) $this.schoolPendingStudentsPersonGroupUid = L0; else $this.schoolPendingStudentsPersonGroupUid = schoolPendingStudentsPersonGroupUid; if ((seen1 & 32768) === 0) $this.schoolCode = null; else $this.schoolCode = schoolCode; if ((seen1 & 65536) === 0) $this.schoolMasterChangeSeqNum = L0; else $this.schoolMasterChangeSeqNum = schoolMasterChangeSeqNum; if ((seen1 & 131072) === 0) $this.schoolLocalChangeSeqNum = L0; else $this.schoolLocalChangeSeqNum = schoolLocalChangeSeqNum; if ((seen1 & 262144) === 0) $this.schoolLastChangedBy = 0; else $this.schoolLastChangedBy = schoolLastChangedBy; if ((seen1 & 524288) === 0) $this.schoolLct = L0; else $this.schoolLct = schoolLct; if ((seen1 & 1048576) === 0) $this.schoolTimeZone = null; else $this.schoolTimeZone = schoolTimeZone; return $this; } School.$metadata$ = {kind: Kind_CLASS, simpleName: 'School', interfaces: []}; function SchoolMember() { SchoolMember$Companion_getInstance(); this.schoolMemberUid = L0; this.schoolMemberPersonUid = L0; this.schoolMemberSchoolUid = L0; this.schoolMemberJoinDate = L0; this.schoolMemberLeftDate = Long$Companion$MAX_VALUE; this.schoolMemberRole = 0; this.schoolMemberActive = true; this.schoolMemberLocalChangeSeqNum = L0; this.schoolMemberMasterChangeSeqNum = L0; this.schoolMemberLastChangedBy = 0; this.schoolMemberLct = L0; } function SchoolMember$Companion() { SchoolMember$Companion_instance = this; this.TABLE_ID = 200; this.FROM_SCHOOLMEMBER_TO_SCOPEDGRANT_JOIN_ON_PERSON_OR_CLAZZ_PERMISSION_CLAUSE = '\n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 9\n AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberPersonUid)\n OR (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberSchoolUid))\n '; this.JOIN_FROM_SCHOOLMEMBER_TO_USERSESSION_VIA_SCOPEDGRANT_PERSON_OR_CLAZZ_PERMISSION_PT1 = '\n JOIN ScopedGrant\n ON \n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 9\n AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberPersonUid)\n OR (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberSchoolUid))\n \n AND (ScopedGrant.sgPermissions &\n '; this.FROM_SCHOOLMEMBER_TO_SCOPEDGRANT_JOIN_ON_SCHOOL_PERMISSION_CLAUSE = '\n (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberSchoolUid)\n '; this.JOIN_FROM_SCHOOLMEMBER_TO_USERSESSION_VIA_SCOPEDGRANT_SCHOOOL_PERMISSION_PT1 = '\n JOIN ScopedGrant\n ON \n (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid = SchoolMember.schoolMemberSchoolUid)\n \n AND (ScopedGrant.sgPermissions &\n '; this.JOIN_FROM_SCHOOLMEMBER_TO_USERSESSION_VIA_SCOPEDGRANT_PT2 = '\n ) > 0 \n JOIN PersonGroupMember \n ON ScopedGrant.sgGroupUid = PersonGroupMember.groupMemberGroupUid\n JOIN UserSession\n ON UserSession.usPersonUid = PersonGroupMember.groupMemberPersonUid\n AND UserSession.usStatus =1\n '; } SchoolMember$Companion.prototype.serializer = function () { return SchoolMember$$serializer_getInstance(); }; SchoolMember$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var SchoolMember$Companion_instance = null; function SchoolMember$Companion_getInstance() { if (SchoolMember$Companion_instance === null) { new SchoolMember$Companion(); } return SchoolMember$Companion_instance; } function SchoolMember$$serializer() { this.descriptor_qbymx3$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.SchoolMember', this, 11); this.descriptor.addElement_ivxn3r$('schoolMemberUid', true); this.descriptor.addElement_ivxn3r$('schoolMemberPersonUid', true); this.descriptor.addElement_ivxn3r$('schoolMemberSchoolUid', true); this.descriptor.addElement_ivxn3r$('schoolMemberJoinDate', true); this.descriptor.addElement_ivxn3r$('schoolMemberLeftDate', true); this.descriptor.addElement_ivxn3r$('schoolMemberRole', true); this.descriptor.addElement_ivxn3r$('schoolMemberActive', true); this.descriptor.addElement_ivxn3r$('schoolMemberLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('schoolMemberMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('schoolMemberLastChangedBy', true); this.descriptor.addElement_ivxn3r$('schoolMemberLct', true); SchoolMember$$serializer_instance = this; } Object.defineProperty(SchoolMember$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_qbymx3$_0; }}); SchoolMember$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.schoolMemberUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.schoolMemberUid); if (!equals(value.schoolMemberPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.schoolMemberPersonUid); if (!equals(value.schoolMemberSchoolUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.schoolMemberSchoolUid); if (!equals(value.schoolMemberJoinDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.schoolMemberJoinDate); if (!equals(value.schoolMemberLeftDate, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.schoolMemberLeftDate); if (!equals(value.schoolMemberRole, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.schoolMemberRole); if (!equals(value.schoolMemberActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.schoolMemberActive); if (!equals(value.schoolMemberLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.schoolMemberLocalChangeSeqNum); if (!equals(value.schoolMemberMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.schoolMemberMasterChangeSeqNum); if (!equals(value.schoolMemberLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.schoolMemberLastChangedBy); if (!equals(value.schoolMemberLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.schoolMemberLct); output.endStructure_24f42q$(this.descriptor); }; SchoolMember$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return SchoolMember_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, null); }; SchoolMember$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; SchoolMember$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var SchoolMember$$serializer_instance = null; function SchoolMember$$serializer_getInstance() { if (SchoolMember$$serializer_instance === null) { new SchoolMember$$serializer(); } return SchoolMember$$serializer_instance; } function SchoolMember_init(seen1, schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(SchoolMember.prototype); if ((seen1 & 1) === 0) $this.schoolMemberUid = L0; else $this.schoolMemberUid = schoolMemberUid; if ((seen1 & 2) === 0) $this.schoolMemberPersonUid = L0; else $this.schoolMemberPersonUid = schoolMemberPersonUid; if ((seen1 & 4) === 0) $this.schoolMemberSchoolUid = L0; else $this.schoolMemberSchoolUid = schoolMemberSchoolUid; if ((seen1 & 8) === 0) $this.schoolMemberJoinDate = L0; else $this.schoolMemberJoinDate = schoolMemberJoinDate; if ((seen1 & 16) === 0) $this.schoolMemberLeftDate = Long$Companion$MAX_VALUE; else $this.schoolMemberLeftDate = schoolMemberLeftDate; if ((seen1 & 32) === 0) $this.schoolMemberRole = 0; else $this.schoolMemberRole = schoolMemberRole; if ((seen1 & 64) === 0) $this.schoolMemberActive = true; else $this.schoolMemberActive = schoolMemberActive; if ((seen1 & 128) === 0) $this.schoolMemberLocalChangeSeqNum = L0; else $this.schoolMemberLocalChangeSeqNum = schoolMemberLocalChangeSeqNum; if ((seen1 & 256) === 0) $this.schoolMemberMasterChangeSeqNum = L0; else $this.schoolMemberMasterChangeSeqNum = schoolMemberMasterChangeSeqNum; if ((seen1 & 512) === 0) $this.schoolMemberLastChangedBy = 0; else $this.schoolMemberLastChangedBy = schoolMemberLastChangedBy; if ((seen1 & 1024) === 0) $this.schoolMemberLct = L0; else $this.schoolMemberLct = schoolMemberLct; return $this; } SchoolMember.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolMember', interfaces: []}; function SchoolMember_init_0($this) { $this = $this || Object.create(SchoolMember.prototype); SchoolMember.call($this); $this.schoolMemberActive = true; $this.schoolMemberLeftDate = Long$Companion$MAX_VALUE; return $this; } var SchoolMemberReplicate$Companion_instance = null; function SchoolMemberReplicate$$serializer() { this.descriptor_mz0dt2$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.SchoolMemberReplicate', this, 4); this.descriptor.addElement_ivxn3r$('smPk', true); this.descriptor.addElement_ivxn3r$('smVersionId', true); this.descriptor.addElement_ivxn3r$('smDestination', true); this.descriptor.addElement_ivxn3r$('smPending', true); SchoolMemberReplicate$$serializer_instance = this; } var SchoolMemberReplicate$$serializer_instance = null; function SchoolMemberWithPerson() { SchoolMemberWithPerson$Companion_getInstance(); SchoolMember_init_0(this); this.person = null; } function SchoolMemberWithPerson$Companion() { SchoolMemberWithPerson$Companion_instance = this; } SchoolMemberWithPerson$Companion.prototype.serializer = function () { return SchoolMemberWithPerson$$serializer_getInstance(); }; SchoolMemberWithPerson$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var SchoolMemberWithPerson$Companion_instance = null; function SchoolMemberWithPerson$Companion_getInstance() { if (SchoolMemberWithPerson$Companion_instance === null) { new SchoolMemberWithPerson$Companion(); } return SchoolMemberWithPerson$Companion_instance; } function SchoolMemberWithPerson$$serializer() { this.descriptor_y5lzu4$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.SchoolMemberWithPerson', this, 12); this.descriptor.addElement_ivxn3r$('schoolMemberUid', true); this.descriptor.addElement_ivxn3r$('schoolMemberPersonUid', true); this.descriptor.addElement_ivxn3r$('schoolMemberSchoolUid', true); this.descriptor.addElement_ivxn3r$('schoolMemberJoinDate', true); this.descriptor.addElement_ivxn3r$('schoolMemberLeftDate', true); this.descriptor.addElement_ivxn3r$('schoolMemberRole', true); this.descriptor.addElement_ivxn3r$('schoolMemberActive', true); this.descriptor.addElement_ivxn3r$('schoolMemberLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('schoolMemberMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('schoolMemberLastChangedBy', true); this.descriptor.addElement_ivxn3r$('schoolMemberLct', true); this.descriptor.addElement_ivxn3r$('person', true); SchoolMemberWithPerson$$serializer_instance = this; } Object.defineProperty(SchoolMemberWithPerson$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_y5lzu4$_0; }}); SchoolMemberWithPerson$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.schoolMemberUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.schoolMemberUid); if (!equals(value.schoolMemberPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.schoolMemberPersonUid); if (!equals(value.schoolMemberSchoolUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.schoolMemberSchoolUid); if (!equals(value.schoolMemberJoinDate, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.schoolMemberJoinDate); if (!equals(value.schoolMemberLeftDate, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.schoolMemberLeftDate); if (!equals(value.schoolMemberRole, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.schoolMemberRole); if (!equals(value.schoolMemberActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.schoolMemberActive); if (!equals(value.schoolMemberLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.schoolMemberLocalChangeSeqNum); if (!equals(value.schoolMemberMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.schoolMemberMasterChangeSeqNum); if (!equals(value.schoolMemberLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.schoolMemberLastChangedBy); if (!equals(value.schoolMemberLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.schoolMemberLct); if (!equals(value.person, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, Person$$serializer_getInstance(), value.person); output.endStructure_24f42q$(this.descriptor); }; SchoolMemberWithPerson$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, Person$$serializer_getInstance(), local11); bitMask0 |= 2048; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return SchoolMemberWithPerson_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, null); }; SchoolMemberWithPerson$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(Person$$serializer_getInstance())]; }; SchoolMemberWithPerson$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var SchoolMemberWithPerson$$serializer_instance = null; function SchoolMemberWithPerson$$serializer_getInstance() { if (SchoolMemberWithPerson$$serializer_instance === null) { new SchoolMemberWithPerson$$serializer(); } return SchoolMemberWithPerson$$serializer_instance; } function SchoolMemberWithPerson_init(seen1, schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct, person, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(SchoolMemberWithPerson.prototype); $this = SchoolMember_init(seen1, schoolMemberUid, schoolMemberPersonUid, schoolMemberSchoolUid, schoolMemberJoinDate, schoolMemberLeftDate, schoolMemberRole, schoolMemberActive, schoolMemberLocalChangeSeqNum, schoolMemberMasterChangeSeqNum, schoolMemberLastChangedBy, schoolMemberLct, $this); if ((seen1 & 2048) === 0) $this.person = null; else $this.person = person; return $this; } SchoolMemberWithPerson.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolMemberWithPerson', interfaces: [SchoolMember]}; var SchoolPicture$Companion_instance = null; function SchoolPicture$$serializer() { this.descriptor_z8tguv$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.SchoolPicture', this, 9); this.descriptor.addElement_ivxn3r$('schoolPictureUid', true); this.descriptor.addElement_ivxn3r$('schoolPictureSchoolUid', true); this.descriptor.addElement_ivxn3r$('schoolPictureMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('schoolPictureLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('schoolPictureLastChangedBy', true); this.descriptor.addElement_ivxn3r$('schoolPictureLct', true); this.descriptor.addElement_ivxn3r$('schoolPictureFileSize', true); this.descriptor.addElement_ivxn3r$('schoolPictureTimestamp', true); this.descriptor.addElement_ivxn3r$('schoolPictureMimeType', true); SchoolPicture$$serializer_instance = this; } var SchoolPicture$$serializer_instance = null; var SchoolReplicate$Companion_instance = null; function SchoolReplicate$$serializer() { this.descriptor_60r0gk$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.SchoolReplicate', this, 4); this.descriptor.addElement_ivxn3r$('schoolPk', true); this.descriptor.addElement_ivxn3r$('schoolVersionId', true); this.descriptor.addElement_ivxn3r$('schoolDestination', true); this.descriptor.addElement_ivxn3r$('schoolPending', true); SchoolReplicate$$serializer_instance = this; } var SchoolReplicate$$serializer_instance = null; function SchoolWithHolidayCalendar() { SchoolWithHolidayCalendar$Companion_getInstance(); School.call(this); this.holidayCalendar = null; } function SchoolWithHolidayCalendar$Companion() { SchoolWithHolidayCalendar$Companion_instance = this; } SchoolWithHolidayCalendar$Companion.prototype.serializer = function () { return SchoolWithHolidayCalendar$$serializer_getInstance(); }; SchoolWithHolidayCalendar$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var SchoolWithHolidayCalendar$Companion_instance = null; function SchoolWithHolidayCalendar$Companion_getInstance() { if (SchoolWithHolidayCalendar$Companion_instance === null) { new SchoolWithHolidayCalendar$Companion(); } return SchoolWithHolidayCalendar$Companion_instance; } function SchoolWithHolidayCalendar$$serializer() { this.descriptor_s1qzjv$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.SchoolWithHolidayCalendar', this, 22); this.descriptor.addElement_ivxn3r$('schoolUid', true); this.descriptor.addElement_ivxn3r$('schoolName', true); this.descriptor.addElement_ivxn3r$('schoolDesc', true); this.descriptor.addElement_ivxn3r$('schoolAddress', true); this.descriptor.addElement_ivxn3r$('schoolActive', true); this.descriptor.addElement_ivxn3r$('schoolPhoneNumber', true); this.descriptor.addElement_ivxn3r$('schoolGender', true); this.descriptor.addElement_ivxn3r$('schoolHolidayCalendarUid', true); this.descriptor.addElement_ivxn3r$('schoolFeatures', true); this.descriptor.addElement_ivxn3r$('schoolLocationLong', true); this.descriptor.addElement_ivxn3r$('schoolLocationLatt', true); this.descriptor.addElement_ivxn3r$('schoolEmailAddress', true); this.descriptor.addElement_ivxn3r$('schoolTeachersPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('schoolStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('schoolPendingStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('schoolCode', true); this.descriptor.addElement_ivxn3r$('schoolMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('schoolLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('schoolLastChangedBy', true); this.descriptor.addElement_ivxn3r$('schoolLct', true); this.descriptor.addElement_ivxn3r$('schoolTimeZone', true); this.descriptor.addElement_ivxn3r$('holidayCalendar', true); SchoolWithHolidayCalendar$$serializer_instance = this; } Object.defineProperty(SchoolWithHolidayCalendar$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_s1qzjv$_0; }}); SchoolWithHolidayCalendar$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.schoolUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.schoolUid); if (!equals(value.schoolName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.schoolName); if (!equals(value.schoolDesc, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.schoolDesc); if (!equals(value.schoolAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.schoolAddress); if (!equals(value.schoolActive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.schoolActive); if (!equals(value.schoolPhoneNumber, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.schoolPhoneNumber); if (!equals(value.schoolGender, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.schoolGender); if (!equals(value.schoolHolidayCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.schoolHolidayCalendarUid); if (!equals(value.schoolFeatures, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.schoolFeatures); if (!equals(value.schoolLocationLong, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeDoubleElement_powrwi$(this.descriptor, 9, value.schoolLocationLong); if (!equals(value.schoolLocationLatt, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeDoubleElement_powrwi$(this.descriptor, 10, value.schoolLocationLatt); if (!equals(value.schoolEmailAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, internal.StringSerializer, value.schoolEmailAddress); if (!equals(value.schoolTeachersPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.schoolTeachersPersonGroupUid); if (!equals(value.schoolStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.schoolStudentsPersonGroupUid); if (!equals(value.schoolPendingStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.schoolPendingStudentsPersonGroupUid); if (!equals(value.schoolCode, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 15, internal.StringSerializer, value.schoolCode); if (!equals(value.schoolMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeLongElement_j0o2mv$(this.descriptor, 16, value.schoolMasterChangeSeqNum); if (!equals(value.schoolLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.schoolLocalChangeSeqNum); if (!equals(value.schoolLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeIntElement_ptg7oe$(this.descriptor, 18, value.schoolLastChangedBy); if (!equals(value.schoolLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.schoolLct); if (!equals(value.schoolTimeZone, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 20, internal.StringSerializer, value.schoolTimeZone); if (!equals(value.holidayCalendar, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 21, HolidayCalendar$$serializer_getInstance(), value.holidayCalendar); output.endStructure_24f42q$(this.descriptor); }; SchoolWithHolidayCalendar$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeDoubleElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeDoubleElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, internal.StringSerializer, local11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 15, internal.StringSerializer, local15); bitMask0 |= 32768; break; case 16: local16 = input.decodeLongElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeIntElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 20, internal.StringSerializer, local20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 21, HolidayCalendar$$serializer_getInstance(), local21); bitMask0 |= 2097152; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return SchoolWithHolidayCalendar_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, null); }; SchoolWithHolidayCalendar$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.DoubleSerializer, internal.DoubleSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(HolidayCalendar$$serializer_getInstance())]; }; SchoolWithHolidayCalendar$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var SchoolWithHolidayCalendar$$serializer_instance = null; function SchoolWithHolidayCalendar$$serializer_getInstance() { if (SchoolWithHolidayCalendar$$serializer_instance === null) { new SchoolWithHolidayCalendar$$serializer(); } return SchoolWithHolidayCalendar$$serializer_instance; } function SchoolWithHolidayCalendar_init(seen1, schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone, holidayCalendar, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(SchoolWithHolidayCalendar.prototype); $this = School_init(seen1, schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone, $this); if ((seen1 & 2097152) === 0) $this.holidayCalendar = null; else $this.holidayCalendar = holidayCalendar; return $this; } SchoolWithHolidayCalendar.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolWithHolidayCalendar', interfaces: [School]}; function SchoolWithMemberCountAndLocation() { SchoolWithMemberCountAndLocation$Companion_getInstance(); School.call(this); this.numStudents = 0; this.numTeachers = 0; this.locationName = null; this.clazzCount = 0; } SchoolWithMemberCountAndLocation.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; if (!School.prototype.equals.call(this, other)) return false; Kotlin.isType(tmp$_0 = other, SchoolWithMemberCountAndLocation) ? tmp$_0 : throwCCE(); if (this.numStudents !== other.numStudents) return false; if (this.numTeachers !== other.numTeachers) return false; if (!equals(this.locationName, other.locationName)) return false; return true; }; SchoolWithMemberCountAndLocation.prototype.hashCode = function () { var tmp$, tmp$_0; var result = School.prototype.hashCode.call(this); result = (31 * result | 0) + this.numStudents | 0; result = (31 * result | 0) + this.numTeachers | 0; result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.locationName) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; return result; }; function SchoolWithMemberCountAndLocation$Companion() { SchoolWithMemberCountAndLocation$Companion_instance = this; } SchoolWithMemberCountAndLocation$Companion.prototype.serializer = function () { return SchoolWithMemberCountAndLocation$$serializer_getInstance(); }; SchoolWithMemberCountAndLocation$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var SchoolWithMemberCountAndLocation$Companion_instance = null; function SchoolWithMemberCountAndLocation$Companion_getInstance() { if (SchoolWithMemberCountAndLocation$Companion_instance === null) { new SchoolWithMemberCountAndLocation$Companion(); } return SchoolWithMemberCountAndLocation$Companion_instance; } function SchoolWithMemberCountAndLocation$$serializer() { this.descriptor_ryzgnw$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.SchoolWithMemberCountAndLocation', this, 25); this.descriptor.addElement_ivxn3r$('schoolUid', true); this.descriptor.addElement_ivxn3r$('schoolName', true); this.descriptor.addElement_ivxn3r$('schoolDesc', true); this.descriptor.addElement_ivxn3r$('schoolAddress', true); this.descriptor.addElement_ivxn3r$('schoolActive', true); this.descriptor.addElement_ivxn3r$('schoolPhoneNumber', true); this.descriptor.addElement_ivxn3r$('schoolGender', true); this.descriptor.addElement_ivxn3r$('schoolHolidayCalendarUid', true); this.descriptor.addElement_ivxn3r$('schoolFeatures', true); this.descriptor.addElement_ivxn3r$('schoolLocationLong', true); this.descriptor.addElement_ivxn3r$('schoolLocationLatt', true); this.descriptor.addElement_ivxn3r$('schoolEmailAddress', true); this.descriptor.addElement_ivxn3r$('schoolTeachersPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('schoolStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('schoolPendingStudentsPersonGroupUid', true); this.descriptor.addElement_ivxn3r$('schoolCode', true); this.descriptor.addElement_ivxn3r$('schoolMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('schoolLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('schoolLastChangedBy', true); this.descriptor.addElement_ivxn3r$('schoolLct', true); this.descriptor.addElement_ivxn3r$('schoolTimeZone', true); this.descriptor.addElement_ivxn3r$('numStudents', true); this.descriptor.addElement_ivxn3r$('numTeachers', true); this.descriptor.addElement_ivxn3r$('locationName', true); this.descriptor.addElement_ivxn3r$('clazzCount', true); SchoolWithMemberCountAndLocation$$serializer_instance = this; } Object.defineProperty(SchoolWithMemberCountAndLocation$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ryzgnw$_0; }}); SchoolWithMemberCountAndLocation$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.schoolUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.schoolUid); if (!equals(value.schoolName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.schoolName); if (!equals(value.schoolDesc, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.schoolDesc); if (!equals(value.schoolAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.schoolAddress); if (!equals(value.schoolActive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.schoolActive); if (!equals(value.schoolPhoneNumber, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.schoolPhoneNumber); if (!equals(value.schoolGender, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.schoolGender); if (!equals(value.schoolHolidayCalendarUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.schoolHolidayCalendarUid); if (!equals(value.schoolFeatures, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.schoolFeatures); if (!equals(value.schoolLocationLong, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeDoubleElement_powrwi$(this.descriptor, 9, value.schoolLocationLong); if (!equals(value.schoolLocationLatt, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeDoubleElement_powrwi$(this.descriptor, 10, value.schoolLocationLatt); if (!equals(value.schoolEmailAddress, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, internal.StringSerializer, value.schoolEmailAddress); if (!equals(value.schoolTeachersPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.schoolTeachersPersonGroupUid); if (!equals(value.schoolStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeLongElement_j0o2mv$(this.descriptor, 13, value.schoolStudentsPersonGroupUid); if (!equals(value.schoolPendingStudentsPersonGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeLongElement_j0o2mv$(this.descriptor, 14, value.schoolPendingStudentsPersonGroupUid); if (!equals(value.schoolCode, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 15, internal.StringSerializer, value.schoolCode); if (!equals(value.schoolMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeLongElement_j0o2mv$(this.descriptor, 16, value.schoolMasterChangeSeqNum); if (!equals(value.schoolLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.schoolLocalChangeSeqNum); if (!equals(value.schoolLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeIntElement_ptg7oe$(this.descriptor, 18, value.schoolLastChangedBy); if (!equals(value.schoolLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeLongElement_j0o2mv$(this.descriptor, 19, value.schoolLct); if (!equals(value.schoolTimeZone, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 20, internal.StringSerializer, value.schoolTimeZone); if (!equals(value.numStudents, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeIntElement_ptg7oe$(this.descriptor, 21, value.numStudents); if (!equals(value.numTeachers, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeIntElement_ptg7oe$(this.descriptor, 22, value.numTeachers); if (!equals(value.locationName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 23, internal.StringSerializer, value.locationName); if (!equals(value.clazzCount, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeIntElement_ptg7oe$(this.descriptor, 24, value.clazzCount); output.endStructure_24f42q$(this.descriptor); }; SchoolWithMemberCountAndLocation$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeDoubleElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeDoubleElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, internal.StringSerializer, local11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeLongElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeLongElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 15, internal.StringSerializer, local15); bitMask0 |= 32768; break; case 16: local16 = input.decodeLongElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeIntElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeLongElement_szpzho$(this.descriptor, 19); bitMask0 |= 524288; break; case 20: local20 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 20, internal.StringSerializer, local20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeIntElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeIntElement_szpzho$(this.descriptor, 22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 23, internal.StringSerializer, local23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeIntElement_szpzho$(this.descriptor, 24); bitMask0 |= 16777216; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return SchoolWithMemberCountAndLocation_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, null); }; SchoolWithMemberCountAndLocation$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.DoubleSerializer, internal.DoubleSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer]; }; SchoolWithMemberCountAndLocation$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var SchoolWithMemberCountAndLocation$$serializer_instance = null; function SchoolWithMemberCountAndLocation$$serializer_getInstance() { if (SchoolWithMemberCountAndLocation$$serializer_instance === null) { new SchoolWithMemberCountAndLocation$$serializer(); } return SchoolWithMemberCountAndLocation$$serializer_instance; } function SchoolWithMemberCountAndLocation_init(seen1, schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone, numStudents, numTeachers, locationName, clazzCount, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(SchoolWithMemberCountAndLocation.prototype); $this = School_init(seen1, schoolUid, schoolName, schoolDesc, schoolAddress, schoolActive, schoolPhoneNumber, schoolGender, schoolHolidayCalendarUid, schoolFeatures, schoolLocationLong, schoolLocationLatt, schoolEmailAddress, schoolTeachersPersonGroupUid, schoolStudentsPersonGroupUid, schoolPendingStudentsPersonGroupUid, schoolCode, schoolMasterChangeSeqNum, schoolLocalChangeSeqNum, schoolLastChangedBy, schoolLct, schoolTimeZone, $this); if ((seen1 & 2097152) === 0) $this.numStudents = 0; else $this.numStudents = numStudents; if ((seen1 & 4194304) === 0) $this.numTeachers = 0; else $this.numTeachers = numTeachers; if ((seen1 & 8388608) === 0) $this.locationName = null; else $this.locationName = locationName; if ((seen1 & 16777216) === 0) $this.clazzCount = 0; else $this.clazzCount = clazzCount; return $this; } SchoolWithMemberCountAndLocation.$metadata$ = {kind: Kind_CLASS, simpleName: 'SchoolWithMemberCountAndLocation', interfaces: [School]}; function ScopedGrant() { ScopedGrant$Companion_getInstance(); this.sgUid = L0; this.sgPcsn = L0; this.sgLcsn = L0; this.sgLcb = 0; this.sgLct = L0; this.sgTableId = 0; this.sgEntityUid = L0; this.sgPermissions = L0; this.sgGroupUid = L0; this.sgIndex = 0; this.sgFlags = 0; } function ScopedGrant$Companion() { ScopedGrant$Companion_instance = this; this.TABLE_ID = 48; this.ALL_TABLES = -2; this.ALL_ENTITIES = L_2; this.FLAG_NO_DELETE = 1; this.FLAG_NO_EDIT = 2; this.FLAG_ADMIN_GROUP = 4; this.FLAG_TEACHER_GROUP = 8; this.FLAG_STUDENT_GROUP = 16; this.FLAG_PARENT_GRANT = 32; this.FLAG_PARENT_GROUP = 64; } ScopedGrant$Companion.prototype.serializer = function () { return ScopedGrant$$serializer_getInstance(); }; ScopedGrant$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ScopedGrant$Companion_instance = null; function ScopedGrant$Companion_getInstance() { if (ScopedGrant$Companion_instance === null) { new ScopedGrant$Companion(); } return ScopedGrant$Companion_instance; } function ScopedGrant$$serializer() { this.descriptor_fpi2cr$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ScopedGrant', this, 11); this.descriptor.addElement_ivxn3r$('sgUid', true); this.descriptor.addElement_ivxn3r$('sgPcsn', true); this.descriptor.addElement_ivxn3r$('sgLcsn', true); this.descriptor.addElement_ivxn3r$('sgLcb', true); this.descriptor.addElement_ivxn3r$('sgLct', true); this.descriptor.addElement_ivxn3r$('sgTableId', true); this.descriptor.addElement_ivxn3r$('sgEntityUid', true); this.descriptor.addElement_ivxn3r$('sgPermissions', true); this.descriptor.addElement_ivxn3r$('sgGroupUid', true); this.descriptor.addElement_ivxn3r$('sgIndex', true); this.descriptor.addElement_ivxn3r$('sgFlags', true); ScopedGrant$$serializer_instance = this; } Object.defineProperty(ScopedGrant$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_fpi2cr$_0; }}); ScopedGrant$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.sgUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.sgUid); if (!equals(value.sgPcsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.sgPcsn); if (!equals(value.sgLcsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.sgLcsn); if (!equals(value.sgLcb, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.sgLcb); if (!equals(value.sgLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.sgLct); if (!equals(value.sgTableId, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.sgTableId); if (!equals(value.sgEntityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.sgEntityUid); if (!equals(value.sgPermissions, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.sgPermissions); if (!equals(value.sgGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.sgGroupUid); if (!equals(value.sgIndex, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.sgIndex); if (!equals(value.sgFlags, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeIntElement_ptg7oe$(this.descriptor, 10, value.sgFlags); output.endStructure_24f42q$(this.descriptor); }; ScopedGrant$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeIntElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ScopedGrant_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, null); }; ScopedGrant$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer]; }; ScopedGrant$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ScopedGrant$$serializer_instance = null; function ScopedGrant$$serializer_getInstance() { if (ScopedGrant$$serializer_instance === null) { new ScopedGrant$$serializer(); } return ScopedGrant$$serializer_instance; } function ScopedGrant_init(seen1, sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ScopedGrant.prototype); if ((seen1 & 1) === 0) $this.sgUid = L0; else $this.sgUid = sgUid; if ((seen1 & 2) === 0) $this.sgPcsn = L0; else $this.sgPcsn = sgPcsn; if ((seen1 & 4) === 0) $this.sgLcsn = L0; else $this.sgLcsn = sgLcsn; if ((seen1 & 8) === 0) $this.sgLcb = 0; else $this.sgLcb = sgLcb; if ((seen1 & 16) === 0) $this.sgLct = L0; else $this.sgLct = sgLct; if ((seen1 & 32) === 0) $this.sgTableId = 0; else $this.sgTableId = sgTableId; if ((seen1 & 64) === 0) $this.sgEntityUid = L0; else $this.sgEntityUid = sgEntityUid; if ((seen1 & 128) === 0) $this.sgPermissions = L0; else $this.sgPermissions = sgPermissions; if ((seen1 & 256) === 0) $this.sgGroupUid = L0; else $this.sgGroupUid = sgGroupUid; if ((seen1 & 512) === 0) $this.sgIndex = 0; else $this.sgIndex = sgIndex; if ((seen1 & 1024) === 0) $this.sgFlags = 0; else $this.sgFlags = sgFlags; return $this; } ScopedGrant.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScopedGrant', interfaces: []}; function ScopedGrantAndName() { ScopedGrantAndName$Companion_getInstance(); this.scopedGrant = null; this.name = null; } function ScopedGrantAndName$Companion() { ScopedGrantAndName$Companion_instance = this; } ScopedGrantAndName$Companion.prototype.serializer = function () { return ScopedGrantAndName$$serializer_getInstance(); }; ScopedGrantAndName$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ScopedGrantAndName$Companion_instance = null; function ScopedGrantAndName$Companion_getInstance() { if (ScopedGrantAndName$Companion_instance === null) { new ScopedGrantAndName$Companion(); } return ScopedGrantAndName$Companion_instance; } function ScopedGrantAndName$$serializer() { this.descriptor_gj098h$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ScopedGrantAndName', this, 2); this.descriptor.addElement_ivxn3r$('scopedGrant', true); this.descriptor.addElement_ivxn3r$('name', true); ScopedGrantAndName$$serializer_instance = this; } Object.defineProperty(ScopedGrantAndName$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_gj098h$_0; }}); ScopedGrantAndName$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.scopedGrant, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 0, ScopedGrant$$serializer_getInstance(), value.scopedGrant); if (!equals(value.name, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.name); output.endStructure_24f42q$(this.descriptor); }; ScopedGrantAndName$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 0, ScopedGrant$$serializer_getInstance(), local0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ScopedGrantAndName_init(bitMask0, local0, local1, null); }; ScopedGrantAndName$$serializer.prototype.childSerializers = function () { return [new NullableSerializer(ScopedGrant$$serializer_getInstance()), new NullableSerializer(internal.StringSerializer)]; }; ScopedGrantAndName$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ScopedGrantAndName$$serializer_instance = null; function ScopedGrantAndName$$serializer_getInstance() { if (ScopedGrantAndName$$serializer_instance === null) { new ScopedGrantAndName$$serializer(); } return ScopedGrantAndName$$serializer_instance; } function ScopedGrantAndName_init(seen1, scopedGrant, name, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ScopedGrantAndName.prototype); if ((seen1 & 1) === 0) $this.scopedGrant = null; else $this.scopedGrant = scopedGrant; if ((seen1 & 2) === 0) $this.name = null; else $this.name = name; return $this; } ScopedGrantAndName.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScopedGrantAndName', interfaces: []}; var ScopedGrantReplicate$Companion_instance = null; function ScopedGrantReplicate$$serializer() { this.descriptor_e8szfs$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ScopedGrantReplicate', this, 4); this.descriptor.addElement_ivxn3r$('sgPk', true); this.descriptor.addElement_ivxn3r$('sgVersionId', true); this.descriptor.addElement_ivxn3r$('sgDestination', true); this.descriptor.addElement_ivxn3r$('sgPending', true); ScopedGrantReplicate$$serializer_instance = this; } var ScopedGrantReplicate$$serializer_instance = null; function ScopedGrantWithName() { ScopedGrantWithName$Companion_getInstance(); ScopedGrant.call(this); this.name = null; } function ScopedGrantWithName$Companion() { ScopedGrantWithName$Companion_instance = this; } ScopedGrantWithName$Companion.prototype.serializer = function () { return ScopedGrantWithName$$serializer_getInstance(); }; ScopedGrantWithName$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ScopedGrantWithName$Companion_instance = null; function ScopedGrantWithName$Companion_getInstance() { if (ScopedGrantWithName$Companion_instance === null) { new ScopedGrantWithName$Companion(); } return ScopedGrantWithName$Companion_instance; } function ScopedGrantWithName$$serializer() { this.descriptor_5yph4s$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ScopedGrantWithName', this, 12); this.descriptor.addElement_ivxn3r$('sgUid', true); this.descriptor.addElement_ivxn3r$('sgPcsn', true); this.descriptor.addElement_ivxn3r$('sgLcsn', true); this.descriptor.addElement_ivxn3r$('sgLcb', true); this.descriptor.addElement_ivxn3r$('sgLct', true); this.descriptor.addElement_ivxn3r$('sgTableId', true); this.descriptor.addElement_ivxn3r$('sgEntityUid', true); this.descriptor.addElement_ivxn3r$('sgPermissions', true); this.descriptor.addElement_ivxn3r$('sgGroupUid', true); this.descriptor.addElement_ivxn3r$('sgIndex', true); this.descriptor.addElement_ivxn3r$('sgFlags', true); this.descriptor.addElement_ivxn3r$('name', true); ScopedGrantWithName$$serializer_instance = this; } Object.defineProperty(ScopedGrantWithName$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_5yph4s$_0; }}); ScopedGrantWithName$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.sgUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.sgUid); if (!equals(value.sgPcsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.sgPcsn); if (!equals(value.sgLcsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.sgLcsn); if (!equals(value.sgLcb, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.sgLcb); if (!equals(value.sgLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.sgLct); if (!equals(value.sgTableId, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.sgTableId); if (!equals(value.sgEntityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.sgEntityUid); if (!equals(value.sgPermissions, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.sgPermissions); if (!equals(value.sgGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.sgGroupUid); if (!equals(value.sgIndex, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.sgIndex); if (!equals(value.sgFlags, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeIntElement_ptg7oe$(this.descriptor, 10, value.sgFlags); if (!equals(value.name, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, internal.StringSerializer, value.name); output.endStructure_24f42q$(this.descriptor); }; ScopedGrantWithName$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeIntElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, internal.StringSerializer, local11); bitMask0 |= 2048; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ScopedGrantWithName_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, null); }; ScopedGrantWithName$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer)]; }; ScopedGrantWithName$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ScopedGrantWithName$$serializer_instance = null; function ScopedGrantWithName$$serializer_getInstance() { if (ScopedGrantWithName$$serializer_instance === null) { new ScopedGrantWithName$$serializer(); } return ScopedGrantWithName$$serializer_instance; } function ScopedGrantWithName_init(seen1, sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags, name, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ScopedGrantWithName.prototype); $this = ScopedGrant_init(seen1, sgUid, sgPcsn, sgLcsn, sgLcb, sgLct, sgTableId, sgEntityUid, sgPermissions, sgGroupUid, sgIndex, sgFlags, $this); if ((seen1 & 2048) === 0) $this.name = null; else $this.name = name; return $this; } ScopedGrantWithName.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScopedGrantWithName', interfaces: [ScopedGrant]}; function ScrapeQueueItem() { ScrapeQueueItem$Companion_getInstance(); this.sqiUid = 0; this.sqiContentEntryParentUid = L0; this.sqiContentEntryUid = L0; this.destDir = null; this.scrapeUrl = null; this.status = 0; this.runId = 0; this.itemType = 0; this.errorCode = 0; this.contentType = null; this.timeAdded = L0; this.timeStarted = L0; this.timeFinished = L0; this.priority = 0; this.overrideEntry = false; } function ScrapeQueueItem$Companion() { ScrapeQueueItem$Companion_instance = this; this.ITEM_TYPE_INDEX = 1; this.ITEM_TYPE_SCRAPE = 2; } ScrapeQueueItem$Companion.prototype.serializer = function () { return ScrapeQueueItem$$serializer_getInstance(); }; ScrapeQueueItem$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ScrapeQueueItem$Companion_instance = null; function ScrapeQueueItem$Companion_getInstance() { if (ScrapeQueueItem$Companion_instance === null) { new ScrapeQueueItem$Companion(); } return ScrapeQueueItem$Companion_instance; } function ScrapeQueueItem$$serializer() { this.descriptor_wddea9$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ScrapeQueueItem', this, 15); this.descriptor.addElement_ivxn3r$('sqiUid', true); this.descriptor.addElement_ivxn3r$('sqiContentEntryParentUid', true); this.descriptor.addElement_ivxn3r$('sqiContentEntryUid', true); this.descriptor.addElement_ivxn3r$('destDir', true); this.descriptor.addElement_ivxn3r$('scrapeUrl', true); this.descriptor.addElement_ivxn3r$('status', true); this.descriptor.addElement_ivxn3r$('runId', true); this.descriptor.addElement_ivxn3r$('itemType', true); this.descriptor.addElement_ivxn3r$('errorCode', true); this.descriptor.addElement_ivxn3r$('contentType', true); this.descriptor.addElement_ivxn3r$('timeAdded', true); this.descriptor.addElement_ivxn3r$('timeStarted', true); this.descriptor.addElement_ivxn3r$('timeFinished', true); this.descriptor.addElement_ivxn3r$('priority', true); this.descriptor.addElement_ivxn3r$('overrideEntry', true); ScrapeQueueItem$$serializer_instance = this; } Object.defineProperty(ScrapeQueueItem$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_wddea9$_0; }}); ScrapeQueueItem$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.sqiUid, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeIntElement_ptg7oe$(this.descriptor, 0, value.sqiUid); if (!equals(value.sqiContentEntryParentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.sqiContentEntryParentUid); if (!equals(value.sqiContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.sqiContentEntryUid); if (!equals(value.destDir, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.destDir); if (!equals(value.scrapeUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.scrapeUrl); if (!equals(value.status, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.status); if (!equals(value.runId, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.runId); if (!equals(value.itemType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.itemType); if (!equals(value.errorCode, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeIntElement_ptg7oe$(this.descriptor, 8, value.errorCode); if (!equals(value.contentType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.contentType); if (!equals(value.timeAdded, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.timeAdded); if (!equals(value.timeStarted, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.timeStarted); if (!equals(value.timeFinished, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.timeFinished); if (!equals(value.priority, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeIntElement_ptg7oe$(this.descriptor, 13, value.priority); if (!equals(value.overrideEntry, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 14, value.overrideEntry); output.endStructure_24f42q$(this.descriptor); }; ScrapeQueueItem$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeIntElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeIntElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeIntElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeBooleanElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ScrapeQueueItem_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, null); }; ScrapeQueueItem$$serializer.prototype.childSerializers = function () { return [internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer]; }; ScrapeQueueItem$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ScrapeQueueItem$$serializer_instance = null; function ScrapeQueueItem$$serializer_getInstance() { if (ScrapeQueueItem$$serializer_instance === null) { new ScrapeQueueItem$$serializer(); } return ScrapeQueueItem$$serializer_instance; } function ScrapeQueueItem_init(seen1, sqiUid, sqiContentEntryParentUid, sqiContentEntryUid, destDir, scrapeUrl, status, runId, itemType, errorCode, contentType, timeAdded, timeStarted, timeFinished, priority, overrideEntry, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ScrapeQueueItem.prototype); if ((seen1 & 1) === 0) $this.sqiUid = 0; else $this.sqiUid = sqiUid; if ((seen1 & 2) === 0) $this.sqiContentEntryParentUid = L0; else $this.sqiContentEntryParentUid = sqiContentEntryParentUid; if ((seen1 & 4) === 0) $this.sqiContentEntryUid = L0; else $this.sqiContentEntryUid = sqiContentEntryUid; if ((seen1 & 8) === 0) $this.destDir = null; else $this.destDir = destDir; if ((seen1 & 16) === 0) $this.scrapeUrl = null; else $this.scrapeUrl = scrapeUrl; if ((seen1 & 32) === 0) $this.status = 0; else $this.status = status; if ((seen1 & 64) === 0) $this.runId = 0; else $this.runId = runId; if ((seen1 & 128) === 0) $this.itemType = 0; else $this.itemType = itemType; if ((seen1 & 256) === 0) $this.errorCode = 0; else $this.errorCode = errorCode; if ((seen1 & 512) === 0) $this.contentType = null; else $this.contentType = contentType; if ((seen1 & 1024) === 0) $this.timeAdded = L0; else $this.timeAdded = timeAdded; if ((seen1 & 2048) === 0) $this.timeStarted = L0; else $this.timeStarted = timeStarted; if ((seen1 & 4096) === 0) $this.timeFinished = L0; else $this.timeFinished = timeFinished; if ((seen1 & 8192) === 0) $this.priority = 0; else $this.priority = priority; if ((seen1 & 16384) === 0) $this.overrideEntry = false; else $this.overrideEntry = overrideEntry; return $this; } ScrapeQueueItem.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScrapeQueueItem', interfaces: []}; function ScrapeQueueItemWithScrapeRun() { ScrapeQueueItemWithScrapeRun$Companion_getInstance(); ScrapeQueueItem.call(this); this.scrapeRun = null; } function ScrapeQueueItemWithScrapeRun$Companion() { ScrapeQueueItemWithScrapeRun$Companion_instance = this; } ScrapeQueueItemWithScrapeRun$Companion.prototype.serializer = function () { return ScrapeQueueItemWithScrapeRun$$serializer_getInstance(); }; ScrapeQueueItemWithScrapeRun$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ScrapeQueueItemWithScrapeRun$Companion_instance = null; function ScrapeQueueItemWithScrapeRun$Companion_getInstance() { if (ScrapeQueueItemWithScrapeRun$Companion_instance === null) { new ScrapeQueueItemWithScrapeRun$Companion(); } return ScrapeQueueItemWithScrapeRun$Companion_instance; } function ScrapeQueueItemWithScrapeRun$$serializer() { this.descriptor_c2ofo$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ScrapeQueueItemWithScrapeRun', this, 16); this.descriptor.addElement_ivxn3r$('sqiUid', true); this.descriptor.addElement_ivxn3r$('sqiContentEntryParentUid', true); this.descriptor.addElement_ivxn3r$('sqiContentEntryUid', true); this.descriptor.addElement_ivxn3r$('destDir', true); this.descriptor.addElement_ivxn3r$('scrapeUrl', true); this.descriptor.addElement_ivxn3r$('status', true); this.descriptor.addElement_ivxn3r$('runId', true); this.descriptor.addElement_ivxn3r$('itemType', true); this.descriptor.addElement_ivxn3r$('errorCode', true); this.descriptor.addElement_ivxn3r$('contentType', true); this.descriptor.addElement_ivxn3r$('timeAdded', true); this.descriptor.addElement_ivxn3r$('timeStarted', true); this.descriptor.addElement_ivxn3r$('timeFinished', true); this.descriptor.addElement_ivxn3r$('priority', true); this.descriptor.addElement_ivxn3r$('overrideEntry', true); this.descriptor.addElement_ivxn3r$('scrapeRun', true); ScrapeQueueItemWithScrapeRun$$serializer_instance = this; } Object.defineProperty(ScrapeQueueItemWithScrapeRun$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_c2ofo$_0; }}); ScrapeQueueItemWithScrapeRun$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.sqiUid, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeIntElement_ptg7oe$(this.descriptor, 0, value.sqiUid); if (!equals(value.sqiContentEntryParentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.sqiContentEntryParentUid); if (!equals(value.sqiContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.sqiContentEntryUid); if (!equals(value.destDir, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.destDir); if (!equals(value.scrapeUrl, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.scrapeUrl); if (!equals(value.status, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.status); if (!equals(value.runId, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.runId); if (!equals(value.itemType, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.itemType); if (!equals(value.errorCode, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeIntElement_ptg7oe$(this.descriptor, 8, value.errorCode); if (!equals(value.contentType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, internal.StringSerializer, value.contentType); if (!equals(value.timeAdded, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.timeAdded); if (!equals(value.timeStarted, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.timeStarted); if (!equals(value.timeFinished, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeLongElement_j0o2mv$(this.descriptor, 12, value.timeFinished); if (!equals(value.priority, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeIntElement_ptg7oe$(this.descriptor, 13, value.priority); if (!equals(value.overrideEntry, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 14, value.overrideEntry); if (!equals(value.scrapeRun, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 15, ScrapeRun$$serializer_getInstance(), value.scrapeRun); output.endStructure_24f42q$(this.descriptor); }; ScrapeQueueItemWithScrapeRun$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeIntElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeIntElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, internal.StringSerializer, local9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeLongElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeIntElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeBooleanElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 15, ScrapeRun$$serializer_getInstance(), local15); bitMask0 |= 32768; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ScrapeQueueItemWithScrapeRun_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, null); }; ScrapeQueueItemWithScrapeRun$$serializer.prototype.childSerializers = function () { return [internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, new NullableSerializer(ScrapeRun$$serializer_getInstance())]; }; ScrapeQueueItemWithScrapeRun$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ScrapeQueueItemWithScrapeRun$$serializer_instance = null; function ScrapeQueueItemWithScrapeRun$$serializer_getInstance() { if (ScrapeQueueItemWithScrapeRun$$serializer_instance === null) { new ScrapeQueueItemWithScrapeRun$$serializer(); } return ScrapeQueueItemWithScrapeRun$$serializer_instance; } function ScrapeQueueItemWithScrapeRun_init(seen1, sqiUid, sqiContentEntryParentUid, sqiContentEntryUid, destDir, scrapeUrl, status, runId, itemType, errorCode, contentType, timeAdded, timeStarted, timeFinished, priority, overrideEntry, scrapeRun, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ScrapeQueueItemWithScrapeRun.prototype); $this = ScrapeQueueItem_init(seen1, sqiUid, sqiContentEntryParentUid, sqiContentEntryUid, destDir, scrapeUrl, status, runId, itemType, errorCode, contentType, timeAdded, timeStarted, timeFinished, priority, overrideEntry, $this); if ((seen1 & 32768) === 0) $this.scrapeRun = null; else $this.scrapeRun = scrapeRun; return $this; } ScrapeQueueItemWithScrapeRun.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScrapeQueueItemWithScrapeRun', interfaces: [ScrapeQueueItem]}; function ScrapeRun() { ScrapeRun$Companion_getInstance(); this.scrapeRunUid = 0; this.scrapeType = null; this.scrapeRunStatus = 0; this.conversionParams = null; } function ScrapeRun$Companion() { ScrapeRun$Companion_instance = this; } ScrapeRun$Companion.prototype.serializer = function () { return ScrapeRun$$serializer_getInstance(); }; ScrapeRun$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ScrapeRun$Companion_instance = null; function ScrapeRun$Companion_getInstance() { if (ScrapeRun$Companion_instance === null) { new ScrapeRun$Companion(); } return ScrapeRun$Companion_instance; } function ScrapeRun$$serializer() { this.descriptor_4uf1oq$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.ScrapeRun', this, 4); this.descriptor.addElement_ivxn3r$('scrapeRunUid', true); this.descriptor.addElement_ivxn3r$('scrapeType', true); this.descriptor.addElement_ivxn3r$('scrapeRunStatus', true); this.descriptor.addElement_ivxn3r$('conversionParams', true); ScrapeRun$$serializer_instance = this; } Object.defineProperty(ScrapeRun$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_4uf1oq$_0; }}); ScrapeRun$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.scrapeRunUid, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeIntElement_ptg7oe$(this.descriptor, 0, value.scrapeRunUid); if (!equals(value.scrapeType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.scrapeType); if (!equals(value.scrapeRunStatus, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeIntElement_ptg7oe$(this.descriptor, 2, value.scrapeRunStatus); if (!equals(value.conversionParams, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.conversionParams); output.endStructure_24f42q$(this.descriptor); }; ScrapeRun$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeIntElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeIntElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return ScrapeRun_init(bitMask0, local0, local1, local2, local3, null); }; ScrapeRun$$serializer.prototype.childSerializers = function () { return [internal.IntSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, new NullableSerializer(internal.StringSerializer)]; }; ScrapeRun$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var ScrapeRun$$serializer_instance = null; function ScrapeRun$$serializer_getInstance() { if (ScrapeRun$$serializer_instance === null) { new ScrapeRun$$serializer(); } return ScrapeRun$$serializer_instance; } function ScrapeRun_init(seen1, scrapeRunUid, scrapeType, scrapeRunStatus, conversionParams, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(ScrapeRun.prototype); if ((seen1 & 1) === 0) $this.scrapeRunUid = 0; else $this.scrapeRunUid = scrapeRunUid; if ((seen1 & 2) === 0) $this.scrapeType = null; else $this.scrapeType = scrapeType; if ((seen1 & 4) === 0) $this.scrapeRunStatus = 0; else $this.scrapeRunStatus = scrapeRunStatus; if ((seen1 & 8) === 0) $this.conversionParams = null; else $this.conversionParams = conversionParams; return $this; } ScrapeRun.$metadata$ = {kind: Kind_CLASS, simpleName: 'ScrapeRun', interfaces: []}; function Site() { Site$Companion_getInstance(); this.siteUid = L0; this.sitePcsn = L0; this.siteLcsn = L0; this.siteLcb = 0; this.siteLct = L0; this.siteName = null; this.guestLogin = true; this.registrationAllowed = true; this.authSalt = null; } function Site$Companion() { Site$Companion_instance = this; } Site$Companion.prototype.serializer = function () { return Site$$serializer_getInstance(); }; Site$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var Site$Companion_instance = null; function Site$Companion_getInstance() { if (Site$Companion_instance === null) { new Site$Companion(); } return Site$Companion_instance; } function Site$$serializer() { this.descriptor_l8ly7i$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.Site', this, 9); this.descriptor.addElement_ivxn3r$('siteUid', true); this.descriptor.addElement_ivxn3r$('sitePcsn', true); this.descriptor.addElement_ivxn3r$('siteLcsn', true); this.descriptor.addElement_ivxn3r$('siteLcb', true); this.descriptor.addElement_ivxn3r$('siteLct', true); this.descriptor.addElement_ivxn3r$('siteName', true); this.descriptor.addElement_ivxn3r$('guestLogin', true); this.descriptor.addElement_ivxn3r$('registrationAllowed', true); this.descriptor.addElement_ivxn3r$('authSalt', true); Site$$serializer_instance = this; } Object.defineProperty(Site$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_l8ly7i$_0; }}); Site$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.siteUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.siteUid); if (!equals(value.sitePcsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.sitePcsn); if (!equals(value.siteLcsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.siteLcsn); if (!equals(value.siteLcb, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.siteLcb); if (!equals(value.siteLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.siteLct); if (!equals(value.siteName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.siteName); if (!equals(value.guestLogin, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.guestLogin); if (!equals(value.registrationAllowed, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 7, value.registrationAllowed); if (!equals(value.authSalt, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 8, internal.StringSerializer, value.authSalt); output.endStructure_24f42q$(this.descriptor); }; Site$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeBooleanElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 8, internal.StringSerializer, local8); bitMask0 |= 256; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return Site_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, null); }; Site$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.BooleanSerializer, new NullableSerializer(internal.StringSerializer)]; }; Site$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var Site$$serializer_instance = null; function Site$$serializer_getInstance() { if (Site$$serializer_instance === null) { new Site$$serializer(); } return Site$$serializer_instance; } function Site_init(seen1, siteUid, sitePcsn, siteLcsn, siteLcb, siteLct, siteName, guestLogin, registrationAllowed, authSalt, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(Site.prototype); if ((seen1 & 1) === 0) $this.siteUid = L0; else $this.siteUid = siteUid; if ((seen1 & 2) === 0) $this.sitePcsn = L0; else $this.sitePcsn = sitePcsn; if ((seen1 & 4) === 0) $this.siteLcsn = L0; else $this.siteLcsn = siteLcsn; if ((seen1 & 8) === 0) $this.siteLcb = 0; else $this.siteLcb = siteLcb; if ((seen1 & 16) === 0) $this.siteLct = L0; else $this.siteLct = siteLct; if ((seen1 & 32) === 0) $this.siteName = null; else $this.siteName = siteName; if ((seen1 & 64) === 0) $this.guestLogin = true; else $this.guestLogin = guestLogin; if ((seen1 & 128) === 0) $this.registrationAllowed = true; else $this.registrationAllowed = registrationAllowed; if ((seen1 & 256) === 0) $this.authSalt = null; else $this.authSalt = authSalt; return $this; } Site.$metadata$ = {kind: Kind_CLASS, simpleName: 'Site', interfaces: []}; var SiteReplicate$Companion_instance = null; function SiteReplicate$$serializer() { this.descriptor_d0ilzz$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.SiteReplicate', this, 4); this.descriptor.addElement_ivxn3r$('sitePk', true); this.descriptor.addElement_ivxn3r$('siteVersionId', true); this.descriptor.addElement_ivxn3r$('siteDestination', true); this.descriptor.addElement_ivxn3r$('sitePending', true); SiteReplicate$$serializer_instance = this; } var SiteReplicate$$serializer_instance = null; function SiteTerms() { SiteTerms$Companion_getInstance(); this.sTermsUid = L0; this.termsHtml = null; this.sTermsLang = null; this.sTermsLangUid = L0; this.sTermsActive = true; this.sTermsLastChangedBy = 0; this.sTermsPrimaryCsn = L0; this.sTermsLocalCsn = L0; this.sTermsLct = L0; } function SiteTerms$Companion() { SiteTerms$Companion_instance = this; this.TABLE_ID = 272; } SiteTerms$Companion.prototype.serializer = function () { return SiteTerms$$serializer_getInstance(); }; SiteTerms$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var SiteTerms$Companion_instance = null; function SiteTerms$Companion_getInstance() { if (SiteTerms$Companion_instance === null) { new SiteTerms$Companion(); } return SiteTerms$Companion_instance; } function SiteTerms$$serializer() { this.descriptor_x7z7jz$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.SiteTerms', this, 9); this.descriptor.addElement_ivxn3r$('sTermsUid', true); this.descriptor.addElement_ivxn3r$('termsHtml', true); this.descriptor.addElement_ivxn3r$('sTermsLang', true); this.descriptor.addElement_ivxn3r$('sTermsLangUid', true); this.descriptor.addElement_ivxn3r$('sTermsActive', true); this.descriptor.addElement_ivxn3r$('sTermsLastChangedBy', true); this.descriptor.addElement_ivxn3r$('sTermsPrimaryCsn', true); this.descriptor.addElement_ivxn3r$('sTermsLocalCsn', true); this.descriptor.addElement_ivxn3r$('sTermsLct', true); SiteTerms$$serializer_instance = this; } Object.defineProperty(SiteTerms$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_x7z7jz$_0; }}); SiteTerms$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.sTermsUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.sTermsUid); if (!equals(value.termsHtml, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.termsHtml); if (!equals(value.sTermsLang, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.sTermsLang); if (!equals(value.sTermsLangUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.sTermsLangUid); if (!equals(value.sTermsActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.sTermsActive); if (!equals(value.sTermsLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.sTermsLastChangedBy); if (!equals(value.sTermsPrimaryCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.sTermsPrimaryCsn); if (!equals(value.sTermsLocalCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.sTermsLocalCsn); if (!equals(value.sTermsLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.sTermsLct); output.endStructure_24f42q$(this.descriptor); }; SiteTerms$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return SiteTerms_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, null); }; SiteTerms$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer]; }; SiteTerms$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var SiteTerms$$serializer_instance = null; function SiteTerms$$serializer_getInstance() { if (SiteTerms$$serializer_instance === null) { new SiteTerms$$serializer(); } return SiteTerms$$serializer_instance; } function SiteTerms_init(seen1, sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(SiteTerms.prototype); if ((seen1 & 1) === 0) $this.sTermsUid = L0; else $this.sTermsUid = sTermsUid; if ((seen1 & 2) === 0) $this.termsHtml = null; else $this.termsHtml = termsHtml; if ((seen1 & 4) === 0) $this.sTermsLang = null; else $this.sTermsLang = sTermsLang; if ((seen1 & 8) === 0) $this.sTermsLangUid = L0; else $this.sTermsLangUid = sTermsLangUid; if ((seen1 & 16) === 0) $this.sTermsActive = true; else $this.sTermsActive = sTermsActive; if ((seen1 & 32) === 0) $this.sTermsLastChangedBy = 0; else $this.sTermsLastChangedBy = sTermsLastChangedBy; if ((seen1 & 64) === 0) $this.sTermsPrimaryCsn = L0; else $this.sTermsPrimaryCsn = sTermsPrimaryCsn; if ((seen1 & 128) === 0) $this.sTermsLocalCsn = L0; else $this.sTermsLocalCsn = sTermsLocalCsn; if ((seen1 & 256) === 0) $this.sTermsLct = L0; else $this.sTermsLct = sTermsLct; return $this; } SiteTerms.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteTerms', interfaces: []}; var SiteTermsReplicate$Companion_instance = null; function SiteTermsReplicate$$serializer() { this.descriptor_jmifn0$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.SiteTermsReplicate', this, 4); this.descriptor.addElement_ivxn3r$('stPk', true); this.descriptor.addElement_ivxn3r$('stVersionId', true); this.descriptor.addElement_ivxn3r$('stDestination', true); this.descriptor.addElement_ivxn3r$('stPending', true); SiteTermsReplicate$$serializer_instance = this; } var SiteTermsReplicate$$serializer_instance = null; function SiteTermsWithLanguage() { SiteTermsWithLanguage$Companion_getInstance(); SiteTerms.call(this); this.stLanguage = null; } function SiteTermsWithLanguage$Companion() { SiteTermsWithLanguage$Companion_instance = this; } SiteTermsWithLanguage$Companion.prototype.serializer = function () { return SiteTermsWithLanguage$$serializer_getInstance(); }; SiteTermsWithLanguage$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var SiteTermsWithLanguage$Companion_instance = null; function SiteTermsWithLanguage$Companion_getInstance() { if (SiteTermsWithLanguage$Companion_instance === null) { new SiteTermsWithLanguage$Companion(); } return SiteTermsWithLanguage$Companion_instance; } function SiteTermsWithLanguage$$serializer() { this.descriptor_42vesj$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.SiteTermsWithLanguage', this, 10); this.descriptor.addElement_ivxn3r$('sTermsUid', true); this.descriptor.addElement_ivxn3r$('termsHtml', true); this.descriptor.addElement_ivxn3r$('sTermsLang', true); this.descriptor.addElement_ivxn3r$('sTermsLangUid', true); this.descriptor.addElement_ivxn3r$('sTermsActive', true); this.descriptor.addElement_ivxn3r$('sTermsLastChangedBy', true); this.descriptor.addElement_ivxn3r$('sTermsPrimaryCsn', true); this.descriptor.addElement_ivxn3r$('sTermsLocalCsn', true); this.descriptor.addElement_ivxn3r$('sTermsLct', true); this.descriptor.addElement_ivxn3r$('stLanguage', true); SiteTermsWithLanguage$$serializer_instance = this; } Object.defineProperty(SiteTermsWithLanguage$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_42vesj$_0; }}); SiteTermsWithLanguage$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.sTermsUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.sTermsUid); if (!equals(value.termsHtml, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.termsHtml); if (!equals(value.sTermsLang, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.sTermsLang); if (!equals(value.sTermsLangUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.sTermsLangUid); if (!equals(value.sTermsActive, true) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.sTermsActive); if (!equals(value.sTermsLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.sTermsLastChangedBy); if (!equals(value.sTermsPrimaryCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.sTermsPrimaryCsn); if (!equals(value.sTermsLocalCsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.sTermsLocalCsn); if (!equals(value.sTermsLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.sTermsLct); if (!equals(value.stLanguage, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 9, Language$$serializer_getInstance(), value.stLanguage); output.endStructure_24f42q$(this.descriptor); }; SiteTermsWithLanguage$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 9, Language$$serializer_getInstance(), local9); bitMask0 |= 512; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return SiteTermsWithLanguage_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, null); }; SiteTermsWithLanguage$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.BooleanSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(Language$$serializer_getInstance())]; }; SiteTermsWithLanguage$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var SiteTermsWithLanguage$$serializer_instance = null; function SiteTermsWithLanguage$$serializer_getInstance() { if (SiteTermsWithLanguage$$serializer_instance === null) { new SiteTermsWithLanguage$$serializer(); } return SiteTermsWithLanguage$$serializer_instance; } function SiteTermsWithLanguage_init(seen1, sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct, stLanguage, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(SiteTermsWithLanguage.prototype); $this = SiteTerms_init(seen1, sTermsUid, termsHtml, sTermsLang, sTermsLangUid, sTermsActive, sTermsLastChangedBy, sTermsPrimaryCsn, sTermsLocalCsn, sTermsLct, $this); if ((seen1 & 512) === 0) $this.stLanguage = null; else $this.stLanguage = stLanguage; return $this; } SiteTermsWithLanguage.$metadata$ = {kind: Kind_CLASS, simpleName: 'SiteTermsWithLanguage', interfaces: [SiteTerms]}; function StateContentEntity() { StateContentEntity$Companion_getInstance(); this.stateContentUid = L0; this.stateContentStateUid = L0; this.stateContentKey = null; this.stateContentValue = null; this.isIsactive = false; this.stateContentMasterChangeSeqNum = L0; this.stateContentLocalChangeSeqNum = L0; this.stateContentLastChangedBy = 0; this.stateContentLct = L0; } StateContentEntity.prototype.equals = function (o) { var tmp$, tmp$_0; if (this === o) return true; if (o == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(o)) : null)) return false; var that = (tmp$_0 = o) == null || Kotlin.isType(tmp$_0, StateContentEntity) ? tmp$_0 : throwCCE(); if (!equals(this.stateContentUid, ensureNotNull(that).stateContentUid)) return false; if (!equals(this.stateContentStateUid, that.stateContentStateUid)) return false; if (this.isIsactive !== that.isIsactive) return false; return !equals(this.stateContentKey, that.stateContentKey) ? false : equals(this.stateContentValue, that.stateContentValue); }; StateContentEntity.prototype.hashCode = function () { var result = this.stateContentUid.xor(this.stateContentUid.shiftRightUnsigned(32)).toInt(); result = (31 * result | 0) + this.stateContentStateUid.xor(this.stateContentStateUid.shiftRightUnsigned(32)).toInt() | 0; result = (31 * result | 0) + (this.stateContentKey != null ? hashCode(ensureNotNull(this.stateContentKey)) : 0) | 0; result = (31 * result | 0) + (this.stateContentValue != null ? hashCode(ensureNotNull(this.stateContentValue)) : 0) | 0; result = (31 * result | 0) + (this.isIsactive ? 1 : 0) | 0; return result; }; function StateContentEntity$Companion() { StateContentEntity$Companion_instance = this; this.TABLE_ID = 72; } StateContentEntity$Companion.prototype.serializer = function () { return StateContentEntity$$serializer_getInstance(); }; StateContentEntity$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var StateContentEntity$Companion_instance = null; function StateContentEntity$Companion_getInstance() { if (StateContentEntity$Companion_instance === null) { new StateContentEntity$Companion(); } return StateContentEntity$Companion_instance; } function StateContentEntity$$serializer() { this.descriptor_xwmc1i$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.StateContentEntity', this, 9); this.descriptor.addElement_ivxn3r$('stateContentUid', true); this.descriptor.addElement_ivxn3r$('stateContentStateUid', true); this.descriptor.addElement_ivxn3r$('stateContentKey', true); this.descriptor.addElement_ivxn3r$('stateContentValue', true); this.descriptor.addElement_ivxn3r$('isIsactive', true); this.descriptor.addElement_ivxn3r$('stateContentMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('stateContentLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('stateContentLastChangedBy', true); this.descriptor.addElement_ivxn3r$('stateContentLct', true); StateContentEntity$$serializer_instance = this; } Object.defineProperty(StateContentEntity$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_xwmc1i$_0; }}); StateContentEntity$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.stateContentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.stateContentUid); if (!equals(value.stateContentStateUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.stateContentStateUid); if (!equals(value.stateContentKey, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.stateContentKey); if (!equals(value.stateContentValue, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.stateContentValue); if (!equals(value.isIsactive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 4, value.isIsactive); if (!equals(value.stateContentMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.stateContentMasterChangeSeqNum); if (!equals(value.stateContentLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.stateContentLocalChangeSeqNum); if (!equals(value.stateContentLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.stateContentLastChangedBy); if (!equals(value.stateContentLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.stateContentLct); output.endStructure_24f42q$(this.descriptor); }; StateContentEntity$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeBooleanElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return StateContentEntity_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, null); }; StateContentEntity$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; StateContentEntity$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var StateContentEntity$$serializer_instance = null; function StateContentEntity$$serializer_getInstance() { if (StateContentEntity$$serializer_instance === null) { new StateContentEntity$$serializer(); } return StateContentEntity$$serializer_instance; } function StateContentEntity_init(seen1, stateContentUid, stateContentStateUid, stateContentKey, stateContentValue, isIsactive, stateContentMasterChangeSeqNum, stateContentLocalChangeSeqNum, stateContentLastChangedBy, stateContentLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(StateContentEntity.prototype); if ((seen1 & 1) === 0) $this.stateContentUid = L0; else $this.stateContentUid = stateContentUid; if ((seen1 & 2) === 0) $this.stateContentStateUid = L0; else $this.stateContentStateUid = stateContentStateUid; if ((seen1 & 4) === 0) $this.stateContentKey = null; else $this.stateContentKey = stateContentKey; if ((seen1 & 8) === 0) $this.stateContentValue = null; else $this.stateContentValue = stateContentValue; if ((seen1 & 16) === 0) $this.isIsactive = false; else $this.isIsactive = isIsactive; if ((seen1 & 32) === 0) $this.stateContentMasterChangeSeqNum = L0; else $this.stateContentMasterChangeSeqNum = stateContentMasterChangeSeqNum; if ((seen1 & 64) === 0) $this.stateContentLocalChangeSeqNum = L0; else $this.stateContentLocalChangeSeqNum = stateContentLocalChangeSeqNum; if ((seen1 & 128) === 0) $this.stateContentLastChangedBy = 0; else $this.stateContentLastChangedBy = stateContentLastChangedBy; if ((seen1 & 256) === 0) $this.stateContentLct = L0; else $this.stateContentLct = stateContentLct; return $this; } StateContentEntity.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateContentEntity', interfaces: []}; function StateContentEntity_init_1($this) { $this = $this || Object.create(StateContentEntity.prototype); StateContentEntity.call($this); return $this; } var StateContentEntityReplicate$Companion_instance = null; function StateContentEntityReplicate$$serializer() { this.descriptor_b7w66b$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.StateContentEntityReplicate', this, 4); this.descriptor.addElement_ivxn3r$('scePk', true); this.descriptor.addElement_ivxn3r$('sceVersionId', true); this.descriptor.addElement_ivxn3r$('sceDestination', true); this.descriptor.addElement_ivxn3r$('scePending', true); StateContentEntityReplicate$$serializer_instance = this; } var StateContentEntityReplicate$$serializer_instance = null; function StateEntity() { StateEntity$Companion_getInstance(); this.stateUid = L0; this.stateId = null; this.agentUid = L0; this.activityId = null; this.registration = null; this.isIsactive = false; this.timestamp = L0; this.stateMasterChangeSeqNum = L0; this.stateLocalChangeSeqNum = L0; this.stateLastChangedBy = 0; this.stateLct = L0; } StateEntity.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; var that = (tmp$_0 = other) == null || Kotlin.isType(tmp$_0, StateEntity) ? tmp$_0 : throwCCE(); if (!equals(this.stateUid, ensureNotNull(that).stateUid)) return false; if (!equals(this.agentUid, that.agentUid)) return false; if (this.isIsactive !== that.isIsactive) return false; if (!equals(this.stateId, that.stateId)) return false; return !equals(this.activityId, that.activityId) ? false : equals(this.registration, that.registration); }; StateEntity.prototype.hashCode = function () { var result = this.stateUid.xor(this.stateUid.shiftRightUnsigned(32)).toInt(); result = (31 * result | 0) + (this.stateId != null ? hashCode(ensureNotNull(this.stateId)) : 0) | 0; result = (31 * result | 0) + this.agentUid.xor(this.agentUid.shiftRightUnsigned(32)).toInt() | 0; result = (31 * result | 0) + (this.activityId != null ? hashCode(ensureNotNull(this.activityId)) : 0) | 0; result = (31 * result | 0) + (this.registration != null ? hashCode(ensureNotNull(this.registration)) : 0) | 0; result = (31 * result | 0) + (this.isIsactive ? 1 : 0) | 0; return result; }; function StateEntity$Companion() { StateEntity$Companion_instance = this; this.TABLE_ID = 70; } StateEntity$Companion.prototype.serializer = function () { return StateEntity$$serializer_getInstance(); }; StateEntity$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var StateEntity$Companion_instance = null; function StateEntity$Companion_getInstance() { if (StateEntity$Companion_instance === null) { new StateEntity$Companion(); } return StateEntity$Companion_instance; } function StateEntity$$serializer() { this.descriptor_2jcb83$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.StateEntity', this, 11); this.descriptor.addElement_ivxn3r$('stateUid', true); this.descriptor.addElement_ivxn3r$('stateId', true); this.descriptor.addElement_ivxn3r$('agentUid', true); this.descriptor.addElement_ivxn3r$('activityId', true); this.descriptor.addElement_ivxn3r$('registration', true); this.descriptor.addElement_ivxn3r$('isIsactive', true); this.descriptor.addElement_ivxn3r$('timestamp', true); this.descriptor.addElement_ivxn3r$('stateMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('stateLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('stateLastChangedBy', true); this.descriptor.addElement_ivxn3r$('stateLct', true); StateEntity$$serializer_instance = this; } Object.defineProperty(StateEntity$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_2jcb83$_0; }}); StateEntity$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.stateUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.stateUid); if (!equals(value.stateId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.stateId); if (!equals(value.agentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.agentUid); if (!equals(value.activityId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.activityId); if (!equals(value.registration, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.registration); if (!equals(value.isIsactive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 5, value.isIsactive); if (!equals(value.timestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.timestamp); if (!equals(value.stateMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.stateMasterChangeSeqNum); if (!equals(value.stateLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.stateLocalChangeSeqNum); if (!equals(value.stateLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.stateLastChangedBy); if (!equals(value.stateLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.stateLct); output.endStructure_24f42q$(this.descriptor); }; StateEntity$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeBooleanElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return StateEntity_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, null); }; StateEntity$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; StateEntity$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var StateEntity$$serializer_instance = null; function StateEntity$$serializer_getInstance() { if (StateEntity$$serializer_instance === null) { new StateEntity$$serializer(); } return StateEntity$$serializer_instance; } function StateEntity_init(seen1, stateUid, stateId, agentUid, activityId, registration, isIsactive, timestamp, stateMasterChangeSeqNum, stateLocalChangeSeqNum, stateLastChangedBy, stateLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(StateEntity.prototype); if ((seen1 & 1) === 0) $this.stateUid = L0; else $this.stateUid = stateUid; if ((seen1 & 2) === 0) $this.stateId = null; else $this.stateId = stateId; if ((seen1 & 4) === 0) $this.agentUid = L0; else $this.agentUid = agentUid; if ((seen1 & 8) === 0) $this.activityId = null; else $this.activityId = activityId; if ((seen1 & 16) === 0) $this.registration = null; else $this.registration = registration; if ((seen1 & 32) === 0) $this.isIsactive = false; else $this.isIsactive = isIsactive; if ((seen1 & 64) === 0) $this.timestamp = L0; else $this.timestamp = timestamp; if ((seen1 & 128) === 0) $this.stateMasterChangeSeqNum = L0; else $this.stateMasterChangeSeqNum = stateMasterChangeSeqNum; if ((seen1 & 256) === 0) $this.stateLocalChangeSeqNum = L0; else $this.stateLocalChangeSeqNum = stateLocalChangeSeqNum; if ((seen1 & 512) === 0) $this.stateLastChangedBy = 0; else $this.stateLastChangedBy = stateLastChangedBy; if ((seen1 & 1024) === 0) $this.stateLct = L0; else $this.stateLct = stateLct; return $this; } StateEntity.$metadata$ = {kind: Kind_CLASS, simpleName: 'StateEntity', interfaces: []}; var StateEntityReplicate$Companion_instance = null; function StateEntityReplicate$$serializer() { this.descriptor_6osrgg$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.StateEntityReplicate', this, 4); this.descriptor.addElement_ivxn3r$('sePk', true); this.descriptor.addElement_ivxn3r$('seVersionId', true); this.descriptor.addElement_ivxn3r$('seDestination', true); this.descriptor.addElement_ivxn3r$('sePending', true); StateEntityReplicate$$serializer_instance = this; } var StateEntityReplicate$$serializer_instance = null; function StatementEntity() { StatementEntity$Companion_getInstance(); this.statementUid = L0; this.statementId = null; this.statementPersonUid = L0; this.statementVerbUid = L0; this.xObjectUid = L0; this.subStatementActorUid = L0; this.substatementVerbUid = L0; this.subStatementObjectUid = L0; this.agentUid = L0; this.instructorUid = L0; this.authorityUid = L0; this.teamUid = L0; this.resultCompletion = false; this.resultSuccess = StatementEntity$Companion_getInstance().RESULT_UNSET; this.resultScoreScaled = 0.0; this.resultScoreRaw = L0; this.resultScoreMin = L0; this.resultScoreMax = L0; this.resultDuration = L0; this.resultResponse = null; this.timestamp = L0; this.stored = L0; this.contextRegistration = null; this.contextPlatform = null; this.contextStatementId = null; this.fullStatement = null; this.statementMasterChangeSeqNum = L0; this.statementLocalChangeSeqNum = L0; this.statementLastChangedBy = 0; this.statementLct = L0; this.extensionProgress = 0; this.contentEntryRoot = false; this.statementContentEntryUid = L0; this.statementLearnerGroupUid = L0; this.statementClazzUid = L0; } function StatementEntity$Companion() { StatementEntity$Companion_instance = this; this.TABLE_ID = 60; this.RESULT_UNSET = toByte(0); this.RESULT_SUCCESS = toByte(2); this.RESULT_FAILURE = toByte(1); this.CONTENT_COMPLETE = 100; this.CONTENT_INCOMPLETE = 101; this.CONTENT_PASSED = 102; this.CONTENT_FAILED = 103; this.FROM_STATEMENT_TO_SCOPEDGRANT_JOIN_ON_CLAUSE = '\n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 9\n AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n OR (ScopedGrant.sgTableId = 6\n AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n OR (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid = (\n SELECT clazzSchoolUid\n FROM Clazz\n WHERE clazzUid = StatementEntity.statementClazzUid))\n )\n '; this.FROM_SCOPEDGRANT_TO_STATEMENT_JOIN_ON_CLAUSE = '\n ((ScopedGrant.sgTableId = -2\n AND ScopedGrant.sgEntityUid = -2)\n OR (ScopedGrant.sgTableId = 9\n AND ScopedGrant.sgEntityUid = StatementEntity.statementPersonUid)\n OR (ScopedGrant.sgTableId = 6\n AND ScopedGrant.sgEntityUid = StatementEntity.statementClazzUid)\n OR (ScopedGrant.sgTableId = 164\n AND ScopedGrant.sgEntityUid = (\n SELECT clazzSchoolUid\n FROM Clazz \n WHERE clazzUid = StatementEntity.statementClazzUid))\n ) \n '; } StatementEntity$Companion.prototype.serializer = function () { return StatementEntity$$serializer_getInstance(); }; StatementEntity$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var StatementEntity$Companion_instance = null; function StatementEntity$Companion_getInstance() { if (StatementEntity$Companion_instance === null) { new StatementEntity$Companion(); } return StatementEntity$Companion_instance; } function StatementEntity$$serializer() { this.descriptor_gako9b$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.StatementEntity', this, 35); this.descriptor.addElement_ivxn3r$('statementUid', true); this.descriptor.addElement_ivxn3r$('statementId', true); this.descriptor.addElement_ivxn3r$('statementPersonUid', true); this.descriptor.addElement_ivxn3r$('statementVerbUid', true); this.descriptor.addElement_ivxn3r$('xObjectUid', true); this.descriptor.addElement_ivxn3r$('subStatementActorUid', true); this.descriptor.addElement_ivxn3r$('substatementVerbUid', true); this.descriptor.addElement_ivxn3r$('subStatementObjectUid', true); this.descriptor.addElement_ivxn3r$('agentUid', true); this.descriptor.addElement_ivxn3r$('instructorUid', true); this.descriptor.addElement_ivxn3r$('authorityUid', true); this.descriptor.addElement_ivxn3r$('teamUid', true); this.descriptor.addElement_ivxn3r$('resultCompletion', true); this.descriptor.addElement_ivxn3r$('resultSuccess', true); this.descriptor.addElement_ivxn3r$('resultScoreScaled', true); this.descriptor.addElement_ivxn3r$('resultScoreRaw', true); this.descriptor.addElement_ivxn3r$('resultScoreMin', true); this.descriptor.addElement_ivxn3r$('resultScoreMax', true); this.descriptor.addElement_ivxn3r$('resultDuration', true); this.descriptor.addElement_ivxn3r$('resultResponse', true); this.descriptor.addElement_ivxn3r$('timestamp', true); this.descriptor.addElement_ivxn3r$('stored', true); this.descriptor.addElement_ivxn3r$('contextRegistration', true); this.descriptor.addElement_ivxn3r$('contextPlatform', true); this.descriptor.addElement_ivxn3r$('contextStatementId', true); this.descriptor.addElement_ivxn3r$('fullStatement', true); this.descriptor.addElement_ivxn3r$('statementMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('statementLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('statementLastChangedBy', true); this.descriptor.addElement_ivxn3r$('statementLct', true); this.descriptor.addElement_ivxn3r$('extensionProgress', true); this.descriptor.addElement_ivxn3r$('contentEntryRoot', true); this.descriptor.addElement_ivxn3r$('statementContentEntryUid', true); this.descriptor.addElement_ivxn3r$('statementLearnerGroupUid', true); this.descriptor.addElement_ivxn3r$('statementClazzUid', true); StatementEntity$$serializer_instance = this; } Object.defineProperty(StatementEntity$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_gako9b$_0; }}); StatementEntity$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.statementUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.statementUid); if (!equals(value.statementId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.statementId); if (!equals(value.statementPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.statementPersonUid); if (!equals(value.statementVerbUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.statementVerbUid); if (!equals(value.xObjectUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.xObjectUid); if (!equals(value.subStatementActorUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.subStatementActorUid); if (!equals(value.substatementVerbUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.substatementVerbUid); if (!equals(value.subStatementObjectUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.subStatementObjectUid); if (!equals(value.agentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.agentUid); if (!equals(value.instructorUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.instructorUid); if (!equals(value.authorityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.authorityUid); if (!equals(value.teamUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.teamUid); if (!equals(value.resultCompletion, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 12, value.resultCompletion); if (!equals(value.resultSuccess, StatementEntity$Companion_getInstance().RESULT_UNSET) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeByteElement_j0u8y3$(this.descriptor, 13, value.resultSuccess); if (!equals(value.resultScoreScaled, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeFloatElement_lf6hpt$(this.descriptor, 14, value.resultScoreScaled); if (!equals(value.resultScoreRaw, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeLongElement_j0o2mv$(this.descriptor, 15, value.resultScoreRaw); if (!equals(value.resultScoreMin, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeLongElement_j0o2mv$(this.descriptor, 16, value.resultScoreMin); if (!equals(value.resultScoreMax, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.resultScoreMax); if (!equals(value.resultDuration, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.resultDuration); if (!equals(value.resultResponse, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 19, internal.StringSerializer, value.resultResponse); if (!equals(value.timestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeLongElement_j0o2mv$(this.descriptor, 20, value.timestamp); if (!equals(value.stored, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.stored); if (!equals(value.contextRegistration, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 22, internal.StringSerializer, value.contextRegistration); if (!equals(value.contextPlatform, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 23, internal.StringSerializer, value.contextPlatform); if (!equals(value.contextStatementId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 24, internal.StringSerializer, value.contextStatementId); if (!equals(value.fullStatement, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 25, internal.StringSerializer, value.fullStatement); if (!equals(value.statementMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 26)) output.encodeLongElement_j0o2mv$(this.descriptor, 26, value.statementMasterChangeSeqNum); if (!equals(value.statementLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 27)) output.encodeLongElement_j0o2mv$(this.descriptor, 27, value.statementLocalChangeSeqNum); if (!equals(value.statementLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 28)) output.encodeIntElement_ptg7oe$(this.descriptor, 28, value.statementLastChangedBy); if (!equals(value.statementLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 29)) output.encodeLongElement_j0o2mv$(this.descriptor, 29, value.statementLct); if (!equals(value.extensionProgress, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 30)) output.encodeIntElement_ptg7oe$(this.descriptor, 30, value.extensionProgress); if (!equals(value.contentEntryRoot, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 31)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 31, value.contentEntryRoot); if (!equals(value.statementContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 32)) output.encodeLongElement_j0o2mv$(this.descriptor, 32, value.statementContentEntryUid); if (!equals(value.statementLearnerGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 33)) output.encodeLongElement_j0o2mv$(this.descriptor, 33, value.statementLearnerGroupUid); if (!equals(value.statementClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 34)) output.encodeLongElement_j0o2mv$(this.descriptor, 34, value.statementClazzUid); output.endStructure_24f42q$(this.descriptor); }; StatementEntity$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0, bitMask1 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, local28, local29, local30, local31, local32, local33, local34; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeBooleanElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeByteElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeFloatElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeLongElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeLongElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 19, internal.StringSerializer, local19); bitMask0 |= 524288; break; case 20: local20 = input.decodeLongElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 22, internal.StringSerializer, local22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 23, internal.StringSerializer, local23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 24, internal.StringSerializer, local24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 25, internal.StringSerializer, local25); bitMask0 |= 33554432; break; case 26: local26 = input.decodeLongElement_szpzho$(this.descriptor, 26); bitMask0 |= 67108864; break; case 27: local27 = input.decodeLongElement_szpzho$(this.descriptor, 27); bitMask0 |= 134217728; break; case 28: local28 = input.decodeIntElement_szpzho$(this.descriptor, 28); bitMask0 |= 268435456; break; case 29: local29 = input.decodeLongElement_szpzho$(this.descriptor, 29); bitMask0 |= 536870912; break; case 30: local30 = input.decodeIntElement_szpzho$(this.descriptor, 30); bitMask0 |= 1073741824; break; case 31: local31 = input.decodeBooleanElement_szpzho$(this.descriptor, 31); bitMask0 |= -2147483648; break; case 32: local32 = input.decodeLongElement_szpzho$(this.descriptor, 32); bitMask1 |= 1; break; case 33: local33 = input.decodeLongElement_szpzho$(this.descriptor, 33); bitMask1 |= 2; break; case 34: local34 = input.decodeLongElement_szpzho$(this.descriptor, 34); bitMask1 |= 4; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return StatementEntity_init(bitMask0, bitMask1, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, local28, local29, local30, local31, local32, local33, local34, null); }; StatementEntity$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.ByteSerializer, internal.FloatSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer]; }; StatementEntity$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var StatementEntity$$serializer_instance = null; function StatementEntity$$serializer_getInstance() { if (StatementEntity$$serializer_instance === null) { new StatementEntity$$serializer(); } return StatementEntity$$serializer_instance; } function StatementEntity_init(seen1, seen2, statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(StatementEntity.prototype); if ((seen1 & 1) === 0) $this.statementUid = L0; else $this.statementUid = statementUid; if ((seen1 & 2) === 0) $this.statementId = null; else $this.statementId = statementId; if ((seen1 & 4) === 0) $this.statementPersonUid = L0; else $this.statementPersonUid = statementPersonUid; if ((seen1 & 8) === 0) $this.statementVerbUid = L0; else $this.statementVerbUid = statementVerbUid; if ((seen1 & 16) === 0) $this.xObjectUid = L0; else $this.xObjectUid = xObjectUid; if ((seen1 & 32) === 0) $this.subStatementActorUid = L0; else $this.subStatementActorUid = subStatementActorUid; if ((seen1 & 64) === 0) $this.substatementVerbUid = L0; else $this.substatementVerbUid = substatementVerbUid; if ((seen1 & 128) === 0) $this.subStatementObjectUid = L0; else $this.subStatementObjectUid = subStatementObjectUid; if ((seen1 & 256) === 0) $this.agentUid = L0; else $this.agentUid = agentUid; if ((seen1 & 512) === 0) $this.instructorUid = L0; else $this.instructorUid = instructorUid; if ((seen1 & 1024) === 0) $this.authorityUid = L0; else $this.authorityUid = authorityUid; if ((seen1 & 2048) === 0) $this.teamUid = L0; else $this.teamUid = teamUid; if ((seen1 & 4096) === 0) $this.resultCompletion = false; else $this.resultCompletion = resultCompletion; if ((seen1 & 8192) === 0) $this.resultSuccess = StatementEntity$Companion_getInstance().RESULT_UNSET; else $this.resultSuccess = resultSuccess; if ((seen1 & 16384) === 0) $this.resultScoreScaled = 0.0; else $this.resultScoreScaled = resultScoreScaled; if ((seen1 & 32768) === 0) $this.resultScoreRaw = L0; else $this.resultScoreRaw = resultScoreRaw; if ((seen1 & 65536) === 0) $this.resultScoreMin = L0; else $this.resultScoreMin = resultScoreMin; if ((seen1 & 131072) === 0) $this.resultScoreMax = L0; else $this.resultScoreMax = resultScoreMax; if ((seen1 & 262144) === 0) $this.resultDuration = L0; else $this.resultDuration = resultDuration; if ((seen1 & 524288) === 0) $this.resultResponse = null; else $this.resultResponse = resultResponse; if ((seen1 & 1048576) === 0) $this.timestamp = L0; else $this.timestamp = timestamp; if ((seen1 & 2097152) === 0) $this.stored = L0; else $this.stored = stored; if ((seen1 & 4194304) === 0) $this.contextRegistration = null; else $this.contextRegistration = contextRegistration; if ((seen1 & 8388608) === 0) $this.contextPlatform = null; else $this.contextPlatform = contextPlatform; if ((seen1 & 16777216) === 0) $this.contextStatementId = null; else $this.contextStatementId = contextStatementId; if ((seen1 & 33554432) === 0) $this.fullStatement = null; else $this.fullStatement = fullStatement; if ((seen1 & 67108864) === 0) $this.statementMasterChangeSeqNum = L0; else $this.statementMasterChangeSeqNum = statementMasterChangeSeqNum; if ((seen1 & 134217728) === 0) $this.statementLocalChangeSeqNum = L0; else $this.statementLocalChangeSeqNum = statementLocalChangeSeqNum; if ((seen1 & 268435456) === 0) $this.statementLastChangedBy = 0; else $this.statementLastChangedBy = statementLastChangedBy; if ((seen1 & 536870912) === 0) $this.statementLct = L0; else $this.statementLct = statementLct; if ((seen1 & 1073741824) === 0) $this.extensionProgress = 0; else $this.extensionProgress = extensionProgress; if ((seen1 & -2147483648) === 0) $this.contentEntryRoot = false; else $this.contentEntryRoot = contentEntryRoot; if ((seen2 & 1) === 0) $this.statementContentEntryUid = L0; else $this.statementContentEntryUid = statementContentEntryUid; if ((seen2 & 2) === 0) $this.statementLearnerGroupUid = L0; else $this.statementLearnerGroupUid = statementLearnerGroupUid; if ((seen2 & 4) === 0) $this.statementClazzUid = L0; else $this.statementClazzUid = statementClazzUid; return $this; } StatementEntity.$metadata$ = {kind: Kind_CLASS, simpleName: 'StatementEntity', interfaces: []}; var StatementEntityReplicate$Companion_instance = null; function StatementEntityReplicate$$serializer() { this.descriptor_4l4fby$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.StatementEntityReplicate', this, 4); this.descriptor.addElement_ivxn3r$('sePk', true); this.descriptor.addElement_ivxn3r$('seVersionId', true); this.descriptor.addElement_ivxn3r$('seDestination', true); this.descriptor.addElement_ivxn3r$('sePending', true); StatementEntityReplicate$$serializer_instance = this; } var StatementEntityReplicate$$serializer_instance = null; function StatementEntityWithDisplayDetails() { StatementEntityWithDisplayDetails$Companion_getInstance(); StatementEntity.call(this); this.person = null; this.xlangMapEntry = null; } StatementEntityWithDisplayDetails.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, StatementEntityWithDisplayDetails) ? tmp$_0 : throwCCE(); if (!equals(this.person, other.person)) return false; if (!equals(this.xlangMapEntry, other.xlangMapEntry)) return false; return true; }; StatementEntityWithDisplayDetails.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2; var result = (tmp$_0 = (tmp$ = this.person) != null ? tmp$.hashCode() : null) != null ? tmp$_0 : 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.xlangMapEntry) != null ? tmp$_1.hashCode() : null) != null ? tmp$_2 : 0) | 0; return result; }; function StatementEntityWithDisplayDetails$Companion() { StatementEntityWithDisplayDetails$Companion_instance = this; } StatementEntityWithDisplayDetails$Companion.prototype.serializer = function () { return StatementEntityWithDisplayDetails$$serializer_getInstance(); }; StatementEntityWithDisplayDetails$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var StatementEntityWithDisplayDetails$Companion_instance = null; function StatementEntityWithDisplayDetails$Companion_getInstance() { if (StatementEntityWithDisplayDetails$Companion_instance === null) { new StatementEntityWithDisplayDetails$Companion(); } return StatementEntityWithDisplayDetails$Companion_instance; } function StatementEntityWithDisplayDetails$$serializer() { this.descriptor_vky815$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.StatementEntityWithDisplayDetails', this, 37); this.descriptor.addElement_ivxn3r$('statementUid', true); this.descriptor.addElement_ivxn3r$('statementId', true); this.descriptor.addElement_ivxn3r$('statementPersonUid', true); this.descriptor.addElement_ivxn3r$('statementVerbUid', true); this.descriptor.addElement_ivxn3r$('xObjectUid', true); this.descriptor.addElement_ivxn3r$('subStatementActorUid', true); this.descriptor.addElement_ivxn3r$('substatementVerbUid', true); this.descriptor.addElement_ivxn3r$('subStatementObjectUid', true); this.descriptor.addElement_ivxn3r$('agentUid', true); this.descriptor.addElement_ivxn3r$('instructorUid', true); this.descriptor.addElement_ivxn3r$('authorityUid', true); this.descriptor.addElement_ivxn3r$('teamUid', true); this.descriptor.addElement_ivxn3r$('resultCompletion', true); this.descriptor.addElement_ivxn3r$('resultSuccess', true); this.descriptor.addElement_ivxn3r$('resultScoreScaled', true); this.descriptor.addElement_ivxn3r$('resultScoreRaw', true); this.descriptor.addElement_ivxn3r$('resultScoreMin', true); this.descriptor.addElement_ivxn3r$('resultScoreMax', true); this.descriptor.addElement_ivxn3r$('resultDuration', true); this.descriptor.addElement_ivxn3r$('resultResponse', true); this.descriptor.addElement_ivxn3r$('timestamp', true); this.descriptor.addElement_ivxn3r$('stored', true); this.descriptor.addElement_ivxn3r$('contextRegistration', true); this.descriptor.addElement_ivxn3r$('contextPlatform', true); this.descriptor.addElement_ivxn3r$('contextStatementId', true); this.descriptor.addElement_ivxn3r$('fullStatement', true); this.descriptor.addElement_ivxn3r$('statementMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('statementLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('statementLastChangedBy', true); this.descriptor.addElement_ivxn3r$('statementLct', true); this.descriptor.addElement_ivxn3r$('extensionProgress', true); this.descriptor.addElement_ivxn3r$('contentEntryRoot', true); this.descriptor.addElement_ivxn3r$('statementContentEntryUid', true); this.descriptor.addElement_ivxn3r$('statementLearnerGroupUid', true); this.descriptor.addElement_ivxn3r$('statementClazzUid', true); this.descriptor.addElement_ivxn3r$('person', true); this.descriptor.addElement_ivxn3r$('xlangMapEntry', true); StatementEntityWithDisplayDetails$$serializer_instance = this; } Object.defineProperty(StatementEntityWithDisplayDetails$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_vky815$_0; }}); StatementEntityWithDisplayDetails$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.statementUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.statementUid); if (!equals(value.statementId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.statementId); if (!equals(value.statementPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.statementPersonUid); if (!equals(value.statementVerbUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.statementVerbUid); if (!equals(value.xObjectUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.xObjectUid); if (!equals(value.subStatementActorUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.subStatementActorUid); if (!equals(value.substatementVerbUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.substatementVerbUid); if (!equals(value.subStatementObjectUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.subStatementObjectUid); if (!equals(value.agentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.agentUid); if (!equals(value.instructorUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.instructorUid); if (!equals(value.authorityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.authorityUid); if (!equals(value.teamUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.teamUid); if (!equals(value.resultCompletion, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 12, value.resultCompletion); if (!equals(value.resultSuccess, StatementEntity$Companion_getInstance().RESULT_UNSET) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeByteElement_j0u8y3$(this.descriptor, 13, value.resultSuccess); if (!equals(value.resultScoreScaled, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeFloatElement_lf6hpt$(this.descriptor, 14, value.resultScoreScaled); if (!equals(value.resultScoreRaw, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeLongElement_j0o2mv$(this.descriptor, 15, value.resultScoreRaw); if (!equals(value.resultScoreMin, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeLongElement_j0o2mv$(this.descriptor, 16, value.resultScoreMin); if (!equals(value.resultScoreMax, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.resultScoreMax); if (!equals(value.resultDuration, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.resultDuration); if (!equals(value.resultResponse, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 19, internal.StringSerializer, value.resultResponse); if (!equals(value.timestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeLongElement_j0o2mv$(this.descriptor, 20, value.timestamp); if (!equals(value.stored, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.stored); if (!equals(value.contextRegistration, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 22, internal.StringSerializer, value.contextRegistration); if (!equals(value.contextPlatform, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 23, internal.StringSerializer, value.contextPlatform); if (!equals(value.contextStatementId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 24, internal.StringSerializer, value.contextStatementId); if (!equals(value.fullStatement, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 25, internal.StringSerializer, value.fullStatement); if (!equals(value.statementMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 26)) output.encodeLongElement_j0o2mv$(this.descriptor, 26, value.statementMasterChangeSeqNum); if (!equals(value.statementLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 27)) output.encodeLongElement_j0o2mv$(this.descriptor, 27, value.statementLocalChangeSeqNum); if (!equals(value.statementLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 28)) output.encodeIntElement_ptg7oe$(this.descriptor, 28, value.statementLastChangedBy); if (!equals(value.statementLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 29)) output.encodeLongElement_j0o2mv$(this.descriptor, 29, value.statementLct); if (!equals(value.extensionProgress, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 30)) output.encodeIntElement_ptg7oe$(this.descriptor, 30, value.extensionProgress); if (!equals(value.contentEntryRoot, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 31)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 31, value.contentEntryRoot); if (!equals(value.statementContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 32)) output.encodeLongElement_j0o2mv$(this.descriptor, 32, value.statementContentEntryUid); if (!equals(value.statementLearnerGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 33)) output.encodeLongElement_j0o2mv$(this.descriptor, 33, value.statementLearnerGroupUid); if (!equals(value.statementClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 34)) output.encodeLongElement_j0o2mv$(this.descriptor, 34, value.statementClazzUid); if (!equals(value.person, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 35)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 35, Person$$serializer_getInstance(), value.person); if (!equals(value.xlangMapEntry, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 36)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 36, XLangMapEntry$$serializer_getInstance(), value.xlangMapEntry); output.endStructure_24f42q$(this.descriptor); }; StatementEntityWithDisplayDetails$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0, bitMask1 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, local28, local29, local30, local31, local32, local33, local34, local35, local36; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeBooleanElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeByteElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeFloatElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeLongElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeLongElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 19, internal.StringSerializer, local19); bitMask0 |= 524288; break; case 20: local20 = input.decodeLongElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 22, internal.StringSerializer, local22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 23, internal.StringSerializer, local23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 24, internal.StringSerializer, local24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 25, internal.StringSerializer, local25); bitMask0 |= 33554432; break; case 26: local26 = input.decodeLongElement_szpzho$(this.descriptor, 26); bitMask0 |= 67108864; break; case 27: local27 = input.decodeLongElement_szpzho$(this.descriptor, 27); bitMask0 |= 134217728; break; case 28: local28 = input.decodeIntElement_szpzho$(this.descriptor, 28); bitMask0 |= 268435456; break; case 29: local29 = input.decodeLongElement_szpzho$(this.descriptor, 29); bitMask0 |= 536870912; break; case 30: local30 = input.decodeIntElement_szpzho$(this.descriptor, 30); bitMask0 |= 1073741824; break; case 31: local31 = input.decodeBooleanElement_szpzho$(this.descriptor, 31); bitMask0 |= -2147483648; break; case 32: local32 = input.decodeLongElement_szpzho$(this.descriptor, 32); bitMask1 |= 1; break; case 33: local33 = input.decodeLongElement_szpzho$(this.descriptor, 33); bitMask1 |= 2; break; case 34: local34 = input.decodeLongElement_szpzho$(this.descriptor, 34); bitMask1 |= 4; break; case 35: local35 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 35, Person$$serializer_getInstance(), local35); bitMask1 |= 8; break; case 36: local36 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 36, XLangMapEntry$$serializer_getInstance(), local36); bitMask1 |= 16; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return StatementEntityWithDisplayDetails_init(bitMask0, bitMask1, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, local28, local29, local30, local31, local32, local33, local34, local35, local36, null); }; StatementEntityWithDisplayDetails$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.ByteSerializer, internal.FloatSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(Person$$serializer_getInstance()), new NullableSerializer(XLangMapEntry$$serializer_getInstance())]; }; StatementEntityWithDisplayDetails$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var StatementEntityWithDisplayDetails$$serializer_instance = null; function StatementEntityWithDisplayDetails$$serializer_getInstance() { if (StatementEntityWithDisplayDetails$$serializer_instance === null) { new StatementEntityWithDisplayDetails$$serializer(); } return StatementEntityWithDisplayDetails$$serializer_instance; } function StatementEntityWithDisplayDetails_init(seen1, seen2, statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid, person, xlangMapEntry, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(StatementEntityWithDisplayDetails.prototype); $this = StatementEntity_init(seen1, seen2, statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid, $this); if ((seen2 & 8) === 0) $this.person = null; else $this.person = person; if ((seen2 & 16) === 0) $this.xlangMapEntry = null; else $this.xlangMapEntry = xlangMapEntry; return $this; } StatementEntityWithDisplayDetails.$metadata$ = {kind: Kind_CLASS, simpleName: 'StatementEntityWithDisplayDetails', interfaces: [StatementEntity]}; function StatementReportData(yAxis, xAxis, subgroup) { StatementReportData$Companion_getInstance(); if (yAxis === void 0) yAxis = 0.0; if (xAxis === void 0) xAxis = ''; if (subgroup === void 0) subgroup = ''; this.yAxis = yAxis; this.xAxis = xAxis; this.subgroup = subgroup; } function StatementReportData$Companion() { StatementReportData$Companion_instance = this; } StatementReportData$Companion.prototype.serializer = function () { return StatementReportData$$serializer_getInstance(); }; StatementReportData$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var StatementReportData$Companion_instance = null; function StatementReportData$Companion_getInstance() { if (StatementReportData$Companion_instance === null) { new StatementReportData$Companion(); } return StatementReportData$Companion_instance; } function StatementReportData$$serializer() { this.descriptor_1ykxcc$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.StatementReportData', this, 3); this.descriptor.addElement_ivxn3r$('yAxis', true); this.descriptor.addElement_ivxn3r$('xAxis', true); this.descriptor.addElement_ivxn3r$('subgroup', true); StatementReportData$$serializer_instance = this; } Object.defineProperty(StatementReportData$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_1ykxcc$_0; }}); StatementReportData$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.yAxis, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeFloatElement_lf6hpt$(this.descriptor, 0, value.yAxis); if (!equals(value.xAxis, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.xAxis); if (!equals(value.subgroup, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.subgroup); output.endStructure_24f42q$(this.descriptor); }; StatementReportData$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeFloatElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return StatementReportData_init(bitMask0, local0, local1, local2, null); }; StatementReportData$$serializer.prototype.childSerializers = function () { return [internal.FloatSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer)]; }; StatementReportData$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var StatementReportData$$serializer_instance = null; function StatementReportData$$serializer_getInstance() { if (StatementReportData$$serializer_instance === null) { new StatementReportData$$serializer(); } return StatementReportData$$serializer_instance; } function StatementReportData_init(seen1, yAxis, xAxis, subgroup, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(StatementReportData.prototype); if ((seen1 & 1) === 0) $this.yAxis = 0.0; else $this.yAxis = yAxis; if ((seen1 & 2) === 0) $this.xAxis = ''; else $this.xAxis = xAxis; if ((seen1 & 4) === 0) $this.subgroup = ''; else $this.subgroup = subgroup; return $this; } StatementReportData.$metadata$ = {kind: Kind_CLASS, simpleName: 'StatementReportData', interfaces: []}; StatementReportData.prototype.component1 = function () { return this.yAxis; }; StatementReportData.prototype.component2 = function () { return this.xAxis; }; StatementReportData.prototype.component3 = function () { return this.subgroup; }; StatementReportData.prototype.copy_9c0xch$ = function (yAxis, xAxis, subgroup) { return new StatementReportData(yAxis === void 0 ? this.yAxis : yAxis, xAxis === void 0 ? this.xAxis : xAxis, subgroup === void 0 ? this.subgroup : subgroup); }; StatementReportData.prototype.toString = function () { return 'StatementReportData(yAxis=' + Kotlin.toString(this.yAxis) + (', xAxis=' + Kotlin.toString(this.xAxis)) + (', subgroup=' + Kotlin.toString(this.subgroup)) + ')'; }; StatementReportData.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.yAxis) | 0; result = result * 31 + Kotlin.hashCode(this.xAxis) | 0; result = result * 31 + Kotlin.hashCode(this.subgroup) | 0; return result; }; StatementReportData.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.yAxis, other.yAxis) && Kotlin.equals(this.xAxis, other.xAxis) && Kotlin.equals(this.subgroup, other.subgroup))))); }; function StatementWithSessionDetailDisplay() { StatementWithSessionDetailDisplay$Companion_getInstance(); StatementEntity.call(this); this.verb = null; this.verbDisplay = null; this.objectDisplay = null; } function StatementWithSessionDetailDisplay$Companion() { StatementWithSessionDetailDisplay$Companion_instance = this; } StatementWithSessionDetailDisplay$Companion.prototype.serializer = function () { return StatementWithSessionDetailDisplay$$serializer_getInstance(); }; StatementWithSessionDetailDisplay$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var StatementWithSessionDetailDisplay$Companion_instance = null; function StatementWithSessionDetailDisplay$Companion_getInstance() { if (StatementWithSessionDetailDisplay$Companion_instance === null) { new StatementWithSessionDetailDisplay$Companion(); } return StatementWithSessionDetailDisplay$Companion_instance; } function StatementWithSessionDetailDisplay$$serializer() { this.descriptor_axrcq7$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.StatementWithSessionDetailDisplay', this, 38); this.descriptor.addElement_ivxn3r$('statementUid', true); this.descriptor.addElement_ivxn3r$('statementId', true); this.descriptor.addElement_ivxn3r$('statementPersonUid', true); this.descriptor.addElement_ivxn3r$('statementVerbUid', true); this.descriptor.addElement_ivxn3r$('xObjectUid', true); this.descriptor.addElement_ivxn3r$('subStatementActorUid', true); this.descriptor.addElement_ivxn3r$('substatementVerbUid', true); this.descriptor.addElement_ivxn3r$('subStatementObjectUid', true); this.descriptor.addElement_ivxn3r$('agentUid', true); this.descriptor.addElement_ivxn3r$('instructorUid', true); this.descriptor.addElement_ivxn3r$('authorityUid', true); this.descriptor.addElement_ivxn3r$('teamUid', true); this.descriptor.addElement_ivxn3r$('resultCompletion', true); this.descriptor.addElement_ivxn3r$('resultSuccess', true); this.descriptor.addElement_ivxn3r$('resultScoreScaled', true); this.descriptor.addElement_ivxn3r$('resultScoreRaw', true); this.descriptor.addElement_ivxn3r$('resultScoreMin', true); this.descriptor.addElement_ivxn3r$('resultScoreMax', true); this.descriptor.addElement_ivxn3r$('resultDuration', true); this.descriptor.addElement_ivxn3r$('resultResponse', true); this.descriptor.addElement_ivxn3r$('timestamp', true); this.descriptor.addElement_ivxn3r$('stored', true); this.descriptor.addElement_ivxn3r$('contextRegistration', true); this.descriptor.addElement_ivxn3r$('contextPlatform', true); this.descriptor.addElement_ivxn3r$('contextStatementId', true); this.descriptor.addElement_ivxn3r$('fullStatement', true); this.descriptor.addElement_ivxn3r$('statementMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('statementLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('statementLastChangedBy', true); this.descriptor.addElement_ivxn3r$('statementLct', true); this.descriptor.addElement_ivxn3r$('extensionProgress', true); this.descriptor.addElement_ivxn3r$('contentEntryRoot', true); this.descriptor.addElement_ivxn3r$('statementContentEntryUid', true); this.descriptor.addElement_ivxn3r$('statementLearnerGroupUid', true); this.descriptor.addElement_ivxn3r$('statementClazzUid', true); this.descriptor.addElement_ivxn3r$('verb', true); this.descriptor.addElement_ivxn3r$('verbDisplay', true); this.descriptor.addElement_ivxn3r$('objectDisplay', true); StatementWithSessionDetailDisplay$$serializer_instance = this; } Object.defineProperty(StatementWithSessionDetailDisplay$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_axrcq7$_0; }}); StatementWithSessionDetailDisplay$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.statementUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.statementUid); if (!equals(value.statementId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.statementId); if (!equals(value.statementPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.statementPersonUid); if (!equals(value.statementVerbUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.statementVerbUid); if (!equals(value.xObjectUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.xObjectUid); if (!equals(value.subStatementActorUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.subStatementActorUid); if (!equals(value.substatementVerbUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.substatementVerbUid); if (!equals(value.subStatementObjectUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.subStatementObjectUid); if (!equals(value.agentUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.agentUid); if (!equals(value.instructorUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.instructorUid); if (!equals(value.authorityUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeLongElement_j0o2mv$(this.descriptor, 10, value.authorityUid); if (!equals(value.teamUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.teamUid); if (!equals(value.resultCompletion, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 12, value.resultCompletion); if (!equals(value.resultSuccess, StatementEntity$Companion_getInstance().RESULT_UNSET) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 13)) output.encodeByteElement_j0u8y3$(this.descriptor, 13, value.resultSuccess); if (!equals(value.resultScoreScaled, 0.0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 14)) output.encodeFloatElement_lf6hpt$(this.descriptor, 14, value.resultScoreScaled); if (!equals(value.resultScoreRaw, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 15)) output.encodeLongElement_j0o2mv$(this.descriptor, 15, value.resultScoreRaw); if (!equals(value.resultScoreMin, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 16)) output.encodeLongElement_j0o2mv$(this.descriptor, 16, value.resultScoreMin); if (!equals(value.resultScoreMax, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 17)) output.encodeLongElement_j0o2mv$(this.descriptor, 17, value.resultScoreMax); if (!equals(value.resultDuration, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 18)) output.encodeLongElement_j0o2mv$(this.descriptor, 18, value.resultDuration); if (!equals(value.resultResponse, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 19)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 19, internal.StringSerializer, value.resultResponse); if (!equals(value.timestamp, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 20)) output.encodeLongElement_j0o2mv$(this.descriptor, 20, value.timestamp); if (!equals(value.stored, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 21)) output.encodeLongElement_j0o2mv$(this.descriptor, 21, value.stored); if (!equals(value.contextRegistration, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 22)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 22, internal.StringSerializer, value.contextRegistration); if (!equals(value.contextPlatform, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 23)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 23, internal.StringSerializer, value.contextPlatform); if (!equals(value.contextStatementId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 24)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 24, internal.StringSerializer, value.contextStatementId); if (!equals(value.fullStatement, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 25)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 25, internal.StringSerializer, value.fullStatement); if (!equals(value.statementMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 26)) output.encodeLongElement_j0o2mv$(this.descriptor, 26, value.statementMasterChangeSeqNum); if (!equals(value.statementLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 27)) output.encodeLongElement_j0o2mv$(this.descriptor, 27, value.statementLocalChangeSeqNum); if (!equals(value.statementLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 28)) output.encodeIntElement_ptg7oe$(this.descriptor, 28, value.statementLastChangedBy); if (!equals(value.statementLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 29)) output.encodeLongElement_j0o2mv$(this.descriptor, 29, value.statementLct); if (!equals(value.extensionProgress, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 30)) output.encodeIntElement_ptg7oe$(this.descriptor, 30, value.extensionProgress); if (!equals(value.contentEntryRoot, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 31)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 31, value.contentEntryRoot); if (!equals(value.statementContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 32)) output.encodeLongElement_j0o2mv$(this.descriptor, 32, value.statementContentEntryUid); if (!equals(value.statementLearnerGroupUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 33)) output.encodeLongElement_j0o2mv$(this.descriptor, 33, value.statementLearnerGroupUid); if (!equals(value.statementClazzUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 34)) output.encodeLongElement_j0o2mv$(this.descriptor, 34, value.statementClazzUid); if (!equals(value.verb, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 35)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 35, VerbEntity$$serializer_getInstance(), value.verb); if (!equals(value.verbDisplay, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 36)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 36, internal.StringSerializer, value.verbDisplay); if (!equals(value.objectDisplay, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 37)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 37, internal.StringSerializer, value.objectDisplay); output.endStructure_24f42q$(this.descriptor); }; StatementWithSessionDetailDisplay$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0, bitMask1 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, local28, local29, local30, local31, local32, local33, local34, local35, local36, local37; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeLongElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case 12: local12 = input.decodeBooleanElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case 13: local13 = input.decodeByteElement_szpzho$(this.descriptor, 13); bitMask0 |= 8192; break; case 14: local14 = input.decodeFloatElement_szpzho$(this.descriptor, 14); bitMask0 |= 16384; break; case 15: local15 = input.decodeLongElement_szpzho$(this.descriptor, 15); bitMask0 |= 32768; break; case 16: local16 = input.decodeLongElement_szpzho$(this.descriptor, 16); bitMask0 |= 65536; break; case 17: local17 = input.decodeLongElement_szpzho$(this.descriptor, 17); bitMask0 |= 131072; break; case 18: local18 = input.decodeLongElement_szpzho$(this.descriptor, 18); bitMask0 |= 262144; break; case 19: local19 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 19, internal.StringSerializer, local19); bitMask0 |= 524288; break; case 20: local20 = input.decodeLongElement_szpzho$(this.descriptor, 20); bitMask0 |= 1048576; break; case 21: local21 = input.decodeLongElement_szpzho$(this.descriptor, 21); bitMask0 |= 2097152; break; case 22: local22 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 22, internal.StringSerializer, local22); bitMask0 |= 4194304; break; case 23: local23 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 23, internal.StringSerializer, local23); bitMask0 |= 8388608; break; case 24: local24 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 24, internal.StringSerializer, local24); bitMask0 |= 16777216; break; case 25: local25 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 25, internal.StringSerializer, local25); bitMask0 |= 33554432; break; case 26: local26 = input.decodeLongElement_szpzho$(this.descriptor, 26); bitMask0 |= 67108864; break; case 27: local27 = input.decodeLongElement_szpzho$(this.descriptor, 27); bitMask0 |= 134217728; break; case 28: local28 = input.decodeIntElement_szpzho$(this.descriptor, 28); bitMask0 |= 268435456; break; case 29: local29 = input.decodeLongElement_szpzho$(this.descriptor, 29); bitMask0 |= 536870912; break; case 30: local30 = input.decodeIntElement_szpzho$(this.descriptor, 30); bitMask0 |= 1073741824; break; case 31: local31 = input.decodeBooleanElement_szpzho$(this.descriptor, 31); bitMask0 |= -2147483648; break; case 32: local32 = input.decodeLongElement_szpzho$(this.descriptor, 32); bitMask1 |= 1; break; case 33: local33 = input.decodeLongElement_szpzho$(this.descriptor, 33); bitMask1 |= 2; break; case 34: local34 = input.decodeLongElement_szpzho$(this.descriptor, 34); bitMask1 |= 4; break; case 35: local35 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 35, VerbEntity$$serializer_getInstance(), local35); bitMask1 |= 8; break; case 36: local36 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 36, internal.StringSerializer, local36); bitMask1 |= 16; break; case 37: local37 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 37, internal.StringSerializer, local37); bitMask1 |= 32; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return StatementWithSessionDetailDisplay_init(bitMask0, bitMask1, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, local13, local14, local15, local16, local17, local18, local19, local20, local21, local22, local23, local24, local25, local26, local27, local28, local29, local30, local31, local32, local33, local34, local35, local36, local37, null); }; StatementWithSessionDetailDisplay$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.BooleanSerializer, internal.ByteSerializer, internal.FloatSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.IntSerializer, internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(VerbEntity$$serializer_getInstance()), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer)]; }; StatementWithSessionDetailDisplay$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var StatementWithSessionDetailDisplay$$serializer_instance = null; function StatementWithSessionDetailDisplay$$serializer_getInstance() { if (StatementWithSessionDetailDisplay$$serializer_instance === null) { new StatementWithSessionDetailDisplay$$serializer(); } return StatementWithSessionDetailDisplay$$serializer_instance; } function StatementWithSessionDetailDisplay_init(seen1, seen2, statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid, verb, verbDisplay, objectDisplay, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(StatementWithSessionDetailDisplay.prototype); $this = StatementEntity_init(seen1, seen2, statementUid, statementId, statementPersonUid, statementVerbUid, xObjectUid, subStatementActorUid, substatementVerbUid, subStatementObjectUid, agentUid, instructorUid, authorityUid, teamUid, resultCompletion, resultSuccess, resultScoreScaled, resultScoreRaw, resultScoreMin, resultScoreMax, resultDuration, resultResponse, timestamp, stored, contextRegistration, contextPlatform, contextStatementId, fullStatement, statementMasterChangeSeqNum, statementLocalChangeSeqNum, statementLastChangedBy, statementLct, extensionProgress, contentEntryRoot, statementContentEntryUid, statementLearnerGroupUid, statementClazzUid, $this); if ((seen2 & 8) === 0) $this.verb = null; else $this.verb = verb; if ((seen2 & 16) === 0) $this.verbDisplay = null; else $this.verbDisplay = verbDisplay; if ((seen2 & 32) === 0) $this.objectDisplay = null; else $this.objectDisplay = objectDisplay; return $this; } StatementWithSessionDetailDisplay.$metadata$ = {kind: Kind_CLASS, simpleName: 'StatementWithSessionDetailDisplay', interfaces: [StatementEntity]}; function TerminologyEntry(id, messageId, term, errorMessage) { TerminologyEntry$Companion_getInstance(); if (errorMessage === void 0) errorMessage = null; this.id = id; this.messageId = messageId; this.term = term; this.errorMessage = errorMessage; } function TerminologyEntry$Companion() { TerminologyEntry$Companion_instance = this; } TerminologyEntry$Companion.prototype.serializer = function () { return TerminologyEntry$$serializer_getInstance(); }; TerminologyEntry$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var TerminologyEntry$Companion_instance = null; function TerminologyEntry$Companion_getInstance() { if (TerminologyEntry$Companion_instance === null) { new TerminologyEntry$Companion(); } return TerminologyEntry$Companion_instance; } function TerminologyEntry$$serializer() { this.descriptor_r1hxhm$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.TerminologyEntry', this, 4); this.descriptor.addElement_ivxn3r$('id', false); this.descriptor.addElement_ivxn3r$('messageId', false); this.descriptor.addElement_ivxn3r$('term', false); this.descriptor.addElement_ivxn3r$('errorMessage', true); TerminologyEntry$$serializer_instance = this; } Object.defineProperty(TerminologyEntry$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_r1hxhm$_0; }}); TerminologyEntry$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); output.encodeStringElement_iij8qq$(this.descriptor, 0, value.id); output.encodeIntElement_ptg7oe$(this.descriptor, 1, value.messageId); output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.term); if (!equals(value.errorMessage, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.errorMessage); output.endStructure_24f42q$(this.descriptor); }; TerminologyEntry$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeStringElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeIntElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return TerminologyEntry_init(bitMask0, local0, local1, local2, local3, null); }; TerminologyEntry$$serializer.prototype.childSerializers = function () { return [internal.StringSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer)]; }; TerminologyEntry$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var TerminologyEntry$$serializer_instance = null; function TerminologyEntry$$serializer_getInstance() { if (TerminologyEntry$$serializer_instance === null) { new TerminologyEntry$$serializer(); } return TerminologyEntry$$serializer_instance; } function TerminologyEntry_init(seen1, id, messageId, term, errorMessage, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(TerminologyEntry.prototype); if ((seen1 & 1) === 0) throw MissingFieldException_init('id'); else $this.id = id; if ((seen1 & 2) === 0) throw MissingFieldException_init('messageId'); else $this.messageId = messageId; if ((seen1 & 4) === 0) throw MissingFieldException_init('term'); else $this.term = term; if ((seen1 & 8) === 0) $this.errorMessage = null; else $this.errorMessage = errorMessage; return $this; } TerminologyEntry.$metadata$ = {kind: Kind_CLASS, simpleName: 'TerminologyEntry', interfaces: []}; TerminologyEntry.prototype.component1 = function () { return this.id; }; TerminologyEntry.prototype.component2 = function () { return this.messageId; }; TerminologyEntry.prototype.component3 = function () { return this.term; }; TerminologyEntry.prototype.component4 = function () { return this.errorMessage; }; TerminologyEntry.prototype.copy_j9igls$ = function (id, messageId, term, errorMessage) { return new TerminologyEntry(id === void 0 ? this.id : id, messageId === void 0 ? this.messageId : messageId, term === void 0 ? this.term : term, errorMessage === void 0 ? this.errorMessage : errorMessage); }; TerminologyEntry.prototype.toString = function () { return 'TerminologyEntry(id=' + Kotlin.toString(this.id) + (', messageId=' + Kotlin.toString(this.messageId)) + (', term=' + Kotlin.toString(this.term)) + (', errorMessage=' + Kotlin.toString(this.errorMessage)) + ')'; }; TerminologyEntry.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.id) | 0; result = result * 31 + Kotlin.hashCode(this.messageId) | 0; result = result * 31 + Kotlin.hashCode(this.term) | 0; result = result * 31 + Kotlin.hashCode(this.errorMessage) | 0; return result; }; TerminologyEntry.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.id, other.id) && Kotlin.equals(this.messageId, other.messageId) && Kotlin.equals(this.term, other.term) && Kotlin.equals(this.errorMessage, other.errorMessage))))); }; function UidAndLabel() { UidAndLabel$Companion_getInstance(); this.uid = L0; this.labelName = null; } function UidAndLabel$Companion() { UidAndLabel$Companion_instance = this; } UidAndLabel$Companion.prototype.serializer = function () { return UidAndLabel$$serializer_getInstance(); }; UidAndLabel$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var UidAndLabel$Companion_instance = null; function UidAndLabel$Companion_getInstance() { if (UidAndLabel$Companion_instance === null) { new UidAndLabel$Companion(); } return UidAndLabel$Companion_instance; } function UidAndLabel$$serializer() { this.descriptor_qndjqs$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.UidAndLabel', this, 2); this.descriptor.addElement_ivxn3r$('uid', true); this.descriptor.addElement_ivxn3r$('labelName', true); UidAndLabel$$serializer_instance = this; } Object.defineProperty(UidAndLabel$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_qndjqs$_0; }}); UidAndLabel$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.uid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.uid); if (!equals(value.labelName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.labelName); output.endStructure_24f42q$(this.descriptor); }; UidAndLabel$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return UidAndLabel_init(bitMask0, local0, local1, null); }; UidAndLabel$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer)]; }; UidAndLabel$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var UidAndLabel$$serializer_instance = null; function UidAndLabel$$serializer_getInstance() { if (UidAndLabel$$serializer_instance === null) { new UidAndLabel$$serializer(); } return UidAndLabel$$serializer_instance; } function UidAndLabel_init(seen1, uid, labelName, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(UidAndLabel.prototype); if ((seen1 & 1) === 0) $this.uid = L0; else $this.uid = uid; if ((seen1 & 2) === 0) $this.labelName = null; else $this.labelName = labelName; return $this; } UidAndLabel.$metadata$ = {kind: Kind_CLASS, simpleName: 'UidAndLabel', interfaces: []}; function UmAccount(personUid, username, auth, endpointUrl, firstName, lastName, admin) { UmAccount$Companion_getInstance(); if (username === void 0) username = null; if (auth === void 0) auth = null; if (endpointUrl === void 0) endpointUrl = ''; if (firstName === void 0) firstName = null; if (lastName === void 0) lastName = null; if (admin === void 0) admin = false; this.personUid = personUid; this.username = username; this.auth = auth; this.endpointUrl = endpointUrl; this.firstName = firstName; this.lastName = lastName; this.admin = admin; } UmAccount.prototype.toPerson = function () { var account = this; var $receiver = new Person(); $receiver.personUid = account.personUid; $receiver.username = account.username; $receiver.firstNames = account.firstName; $receiver.lastName = account.lastName; $receiver.admin = account.admin; return $receiver; }; function UmAccount$Companion() { UmAccount$Companion_instance = this; } UmAccount$Companion.prototype.serializer = function () { return UmAccount$$serializer_getInstance(); }; UmAccount$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var UmAccount$Companion_instance = null; function UmAccount$Companion_getInstance() { if (UmAccount$Companion_instance === null) { new UmAccount$Companion(); } return UmAccount$Companion_instance; } function UmAccount$$serializer() { this.descriptor_ulky5w$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.UmAccount', this, 7); this.descriptor.addElement_ivxn3r$('personUid', false); this.descriptor.addElement_ivxn3r$('username', true); this.descriptor.addElement_ivxn3r$('auth', true); this.descriptor.addElement_ivxn3r$('endpointUrl', true); this.descriptor.addElement_ivxn3r$('firstName', true); this.descriptor.addElement_ivxn3r$('lastName', true); this.descriptor.addElement_ivxn3r$('admin', true); UmAccount$$serializer_instance = this; } Object.defineProperty(UmAccount$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ulky5w$_0; }}); UmAccount$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.personUid); if (!equals(value.username, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.username); if (!equals(value.auth, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.auth); if (!equals(value.endpointUrl, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeStringElement_iij8qq$(this.descriptor, 3, value.endpointUrl); if (!equals(value.firstName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.firstName); if (!equals(value.lastName, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.lastName); if (!equals(value.admin, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 6, value.admin); output.endStructure_24f42q$(this.descriptor); }; UmAccount$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeStringElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeBooleanElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return UmAccount_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, null); }; UmAccount$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.StringSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer]; }; UmAccount$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var UmAccount$$serializer_instance = null; function UmAccount$$serializer_getInstance() { if (UmAccount$$serializer_instance === null) { new UmAccount$$serializer(); } return UmAccount$$serializer_instance; } function UmAccount_init(seen1, personUid, username, auth, endpointUrl, firstName, lastName, admin, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(UmAccount.prototype); if ((seen1 & 1) === 0) throw MissingFieldException_init('personUid'); else $this.personUid = personUid; if ((seen1 & 2) === 0) $this.username = null; else $this.username = username; if ((seen1 & 4) === 0) $this.auth = null; else $this.auth = auth; if ((seen1 & 8) === 0) $this.endpointUrl = ''; else $this.endpointUrl = endpointUrl; if ((seen1 & 16) === 0) $this.firstName = null; else $this.firstName = firstName; if ((seen1 & 32) === 0) $this.lastName = null; else $this.lastName = lastName; if ((seen1 & 64) === 0) $this.admin = false; else $this.admin = admin; return $this; } UmAccount.$metadata$ = {kind: Kind_CLASS, simpleName: 'UmAccount', interfaces: []}; UmAccount.prototype.component1 = function () { return this.personUid; }; UmAccount.prototype.component2 = function () { return this.username; }; UmAccount.prototype.component3 = function () { return this.auth; }; UmAccount.prototype.component4 = function () { return this.endpointUrl; }; UmAccount.prototype.component5 = function () { return this.firstName; }; UmAccount.prototype.component6 = function () { return this.lastName; }; UmAccount.prototype.component7 = function () { return this.admin; }; UmAccount.prototype.copy_i1i8k$ = function (personUid, username, auth, endpointUrl, firstName, lastName, admin) { return new UmAccount(personUid === void 0 ? this.personUid : personUid, username === void 0 ? this.username : username, auth === void 0 ? this.auth : auth, endpointUrl === void 0 ? this.endpointUrl : endpointUrl, firstName === void 0 ? this.firstName : firstName, lastName === void 0 ? this.lastName : lastName, admin === void 0 ? this.admin : admin); }; UmAccount.prototype.toString = function () { return 'UmAccount(personUid=' + Kotlin.toString(this.personUid) + (', username=' + Kotlin.toString(this.username)) + (', auth=' + Kotlin.toString(this.auth)) + (', endpointUrl=' + Kotlin.toString(this.endpointUrl)) + (', firstName=' + Kotlin.toString(this.firstName)) + (', lastName=' + Kotlin.toString(this.lastName)) + (', admin=' + Kotlin.toString(this.admin)) + ')'; }; UmAccount.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.personUid) | 0; result = result * 31 + Kotlin.hashCode(this.username) | 0; result = result * 31 + Kotlin.hashCode(this.auth) | 0; result = result * 31 + Kotlin.hashCode(this.endpointUrl) | 0; result = result * 31 + Kotlin.hashCode(this.firstName) | 0; result = result * 31 + Kotlin.hashCode(this.lastName) | 0; result = result * 31 + Kotlin.hashCode(this.admin) | 0; return result; }; UmAccount.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.personUid, other.personUid) && Kotlin.equals(this.username, other.username) && Kotlin.equals(this.auth, other.auth) && Kotlin.equals(this.endpointUrl, other.endpointUrl) && Kotlin.equals(this.firstName, other.firstName) && Kotlin.equals(this.lastName, other.lastName) && Kotlin.equals(this.admin, other.admin))))); }; function UserSession() { UserSession$Companion_getInstance(); this.usUid = L0; this.usPcsn = L0; this.usLcsn = L0; this.usLcb = 0; this.usLct = L0; this.usPersonUid = L0; this.usClientNodeId = L0; this.usStartTime = L0; this.usEndTime = Long$Companion$MAX_VALUE; this.usStatus = 0; this.usReason = 0; this.usAuth = null; this.usSessionType = 1; } function UserSession$Companion() { UserSession$Companion_instance = this; this.TABLE_ID = 679; this.TYPE_STANDARD = 1; this.TYPE_UPSTREAM = 2; this.STATUS_ACTIVE = 1; this.STATUS_NEEDS_REAUTH = 2; this.STATUS_LOGGED_OUT = 4; this.REASON_LOGGED_OUT = 1; this.REASON_CONSENT_REVOKED = 2; this.REASON_PASSWORD_CHANGED = 3; this.USER_SESSION_NOT_LOCAL_DEVICE_SQL = '\n UserSession.usClientNodeId != (\n SELECT nodeClientId \n FROM SyncNode\n LIMIT 1)\n '; } UserSession$Companion.prototype.serializer = function () { return UserSession$$serializer_getInstance(); }; UserSession$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var UserSession$Companion_instance = null; function UserSession$Companion_getInstance() { if (UserSession$Companion_instance === null) { new UserSession$Companion(); } return UserSession$Companion_instance; } function UserSession$$serializer() { this.descriptor_iypglm$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.UserSession', this, 13); this.descriptor.addElement_ivxn3r$('usUid', true); this.descriptor.addElement_ivxn3r$('usPcsn', true); this.descriptor.addElement_ivxn3r$('usLcsn', true); this.descriptor.addElement_ivxn3r$('usLcb', true); this.descriptor.addElement_ivxn3r$('usLct', true); this.descriptor.addElement_ivxn3r$('usPersonUid', true); this.descriptor.addElement_ivxn3r$('usClientNodeId', true); this.descriptor.addElement_ivxn3r$('usStartTime', true); this.descriptor.addElement_ivxn3r$('usEndTime', true); this.descriptor.addElement_ivxn3r$('usStatus', true); this.descriptor.addElement_ivxn3r$('usReason', true); this.descriptor.addElement_ivxn3r$('usAuth', true); this.descriptor.addElement_ivxn3r$('usSessionType', true); UserSession$$serializer_instance = this; } Object.defineProperty(UserSession$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_iypglm$_0; }}); UserSession$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.usUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.usUid); if (!equals(value.usPcsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.usPcsn); if (!equals(value.usLcsn, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.usLcsn); if (!equals(value.usLcb, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeIntElement_ptg7oe$(this.descriptor, 3, value.usLcb); if (!equals(value.usLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.usLct); if (!equals(value.usPersonUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeLongElement_j0o2mv$(this.descriptor, 5, value.usPersonUid); if (!equals(value.usClientNodeId, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.usClientNodeId); if (!equals(value.usStartTime, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.usStartTime); if (!equals(value.usEndTime, Long$Companion$MAX_VALUE) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.usEndTime); if (!equals(value.usStatus, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeIntElement_ptg7oe$(this.descriptor, 9, value.usStatus); if (!equals(value.usReason, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeIntElement_ptg7oe$(this.descriptor, 10, value.usReason); if (!equals(value.usAuth, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 11, internal.StringSerializer, value.usAuth); if (!equals(value.usSessionType, 1) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 12)) output.encodeIntElement_ptg7oe$(this.descriptor, 12, value.usSessionType); output.endStructure_24f42q$(this.descriptor); }; UserSession$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeIntElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeLongElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeIntElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeIntElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 11, internal.StringSerializer, local11); bitMask0 |= 2048; break; case 12: local12 = input.decodeIntElement_szpzho$(this.descriptor, 12); bitMask0 |= 4096; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return UserSession_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, local12, null); }; UserSession$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.IntSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer]; }; UserSession$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var UserSession$$serializer_instance = null; function UserSession$$serializer_getInstance() { if (UserSession$$serializer_instance === null) { new UserSession$$serializer(); } return UserSession$$serializer_instance; } function UserSession_init(seen1, usUid, usPcsn, usLcsn, usLcb, usLct, usPersonUid, usClientNodeId, usStartTime, usEndTime, usStatus, usReason, usAuth, usSessionType, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(UserSession.prototype); if ((seen1 & 1) === 0) $this.usUid = L0; else $this.usUid = usUid; if ((seen1 & 2) === 0) $this.usPcsn = L0; else $this.usPcsn = usPcsn; if ((seen1 & 4) === 0) $this.usLcsn = L0; else $this.usLcsn = usLcsn; if ((seen1 & 8) === 0) $this.usLcb = 0; else $this.usLcb = usLcb; if ((seen1 & 16) === 0) $this.usLct = L0; else $this.usLct = usLct; if ((seen1 & 32) === 0) $this.usPersonUid = L0; else $this.usPersonUid = usPersonUid; if ((seen1 & 64) === 0) $this.usClientNodeId = L0; else $this.usClientNodeId = usClientNodeId; if ((seen1 & 128) === 0) $this.usStartTime = L0; else $this.usStartTime = usStartTime; if ((seen1 & 256) === 0) $this.usEndTime = Long$Companion$MAX_VALUE; else $this.usEndTime = usEndTime; if ((seen1 & 512) === 0) $this.usStatus = 0; else $this.usStatus = usStatus; if ((seen1 & 1024) === 0) $this.usReason = 0; else $this.usReason = usReason; if ((seen1 & 2048) === 0) $this.usAuth = null; else $this.usAuth = usAuth; if ((seen1 & 4096) === 0) $this.usSessionType = 1; else $this.usSessionType = usSessionType; return $this; } UserSession.$metadata$ = {kind: Kind_CLASS, simpleName: 'UserSession', interfaces: []}; function UserSessionAndPerson() { this.person = null; this.userSession = null; } UserSessionAndPerson.$metadata$ = {kind: Kind_CLASS, simpleName: 'UserSessionAndPerson', interfaces: []}; var UserSessionReplicate$Companion_instance = null; function UserSessionReplicate$$serializer() { this.descriptor_55r53r$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.UserSessionReplicate', this, 4); this.descriptor.addElement_ivxn3r$('usPk', true); this.descriptor.addElement_ivxn3r$('usVersionId', true); this.descriptor.addElement_ivxn3r$('usDestination', true); this.descriptor.addElement_ivxn3r$('usPending', true); UserSessionReplicate$$serializer_instance = this; } var UserSessionReplicate$$serializer_instance = null; function VerbDisplay() { VerbDisplay$Companion_getInstance(); this.verbUid = L0; this.urlId = null; this.display = null; } function VerbDisplay$Companion() { VerbDisplay$Companion_instance = this; } VerbDisplay$Companion.prototype.serializer = function () { return VerbDisplay$$serializer_getInstance(); }; VerbDisplay$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var VerbDisplay$Companion_instance = null; function VerbDisplay$Companion_getInstance() { if (VerbDisplay$Companion_instance === null) { new VerbDisplay$Companion(); } return VerbDisplay$Companion_instance; } function VerbDisplay$$serializer() { this.descriptor_tq957m$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.VerbDisplay', this, 3); this.descriptor.addElement_ivxn3r$('verbUid', true); this.descriptor.addElement_ivxn3r$('urlId', true); this.descriptor.addElement_ivxn3r$('display', true); VerbDisplay$$serializer_instance = this; } Object.defineProperty(VerbDisplay$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_tq957m$_0; }}); VerbDisplay$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.verbUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.verbUid); if (!equals(value.urlId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.urlId); if (!equals(value.display, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.display); output.endStructure_24f42q$(this.descriptor); }; VerbDisplay$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return VerbDisplay_init(bitMask0, local0, local1, local2, null); }; VerbDisplay$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer)]; }; VerbDisplay$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var VerbDisplay$$serializer_instance = null; function VerbDisplay$$serializer_getInstance() { if (VerbDisplay$$serializer_instance === null) { new VerbDisplay$$serializer(); } return VerbDisplay$$serializer_instance; } function VerbDisplay_init(seen1, verbUid, urlId, display, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(VerbDisplay.prototype); if ((seen1 & 1) === 0) $this.verbUid = L0; else $this.verbUid = verbUid; if ((seen1 & 2) === 0) $this.urlId = null; else $this.urlId = urlId; if ((seen1 & 4) === 0) $this.display = null; else $this.display = display; return $this; } VerbDisplay.$metadata$ = {kind: Kind_CLASS, simpleName: 'VerbDisplay', interfaces: []}; function VerbEntity() { VerbEntity$Companion_getInstance(); this.verbUid = L0; this.urlId = null; this.verbInActive = false; this.verbMasterChangeSeqNum = L0; this.verbLocalChangeSeqNum = L0; this.verbLastChangedBy = 0; this.verbLct = L0; } function VerbEntity$Companion() { VerbEntity$Companion_instance = this; this.TABLE_ID = 62; this.VERB_PROGRESSED_URL = 'http://adlnet.gov/expapi/verbs/progressed'; this.VERB_PROGRESSED_UID = L10000; this.VERB_COMPLETED_URL = 'http://adlnet.gov/expapi/verbs/completed'; this.VERB_COMPLETED_UID = L10001; this.VERB_PASSED_URL = 'http://adlnet.gov/expapi/verbs/passed'; this.VERB_PASSED_UID = L10002; this.VERB_FAILED_URL = 'http://adlnet.gov/expapi/verbs/failed'; this.VERB_FAILED_UID = L10003; this.VERB_SATISFIED_URL = 'https://w3id.org/xapi/adl/verbs/satisfied'; this.VERB_SATISFIED_UID = L10004; this.VERB_ATTEMPTED_URL = 'http://adlnet.gov/expapi/verbs/attempted'; this.VERB_ATTEMPTED_UID = L10005; this.VERB_INTERACTED_URL = 'http://adlnet.gov/expapi/verbs/interacted'; this.VERB_INTERACTED_UID = L10006; this.VERB_ANSWERED_URL = 'http://adlnet.gov/expapi/verbs/answered'; this.VERB_ANSWERED_UID = L10007; this.VERB_SUBMITTED_URL = 'http://activitystrea.ms/schema/1.0/submit'; this.VERB_SUBMITTED_UID = L10008; this.VERB_SCORED_URL = 'http://adlnet.gov/expapi/verbs/scored'; this.VERB_SCORED_UID = L10009; this.FIXED_UIDS = mapOf([to(this.VERB_PROGRESSED_URL, this.VERB_PROGRESSED_UID), to(this.VERB_COMPLETED_URL, this.VERB_COMPLETED_UID), to(this.VERB_PASSED_URL, this.VERB_PASSED_UID), to(this.VERB_FAILED_URL, this.VERB_FAILED_UID), to(this.VERB_SATISFIED_URL, this.VERB_SATISFIED_UID), to(this.VERB_ANSWERED_URL, this.VERB_ANSWERED_UID), to(this.VERB_ATTEMPTED_URL, this.VERB_ATTEMPTED_UID), to(this.VERB_INTERACTED_URL, this.VERB_INTERACTED_UID), to(this.VERB_SUBMITTED_URL, this.VERB_SUBMITTED_UID), to(this.VERB_SCORED_URL, this.VERB_SCORED_UID)]); } VerbEntity$Companion.prototype.serializer = function () { return VerbEntity$$serializer_getInstance(); }; VerbEntity$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var VerbEntity$Companion_instance = null; function VerbEntity$Companion_getInstance() { if (VerbEntity$Companion_instance === null) { new VerbEntity$Companion(); } return VerbEntity$Companion_instance; } function VerbEntity$$serializer() { this.descriptor_ymkq4z$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.VerbEntity', this, 7); this.descriptor.addElement_ivxn3r$('verbUid', true); this.descriptor.addElement_ivxn3r$('urlId', true); this.descriptor.addElement_ivxn3r$('verbInActive', true); this.descriptor.addElement_ivxn3r$('verbMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('verbLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('verbLastChangedBy', true); this.descriptor.addElement_ivxn3r$('verbLct', true); VerbEntity$$serializer_instance = this; } Object.defineProperty(VerbEntity$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_ymkq4z$_0; }}); VerbEntity$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.verbUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.verbUid); if (!equals(value.urlId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.urlId); if (!equals(value.verbInActive, false) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeBooleanElement_qh7jdn$(this.descriptor, 2, value.verbInActive); if (!equals(value.verbMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.verbMasterChangeSeqNum); if (!equals(value.verbLocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeLongElement_j0o2mv$(this.descriptor, 4, value.verbLocalChangeSeqNum); if (!equals(value.verbLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.verbLastChangedBy); if (!equals(value.verbLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.verbLct); output.endStructure_24f42q$(this.descriptor); }; VerbEntity$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeBooleanElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeLongElement_szpzho$(this.descriptor, 4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return VerbEntity_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, null); }; VerbEntity$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.BooleanSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; VerbEntity$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var VerbEntity$$serializer_instance = null; function VerbEntity$$serializer_getInstance() { if (VerbEntity$$serializer_instance === null) { new VerbEntity$$serializer(); } return VerbEntity$$serializer_instance; } function VerbEntity_init(seen1, verbUid, urlId, verbInActive, verbMasterChangeSeqNum, verbLocalChangeSeqNum, verbLastChangedBy, verbLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(VerbEntity.prototype); if ((seen1 & 1) === 0) $this.verbUid = L0; else $this.verbUid = verbUid; if ((seen1 & 2) === 0) $this.urlId = null; else $this.urlId = urlId; if ((seen1 & 4) === 0) $this.verbInActive = false; else $this.verbInActive = verbInActive; if ((seen1 & 8) === 0) $this.verbMasterChangeSeqNum = L0; else $this.verbMasterChangeSeqNum = verbMasterChangeSeqNum; if ((seen1 & 16) === 0) $this.verbLocalChangeSeqNum = L0; else $this.verbLocalChangeSeqNum = verbLocalChangeSeqNum; if ((seen1 & 32) === 0) $this.verbLastChangedBy = 0; else $this.verbLastChangedBy = verbLastChangedBy; if ((seen1 & 64) === 0) $this.verbLct = L0; else $this.verbLct = verbLct; return $this; } VerbEntity.$metadata$ = {kind: Kind_CLASS, simpleName: 'VerbEntity', interfaces: []}; var VerbEntityReplicate$Companion_instance = null; function VerbEntityReplicate$$serializer() { this.descriptor_j02wkm$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.VerbEntityReplicate', this, 4); this.descriptor.addElement_ivxn3r$('vePk', true); this.descriptor.addElement_ivxn3r$('veVersionId', true); this.descriptor.addElement_ivxn3r$('veDestination', true); this.descriptor.addElement_ivxn3r$('vePending', true); VerbEntityReplicate$$serializer_instance = this; } var VerbEntityReplicate$$serializer_instance = null; function XLangMapEntry(verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct) { XLangMapEntry$Companion_getInstance(); if (verbLangMapUid === void 0) verbLangMapUid = L0; if (objectLangMapUid === void 0) objectLangMapUid = L0; if (languageLangMapUid === void 0) languageLangMapUid = L0; if (languageVariantLangMapUid === void 0) languageVariantLangMapUid = L0; if (valueLangMap === void 0) valueLangMap = ''; if (statementLangMapMasterCsn === void 0) statementLangMapMasterCsn = 0; if (statementLangMapLocalCsn === void 0) statementLangMapLocalCsn = 0; if (statementLangMapLcb === void 0) statementLangMapLcb = 0; if (statementLangMapLct === void 0) statementLangMapLct = L0; this.verbLangMapUid = verbLangMapUid; this.objectLangMapUid = objectLangMapUid; this.languageLangMapUid = languageLangMapUid; this.languageVariantLangMapUid = languageVariantLangMapUid; this.valueLangMap = valueLangMap; this.statementLangMapMasterCsn = statementLangMapMasterCsn; this.statementLangMapLocalCsn = statementLangMapLocalCsn; this.statementLangMapLcb = statementLangMapLcb; this.statementLangMapLct = statementLangMapLct; this.statementLangMapUid = L0; } function XLangMapEntry$Companion() { XLangMapEntry$Companion_instance = this; this.TABLE_ID = 74; } XLangMapEntry$Companion.prototype.serializer = function () { return XLangMapEntry$$serializer_getInstance(); }; XLangMapEntry$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var XLangMapEntry$Companion_instance = null; function XLangMapEntry$Companion_getInstance() { if (XLangMapEntry$Companion_instance === null) { new XLangMapEntry$Companion(); } return XLangMapEntry$Companion_instance; } function XLangMapEntry$$serializer() { this.descriptor_gut0l$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.XLangMapEntry', this, 10); this.descriptor.addElement_ivxn3r$('verbLangMapUid', true); this.descriptor.addElement_ivxn3r$('objectLangMapUid', true); this.descriptor.addElement_ivxn3r$('languageLangMapUid', true); this.descriptor.addElement_ivxn3r$('languageVariantLangMapUid', true); this.descriptor.addElement_ivxn3r$('valueLangMap', true); this.descriptor.addElement_ivxn3r$('statementLangMapMasterCsn', true); this.descriptor.addElement_ivxn3r$('statementLangMapLocalCsn', true); this.descriptor.addElement_ivxn3r$('statementLangMapLcb', true); this.descriptor.addElement_ivxn3r$('statementLangMapLct', true); this.descriptor.addElement_ivxn3r$('statementLangMapUid', true); XLangMapEntry$$serializer_instance = this; } Object.defineProperty(XLangMapEntry$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_gut0l$_0; }}); XLangMapEntry$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.verbLangMapUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.verbLangMapUid); if (!equals(value.objectLangMapUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeLongElement_j0o2mv$(this.descriptor, 1, value.objectLangMapUid); if (!equals(value.languageLangMapUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeLongElement_j0o2mv$(this.descriptor, 2, value.languageLangMapUid); if (!equals(value.languageVariantLangMapUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeLongElement_j0o2mv$(this.descriptor, 3, value.languageVariantLangMapUid); if (!equals(value.valueLangMap, '') || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.valueLangMap); if (!equals(value.statementLangMapMasterCsn, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeIntElement_ptg7oe$(this.descriptor, 5, value.statementLangMapMasterCsn); if (!equals(value.statementLangMapLocalCsn, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeIntElement_ptg7oe$(this.descriptor, 6, value.statementLangMapLocalCsn); if (!equals(value.statementLangMapLcb, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeIntElement_ptg7oe$(this.descriptor, 7, value.statementLangMapLcb); if (!equals(value.statementLangMapLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.statementLangMapLct); if (!equals(value.statementLangMapUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.statementLangMapUid); output.endStructure_24f42q$(this.descriptor); }; XLangMapEntry$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeLongElement_szpzho$(this.descriptor, 1); bitMask0 |= 2; break; case 2: local2 = input.decodeLongElement_szpzho$(this.descriptor, 2); bitMask0 |= 4; break; case 3: local3 = input.decodeLongElement_szpzho$(this.descriptor, 3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeIntElement_szpzho$(this.descriptor, 5); bitMask0 |= 32; break; case 6: local6 = input.decodeIntElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeIntElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return XLangMapEntry_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, null); }; XLangMapEntry$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, new NullableSerializer(internal.StringSerializer), internal.IntSerializer, internal.IntSerializer, internal.IntSerializer, internal.LongSerializer, internal.LongSerializer]; }; XLangMapEntry$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var XLangMapEntry$$serializer_instance = null; function XLangMapEntry$$serializer_getInstance() { if (XLangMapEntry$$serializer_instance === null) { new XLangMapEntry$$serializer(); } return XLangMapEntry$$serializer_instance; } function XLangMapEntry_init(seen1, verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct, statementLangMapUid, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(XLangMapEntry.prototype); if ((seen1 & 1) === 0) $this.verbLangMapUid = L0; else $this.verbLangMapUid = verbLangMapUid; if ((seen1 & 2) === 0) $this.objectLangMapUid = L0; else $this.objectLangMapUid = objectLangMapUid; if ((seen1 & 4) === 0) $this.languageLangMapUid = L0; else $this.languageLangMapUid = languageLangMapUid; if ((seen1 & 8) === 0) $this.languageVariantLangMapUid = L0; else $this.languageVariantLangMapUid = languageVariantLangMapUid; if ((seen1 & 16) === 0) $this.valueLangMap = ''; else $this.valueLangMap = valueLangMap; if ((seen1 & 32) === 0) $this.statementLangMapMasterCsn = 0; else $this.statementLangMapMasterCsn = statementLangMapMasterCsn; if ((seen1 & 64) === 0) $this.statementLangMapLocalCsn = 0; else $this.statementLangMapLocalCsn = statementLangMapLocalCsn; if ((seen1 & 128) === 0) $this.statementLangMapLcb = 0; else $this.statementLangMapLcb = statementLangMapLcb; if ((seen1 & 256) === 0) $this.statementLangMapLct = L0; else $this.statementLangMapLct = statementLangMapLct; if ((seen1 & 512) === 0) $this.statementLangMapUid = L0; else $this.statementLangMapUid = statementLangMapUid; return $this; } XLangMapEntry.$metadata$ = {kind: Kind_CLASS, simpleName: 'XLangMapEntry', interfaces: []}; XLangMapEntry.prototype.component1 = function () { return this.verbLangMapUid; }; XLangMapEntry.prototype.component2 = function () { return this.objectLangMapUid; }; XLangMapEntry.prototype.component3 = function () { return this.languageLangMapUid; }; XLangMapEntry.prototype.component4 = function () { return this.languageVariantLangMapUid; }; XLangMapEntry.prototype.component5 = function () { return this.valueLangMap; }; XLangMapEntry.prototype.component6 = function () { return this.statementLangMapMasterCsn; }; XLangMapEntry.prototype.component7 = function () { return this.statementLangMapLocalCsn; }; XLangMapEntry.prototype.component8 = function () { return this.statementLangMapLcb; }; XLangMapEntry.prototype.component9 = function () { return this.statementLangMapLct; }; XLangMapEntry.prototype.copy_9nwdwe$ = function (verbLangMapUid, objectLangMapUid, languageLangMapUid, languageVariantLangMapUid, valueLangMap, statementLangMapMasterCsn, statementLangMapLocalCsn, statementLangMapLcb, statementLangMapLct) { return new XLangMapEntry(verbLangMapUid === void 0 ? this.verbLangMapUid : verbLangMapUid, objectLangMapUid === void 0 ? this.objectLangMapUid : objectLangMapUid, languageLangMapUid === void 0 ? this.languageLangMapUid : languageLangMapUid, languageVariantLangMapUid === void 0 ? this.languageVariantLangMapUid : languageVariantLangMapUid, valueLangMap === void 0 ? this.valueLangMap : valueLangMap, statementLangMapMasterCsn === void 0 ? this.statementLangMapMasterCsn : statementLangMapMasterCsn, statementLangMapLocalCsn === void 0 ? this.statementLangMapLocalCsn : statementLangMapLocalCsn, statementLangMapLcb === void 0 ? this.statementLangMapLcb : statementLangMapLcb, statementLangMapLct === void 0 ? this.statementLangMapLct : statementLangMapLct); }; XLangMapEntry.prototype.toString = function () { return 'XLangMapEntry(verbLangMapUid=' + Kotlin.toString(this.verbLangMapUid) + (', objectLangMapUid=' + Kotlin.toString(this.objectLangMapUid)) + (', languageLangMapUid=' + Kotlin.toString(this.languageLangMapUid)) + (', languageVariantLangMapUid=' + Kotlin.toString(this.languageVariantLangMapUid)) + (', valueLangMap=' + Kotlin.toString(this.valueLangMap)) + (', statementLangMapMasterCsn=' + Kotlin.toString(this.statementLangMapMasterCsn)) + (', statementLangMapLocalCsn=' + Kotlin.toString(this.statementLangMapLocalCsn)) + (', statementLangMapLcb=' + Kotlin.toString(this.statementLangMapLcb)) + (', statementLangMapLct=' + Kotlin.toString(this.statementLangMapLct)) + ')'; }; XLangMapEntry.prototype.hashCode = function () { var result = 0; result = result * 31 + Kotlin.hashCode(this.verbLangMapUid) | 0; result = result * 31 + Kotlin.hashCode(this.objectLangMapUid) | 0; result = result * 31 + Kotlin.hashCode(this.languageLangMapUid) | 0; result = result * 31 + Kotlin.hashCode(this.languageVariantLangMapUid) | 0; result = result * 31 + Kotlin.hashCode(this.valueLangMap) | 0; result = result * 31 + Kotlin.hashCode(this.statementLangMapMasterCsn) | 0; result = result * 31 + Kotlin.hashCode(this.statementLangMapLocalCsn) | 0; result = result * 31 + Kotlin.hashCode(this.statementLangMapLcb) | 0; result = result * 31 + Kotlin.hashCode(this.statementLangMapLct) | 0; return result; }; XLangMapEntry.prototype.equals = function (other) { return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && (Kotlin.equals(this.verbLangMapUid, other.verbLangMapUid) && Kotlin.equals(this.objectLangMapUid, other.objectLangMapUid) && Kotlin.equals(this.languageLangMapUid, other.languageLangMapUid) && Kotlin.equals(this.languageVariantLangMapUid, other.languageVariantLangMapUid) && Kotlin.equals(this.valueLangMap, other.valueLangMap) && Kotlin.equals(this.statementLangMapMasterCsn, other.statementLangMapMasterCsn) && Kotlin.equals(this.statementLangMapLocalCsn, other.statementLangMapLocalCsn) && Kotlin.equals(this.statementLangMapLcb, other.statementLangMapLcb) && Kotlin.equals(this.statementLangMapLct, other.statementLangMapLct))))); }; var XLangMapEntryReplicate$Companion_instance = null; function XLangMapEntryReplicate$$serializer() { this.descriptor_d77g3c$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.XLangMapEntryReplicate', this, 4); this.descriptor.addElement_ivxn3r$('xlmePk', true); this.descriptor.addElement_ivxn3r$('xlmeVersionId', true); this.descriptor.addElement_ivxn3r$('xlmeDestination', true); this.descriptor.addElement_ivxn3r$('xlmePending', true); XLangMapEntryReplicate$$serializer_instance = this; } var XLangMapEntryReplicate$$serializer_instance = null; function XObjectEntity() { XObjectEntity$Companion_getInstance(); this.xObjectUid = L0; this.objectType = null; this.objectId = null; this.definitionType = null; this.interactionType = null; this.correctResponsePattern = null; this.objectContentEntryUid = L0; this.objectStatementRefUid = L0; this.xObjectMasterChangeSeqNum = L0; this.xObjectocalChangeSeqNum = L0; this.xObjectLastChangedBy = 0; this.xObjectLct = L0; } XObjectEntity.prototype.hashCode = function () { var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5, tmp$_6, tmp$_7, tmp$_8; var result = this.xObjectUid.xor(this.xObjectUid.shiftRightUnsigned(32)).toInt(); result = (31 * result | 0) + ((tmp$_0 = (tmp$ = this.objectType) != null ? hashCode(tmp$) : null) != null ? tmp$_0 : 0) | 0; result = (31 * result | 0) + ((tmp$_2 = (tmp$_1 = this.objectId) != null ? hashCode(tmp$_1) : null) != null ? tmp$_2 : 0) | 0; result = (31 * result | 0) + ((tmp$_4 = (tmp$_3 = this.definitionType) != null ? hashCode(tmp$_3) : null) != null ? tmp$_4 : 0) | 0; result = (31 * result | 0) + ((tmp$_6 = (tmp$_5 = this.interactionType) != null ? hashCode(tmp$_5) : null) != null ? tmp$_6 : 0) | 0; result = (31 * result | 0) + ((tmp$_8 = (tmp$_7 = this.correctResponsePattern) != null ? hashCode(tmp$_7) : null) != null ? tmp$_8 : 0) | 0; result = (31 * result | 0) + hashCode(this.objectContentEntryUid) | 0; result = (31 * result | 0) + hashCode(this.objectStatementRefUid) | 0; return result; }; XObjectEntity.prototype.equals = function (other) { var tmp$, tmp$_0; if (this === other) return true; if (other == null || !((tmp$ = Kotlin.getKClassFromExpression(this)) != null ? tmp$.equals(Kotlin.getKClassFromExpression(other)) : null)) return false; Kotlin.isType(tmp$_0 = other, XObjectEntity) ? tmp$_0 : throwCCE(); if (!equals(this.xObjectUid, other.xObjectUid)) return false; if (!equals(this.objectType, other.objectType)) return false; if (!equals(this.objectId, other.objectId)) return false; if (!equals(this.definitionType, other.definitionType)) return false; if (!equals(this.interactionType, other.interactionType)) return false; if (!equals(this.correctResponsePattern, other.correctResponsePattern)) return false; if (!equals(this.objectContentEntryUid, other.objectContentEntryUid)) return false; if (!equals(this.objectStatementRefUid, other.objectStatementRefUid)) return false; return true; }; function XObjectEntity$Companion() { XObjectEntity$Companion_instance = this; this.TABLE_ID = 64; } XObjectEntity$Companion.prototype.serializer = function () { return XObjectEntity$$serializer_getInstance(); }; XObjectEntity$Companion.$metadata$ = {kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var XObjectEntity$Companion_instance = null; function XObjectEntity$Companion_getInstance() { if (XObjectEntity$Companion_instance === null) { new XObjectEntity$Companion(); } return XObjectEntity$Companion_instance; } function XObjectEntity$$serializer() { this.descriptor_g2vg13$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.XObjectEntity', this, 12); this.descriptor.addElement_ivxn3r$('xObjectUid', true); this.descriptor.addElement_ivxn3r$('objectType', true); this.descriptor.addElement_ivxn3r$('objectId', true); this.descriptor.addElement_ivxn3r$('definitionType', true); this.descriptor.addElement_ivxn3r$('interactionType', true); this.descriptor.addElement_ivxn3r$('correctResponsePattern', true); this.descriptor.addElement_ivxn3r$('objectContentEntryUid', true); this.descriptor.addElement_ivxn3r$('objectStatementRefUid', true); this.descriptor.addElement_ivxn3r$('xObjectMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('xObjectocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('xObjectLastChangedBy', true); this.descriptor.addElement_ivxn3r$('xObjectLct', true); XObjectEntity$$serializer_instance = this; } Object.defineProperty(XObjectEntity$$serializer.prototype, 'descriptor', {configurable: true, get: function () { return this.descriptor_g2vg13$_0; }}); XObjectEntity$$serializer.prototype.serialize_55azsf$ = function (encoder, value) { var output = encoder.beginStructure_24f42q$(this.descriptor); if (!equals(value.xObjectUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 0)) output.encodeLongElement_j0o2mv$(this.descriptor, 0, value.xObjectUid); if (!equals(value.objectType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 1)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 1, internal.StringSerializer, value.objectType); if (!equals(value.objectId, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 2)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 2, internal.StringSerializer, value.objectId); if (!equals(value.definitionType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 3)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 3, internal.StringSerializer, value.definitionType); if (!equals(value.interactionType, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 4)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 4, internal.StringSerializer, value.interactionType); if (!equals(value.correctResponsePattern, null) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 5)) output.encodeNullableSerializableElement_qw92s8$(this.descriptor, 5, internal.StringSerializer, value.correctResponsePattern); if (!equals(value.objectContentEntryUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 6)) output.encodeLongElement_j0o2mv$(this.descriptor, 6, value.objectContentEntryUid); if (!equals(value.objectStatementRefUid, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 7)) output.encodeLongElement_j0o2mv$(this.descriptor, 7, value.objectStatementRefUid); if (!equals(value.xObjectMasterChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 8)) output.encodeLongElement_j0o2mv$(this.descriptor, 8, value.xObjectMasterChangeSeqNum); if (!equals(value.xObjectocalChangeSeqNum, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 9)) output.encodeLongElement_j0o2mv$(this.descriptor, 9, value.xObjectocalChangeSeqNum); if (!equals(value.xObjectLastChangedBy, 0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 10)) output.encodeIntElement_ptg7oe$(this.descriptor, 10, value.xObjectLastChangedBy); if (!equals(value.xObjectLct, L0) || output.shouldEncodeElementDefault_szpzho$(this.descriptor, 11)) output.encodeLongElement_j0o2mv$(this.descriptor, 11, value.xObjectLct); output.endStructure_24f42q$(this.descriptor); }; XObjectEntity$$serializer.prototype.deserialize_bq71mq$ = function (decoder) { var index; var bitMask0 = 0; var local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11; var input = decoder.beginStructure_24f42q$(this.descriptor); loopLabel: while (true) { index = input.decodeElementIndex_24f42q$(this.descriptor); switch (index) { case 0: local0 = input.decodeLongElement_szpzho$(this.descriptor, 0); bitMask0 |= 1; break; case 1: local1 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 1, internal.StringSerializer, local1); bitMask0 |= 2; break; case 2: local2 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 2, internal.StringSerializer, local2); bitMask0 |= 4; break; case 3: local3 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 3, internal.StringSerializer, local3); bitMask0 |= 8; break; case 4: local4 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 4, internal.StringSerializer, local4); bitMask0 |= 16; break; case 5: local5 = input.decodeNullableSerializableElement_8viuyw$(this.descriptor, 5, internal.StringSerializer, local5); bitMask0 |= 32; break; case 6: local6 = input.decodeLongElement_szpzho$(this.descriptor, 6); bitMask0 |= 64; break; case 7: local7 = input.decodeLongElement_szpzho$(this.descriptor, 7); bitMask0 |= 128; break; case 8: local8 = input.decodeLongElement_szpzho$(this.descriptor, 8); bitMask0 |= 256; break; case 9: local9 = input.decodeLongElement_szpzho$(this.descriptor, 9); bitMask0 |= 512; break; case 10: local10 = input.decodeIntElement_szpzho$(this.descriptor, 10); bitMask0 |= 1024; break; case 11: local11 = input.decodeLongElement_szpzho$(this.descriptor, 11); bitMask0 |= 2048; break; case -1: break loopLabel; default: throw new UnknownFieldException(index); } } input.endStructure_24f42q$(this.descriptor); return XObjectEntity_init(bitMask0, local0, local1, local2, local3, local4, local5, local6, local7, local8, local9, local10, local11, null); }; XObjectEntity$$serializer.prototype.childSerializers = function () { return [internal.LongSerializer, new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), new NullableSerializer(internal.StringSerializer), internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.LongSerializer, internal.IntSerializer, internal.LongSerializer]; }; XObjectEntity$$serializer.$metadata$ = {kind: Kind_OBJECT, simpleName: '$serializer', interfaces: [GeneratedSerializer]}; var XObjectEntity$$serializer_instance = null; function XObjectEntity$$serializer_getInstance() { if (XObjectEntity$$serializer_instance === null) { new XObjectEntity$$serializer(); } return XObjectEntity$$serializer_instance; } function XObjectEntity_init(seen1, xObjectUid, objectType, objectId, definitionType, interactionType, correctResponsePattern, objectContentEntryUid, objectStatementRefUid, xObjectMasterChangeSeqNum, xObjectocalChangeSeqNum, xObjectLastChangedBy, xObjectLct, serializationConstructorMarker) { var $this = serializationConstructorMarker || Object.create(XObjectEntity.prototype); if ((seen1 & 1) === 0) $this.xObjectUid = L0; else $this.xObjectUid = xObjectUid; if ((seen1 & 2) === 0) $this.objectType = null; else $this.objectType = objectType; if ((seen1 & 4) === 0) $this.objectId = null; else $this.objectId = objectId; if ((seen1 & 8) === 0) $this.definitionType = null; else $this.definitionType = definitionType; if ((seen1 & 16) === 0) $this.interactionType = null; else $this.interactionType = interactionType; if ((seen1 & 32) === 0) $this.correctResponsePattern = null; else $this.correctResponsePattern = correctResponsePattern; if ((seen1 & 64) === 0) $this.objectContentEntryUid = L0; else $this.objectContentEntryUid = objectContentEntryUid; if ((seen1 & 128) === 0) $this.objectStatementRefUid = L0; else $this.objectStatementRefUid = objectStatementRefUid; if ((seen1 & 256) === 0) $this.xObjectMasterChangeSeqNum = L0; else $this.xObjectMasterChangeSeqNum = xObjectMasterChangeSeqNum; if ((seen1 & 512) === 0) $this.xObjectocalChangeSeqNum = L0; else $this.xObjectocalChangeSeqNum = xObjectocalChangeSeqNum; if ((seen1 & 1024) === 0) $this.xObjectLastChangedBy = 0; else $this.xObjectLastChangedBy = xObjectLastChangedBy; if ((seen1 & 2048) === 0) $this.xObjectLct = L0; else $this.xObjectLct = xObjectLct; return $this; } XObjectEntity.$metadata$ = {kind: Kind_CLASS, simpleName: 'XObjectEntity', interfaces: []}; function XObjectEntity_init_0($this) { $this = $this || Object.create(XObjectEntity.prototype); XObjectEntity.call($this); return $this; } var XObjectEntityReplicate$Companion_instance = null; function XObjectEntityReplicate$$serializer() { this.descriptor_grz5vq$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.XObjectEntityReplicate', this, 4); this.descriptor.addElement_ivxn3r$('xoePk', true); this.descriptor.addElement_ivxn3r$('xoeVersionId', true); this.descriptor.addElement_ivxn3r$('xoeDestination', true); this.descriptor.addElement_ivxn3r$('xoePending', true); XObjectEntityReplicate$$serializer_instance = this; } var XObjectEntityReplicate$$serializer_instance = null; var AuditLog$Companion_instance = null; function AuditLog$$serializer() { this.descriptor_v3d7zo$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.AuditLog', this, 10); this.descriptor.addElement_ivxn3r$('auditLogUid', true); this.descriptor.addElement_ivxn3r$('auditLogMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('auditLogLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('auditLogLastChangedBy', true); this.descriptor.addElement_ivxn3r$('auditLogLct', true); this.descriptor.addElement_ivxn3r$('auditLogActorPersonUid', true); this.descriptor.addElement_ivxn3r$('auditLogTableUid', true); this.descriptor.addElement_ivxn3r$('auditLogEntityUid', true); this.descriptor.addElement_ivxn3r$('auditLogDate', true); this.descriptor.addElement_ivxn3r$('notes', true); AuditLog$$serializer_instance = this; } var AuditLog$$serializer_instance = null; var CustomField$Companion_instance = null; function CustomField$$serializer() { this.descriptor_18qcy0$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CustomField', this, 16); this.descriptor.addElement_ivxn3r$('customFieldUid', true); this.descriptor.addElement_ivxn3r$('customFieldName', true); this.descriptor.addElement_ivxn3r$('customFieldNameAlt', true); this.descriptor.addElement_ivxn3r$('customFieldLabelMessageID', true); this.descriptor.addElement_ivxn3r$('customFieldIcon', true); this.descriptor.addElement_ivxn3r$('customFieldIconId', true); this.descriptor.addElement_ivxn3r$('actionOnClick', true); this.descriptor.addElement_ivxn3r$('customFieldType', true); this.descriptor.addElement_ivxn3r$('customFieldEntityType', true); this.descriptor.addElement_ivxn3r$('customFieldActive', true); this.descriptor.addElement_ivxn3r$('customFieldDefaultValue', true); this.descriptor.addElement_ivxn3r$('customFieldMCSN', true); this.descriptor.addElement_ivxn3r$('customFieldLCSN', true); this.descriptor.addElement_ivxn3r$('customFieldLCB', true); this.descriptor.addElement_ivxn3r$('customFieldLct', true); this.descriptor.addElement_ivxn3r$('customFieldInputType', true); CustomField$$serializer_instance = this; } var CustomField$$serializer_instance = null; var CustomFieldValue$Companion_instance = null; function CustomFieldValue$$serializer() { this.descriptor_tfw6od$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CustomFieldValue', this, 9); this.descriptor.addElement_ivxn3r$('customFieldValueUid', true); this.descriptor.addElement_ivxn3r$('customFieldValueFieldUid', true); this.descriptor.addElement_ivxn3r$('customFieldValueEntityUid', true); this.descriptor.addElement_ivxn3r$('customFieldValueValue', true); this.descriptor.addElement_ivxn3r$('customFieldValueCustomFieldValueOptionUid', true); this.descriptor.addElement_ivxn3r$('customFieldValueMCSN', true); this.descriptor.addElement_ivxn3r$('customFieldValueLCSN', true); this.descriptor.addElement_ivxn3r$('customFieldValueLCB', true); this.descriptor.addElement_ivxn3r$('customFieldLct', true); CustomFieldValue$$serializer_instance = this; } var CustomFieldValue$$serializer_instance = null; var CustomFieldValueOption$Companion_instance = null; function CustomFieldValueOption$$serializer() { this.descriptor_w21xh4$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.CustomFieldValueOption', this, 10); this.descriptor.addElement_ivxn3r$('customFieldValueOptionUid', true); this.descriptor.addElement_ivxn3r$('customFieldValueOptionName', true); this.descriptor.addElement_ivxn3r$('customFieldValueOptionFieldUid', true); this.descriptor.addElement_ivxn3r$('customFieldValueOptionIcon', true); this.descriptor.addElement_ivxn3r$('customFieldValueOptionMessageId', true); this.descriptor.addElement_ivxn3r$('customFieldValueOptionActive', true); this.descriptor.addElement_ivxn3r$('customFieldValueOptionMCSN', true); this.descriptor.addElement_ivxn3r$('customFieldValueOptionLCSN', true); this.descriptor.addElement_ivxn3r$('customFieldValueOptionLCB', true); this.descriptor.addElement_ivxn3r$('customFieldValueLct', true); CustomFieldValueOption$$serializer_instance = this; } var CustomFieldValueOption$$serializer_instance = null; var DateRange$Companion_instance = null; function DateRange$$serializer() { this.descriptor_thvjgy$_0 = new PluginGeneratedSerialDescriptor('com.ustadmobile.lib.db.entities.DateRange', this, 11); this.descriptor.addElement_ivxn3r$('dateRangeUid', true); this.descriptor.addElement_ivxn3r$('dateRangeLocalChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('dateRangeMasterChangeSeqNum', true); this.descriptor.addElement_ivxn3r$('dateRangLastChangedBy', true); this.descriptor.addElement_ivxn3r$('dateRangeLct', true); this.descriptor.addElement_ivxn3r$('dateRangeFromDate', true); this.descriptor.addElement_ivxn3r$('dateRangeToDate', true); this.descriptor.addElement_ivxn3r$('dateRangeUMCalendarUid', true); this.descriptor.addElement_ivxn3r$('dateRangeName', true); this.descriptor.addElement_ivxn3r$('dateRangeDesc', true); this.descriptor.addElement_ivxn3r$('dateRangeActive', true); DateRange$$serializer_instance = this; } var DateRange$$serializer_instance = null; var ScheduledCheck$Companion_instance = null; function addSyncCallback($receiver, nodeIdAndAuth) { $receiver.addCallback_zdc9ji$(new SyncNodeIdCallback(nodeIdAndAuth.nodeId)); return $receiver; } function getFirstValue$lambda(closure$completable) { return function (it) { closure$completable.complete_11rb$(it); return Unit; }; } function Coroutine$getFirstValue($receiver_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 6; this.local$observer = void 0; this.local$$receiver = $receiver_0; } Coroutine$getFirstValue.$metadata$ = {kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$getFirstValue.prototype = Object.create(CoroutineImpl.prototype); Coroutine$getFirstValue.prototype.constructor = Coroutine$getFirstValue; Coroutine$getFirstValue.prototype.doResume = function () { do try { switch (this.state_0) { case 0: var completable = CompletableDeferred(); this.local$observer = new Observer(getFirstValue$lambda(completable)); this.exceptionState_0 = 4; this.local$$receiver.observeForever_fujmse$(this.local$observer); this.state_0 = 1; this.result_0 = completable.await(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: this.exceptionState_0 = 6; this.finallyPath_0 = [2]; this.state_0 = 5; this.$returnValue = this.result_0; continue; case 2: return this.$returnValue; case 3: return; case 4: this.finallyPath_0 = [6]; this.state_0 = 5; continue; case 5: this.exceptionState_0 = 6; this.local$$receiver.removeObserver_fujmse$(this.local$observer); this.state_0 = this.finallyPath_0.shift(); continue; case 6: throw this.exception_0; default: this.state_0 = 6; throw new Error('State Machine Unreachable execution'); } } catch (e) { if (this.state_0 === 6) { this.exceptionState_0 = this.state_0; throw e; } else { this.state_0 = this.exceptionState_0; this.exception_0 = e; } } while (true); }; function getFirstValue($receiver_0, continuation_0, suspended) { var instance = new Coroutine$getFirstValue($receiver_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); } var package$com = _.com || (_.com = {}); var package$ustadmobile = package$com.ustadmobile || (package$com.ustadmobile = {}); var package$core = package$ustadmobile.core || (package$ustadmobile.core = {}); var package$db = package$core.db || (package$core.db = {}); package$db.UmAppDatabase = UmAppDatabase; Object.defineProperty(package$db, 'UmAppDatabaseJsImplementations', {get: UmAppDatabaseJsImplementations_getInstance}); Object.defineProperty(UmAppDatabase_DoorMetadata, 'Companion', {get: UmAppDatabase_DoorMetadata$Companion_getInstance}); package$db.UmAppDatabase_DoorMetadata = UmAppDatabase_DoorMetadata; package$db.UmAppDatabase_JdbcKt = UmAppDatabase_JdbcKt; package$db.UmAppDatabase_ReplicateWrapper = UmAppDatabase_ReplicateWrapper; package$db.UmAppDatabase_ReplicationRunOnChangeRunner = UmAppDatabase_ReplicationRunOnChangeRunner; Object.defineProperty(UmAppDatabase_Repo, 'Companion', {get: UmAppDatabase_Repo$Companion_getInstance}); package$db.UmAppDatabase_Repo = UmAppDatabase_Repo; var package$dao = package$db.dao || (package$db.dao = {}); package$dao.AgentDao = AgentDao; package$dao.AgentDao_JdbcKt = AgentDao_JdbcKt; package$dao.AgentDao_ReplicateWrapper = AgentDao_ReplicateWrapper; package$dao.AgentDao_Repo = AgentDao_Repo; package$dao.ChatDao = ChatDao; package$dao.ChatDao_JdbcKt = ChatDao_JdbcKt; package$dao.ChatDao_ReplicateWrapper = ChatDao_ReplicateWrapper; package$dao.ChatDao_Repo = ChatDao_Repo; package$dao.ChatMemberDao = ChatMemberDao; package$dao.ChatMemberDao_JdbcKt = ChatMemberDao_JdbcKt; package$dao.ChatMemberDao_ReplicateWrapper = ChatMemberDao_ReplicateWrapper; package$dao.ChatMemberDao_Repo = ChatMemberDao_Repo; package$dao.ClazzAssignmentContentJoinDao = ClazzAssignmentContentJoinDao; package$dao.ClazzAssignmentContentJoinDao_JdbcKt = ClazzAssignmentContentJoinDao_JdbcKt; package$dao.ClazzAssignmentContentJoinDao_ReplicateWrapper = ClazzAssignmentContentJoinDao_ReplicateWrapper; package$dao.ClazzAssignmentContentJoinDao_Repo = ClazzAssignmentContentJoinDao_Repo; package$dao.ClazzAssignmentDao = ClazzAssignmentDao; package$dao.ClazzAssignmentDao_JdbcKt = ClazzAssignmentDao_JdbcKt; package$dao.ClazzAssignmentDao_ReplicateWrapper = ClazzAssignmentDao_ReplicateWrapper; package$dao.ClazzAssignmentDao_Repo = ClazzAssignmentDao_Repo; package$dao.ClazzAssignmentRollUpDao = ClazzAssignmentRollUpDao; package$dao.ClazzAssignmentRollUpDao_JdbcKt = ClazzAssignmentRollUpDao_JdbcKt; package$dao.ClazzAssignmentRollUpDao_Repo = ClazzAssignmentRollUpDao_Repo; package$dao.ClazzContentJoinDao = ClazzContentJoinDao; package$dao.ClazzContentJoinDao_JdbcKt = ClazzContentJoinDao_JdbcKt; package$dao.ClazzContentJoinDao_ReplicateWrapper = ClazzContentJoinDao_ReplicateWrapper; package$dao.ClazzContentJoinDao_Repo = ClazzContentJoinDao_Repo; package$dao.ClazzDao = ClazzDao; package$dao.ClazzDao_JdbcKt = ClazzDao_JdbcKt; package$dao.ClazzDao_ReplicateWrapper = ClazzDao_ReplicateWrapper; package$dao.ClazzDao_Repo = ClazzDao_Repo; package$dao.ClazzEnrolmentDao = ClazzEnrolmentDao; package$dao.ClazzEnrolmentDao_JdbcKt = ClazzEnrolmentDao_JdbcKt; package$dao.ClazzEnrolmentDao_ReplicateWrapper = ClazzEnrolmentDao_ReplicateWrapper; package$dao.ClazzEnrolmentDao_Repo = ClazzEnrolmentDao_Repo; package$dao.ClazzLogAttendanceRecordDao = ClazzLogAttendanceRecordDao; package$dao.ClazzLogAttendanceRecordDao_JdbcKt = ClazzLogAttendanceRecordDao_JdbcKt; package$dao.ClazzLogAttendanceRecordDao_ReplicateWrapper = ClazzLogAttendanceRecordDao_ReplicateWrapper; package$dao.ClazzLogAttendanceRecordDao_Repo = ClazzLogAttendanceRecordDao_Repo; package$dao.ClazzLogDao = ClazzLogDao; package$dao.ClazzLogDao_JdbcKt = ClazzLogDao_JdbcKt; package$dao.ClazzLogDao_ReplicateWrapper = ClazzLogDao_ReplicateWrapper; package$dao.ClazzLogDao_Repo = ClazzLogDao_Repo; package$dao.CommentsDao = CommentsDao; package$dao.CommentsDao_JdbcKt = CommentsDao_JdbcKt; package$dao.CommentsDao_ReplicateWrapper = CommentsDao_ReplicateWrapper; package$dao.CommentsDao_Repo = CommentsDao_Repo; package$dao.ConnectivityStatusDao = ConnectivityStatusDao; package$dao.ConnectivityStatusDao_JdbcKt = ConnectivityStatusDao_JdbcKt; package$dao.ContainerDao = ContainerDao; package$dao.ContainerDao_JdbcKt = ContainerDao_JdbcKt; package$dao.ContainerDao_ReplicateWrapper = ContainerDao_ReplicateWrapper; package$dao.ContainerDao_Repo = ContainerDao_Repo; package$dao.ContainerETagDao = ContainerETagDao; package$dao.ContainerETagDao_JdbcKt = ContainerETagDao_JdbcKt; package$dao.ContainerEntryDao = ContainerEntryDao; package$dao.ContainerEntryDao_JdbcKt = ContainerEntryDao_JdbcKt; package$dao.ContainerEntryFileDao = ContainerEntryFileDao; package$dao.ContainerEntryFileDao_JdbcKt = ContainerEntryFileDao_JdbcKt; package$dao.ContainerImportJobDao = ContainerImportJobDao; package$dao.ContainerImportJobDao_JdbcKt = ContainerImportJobDao_JdbcKt; package$dao.ContentCategoryDao = ContentCategoryDao; package$dao.ContentCategoryDao_JdbcKt = ContentCategoryDao_JdbcKt; package$dao.ContentCategoryDao_ReplicateWrapper = ContentCategoryDao_ReplicateWrapper; package$dao.ContentCategoryDao_Repo = ContentCategoryDao_Repo; package$dao.ContentCategorySchemaDao = ContentCategorySchemaDao; package$dao.ContentCategorySchemaDao_JdbcKt = ContentCategorySchemaDao_JdbcKt; package$dao.ContentCategorySchemaDao_ReplicateWrapper = ContentCategorySchemaDao_ReplicateWrapper; package$dao.ContentCategorySchemaDao_Repo = ContentCategorySchemaDao_Repo; package$dao.ContentEntryContentCategoryJoinDao = ContentEntryContentCategoryJoinDao; package$dao.ContentEntryContentCategoryJoinDao_JdbcKt = ContentEntryContentCategoryJoinDao_JdbcKt; package$dao.ContentEntryContentCategoryJoinDao_ReplicateWrapper = ContentEntryContentCategoryJoinDao_ReplicateWrapper; package$dao.ContentEntryContentCategoryJoinDao_Repo = ContentEntryContentCategoryJoinDao_Repo; package$dao.ContentEntryDao = ContentEntryDao; package$dao.ContentEntryDao_JdbcKt = ContentEntryDao_JdbcKt; package$dao.ContentEntryDao_ReplicateWrapper = ContentEntryDao_ReplicateWrapper; package$dao.ContentEntryDao_Repo = ContentEntryDao_Repo; package$dao.ContentEntryParentChildJoinDao = ContentEntryParentChildJoinDao; package$dao.ContentEntryParentChildJoinDao_JdbcKt = ContentEntryParentChildJoinDao_JdbcKt; package$dao.ContentEntryParentChildJoinDao_ReplicateWrapper = ContentEntryParentChildJoinDao_ReplicateWrapper; package$dao.ContentEntryParentChildJoinDao_Repo = ContentEntryParentChildJoinDao_Repo; package$dao.ContentEntryPictureDao = ContentEntryPictureDao; package$dao.ContentEntryPictureDao_JdbcKt = ContentEntryPictureDao_JdbcKt; package$dao.ContentEntryPictureDao_ReplicateWrapper = ContentEntryPictureDao_ReplicateWrapper; package$dao.ContentEntryPictureDao_Repo = ContentEntryPictureDao_Repo; package$dao.ContentEntryRelatedEntryJoinDao = ContentEntryRelatedEntryJoinDao; package$dao.ContentEntryRelatedEntryJoinDao_JdbcKt = ContentEntryRelatedEntryJoinDao_JdbcKt; package$dao.ContentEntryRelatedEntryJoinDao_ReplicateWrapper = ContentEntryRelatedEntryJoinDao_ReplicateWrapper; package$dao.ContentEntryRelatedEntryJoinDao_Repo = ContentEntryRelatedEntryJoinDao_Repo; package$dao.ContentJobDao = ContentJobDao; package$dao.ContentJobDao_JdbcKt = ContentJobDao_JdbcKt; package$dao.ContentJobItemDao = ContentJobItemDao; package$dao.ContentJobItemDao_JdbcKt = ContentJobItemDao_JdbcKt; package$dao.ContextXObjectStatementJoinDao = ContextXObjectStatementJoinDao; package$dao.ContextXObjectStatementJoinDao_JdbcKt = ContextXObjectStatementJoinDao_JdbcKt; package$dao.ContextXObjectStatementJoinDao_ReplicateWrapper = ContextXObjectStatementJoinDao_ReplicateWrapper; package$dao.ContextXObjectStatementJoinDao_Repo = ContextXObjectStatementJoinDao_Repo; package$dao.CourseAssignmentMarkDao = CourseAssignmentMarkDao; package$dao.CourseAssignmentMarkDao_JdbcKt = CourseAssignmentMarkDao_JdbcKt; package$dao.CourseAssignmentMarkDao_ReplicateWrapper = CourseAssignmentMarkDao_ReplicateWrapper; package$dao.CourseAssignmentMarkDao_Repo = CourseAssignmentMarkDao_Repo; package$dao.CourseAssignmentSubmissionAttachmentDao = CourseAssignmentSubmissionAttachmentDao; package$dao.CourseAssignmentSubmissionAttachmentDao_JdbcKt = CourseAssignmentSubmissionAttachmentDao_JdbcKt; package$dao.CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper = CourseAssignmentSubmissionAttachmentDao_ReplicateWrapper; package$dao.CourseAssignmentSubmissionAttachmentDao_Repo = CourseAssignmentSubmissionAttachmentDao_Repo; package$dao.CourseAssignmentSubmissionDao = CourseAssignmentSubmissionDao; package$dao.CourseAssignmentSubmissionDao_JdbcKt = CourseAssignmentSubmissionDao_JdbcKt; package$dao.CourseAssignmentSubmissionDao_ReplicateWrapper = CourseAssignmentSubmissionDao_ReplicateWrapper; package$dao.CourseAssignmentSubmissionDao_Repo = CourseAssignmentSubmissionDao_Repo; package$dao.CourseBlockDao = CourseBlockDao; package$dao.CourseBlockDao_JdbcKt = CourseBlockDao_JdbcKt; package$dao.CourseBlockDao_ReplicateWrapper = CourseBlockDao_ReplicateWrapper; package$dao.CourseBlockDao_Repo = CourseBlockDao_Repo; package$dao.CourseDiscussionDao = CourseDiscussionDao; package$dao.CourseDiscussionDao_JdbcKt = CourseDiscussionDao_JdbcKt; package$dao.CourseDiscussionDao_ReplicateWrapper = CourseDiscussionDao_ReplicateWrapper; package$dao.CourseDiscussionDao_Repo = CourseDiscussionDao_Repo; package$dao.CourseGroupMemberDao = CourseGroupMemberDao; package$dao.CourseGroupMemberDao_JdbcKt = CourseGroupMemberDao_JdbcKt; package$dao.CourseGroupMemberDao_ReplicateWrapper = CourseGroupMemberDao_ReplicateWrapper; package$dao.CourseGroupMemberDao_Repo = CourseGroupMemberDao_Repo; package$dao.CourseGroupSetDao = CourseGroupSetDao; package$dao.CourseGroupSetDao_JdbcKt = CourseGroupSetDao_JdbcKt; package$dao.CourseGroupSetDao_ReplicateWrapper = CourseGroupSetDao_ReplicateWrapper; package$dao.CourseGroupSetDao_Repo = CourseGroupSetDao_Repo; package$dao.CoursePictureDao = CoursePictureDao; package$dao.CoursePictureDao_JdbcKt = CoursePictureDao_JdbcKt; package$dao.CoursePictureDao_ReplicateWrapper = CoursePictureDao_ReplicateWrapper; package$dao.CoursePictureDao_Repo = CoursePictureDao_Repo; package$dao.CourseTerminologyDao = CourseTerminologyDao; package$dao.CourseTerminologyDao_JdbcKt = CourseTerminologyDao_JdbcKt; package$dao.CourseTerminologyDao_ReplicateWrapper = CourseTerminologyDao_ReplicateWrapper; package$dao.CourseTerminologyDao_Repo = CourseTerminologyDao_Repo; package$dao.DiscussionPostDao = DiscussionPostDao; package$dao.DiscussionPostDao_JdbcKt = DiscussionPostDao_JdbcKt; package$dao.DiscussionPostDao_ReplicateWrapper = DiscussionPostDao_ReplicateWrapper; package$dao.DiscussionPostDao_Repo = DiscussionPostDao_Repo; package$dao.DiscussionTopicDao = DiscussionTopicDao; package$dao.DiscussionTopicDao_JdbcKt = DiscussionTopicDao_JdbcKt; package$dao.DiscussionTopicDao_ReplicateWrapper = DiscussionTopicDao_ReplicateWrapper; package$dao.DiscussionTopicDao_Repo = DiscussionTopicDao_Repo; package$dao.EntityRoleDao = EntityRoleDao; package$dao.EntityRoleDao_JdbcKt = EntityRoleDao_JdbcKt; package$dao.EntityRoleDao_Repo = EntityRoleDao_Repo; package$dao.ErrorReportDao = ErrorReportDao; package$dao.ErrorReportDao_JdbcKt = ErrorReportDao_JdbcKt; package$dao.ErrorReportDao_ReplicateWrapper = ErrorReportDao_ReplicateWrapper; package$dao.ErrorReportDao_Repo = ErrorReportDao_Repo; package$dao.GroupLearningSessionDao = GroupLearningSessionDao; package$dao.GroupLearningSessionDao_JdbcKt = GroupLearningSessionDao_JdbcKt; package$dao.GroupLearningSessionDao_ReplicateWrapper = GroupLearningSessionDao_ReplicateWrapper; package$dao.GroupLearningSessionDao_Repo = GroupLearningSessionDao_Repo; package$dao.HolidayCalendarDao = HolidayCalendarDao; package$dao.HolidayCalendarDao_JdbcKt = HolidayCalendarDao_JdbcKt; package$dao.HolidayCalendarDao_ReplicateWrapper = HolidayCalendarDao_ReplicateWrapper; package$dao.HolidayCalendarDao_Repo = HolidayCalendarDao_Repo; package$dao.HolidayDao = HolidayDao; package$dao.HolidayDao_JdbcKt = HolidayDao_JdbcKt; package$dao.HolidayDao_ReplicateWrapper = HolidayDao_ReplicateWrapper; package$dao.HolidayDao_Repo = HolidayDao_Repo; package$dao.LanguageDao = LanguageDao; package$dao.LanguageDao_JdbcKt = LanguageDao_JdbcKt; package$dao.LanguageDao_ReplicateWrapper = LanguageDao_ReplicateWrapper; package$dao.LanguageDao_Repo = LanguageDao_Repo; package$dao.LanguageVariantDao = LanguageVariantDao; package$dao.LanguageVariantDao_JdbcKt = LanguageVariantDao_JdbcKt; package$dao.LanguageVariantDao_ReplicateWrapper = LanguageVariantDao_ReplicateWrapper; package$dao.LanguageVariantDao_Repo = LanguageVariantDao_Repo; package$dao.LearnerGroupDao = LearnerGroupDao; package$dao.LearnerGroupDao_JdbcKt = LearnerGroupDao_JdbcKt; package$dao.LearnerGroupDao_ReplicateWrapper = LearnerGroupDao_ReplicateWrapper; package$dao.LearnerGroupDao_Repo = LearnerGroupDao_Repo; package$dao.LearnerGroupMemberDao = LearnerGroupMemberDao; package$dao.LearnerGroupMemberDao_JdbcKt = LearnerGroupMemberDao_JdbcKt; package$dao.LearnerGroupMemberDao_ReplicateWrapper = LearnerGroupMemberDao_ReplicateWrapper; package$dao.LearnerGroupMemberDao_Repo = LearnerGroupMemberDao_Repo; package$dao.LeavingReasonDao = LeavingReasonDao; package$dao.LeavingReasonDao_JdbcKt = LeavingReasonDao_JdbcKt; package$dao.LeavingReasonDao_ReplicateWrapper = LeavingReasonDao_ReplicateWrapper; package$dao.LeavingReasonDao_Repo = LeavingReasonDao_Repo; package$dao.LocallyAvailableContainerDao = LocallyAvailableContainerDao; package$dao.LocallyAvailableContainerDao_JdbcKt = LocallyAvailableContainerDao_JdbcKt; package$dao.MessageDao = MessageDao; package$dao.MessageDao_JdbcKt = MessageDao_JdbcKt; package$dao.MessageDao_ReplicateWrapper = MessageDao_ReplicateWrapper; package$dao.MessageDao_Repo = MessageDao_Repo; package$dao.MessageReadDao = MessageReadDao; package$dao.MessageReadDao_JdbcKt = MessageReadDao_JdbcKt; package$dao.MessageReadDao_ReplicateWrapper = MessageReadDao_ReplicateWrapper; package$dao.MessageReadDao_Repo = MessageReadDao_Repo; package$dao.NetworkNodeDao = NetworkNodeDao; package$dao.NetworkNodeDao_JdbcKt = NetworkNodeDao_JdbcKt; package$dao.PersonAuth2Dao = PersonAuth2Dao; package$dao.PersonAuth2Dao_JdbcKt = PersonAuth2Dao_JdbcKt; package$dao.PersonAuth2Dao_ReplicateWrapper = PersonAuth2Dao_ReplicateWrapper; package$dao.PersonAuth2Dao_Repo = PersonAuth2Dao_Repo; package$dao.PersonAuthDao = PersonAuthDao; package$dao.PersonAuthDao_JdbcKt = PersonAuthDao_JdbcKt; package$dao.PersonDao = PersonDao; package$dao.PersonDao_JdbcKt = PersonDao_JdbcKt; package$dao.PersonDao_ReplicateWrapper = PersonDao_ReplicateWrapper; package$dao.PersonDao_Repo = PersonDao_Repo; package$dao.PersonGroupDao = PersonGroupDao; package$dao.PersonGroupDao_JdbcKt = PersonGroupDao_JdbcKt; package$dao.PersonGroupDao_ReplicateWrapper = PersonGroupDao_ReplicateWrapper; package$dao.PersonGroupDao_Repo = PersonGroupDao_Repo; package$dao.PersonGroupMemberDao = PersonGroupMemberDao; package$dao.PersonGroupMemberDao_JdbcKt = PersonGroupMemberDao_JdbcKt; package$dao.PersonGroupMemberDao_ReplicateWrapper = PersonGroupMemberDao_ReplicateWrapper; package$dao.PersonGroupMemberDao_Repo = PersonGroupMemberDao_Repo; package$dao.PersonParentJoinDao = PersonParentJoinDao; package$dao.PersonParentJoinDao_JdbcKt = PersonParentJoinDao_JdbcKt; package$dao.PersonParentJoinDao_ReplicateWrapper = PersonParentJoinDao_ReplicateWrapper; package$dao.PersonParentJoinDao_Repo = PersonParentJoinDao_Repo; package$dao.PersonPictureDao = PersonPictureDao; package$dao.PersonPictureDao_JdbcKt = PersonPictureDao_JdbcKt; package$dao.PersonPictureDao_ReplicateWrapper = PersonPictureDao_ReplicateWrapper; package$dao.PersonPictureDao_Repo = PersonPictureDao_Repo; package$dao.ReportDao = ReportDao; package$dao.ReportDao_JdbcKt = ReportDao_JdbcKt; package$dao.ReportDao_ReplicateWrapper = ReportDao_ReplicateWrapper; package$dao.ReportDao_Repo = ReportDao_Repo; package$dao.ScheduleDao = ScheduleDao; package$dao.ScheduleDao_JdbcKt = ScheduleDao_JdbcKt; package$dao.ScheduleDao_ReplicateWrapper = ScheduleDao_ReplicateWrapper; package$dao.ScheduleDao_Repo = ScheduleDao_Repo; package$dao.SchoolDao = SchoolDao; package$dao.SchoolDao_JdbcKt = SchoolDao_JdbcKt; package$dao.SchoolDao_ReplicateWrapper = SchoolDao_ReplicateWrapper; package$dao.SchoolDao_Repo = SchoolDao_Repo; package$dao.SchoolMemberDao = SchoolMemberDao; package$dao.SchoolMemberDao_JdbcKt = SchoolMemberDao_JdbcKt; package$dao.SchoolMemberDao_ReplicateWrapper = SchoolMemberDao_ReplicateWrapper; package$dao.SchoolMemberDao_Repo = SchoolMemberDao_Repo; package$dao.ScopedGrantDao = ScopedGrantDao; package$dao.ScopedGrantDao_JdbcKt = ScopedGrantDao_JdbcKt; package$dao.ScopedGrantDao_ReplicateWrapper = ScopedGrantDao_ReplicateWrapper; package$dao.ScopedGrantDao_Repo = ScopedGrantDao_Repo; package$dao.ScrapeQueueItemDao = ScrapeQueueItemDao; package$dao.ScrapeQueueItemDao_JdbcKt = ScrapeQueueItemDao_JdbcKt; package$dao.SiteDao = SiteDao; package$dao.SiteDao_JdbcKt = SiteDao_JdbcKt; package$dao.SiteDao_ReplicateWrapper = SiteDao_ReplicateWrapper; package$dao.SiteDao_Repo = SiteDao_Repo; package$dao.SiteTermsDao = SiteTermsDao; package$dao.SiteTermsDao_JdbcKt = SiteTermsDao_JdbcKt; package$dao.SiteTermsDao_ReplicateWrapper = SiteTermsDao_ReplicateWrapper; package$dao.SiteTermsDao_Repo = SiteTermsDao_Repo; package$dao.StateContentDao = StateContentDao; package$dao.StateContentDao_JdbcKt = StateContentDao_JdbcKt; package$dao.StateContentDao_ReplicateWrapper = StateContentDao_ReplicateWrapper; package$dao.StateContentDao_Repo = StateContentDao_Repo; package$dao.StateDao = StateDao; package$dao.StateDao_JdbcKt = StateDao_JdbcKt; package$dao.StateDao_ReplicateWrapper = StateDao_ReplicateWrapper; package$dao.StateDao_Repo = StateDao_Repo; package$dao.StatementDao = StatementDao; package$dao.StatementDao_JdbcKt = StatementDao_JdbcKt; package$dao.StatementDao_ReplicateWrapper = StatementDao_ReplicateWrapper; package$dao.StatementDao_Repo = StatementDao_Repo; package$dao.SyncNodeDao = SyncNodeDao; package$dao.SyncNodeDao_JdbcKt = SyncNodeDao_JdbcKt; package$dao.UserSessionDao = UserSessionDao; package$dao.UserSessionDao_JdbcKt = UserSessionDao_JdbcKt; package$dao.UserSessionDao_ReplicateWrapper = UserSessionDao_ReplicateWrapper; package$dao.UserSessionDao_Repo = UserSessionDao_Repo; package$dao.VerbDao = VerbDao; package$dao.VerbDao_JdbcKt = VerbDao_JdbcKt; package$dao.VerbDao_ReplicateWrapper = VerbDao_ReplicateWrapper; package$dao.VerbDao_Repo = VerbDao_Repo; package$dao.XLangMapEntryDao = XLangMapEntryDao; package$dao.XLangMapEntryDao_JdbcKt = XLangMapEntryDao_JdbcKt; package$dao.XLangMapEntryDao_ReplicateWrapper = XLangMapEntryDao_ReplicateWrapper; package$dao.XLangMapEntryDao_Repo = XLangMapEntryDao_Repo; package$dao.XObjectDao = XObjectDao; package$dao.XObjectDao_JdbcKt = XObjectDao_JdbcKt; package$dao.XObjectDao_ReplicateWrapper = XObjectDao_ReplicateWrapper; package$dao.XObjectDao_Repo = XObjectDao_Repo; var package$lib = package$ustadmobile.lib || (package$ustadmobile.lib = {}); var package$db_0 = package$lib.db || (package$lib.db = {}); var package$entities = package$db_0.entities || (package$db_0.entities = {}); package$entities.ContentEntryPicture_EwaAdapter = ContentEntryPicture_EwaAdapter; package$entities.CourseAssignmentSubmissionAttachment_EwaAdapter = CourseAssignmentSubmissionAttachment_EwaAdapter; package$entities.CoursePicture_EwaAdapter = CoursePicture_EwaAdapter; package$entities.PersonPicture_EwaAdapter = PersonPicture_EwaAdapter; Object.defineProperty(ContentJobItemTriggersCallback, 'Companion', {get: ContentJobItemTriggersCallback$Companion_getInstance}); package$db.ContentJobItemTriggersCallback = ContentJobItemTriggersCallback; package$dao.BaseDao = BaseDao; package$dao.deactivateByUids_aw1xkw$ = deactivateByUids; package$dao.deactivateByUids_w29pf7$ = deactivateByUids_0; package$dao.deactivateByUids_5h527s$ = deactivateByUids_1; package$dao.deactivateByUids_txvfhe$ = deactivateByUids_2; package$dao.deactivateByUids_3z24gd$ = deactivateByUids_3; package$dao.OneToManyJoinDao = OneToManyJoinDao; Object.defineProperty(package$dao, 'PersonAuthDaoCommon', {get: PersonAuthDaoCommon_getInstance}); package$dao.deactivateByUids_hzprtg$ = deactivateByUids_4; package$dao.deactivateByUids_ozash1$ = deactivateByUids_5; package$dao.getResults_qgp830$ = getResults; var package$ext = package$db.ext || (package$db.ext = {}); package$ext.migrationList = migrationList; Object.defineProperty(AgentEntity, 'Companion', {get: AgentEntity$Companion_getInstance}); Object.defineProperty(AgentEntity, '$serializer', {get: AgentEntity$$serializer_getInstance}); package$entities.AgentEntity_init_i2xni3$ = AgentEntity_init; package$entities.AgentEntity = AgentEntity; Object.defineProperty(AssignmentProgressSummary, 'Companion', {get: AssignmentProgressSummary$Companion_getInstance}); Object.defineProperty(AssignmentProgressSummary, '$serializer', {get: AssignmentProgressSummary$$serializer_getInstance}); package$entities.AssignmentProgressSummary_init_na46m2$ = AssignmentProgressSummary_init; package$entities.AssignmentProgressSummary = AssignmentProgressSummary; Object.defineProperty(Chat, 'Companion', {get: Chat$Companion_getInstance}); Object.defineProperty(Chat, '$serializer', {get: Chat$$serializer_getInstance}); package$entities.Chat_init_hho6eg$ = Chat_init; package$entities.Chat_init_ivxn3r$ = Chat_init_1; package$entities.Chat = Chat; Object.defineProperty(ChatMember, 'Companion', {get: ChatMember$Companion_getInstance}); Object.defineProperty(ChatMember, '$serializer', {get: ChatMember$$serializer_getInstance}); package$entities.ChatMember_init_y5rxtx$ = ChatMember_init; package$entities.ChatMember_init_3pjtqy$ = ChatMember_init_0; package$entities.ChatMember = ChatMember; Object.defineProperty(ChatWithLatestMessageAndCount, 'Companion', {get: ChatWithLatestMessageAndCount$Companion_getInstance}); Object.defineProperty(ChatWithLatestMessageAndCount, '$serializer', {get: ChatWithLatestMessageAndCount$$serializer_getInstance}); package$entities.ChatWithLatestMessageAndCount_init_eqwren$ = ChatWithLatestMessageAndCount_init; package$entities.ChatWithLatestMessageAndCount = ChatWithLatestMessageAndCount; Object.defineProperty(Clazz, 'Companion', {get: Clazz$Companion_getInstance}); Object.defineProperty(Clazz, '$serializer', {get: Clazz$$serializer_getInstance}); package$entities.Clazz_init_dljzbr$ = Clazz_init; package$entities.Clazz = Clazz; Object.defineProperty(ClazzAssignment, 'Companion', {get: ClazzAssignment$Companion_getInstance}); Object.defineProperty(ClazzAssignment, '$serializer', {get: ClazzAssignment$$serializer_getInstance}); package$entities.ClazzAssignment_init_3gtwkx$ = ClazzAssignment_init; package$entities.ClazzAssignment = ClazzAssignment; Object.defineProperty(ClazzAssignmentWithCourseBlock, 'Companion', {get: ClazzAssignmentWithCourseBlock$Companion_getInstance}); Object.defineProperty(ClazzAssignmentWithCourseBlock, '$serializer', {get: ClazzAssignmentWithCourseBlock$$serializer_getInstance}); package$entities.ClazzAssignmentWithCourseBlock_init_wy7ocm$ = ClazzAssignmentWithCourseBlock_init; package$entities.ClazzAssignmentWithCourseBlock = ClazzAssignmentWithCourseBlock; Object.defineProperty(ClazzAssignmentWithMetrics, 'Companion', {get: ClazzAssignmentWithMetrics$Companion_getInstance}); Object.defineProperty(ClazzAssignmentWithMetrics, '$serializer', {get: ClazzAssignmentWithMetrics$$serializer_getInstance}); package$entities.ClazzAssignmentWithMetrics_init_xiubz4$ = ClazzAssignmentWithMetrics_init; package$entities.ClazzAssignmentWithMetrics = ClazzAssignmentWithMetrics; Object.defineProperty(ClazzEnrolment, 'Companion', {get: ClazzEnrolment$Companion_getInstance}); Object.defineProperty(ClazzEnrolment, '$serializer', {get: ClazzEnrolment$$serializer_getInstance}); package$entities.ClazzEnrolment_init_u3urac$ = ClazzEnrolment_init; package$entities.ClazzEnrolment = ClazzEnrolment; Object.defineProperty(ClazzEnrolmentWithClazz, 'Companion', {get: ClazzEnrolmentWithClazz$Companion_getInstance}); Object.defineProperty(ClazzEnrolmentWithClazz, '$serializer', {get: ClazzEnrolmentWithClazz$$serializer_getInstance}); package$entities.ClazzEnrolmentWithClazz_init_r6ondl$ = ClazzEnrolmentWithClazz_init; package$entities.ClazzEnrolmentWithClazz = ClazzEnrolmentWithClazz; Object.defineProperty(ClazzEnrolmentWithClazzAndAttendance, 'Companion', {get: ClazzEnrolmentWithClazzAndAttendance$Companion_getInstance}); Object.defineProperty(ClazzEnrolmentWithClazzAndAttendance, '$serializer', {get: ClazzEnrolmentWithClazzAndAttendance$$serializer_getInstance}); package$entities.ClazzEnrolmentWithClazzAndAttendance_init_w05voe$ = ClazzEnrolmentWithClazzAndAttendance_init; package$entities.ClazzEnrolmentWithClazzAndAttendance = ClazzEnrolmentWithClazzAndAttendance; Object.defineProperty(ClazzEnrolmentWithLeavingReason, 'Companion', {get: ClazzEnrolmentWithLeavingReason$Companion_getInstance}); Object.defineProperty(ClazzEnrolmentWithLeavingReason, '$serializer', {get: ClazzEnrolmentWithLeavingReason$$serializer_getInstance}); package$entities.ClazzEnrolmentWithLeavingReason_init_2gkl2o$ = ClazzEnrolmentWithLeavingReason_init; package$entities.ClazzEnrolmentWithLeavingReason = ClazzEnrolmentWithLeavingReason; Object.defineProperty(ClazzEnrolmentWithPerson, 'Companion', {get: ClazzEnrolmentWithPerson$Companion_getInstance}); Object.defineProperty(ClazzEnrolmentWithPerson, '$serializer', {get: ClazzEnrolmentWithPerson$$serializer_getInstance}); package$entities.ClazzEnrolmentWithPerson_init_2ryz78$ = ClazzEnrolmentWithPerson_init; package$entities.ClazzEnrolmentWithPerson = ClazzEnrolmentWithPerson; Object.defineProperty(ClazzLog, 'Companion', {get: ClazzLog$Companion_getInstance}); Object.defineProperty(ClazzLog, '$serializer', {get: ClazzLog$$serializer_getInstance}); package$entities.ClazzLog_init_sart3s$ = ClazzLog_init; package$entities.ClazzLog = ClazzLog; Object.defineProperty(ClazzLogAttendanceRecord, 'Companion', {get: ClazzLogAttendanceRecord$Companion_getInstance}); Object.defineProperty(ClazzLogAttendanceRecord, '$serializer', {get: ClazzLogAttendanceRecord$$serializer_getInstance}); package$entities.ClazzLogAttendanceRecord_init_j55olt$ = ClazzLogAttendanceRecord_init; package$entities.ClazzLogAttendanceRecord = ClazzLogAttendanceRecord; Object.defineProperty(ClazzLogAttendanceRecordWithPerson, 'Companion', {get: ClazzLogAttendanceRecordWithPerson$Companion_getInstance}); Object.defineProperty(ClazzLogAttendanceRecordWithPerson, '$serializer', {get: ClazzLogAttendanceRecordWithPerson$$serializer_getInstance}); package$entities.ClazzLogAttendanceRecordWithPerson_init_m3rv87$ = ClazzLogAttendanceRecordWithPerson_init; package$entities.ClazzLogAttendanceRecordWithPerson = ClazzLogAttendanceRecordWithPerson; Object.defineProperty(ClazzWithDisplayDetails, 'Companion', {get: ClazzWithDisplayDetails$Companion_getInstance}); Object.defineProperty(ClazzWithDisplayDetails, '$serializer', {get: ClazzWithDisplayDetails$$serializer_getInstance}); package$entities.ClazzWithDisplayDetails_init_jfreia$ = ClazzWithDisplayDetails_init; package$entities.ClazzWithDisplayDetails = ClazzWithDisplayDetails; Object.defineProperty(ClazzWithHolidayCalendarAndSchoolAndTerminology, 'Companion', {get: ClazzWithHolidayCalendarAndSchoolAndTerminology$Companion_getInstance}); Object.defineProperty(ClazzWithHolidayCalendarAndSchoolAndTerminology, '$serializer', {get: ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer_getInstance}); package$entities.ClazzWithHolidayCalendarAndSchoolAndTerminology_init_cp23pq$ = ClazzWithHolidayCalendarAndSchoolAndTerminology_init; package$entities.ClazzWithHolidayCalendarAndSchoolAndTerminology = ClazzWithHolidayCalendarAndSchoolAndTerminology; Object.defineProperty(ClazzWithListDisplayDetails, 'Companion', {get: ClazzWithListDisplayDetails$Companion_getInstance}); Object.defineProperty(ClazzWithListDisplayDetails, '$serializer', {get: ClazzWithListDisplayDetails$$serializer_getInstance}); package$entities.ClazzWithListDisplayDetails_init_1l4oix$ = ClazzWithListDisplayDetails_init; package$entities.ClazzWithListDisplayDetails = ClazzWithListDisplayDetails; Object.defineProperty(ClazzWithSchool, 'Companion', {get: ClazzWithSchool$Companion_getInstance}); Object.defineProperty(ClazzWithSchool, '$serializer', {get: ClazzWithSchool$$serializer_getInstance}); package$entities.ClazzWithSchool_init_6oyrtq$ = ClazzWithSchool_init; package$entities.ClazzWithSchool = ClazzWithSchool; Object.defineProperty(Comments, 'Companion', {get: Comments$Companion_getInstance}); Object.defineProperty(Comments, '$serializer', {get: Comments$$serializer_getInstance}); package$entities.Comments_init_z65qjz$ = Comments_init; package$entities.Comments_init_crfs04$ = Comments_init_0; package$entities.Comments = Comments; Object.defineProperty(CommentsWithPerson, 'Companion', {get: CommentsWithPerson$Companion_getInstance}); Object.defineProperty(CommentsWithPerson, '$serializer', {get: CommentsWithPerson$$serializer_getInstance}); package$entities.CommentsWithPerson_init_hhsml3$ = CommentsWithPerson_init; package$entities.CommentsWithPerson = CommentsWithPerson; Object.defineProperty(ConnectivityStatus, 'Companion', {get: ConnectivityStatus$Companion_getInstance}); Object.defineProperty(ConnectivityStatus, '$serializer', {get: ConnectivityStatus$$serializer_getInstance}); package$entities.ConnectivityStatus_init_1fsxe9$ = ConnectivityStatus_init; package$entities.ConnectivityStatus = ConnectivityStatus; Object.defineProperty(Container, 'Companion', {get: Container$Companion_getInstance}); Object.defineProperty(Container, '$serializer', {get: Container$$serializer_getInstance}); package$entities.Container_init_5cc2x1$ = Container_init; package$entities.Container = Container; Object.defineProperty(ContainerEntry, 'Companion', {get: ContainerEntry$Companion_getInstance}); Object.defineProperty(ContainerEntry, '$serializer', {get: ContainerEntry$$serializer_getInstance}); package$entities.ContainerEntry_init_rxixqb$ = ContainerEntry_init; package$entities.ContainerEntry = ContainerEntry; Object.defineProperty(ContainerEntryFile, 'Companion', {get: ContainerEntryFile$Companion_getInstance}); Object.defineProperty(ContainerEntryFile, '$serializer', {get: ContainerEntryFile$$serializer_getInstance}); package$entities.ContainerEntryFile_init_39zgnt$ = ContainerEntryFile_init; package$entities.ContainerEntryFile = ContainerEntryFile; Object.defineProperty(ContainerEntryFileUidAndPath, 'Companion', {get: ContainerEntryFileUidAndPath$Companion_getInstance}); Object.defineProperty(ContainerEntryFileUidAndPath, '$serializer', {get: ContainerEntryFileUidAndPath$$serializer_getInstance}); package$entities.ContainerEntryFileUidAndPath_init_wok9wd$ = ContainerEntryFileUidAndPath_init; package$entities.ContainerEntryFileUidAndPath = ContainerEntryFileUidAndPath; Object.defineProperty(ContainerEntryWithContainerEntryFile, 'Companion', {get: ContainerEntryWithContainerEntryFile$Companion_getInstance}); Object.defineProperty(ContainerEntryWithContainerEntryFile, '$serializer', {get: ContainerEntryWithContainerEntryFile$$serializer_getInstance}); package$entities.ContainerEntryWithContainerEntryFile_init_jrhsv7$ = ContainerEntryWithContainerEntryFile_init; package$entities.ContainerEntryWithContainerEntryFile_init_t4nsby$ = ContainerEntryWithContainerEntryFile_init_0; package$entities.ContainerEntryWithContainerEntryFile = ContainerEntryWithContainerEntryFile; Object.defineProperty(ContainerEntryWithMd5, 'Companion', {get: ContainerEntryWithMd5$Companion_getInstance}); Object.defineProperty(ContainerEntryWithMd5, '$serializer', {get: ContainerEntryWithMd5$$serializer_getInstance}); package$entities.ContainerEntryWithMd5_init_8lnkb0$ = ContainerEntryWithMd5_init; package$entities.ContainerEntryWithMd5 = ContainerEntryWithMd5; Object.defineProperty(ContainerImportJob, 'Companion', {get: ContainerImportJob$Companion_getInstance}); Object.defineProperty(ContainerImportJob, '$serializer', {get: ContainerImportJob$$serializer_getInstance}); package$entities.ContainerImportJob_init_5npc5h$ = ContainerImportJob_init; package$entities.ContainerImportJob = ContainerImportJob; Object.defineProperty(ContainerUidAndMimeType, 'Companion', {get: ContainerUidAndMimeType$Companion_getInstance}); Object.defineProperty(ContainerUidAndMimeType, '$serializer', {get: ContainerUidAndMimeType$$serializer_getInstance}); package$entities.ContainerUidAndMimeType_init_wok9wd$ = ContainerUidAndMimeType_init; package$entities.ContainerUidAndMimeType = ContainerUidAndMimeType; Object.defineProperty(ContainerWithContentEntry, 'Companion', {get: ContainerWithContentEntry$Companion_getInstance}); Object.defineProperty(ContainerWithContentEntry, '$serializer', {get: ContainerWithContentEntry$$serializer_getInstance}); package$entities.ContainerWithContentEntry_init_nzu7tx$ = ContainerWithContentEntry_init; package$entities.ContainerWithContentEntry = ContainerWithContentEntry; Object.defineProperty(ContentCategory, 'Companion', {get: ContentCategory$Companion_getInstance}); Object.defineProperty(ContentCategory, '$serializer', {get: ContentCategory$$serializer_getInstance}); package$entities.ContentCategory_init_c2widx$ = ContentCategory_init; package$entities.ContentCategory = ContentCategory; Object.defineProperty(ContentCategorySchema, 'Companion', {get: ContentCategorySchema$Companion_getInstance}); Object.defineProperty(ContentCategorySchema, '$serializer', {get: ContentCategorySchema$$serializer_getInstance}); package$entities.ContentCategorySchema_init_39zgnt$ = ContentCategorySchema_init; package$entities.ContentCategorySchema = ContentCategorySchema; Object.defineProperty(ContentEntry, 'Companion', {get: ContentEntry$Companion_getInstance}); Object.defineProperty(ContentEntry, '$serializer', {get: ContentEntry$$serializer_getInstance}); package$entities.ContentEntry_init_dpigsr$ = ContentEntry_init; package$entities.ContentEntry = ContentEntry; package$entities.ContentEntryButtonModel = ContentEntryButtonModel; Object.defineProperty(ContentEntryContentCategoryJoin, 'Companion', {get: ContentEntryContentCategoryJoin$Companion_getInstance}); Object.defineProperty(ContentEntryContentCategoryJoin, '$serializer', {get: ContentEntryContentCategoryJoin$$serializer_getInstance}); package$entities.ContentEntryContentCategoryJoin_init_9f3e5v$ = ContentEntryContentCategoryJoin_init; package$entities.ContentEntryContentCategoryJoin = ContentEntryContentCategoryJoin; Object.defineProperty(ContentEntryContentJobItemParams, 'Companion', {get: ContentEntryContentJobItemParams$Companion_getInstance}); Object.defineProperty(ContentEntryContentJobItemParams, '$serializer', {get: ContentEntryContentJobItemParams$$serializer_getInstance}); package$entities.ContentEntryContentJobItemParams_init_2r64vr$ = ContentEntryContentJobItemParams_init; package$entities.ContentEntryContentJobItemParams = ContentEntryContentJobItemParams; Object.defineProperty(ContentEntryParentChildJoin, 'Companion', {get: ContentEntryParentChildJoin$Companion_getInstance}); Object.defineProperty(ContentEntryParentChildJoin, '$serializer', {get: ContentEntryParentChildJoin$$serializer_getInstance}); package$entities.ContentEntryParentChildJoin_init_i0trgp$ = ContentEntryParentChildJoin_init; package$entities.ContentEntryParentChildJoin = ContentEntryParentChildJoin; Object.defineProperty(ContentEntryPicture, 'Companion', {get: ContentEntryPicture$Companion_getInstance}); Object.defineProperty(ContentEntryPicture, '$serializer', {get: ContentEntryPicture$$serializer_getInstance}); package$entities.ContentEntryPicture_init_9c231a$ = ContentEntryPicture_init; package$entities.ContentEntryPicture = ContentEntryPicture; Object.defineProperty(ContentEntryRelatedEntryJoin, 'Companion', {get: ContentEntryRelatedEntryJoin$Companion_getInstance}); Object.defineProperty(ContentEntryRelatedEntryJoin, '$serializer', {get: ContentEntryRelatedEntryJoin$$serializer_getInstance}); package$entities.ContentEntryRelatedEntryJoin_init_er2an1$ = ContentEntryRelatedEntryJoin_init; package$entities.ContentEntryRelatedEntryJoin = ContentEntryRelatedEntryJoin; Object.defineProperty(ContentEntryRelatedEntryJoinWithLangName, 'Companion', {get: ContentEntryRelatedEntryJoinWithLangName$Companion_getInstance}); Object.defineProperty(ContentEntryRelatedEntryJoinWithLangName, '$serializer', {get: ContentEntryRelatedEntryJoinWithLangName$$serializer_getInstance}); package$entities.ContentEntryRelatedEntryJoinWithLangName_init_l1ugyu$ = ContentEntryRelatedEntryJoinWithLangName_init; package$entities.ContentEntryRelatedEntryJoinWithLangName = ContentEntryRelatedEntryJoinWithLangName; Object.defineProperty(ContentEntryRelatedEntryJoinWithLanguage, 'Companion', {get: ContentEntryRelatedEntryJoinWithLanguage$Companion_getInstance}); Object.defineProperty(ContentEntryRelatedEntryJoinWithLanguage, '$serializer', {get: ContentEntryRelatedEntryJoinWithLanguage$$serializer_getInstance}); package$entities.ContentEntryRelatedEntryJoinWithLanguage_init_cg6wni$ = ContentEntryRelatedEntryJoinWithLanguage_init; package$entities.ContentEntryRelatedEntryJoinWithLanguage = ContentEntryRelatedEntryJoinWithLanguage; Object.defineProperty(ContentEntryStatementScoreProgress, 'Companion', {get: ContentEntryStatementScoreProgress$Companion_getInstance}); Object.defineProperty(ContentEntryStatementScoreProgress, '$serializer', {get: ContentEntryStatementScoreProgress$$serializer_getInstance}); package$entities.ContentEntryStatementScoreProgress_init_jqycla$ = ContentEntryStatementScoreProgress_init; package$entities.ContentEntryStatementScoreProgress = ContentEntryStatementScoreProgress; Object.defineProperty(ContentEntryWithBlockAndLanguage, 'Companion', {get: ContentEntryWithBlockAndLanguage$Companion_getInstance}); Object.defineProperty(ContentEntryWithBlockAndLanguage, '$serializer', {get: ContentEntryWithBlockAndLanguage$$serializer_getInstance}); package$entities.ContentEntryWithBlockAndLanguage_init_bou361$ = ContentEntryWithBlockAndLanguage_init; package$entities.ContentEntryWithBlockAndLanguage = ContentEntryWithBlockAndLanguage; Object.defineProperty(ContentEntryWithLanguage, 'Companion', {get: ContentEntryWithLanguage$Companion_getInstance}); Object.defineProperty(ContentEntryWithLanguage, '$serializer', {get: ContentEntryWithLanguage$$serializer_getInstance}); package$entities.ContentEntryWithLanguage_init_xwmo0w$ = ContentEntryWithLanguage_init; package$entities.ContentEntryWithLanguage = ContentEntryWithLanguage; Object.defineProperty(ContentEntryWithMostRecentContainer, 'Companion', {get: ContentEntryWithMostRecentContainer$Companion_getInstance}); Object.defineProperty(ContentEntryWithMostRecentContainer, '$serializer', {get: ContentEntryWithMostRecentContainer$$serializer_getInstance}); package$entities.ContentEntryWithMostRecentContainer_init_4h8fbl$ = ContentEntryWithMostRecentContainer_init; package$entities.ContentEntryWithMostRecentContainer = ContentEntryWithMostRecentContainer; Object.defineProperty(ContentEntryWithParentChildJoinAndMostRecentContainer, 'Companion', {get: ContentEntryWithParentChildJoinAndMostRecentContainer$Companion_getInstance}); Object.defineProperty(ContentEntryWithParentChildJoinAndMostRecentContainer, '$serializer', {get: ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer_getInstance}); package$entities.ContentEntryWithParentChildJoinAndMostRecentContainer_init_nqvxxz$ = ContentEntryWithParentChildJoinAndMostRecentContainer_init; package$entities.ContentEntryWithParentChildJoinAndMostRecentContainer = ContentEntryWithParentChildJoinAndMostRecentContainer; Object.defineProperty(ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer, 'Companion', {get: ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$Companion_getInstance}); Object.defineProperty(ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer, '$serializer', {get: ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer_getInstance}); package$entities.ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_init_ae3x79$ = ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer_init; package$entities.ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer = ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer; package$entities.ContentJob = ContentJob; package$entities.ContentJobItem = ContentJobItem; package$entities.ContentJobItemAndContentJob = ContentJobItemAndContentJob; package$entities.ContentJobItemProgress = ContentJobItemProgress; package$entities.ContentJobItemProgressAndStatus = ContentJobItemProgressAndStatus; Object.defineProperty(ContextXObjectStatementJoin, 'Companion', {get: ContextXObjectStatementJoin$Companion_getInstance}); Object.defineProperty(ContextXObjectStatementJoin, '$serializer', {get: ContextXObjectStatementJoin$$serializer_getInstance}); package$entities.ContextXObjectStatementJoin_init_tr8ztv$ = ContextXObjectStatementJoin_init; package$entities.ContextXObjectStatementJoin = ContextXObjectStatementJoin; Object.defineProperty(CourseAssignmentMark, 'Companion', {get: CourseAssignmentMark$Companion_getInstance}); Object.defineProperty(CourseAssignmentMark, '$serializer', {get: CourseAssignmentMark$$serializer_getInstance}); package$entities.CourseAssignmentMark_init_d3gmw2$ = CourseAssignmentMark_init; package$entities.CourseAssignmentMark = CourseAssignmentMark; Object.defineProperty(CourseAssignmentSubmission, 'Companion', {get: CourseAssignmentSubmission$Companion_getInstance}); Object.defineProperty(CourseAssignmentSubmission, '$serializer', {get: CourseAssignmentSubmission$$serializer_getInstance}); package$entities.CourseAssignmentSubmission_init_x3a94n$ = CourseAssignmentSubmission_init; package$entities.CourseAssignmentSubmission = CourseAssignmentSubmission; Object.defineProperty(CourseAssignmentSubmissionAttachment, 'Companion', {get: CourseAssignmentSubmissionAttachment$Companion_getInstance}); Object.defineProperty(CourseAssignmentSubmissionAttachment, '$serializer', {get: CourseAssignmentSubmissionAttachment$$serializer_getInstance}); package$entities.CourseAssignmentSubmissionAttachment_init_ujuyx0$ = CourseAssignmentSubmissionAttachment_init; package$entities.CourseAssignmentSubmissionAttachment = CourseAssignmentSubmissionAttachment; Object.defineProperty(CourseAssignmentSubmissionWithAttachment, 'Companion', {get: CourseAssignmentSubmissionWithAttachment$Companion_getInstance}); Object.defineProperty(CourseAssignmentSubmissionWithAttachment, '$serializer', {get: CourseAssignmentSubmissionWithAttachment$$serializer_getInstance}); package$entities.CourseAssignmentSubmissionWithAttachment_init_caiyn$ = CourseAssignmentSubmissionWithAttachment_init; package$entities.CourseAssignmentSubmissionWithAttachment = CourseAssignmentSubmissionWithAttachment; Object.defineProperty(CourseBlock, 'Companion', {get: CourseBlock$Companion_getInstance}); Object.defineProperty(CourseBlock, '$serializer', {get: CourseBlock$$serializer_getInstance}); package$entities.CourseBlock_init_gibxq3$ = CourseBlock_init; package$entities.CourseBlock = CourseBlock; package$entities.CourseBlockWithCompleteEntity = CourseBlockWithCompleteEntity; Object.defineProperty(CourseBlockWithEntity, 'Companion', {get: CourseBlockWithEntity$Companion_getInstance}); Object.defineProperty(CourseBlockWithEntity, '$serializer', {get: CourseBlockWithEntity$$serializer_getInstance}); package$entities.CourseBlockWithEntity_init_uvhwzu$ = CourseBlockWithEntity_init; package$entities.CourseBlockWithEntity = CourseBlockWithEntity; Object.defineProperty(CourseBlockWithEntityDb, 'Companion', {get: CourseBlockWithEntityDb$Companion_getInstance}); Object.defineProperty(CourseBlockWithEntityDb, '$serializer', {get: CourseBlockWithEntityDb$$serializer_getInstance}); package$entities.CourseBlockWithEntityDb_init_nnoj76$ = CourseBlockWithEntityDb_init; package$entities.CourseBlockWithEntityDb = CourseBlockWithEntityDb; Object.defineProperty(CourseDiscussion, 'Companion', {get: CourseDiscussion$Companion_getInstance}); Object.defineProperty(CourseDiscussion, '$serializer', {get: CourseDiscussion$$serializer_getInstance}); package$entities.CourseDiscussion_init_cv9kt$ = CourseDiscussion_init; package$entities.CourseDiscussion = CourseDiscussion; Object.defineProperty(CourseGroupMember, 'Companion', {get: CourseGroupMember$Companion_getInstance}); Object.defineProperty(CourseGroupMember, '$serializer', {get: CourseGroupMember$$serializer_getInstance}); package$entities.CourseGroupMember_init_bos1zz$ = CourseGroupMember_init; package$entities.CourseGroupMember = CourseGroupMember; Object.defineProperty(CourseGroupMemberPerson, 'Companion', {get: CourseGroupMemberPerson$Companion_getInstance}); Object.defineProperty(CourseGroupMemberPerson, '$serializer', {get: CourseGroupMemberPerson$$serializer_getInstance}); package$entities.CourseGroupMemberPerson_init_ds5ugt$ = CourseGroupMemberPerson_init; package$entities.CourseGroupMemberPerson = CourseGroupMemberPerson; Object.defineProperty(CourseGroupSet, 'Companion', {get: CourseGroupSet$Companion_getInstance}); Object.defineProperty(CourseGroupSet, '$serializer', {get: CourseGroupSet$$serializer_getInstance}); package$entities.CourseGroupSet_init_vqss6u$ = CourseGroupSet_init; package$entities.CourseGroupSet = CourseGroupSet; Object.defineProperty(CoursePicture, 'Companion', {get: CoursePicture$Companion_getInstance}); Object.defineProperty(CoursePicture, '$serializer', {get: CoursePicture$$serializer_getInstance}); package$entities.CoursePicture_init_u6ccw5$ = CoursePicture_init; package$entities.CoursePicture = CoursePicture; Object.defineProperty(CourseTerminology, 'Companion', {get: CourseTerminology$Companion_getInstance}); Object.defineProperty(CourseTerminology, '$serializer', {get: CourseTerminology$$serializer_getInstance}); package$entities.CourseTerminology_init_srk0xd$ = CourseTerminology_init; package$entities.CourseTerminology = CourseTerminology; Object.defineProperty(DiscussionPost, 'Companion', {get: DiscussionPost$Companion_getInstance}); Object.defineProperty(DiscussionPost, '$serializer', {get: DiscussionPost$$serializer_getInstance}); package$entities.DiscussionPost_init_92kn7p$ = DiscussionPost_init; package$entities.DiscussionPost = DiscussionPost; Object.defineProperty(DiscussionPostWithDetails, 'Companion', {get: DiscussionPostWithDetails$Companion_getInstance}); Object.defineProperty(DiscussionPostWithDetails, '$serializer', {get: DiscussionPostWithDetails$$serializer_getInstance}); package$entities.DiscussionPostWithDetails_init_l7rnc3$ = DiscussionPostWithDetails_init; package$entities.DiscussionPostWithDetails = DiscussionPostWithDetails; Object.defineProperty(DiscussionTopic, 'Companion', {get: DiscussionTopic$Companion_getInstance}); Object.defineProperty(DiscussionTopic, '$serializer', {get: DiscussionTopic$$serializer_getInstance}); package$entities.DiscussionTopic_init_32b204$ = DiscussionTopic_init; package$entities.DiscussionTopic = DiscussionTopic; Object.defineProperty(DiscussionTopicListDetail, 'Companion', {get: DiscussionTopicListDetail$Companion_getInstance}); Object.defineProperty(DiscussionTopicListDetail, '$serializer', {get: DiscussionTopicListDetail$$serializer_getInstance}); package$entities.DiscussionTopicListDetail_init_17zyhd$ = DiscussionTopicListDetail_init; package$entities.DiscussionTopicListDetail = DiscussionTopicListDetail; Object.defineProperty(DistinctCategorySchema, 'Companion', {get: DistinctCategorySchema$Companion_getInstance}); Object.defineProperty(DistinctCategorySchema, '$serializer', {get: DistinctCategorySchema$$serializer_getInstance}); package$entities.DistinctCategorySchema_init_dxjhgp$ = DistinctCategorySchema_init; package$entities.DistinctCategorySchema = DistinctCategorySchema; package$entities.DownloadJobSizeInfo = DownloadJobSizeInfo; Object.defineProperty(EntityRole, 'Companion', {get: EntityRole$Companion_getInstance}); Object.defineProperty(EntityRole, '$serializer', {get: EntityRole$$serializer_getInstance}); package$entities.EntityRole_init_bblqnd$ = EntityRole_init; package$entities.EntityRole = EntityRole; Object.defineProperty(EntityRoleWithNameAndRole, 'Companion', {get: EntityRoleWithNameAndRole$Companion_getInstance}); Object.defineProperty(EntityRoleWithNameAndRole, '$serializer', {get: EntityRoleWithNameAndRole$$serializer_getInstance}); package$entities.EntityRoleWithNameAndRole_init_iopo7d$ = EntityRoleWithNameAndRole_init; package$entities.EntityRoleWithNameAndRole = EntityRoleWithNameAndRole; Object.defineProperty(ErrorReport, 'Companion', {get: ErrorReport$Companion_getInstance}); package$entities.ErrorReport = ErrorReport; Object.defineProperty(GroupLearningSession, 'Companion', {get: GroupLearningSession$Companion_getInstance}); Object.defineProperty(GroupLearningSession, '$serializer', {get: GroupLearningSession$$serializer_getInstance}); package$entities.GroupLearningSession_init_s2lemw$ = GroupLearningSession_init; package$entities.GroupLearningSession = GroupLearningSession; Object.defineProperty(Holiday, 'Companion', {get: Holiday$Companion_getInstance}); Object.defineProperty(Holiday, '$serializer', {get: Holiday$$serializer_getInstance}); package$entities.Holiday_init_3tvbti$ = Holiday_init; package$entities.Holiday = Holiday; Object.defineProperty(HolidayCalendar, 'Companion', {get: HolidayCalendar$Companion_getInstance}); Object.defineProperty(HolidayCalendar, '$serializer', {get: HolidayCalendar$$serializer_getInstance}); package$entities.HolidayCalendar_init_qqafy7$ = HolidayCalendar_init; package$entities.HolidayCalendar = HolidayCalendar; Object.defineProperty(HolidayCalendarWithNumEntries, 'Companion', {get: HolidayCalendarWithNumEntries$Companion_getInstance}); Object.defineProperty(HolidayCalendarWithNumEntries, '$serializer', {get: HolidayCalendarWithNumEntries$$serializer_getInstance}); package$entities.HolidayCalendarWithNumEntries_init_gr0z09$ = HolidayCalendarWithNumEntries_init; package$entities.HolidayCalendarWithNumEntries = HolidayCalendarWithNumEntries; Object.defineProperty(LangUidAndName, 'Companion', {get: LangUidAndName$Companion_getInstance}); Object.defineProperty(LangUidAndName, '$serializer', {get: LangUidAndName$$serializer_getInstance}); package$entities.LangUidAndName_init_wok9wd$ = LangUidAndName_init; package$entities.LangUidAndName = LangUidAndName; Object.defineProperty(Language, 'Companion', {get: Language$Companion_getInstance}); Object.defineProperty(Language, '$serializer', {get: Language$$serializer_getInstance}); package$entities.Language_init_jyfex9$ = Language_init; package$entities.Language = Language; Object.defineProperty(LanguageVariant, 'Companion', {get: LanguageVariant$Companion_getInstance}); Object.defineProperty(LanguageVariant, '$serializer', {get: LanguageVariant$$serializer_getInstance}); package$entities.LanguageVariant_init_lz0lyi$ = LanguageVariant_init; package$entities.LanguageVariant = LanguageVariant; Object.defineProperty(LearnerGroup, 'Companion', {get: LearnerGroup$Companion_getInstance}); Object.defineProperty(LearnerGroup, '$serializer', {get: LearnerGroup$$serializer_getInstance}); package$entities.LearnerGroup_init_a6twsi$ = LearnerGroup_init; package$entities.LearnerGroup = LearnerGroup; Object.defineProperty(LearnerGroupMember, 'Companion', {get: LearnerGroupMember$Companion_getInstance}); Object.defineProperty(LearnerGroupMember, '$serializer', {get: LearnerGroupMember$$serializer_getInstance}); package$entities.LearnerGroupMember_init_rad0to$ = LearnerGroupMember_init; package$entities.LearnerGroupMember = LearnerGroupMember; Object.defineProperty(LearnerGroupMemberWithPerson, 'Companion', {get: LearnerGroupMemberWithPerson$Companion_getInstance}); Object.defineProperty(LearnerGroupMemberWithPerson, '$serializer', {get: LearnerGroupMemberWithPerson$$serializer_getInstance}); package$entities.LearnerGroupMemberWithPerson_init_8rfpck$ = LearnerGroupMemberWithPerson_init; package$entities.LearnerGroupMemberWithPerson = LearnerGroupMemberWithPerson; Object.defineProperty(LeavingReason, 'Companion', {get: LeavingReason$Companion_getInstance}); Object.defineProperty(LeavingReason, '$serializer', {get: LeavingReason$$serializer_getInstance}); package$entities.LeavingReason_init_154yko$ = LeavingReason_init; package$entities.LeavingReason = LeavingReason; Object.defineProperty(Message, 'Companion', {get: Message$Companion_getInstance}); Object.defineProperty(Message, '$serializer', {get: Message$$serializer_getInstance}); package$entities.Message_init_zb79hy$ = Message_init; package$entities.Message_init_cd114f$ = Message_init_0; package$entities.Message_init_65ss6k$ = Message_init_1; package$entities.Message = Message; Object.defineProperty(MessageRead, 'Companion', {get: MessageRead$Companion_getInstance}); Object.defineProperty(MessageRead, '$serializer', {get: MessageRead$$serializer_getInstance}); package$entities.MessageRead_init_m2fh08$ = MessageRead_init; package$entities.MessageRead_init_b9bd0d$ = MessageRead_init_0; package$entities.MessageRead = MessageRead; Object.defineProperty(MessageWithPerson, 'Companion', {get: MessageWithPerson$Companion_getInstance}); Object.defineProperty(MessageWithPerson, '$serializer', {get: MessageWithPerson$$serializer_getInstance}); package$entities.MessageWithPerson_init_ux2gik$ = MessageWithPerson_init; package$entities.MessageWithPerson = MessageWithPerson; Object.defineProperty(Moment, 'Companion', {get: Moment$Companion_getInstance}); Object.defineProperty(Moment, '$serializer', {get: Moment$$serializer_getInstance}); package$entities.Moment_init_ahr5ei$ = Moment_init; package$entities.Moment = Moment; Object.defineProperty(DateRangeMoment, 'Companion', {get: DateRangeMoment$Companion_getInstance}); Object.defineProperty(DateRangeMoment, '$serializer', {get: DateRangeMoment$$serializer_getInstance}); package$entities.DateRangeMoment_init_4tfctt$ = DateRangeMoment_init; package$entities.DateRangeMoment = DateRangeMoment; Object.defineProperty(NetworkNode, 'Companion', {get: NetworkNode$Companion_getInstance}); Object.defineProperty(NetworkNode, '$serializer', {get: NetworkNode$$serializer_getInstance}); package$entities.NetworkNode_init_81onh5$ = NetworkNode_init; package$entities.NetworkNode = NetworkNode; package$entities.ParentEnrolmentRequired = ParentEnrolmentRequired; Object.defineProperty(Person, 'Companion', {get: Person$Companion_getInstance}); Object.defineProperty(Person, '$serializer', {get: Person$$serializer_getInstance}); package$entities.Person_init_qnckxs$ = Person_init; package$entities.Person = Person; Object.defineProperty(PersonAuth, 'Companion', {get: PersonAuth$Companion_getInstance}); Object.defineProperty(PersonAuth, '$serializer', {get: PersonAuth$$serializer_getInstance}); package$entities.PersonAuth_init_831c0l$ = PersonAuth_init; package$entities.PersonAuth = PersonAuth; Object.defineProperty(PersonAuth2, 'Companion', {get: PersonAuth2$Companion_getInstance}); package$entities.PersonAuth2 = PersonAuth2; Object.defineProperty(PersonGroup, 'Companion', {get: PersonGroup$Companion_getInstance}); Object.defineProperty(PersonGroup, '$serializer', {get: PersonGroup$$serializer_getInstance}); package$entities.PersonGroup_init_n7br9l$ = PersonGroup_init; package$entities.PersonGroup_init_61zpoe$ = PersonGroup_init_0; package$entities.PersonGroup = PersonGroup; package$entities.PersonGroupAssignmentSummary = PersonGroupAssignmentSummary; Object.defineProperty(PersonGroupMember, 'Companion', {get: PersonGroupMember$Companion_getInstance}); Object.defineProperty(PersonGroupMember, '$serializer', {get: PersonGroupMember$$serializer_getInstance}); package$entities.PersonGroupMember_init_ivbeas$ = PersonGroupMember_init; package$entities.PersonGroupMember_init_3pjtqy$ = PersonGroupMember_init_0; package$entities.PersonGroupMember = PersonGroupMember; Object.defineProperty(PersonParentJoin, 'Companion', {get: PersonParentJoin$Companion_getInstance}); Object.defineProperty(PersonParentJoin, '$serializer', {get: PersonParentJoin$$serializer_getInstance}); package$entities.PersonParentJoin_init_d7x67w$ = PersonParentJoin_init; package$entities.PersonParentJoin = PersonParentJoin; Object.defineProperty(PersonParentJoinWithMinorPerson, 'Companion', {get: PersonParentJoinWithMinorPerson$Companion_getInstance}); Object.defineProperty(PersonParentJoinWithMinorPerson, '$serializer', {get: PersonParentJoinWithMinorPerson$$serializer_getInstance}); package$entities.PersonParentJoinWithMinorPerson_init_r55ib0$ = PersonParentJoinWithMinorPerson_init; package$entities.PersonParentJoinWithMinorPerson = PersonParentJoinWithMinorPerson; Object.defineProperty(PersonPicture, 'Companion', {get: PersonPicture$Companion_getInstance}); Object.defineProperty(PersonPicture, '$serializer', {get: PersonPicture$$serializer_getInstance}); package$entities.PersonPicture_init_u6ccw5$ = PersonPicture_init; package$entities.PersonPicture = PersonPicture; package$entities.PersonUidAndPasswordHash = PersonUidAndPasswordHash; Object.defineProperty(PersonWithAccount, 'Companion', {get: PersonWithAccount$Companion_getInstance}); Object.defineProperty(PersonWithAccount, '$serializer', {get: PersonWithAccount$$serializer_getInstance}); package$entities.PersonWithAccount_init_px30uh$ = PersonWithAccount_init; package$entities.PersonWithAccount = PersonWithAccount; Object.defineProperty(PersonWithAttemptsSummary, 'Companion', {get: PersonWithAttemptsSummary$Companion_getInstance}); Object.defineProperty(PersonWithAttemptsSummary, '$serializer', {get: PersonWithAttemptsSummary$$serializer_getInstance}); package$entities.PersonWithAttemptsSummary_init_douqjk$ = PersonWithAttemptsSummary_init; package$entities.PersonWithAttemptsSummary = PersonWithAttemptsSummary; Object.defineProperty(PersonWithClazzEnrolmentDetails, 'Companion', {get: PersonWithClazzEnrolmentDetails$Companion_getInstance}); Object.defineProperty(PersonWithClazzEnrolmentDetails, '$serializer', {get: PersonWithClazzEnrolmentDetails$$serializer_getInstance}); package$entities.PersonWithClazzEnrolmentDetails_init_p9duft$ = PersonWithClazzEnrolmentDetails_init; package$entities.PersonWithClazzEnrolmentDetails = PersonWithClazzEnrolmentDetails; Object.defineProperty(PersonWithDisplayDetails, 'Companion', {get: PersonWithDisplayDetails$Companion_getInstance}); Object.defineProperty(PersonWithDisplayDetails, '$serializer', {get: PersonWithDisplayDetails$$serializer_getInstance}); package$entities.PersonWithDisplayDetails_init_qnckxs$ = PersonWithDisplayDetails_init; package$entities.PersonWithDisplayDetails = PersonWithDisplayDetails; Object.defineProperty(PersonWithPersonParentJoin, 'Companion', {get: PersonWithPersonParentJoin$Companion_getInstance}); Object.defineProperty(PersonWithPersonParentJoin, '$serializer', {get: PersonWithPersonParentJoin$$serializer_getInstance}); package$entities.PersonWithPersonParentJoin_init_1l43lw$ = PersonWithPersonParentJoin_init; package$entities.PersonWithPersonParentJoin = PersonWithPersonParentJoin; Object.defineProperty(PersonWithSessionsDisplay, 'Companion', {get: PersonWithSessionsDisplay$Companion_getInstance}); Object.defineProperty(PersonWithSessionsDisplay, '$serializer', {get: PersonWithSessionsDisplay$$serializer_getInstance}); package$entities.PersonWithSessionsDisplay_init_j33i2l$ = PersonWithSessionsDisplay_init; package$entities.PersonWithSessionsDisplay = PersonWithSessionsDisplay; Object.defineProperty(Report, 'Companion', {get: Report$Companion_getInstance}); Object.defineProperty(Report, '$serializer', {get: Report$$serializer_getInstance}); package$entities.Report_init_7oz21j$ = Report_init; package$entities.Report = Report; Object.defineProperty(ReportFilter, 'Companion', {get: ReportFilter$Companion_getInstance}); Object.defineProperty(ReportFilter, '$serializer', {get: ReportFilter$$serializer_getInstance}); package$entities.ReportFilter_init_5nv23s$ = ReportFilter_init; package$entities.ReportFilter = ReportFilter; Object.defineProperty(ReportSeries, 'Companion', {get: ReportSeries$Companion_getInstance}); Object.defineProperty(ReportSeries, '$serializer', {get: ReportSeries$$serializer_getInstance}); package$entities.ReportSeries_init_d33ox0$ = ReportSeries_init; package$entities.ReportSeries = ReportSeries; Object.defineProperty(ReportWithSeriesWithFilters, 'Companion', {get: ReportWithSeriesWithFilters$Companion_getInstance}); Object.defineProperty(ReportWithSeriesWithFilters, '$serializer', {get: ReportWithSeriesWithFilters$$serializer_getInstance}); package$entities.ReportWithSeriesWithFilters_init_216vz6$ = ReportWithSeriesWithFilters_init; package$entities.ReportWithSeriesWithFilters_init_bj006k$ = ReportWithSeriesWithFilters_init_0; package$entities.ReportWithSeriesWithFilters = ReportWithSeriesWithFilters; Object.defineProperty(Role, 'Companion', {get: Role$Companion_getInstance}); Object.defineProperty(Role, '$serializer', {get: Role$$serializer_getInstance}); package$entities.Role_init_1ppb12$ = Role_init; package$entities.Role = Role; Object.defineProperty(Schedule, 'Companion', {get: Schedule$Companion_getInstance}); Object.defineProperty(Schedule, '$serializer', {get: Schedule$$serializer_getInstance}); package$entities.Schedule_init_5i1y12$ = Schedule_init; package$entities.Schedule = Schedule; Object.defineProperty(School, 'Companion', {get: School$Companion_getInstance}); Object.defineProperty(School, '$serializer', {get: School$$serializer_getInstance}); package$entities.School_init_xis46q$ = School_init; package$entities.School = School; Object.defineProperty(SchoolMember, 'Companion', {get: SchoolMember$Companion_getInstance}); Object.defineProperty(SchoolMember, '$serializer', {get: SchoolMember$$serializer_getInstance}); package$entities.SchoolMember_init_4enaee$ = SchoolMember_init; package$entities.SchoolMember_init = SchoolMember_init_0; package$entities.SchoolMember = SchoolMember; Object.defineProperty(SchoolMemberWithPerson, 'Companion', {get: SchoolMemberWithPerson$Companion_getInstance}); Object.defineProperty(SchoolMemberWithPerson, '$serializer', {get: SchoolMemberWithPerson$$serializer_getInstance}); package$entities.SchoolMemberWithPerson_init_6lho8i$ = SchoolMemberWithPerson_init; package$entities.SchoolMemberWithPerson = SchoolMemberWithPerson; Object.defineProperty(SchoolWithHolidayCalendar, 'Companion', {get: SchoolWithHolidayCalendar$Companion_getInstance}); Object.defineProperty(SchoolWithHolidayCalendar, '$serializer', {get: SchoolWithHolidayCalendar$$serializer_getInstance}); package$entities.SchoolWithHolidayCalendar_init_dmiohf$ = SchoolWithHolidayCalendar_init; package$entities.SchoolWithHolidayCalendar = SchoolWithHolidayCalendar; Object.defineProperty(SchoolWithMemberCountAndLocation, 'Companion', {get: SchoolWithMemberCountAndLocation$Companion_getInstance}); Object.defineProperty(SchoolWithMemberCountAndLocation, '$serializer', {get: SchoolWithMemberCountAndLocation$$serializer_getInstance}); package$entities.SchoolWithMemberCountAndLocation_init_7nhm5p$ = SchoolWithMemberCountAndLocation_init; package$entities.SchoolWithMemberCountAndLocation = SchoolWithMemberCountAndLocation; Object.defineProperty(ScopedGrant, 'Companion', {get: ScopedGrant$Companion_getInstance}); Object.defineProperty(ScopedGrant, '$serializer', {get: ScopedGrant$$serializer_getInstance}); package$entities.ScopedGrant_init_lqgq9k$ = ScopedGrant_init; package$entities.ScopedGrant = ScopedGrant; Object.defineProperty(ScopedGrantAndName, 'Companion', {get: ScopedGrantAndName$Companion_getInstance}); Object.defineProperty(ScopedGrantAndName, '$serializer', {get: ScopedGrantAndName$$serializer_getInstance}); package$entities.ScopedGrantAndName_init_nyvobj$ = ScopedGrantAndName_init; package$entities.ScopedGrantAndName = ScopedGrantAndName; Object.defineProperty(ScopedGrantWithName, 'Companion', {get: ScopedGrantWithName$Companion_getInstance}); Object.defineProperty(ScopedGrantWithName, '$serializer', {get: ScopedGrantWithName$$serializer_getInstance}); package$entities.ScopedGrantWithName_init_4xluz3$ = ScopedGrantWithName_init; package$entities.ScopedGrantWithName = ScopedGrantWithName; Object.defineProperty(ScrapeQueueItem, 'Companion', {get: ScrapeQueueItem$Companion_getInstance}); Object.defineProperty(ScrapeQueueItem, '$serializer', {get: ScrapeQueueItem$$serializer_getInstance}); package$entities.ScrapeQueueItem_init_m1ua1g$ = ScrapeQueueItem_init; package$entities.ScrapeQueueItem = ScrapeQueueItem; Object.defineProperty(ScrapeQueueItemWithScrapeRun, 'Companion', {get: ScrapeQueueItemWithScrapeRun$Companion_getInstance}); Object.defineProperty(ScrapeQueueItemWithScrapeRun, '$serializer', {get: ScrapeQueueItemWithScrapeRun$$serializer_getInstance}); package$entities.ScrapeQueueItemWithScrapeRun_init_wbynt4$ = ScrapeQueueItemWithScrapeRun_init; package$entities.ScrapeQueueItemWithScrapeRun = ScrapeQueueItemWithScrapeRun; Object.defineProperty(ScrapeRun, 'Companion', {get: ScrapeRun$Companion_getInstance}); Object.defineProperty(ScrapeRun, '$serializer', {get: ScrapeRun$$serializer_getInstance}); package$entities.ScrapeRun_init_lun91x$ = ScrapeRun_init; package$entities.ScrapeRun = ScrapeRun; Object.defineProperty(Site, 'Companion', {get: Site$Companion_getInstance}); Object.defineProperty(Site, '$serializer', {get: Site$$serializer_getInstance}); package$entities.Site_init_48f30n$ = Site_init; package$entities.Site = Site; Object.defineProperty(SiteTerms, 'Companion', {get: SiteTerms$Companion_getInstance}); Object.defineProperty(SiteTerms, '$serializer', {get: SiteTerms$$serializer_getInstance}); package$entities.SiteTerms_init_t45fgv$ = SiteTerms_init; package$entities.SiteTerms = SiteTerms; Object.defineProperty(SiteTermsWithLanguage, 'Companion', {get: SiteTermsWithLanguage$Companion_getInstance}); Object.defineProperty(SiteTermsWithLanguage, '$serializer', {get: SiteTermsWithLanguage$$serializer_getInstance}); package$entities.SiteTermsWithLanguage_init_r8z4ro$ = SiteTermsWithLanguage_init; package$entities.SiteTermsWithLanguage = SiteTermsWithLanguage; Object.defineProperty(StateContentEntity, 'Companion', {get: StateContentEntity$Companion_getInstance}); Object.defineProperty(StateContentEntity, '$serializer', {get: StateContentEntity$$serializer_getInstance}); package$entities.StateContentEntity_init_a64tuj$ = StateContentEntity_init; package$entities.StateContentEntity_init = StateContentEntity_init_1; package$entities.StateContentEntity = StateContentEntity; Object.defineProperty(StateEntity, 'Companion', {get: StateEntity$Companion_getInstance}); Object.defineProperty(StateEntity, '$serializer', {get: StateEntity$$serializer_getInstance}); package$entities.StateEntity_init_pvro0d$ = StateEntity_init; package$entities.StateEntity = StateEntity; Object.defineProperty(StatementEntity, 'Companion', {get: StatementEntity$Companion_getInstance}); Object.defineProperty(StatementEntity, '$serializer', {get: StatementEntity$$serializer_getInstance}); package$entities.StatementEntity_init_v10nt8$ = StatementEntity_init; package$entities.StatementEntity = StatementEntity; Object.defineProperty(StatementEntityWithDisplayDetails, 'Companion', {get: StatementEntityWithDisplayDetails$Companion_getInstance}); Object.defineProperty(StatementEntityWithDisplayDetails, '$serializer', {get: StatementEntityWithDisplayDetails$$serializer_getInstance}); package$entities.StatementEntityWithDisplayDetails_init_kicpsd$ = StatementEntityWithDisplayDetails_init; package$entities.StatementEntityWithDisplayDetails = StatementEntityWithDisplayDetails; Object.defineProperty(StatementReportData, 'Companion', {get: StatementReportData$Companion_getInstance}); Object.defineProperty(StatementReportData, '$serializer', {get: StatementReportData$$serializer_getInstance}); package$entities.StatementReportData_init_hn5lyq$ = StatementReportData_init; package$entities.StatementReportData = StatementReportData; Object.defineProperty(StatementWithSessionDetailDisplay, 'Companion', {get: StatementWithSessionDetailDisplay$Companion_getInstance}); Object.defineProperty(StatementWithSessionDetailDisplay, '$serializer', {get: StatementWithSessionDetailDisplay$$serializer_getInstance}); package$entities.StatementWithSessionDetailDisplay_init_woa8gx$ = StatementWithSessionDetailDisplay_init; package$entities.StatementWithSessionDetailDisplay = StatementWithSessionDetailDisplay; Object.defineProperty(TerminologyEntry, 'Companion', {get: TerminologyEntry$Companion_getInstance}); Object.defineProperty(TerminologyEntry, '$serializer', {get: TerminologyEntry$$serializer_getInstance}); package$entities.TerminologyEntry_init_7574dk$ = TerminologyEntry_init; package$entities.TerminologyEntry = TerminologyEntry; Object.defineProperty(UidAndLabel, 'Companion', {get: UidAndLabel$Companion_getInstance}); Object.defineProperty(UidAndLabel, '$serializer', {get: UidAndLabel$$serializer_getInstance}); package$entities.UidAndLabel_init_wok9wd$ = UidAndLabel_init; package$entities.UidAndLabel = UidAndLabel; Object.defineProperty(UmAccount, 'Companion', {get: UmAccount$Companion_getInstance}); Object.defineProperty(UmAccount, '$serializer', {get: UmAccount$$serializer_getInstance}); package$entities.UmAccount_init_3u1mmq$ = UmAccount_init; package$entities.UmAccount = UmAccount; Object.defineProperty(UserSession, 'Companion', {get: UserSession$Companion_getInstance}); Object.defineProperty(UserSession, '$serializer', {get: UserSession$$serializer_getInstance}); package$entities.UserSession_init_4px92c$ = UserSession_init; package$entities.UserSession = UserSession; package$entities.UserSessionAndPerson = UserSessionAndPerson; Object.defineProperty(VerbDisplay, 'Companion', {get: VerbDisplay$Companion_getInstance}); Object.defineProperty(VerbDisplay, '$serializer', {get: VerbDisplay$$serializer_getInstance}); package$entities.VerbDisplay_init_qq2z10$ = VerbDisplay_init; package$entities.VerbDisplay = VerbDisplay; Object.defineProperty(VerbEntity, 'Companion', {get: VerbEntity$Companion_getInstance}); Object.defineProperty(VerbEntity, '$serializer', {get: VerbEntity$$serializer_getInstance}); package$entities.VerbEntity_init_1h4mlv$ = VerbEntity_init; package$entities.VerbEntity = VerbEntity; Object.defineProperty(XLangMapEntry, 'Companion', {get: XLangMapEntry$Companion_getInstance}); Object.defineProperty(XLangMapEntry, '$serializer', {get: XLangMapEntry$$serializer_getInstance}); package$entities.XLangMapEntry_init_keqouy$ = XLangMapEntry_init; package$entities.XLangMapEntry = XLangMapEntry; Object.defineProperty(XObjectEntity, 'Companion', {get: XObjectEntity$Companion_getInstance}); Object.defineProperty(XObjectEntity, '$serializer', {get: XObjectEntity$$serializer_getInstance}); package$entities.XObjectEntity_init_92etha$ = XObjectEntity_init; package$entities.XObjectEntity_init = XObjectEntity_init_0; package$entities.XObjectEntity = XObjectEntity; package$ext.addSyncCallback_oam1fn$ = addSyncCallback; package$ext.getFirstValue_z9yzxd$ = getFirstValue; AgentEntity$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; AgentEntityReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; AssignmentProgressSummary$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; Chat$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ChatMember$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ChatMemberReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ChatReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ChatWithLatestMessageAndCount$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; Clazz$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzAssignment$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzAssignmentContentJoin$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzAssignmentContentJoinReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzAssignmentReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzAssignmentRollUp$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzAssignmentWithCourseBlock$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzAssignmentWithMetrics$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzAssignmentWithTimezone$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzContentJoin$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzContentJoinReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzEnrolment$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzEnrolmentReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzEnrolmentWithClazz$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzEnrolmentWithClazzAndAttendance$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzEnrolmentWithLeavingReason$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzEnrolmentWithPerson$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzLog$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzLogAttendanceRecord$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzLogAttendanceRecordReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzLogAttendanceRecordWithPerson$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzLogReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzWithDisplayDetails$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzWithHolidayCalendarAndSchoolAndTerminology$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzWithListDisplayDetails$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ClazzWithSchool$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; Comments$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CommentsReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CommentsWithPerson$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ConnectivityStatus$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; Container$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContainerETag$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContainerEntry$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContainerEntryFile$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContainerEntryFileUidAndPath$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContainerEntryWithContainerEntryFile$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContainerEntryWithMd5$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContainerWithContainerEntryWithMd5$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContainerFilesWithContentEntry$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContainerImportJob$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContainerManifest$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContainerReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContainerUidAndMimeType$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContainerWithContentEntry$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentCategory$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentCategoryReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentCategorySchema$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentCategorySchemaReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntry$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryContentCategoryJoin$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryContentCategoryJoinReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryContentJobItemParams$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryParentChildJoin$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryParentChildJoinReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryPicture$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryPictureReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryRelatedEntryJoin$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryRelatedEntryJoinReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryRelatedEntryJoinWithLangName$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryRelatedEntryJoinWithLanguage$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryStatementScoreProgress$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryWithAttemptsSummary$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryWithBlockAndLanguage$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryWithLanguage$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryWithMostRecentContainer$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryWithParentChildJoinAndMostRecentContainer$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentEntryWithParentChildJoinAndStatusAndMostRecentContainer$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContentWithAttemptSummary$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContextXObjectStatementJoin$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ContextXObjectStatementJoinReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CourseAssignmentMark$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CourseAssignmentSubmission$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CourseAssignmentSubmissionAttachment$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CourseAssignmentSubmissionWithAttachment$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CourseBlock$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CourseBlockWithEntity$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CourseBlockWithEntityDb$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CourseDiscussion$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CourseDiscussionReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CourseGroupMember$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CourseGroupMemberPerson$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CourseGroupSet$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CoursePicture$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CoursePictureReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CourseTerminology$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; DeviceSession$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; DiscussionPost$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; DiscussionPostReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; DiscussionPostWithDetails$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; DiscussionTopic$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; DiscussionTopicListDetail$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; DiscussionTopicReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; DistinctCategorySchema$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; EntityRole$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; EntityRoleWithNameAndRole$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; EntryStatusResponse$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ErrorReportReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; GroupLearningSession$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; GroupLearningSessionReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; Holiday$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; HolidayCalendar$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; HolidayCalendarReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; HolidayCalendarWithNumEntries$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; HolidayReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; LangUidAndName$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; Language$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; LanguageReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; LanguageVariant$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; LanguageVariantReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; LearnerGroup$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; LearnerGroupMember$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; LearnerGroupMemberReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; LearnerGroupMemberWithPerson$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; LearnerGroupReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; LeavingReason$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; LeavingReasonReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; LocallyAvailableContainer$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; Message$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; MessageRead$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; MessageReadReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; MessageReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; MessageWithPerson$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; Moment$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; DateRangeMoment$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; NetworkNode$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; Person$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonAuth$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonAuth2Replicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonGroup$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonGroupMember$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonGroupMemberReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonGroupReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonGroupWithMemberCount$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonNameAndUid$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonParentJoin$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonParentJoinReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonParentJoinWithMinorPerson$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonPicture$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonPictureReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonWithAccount$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonWithAttemptsSummary$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonWithClazzEnrolmentDetails$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonWithDisplayDetails$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonWithPersonParentJoin$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; PersonWithSessionsDisplay$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; Report$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ReportFilter$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ReportFilterWithDisplayDetails$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ReportReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ReportSeries$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ReportWithSeriesWithFilters$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; Role$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; Schedule$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ScheduleReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; School$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; SchoolMember$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; SchoolMemberReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; SchoolMemberWithPerson$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; SchoolPicture$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; SchoolReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; SchoolWithHolidayCalendar$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; SchoolWithMemberCountAndLocation$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ScopedGrant$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ScopedGrantAndName$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ScopedGrantReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ScopedGrantWithName$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ScrapeQueueItem$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ScrapeQueueItemWithScrapeRun$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; ScrapeRun$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; Site$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; SiteReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; SiteTerms$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; SiteTermsReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; SiteTermsWithLanguage$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; StateContentEntity$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; StateContentEntityReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; StateEntity$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; StateEntityReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; StatementEntity$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; StatementEntityReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; StatementEntityWithDisplayDetails$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; StatementReportData$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; StatementWithSessionDetailDisplay$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; TerminologyEntry$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; UidAndLabel$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; UmAccount$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; UserSession$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; UserSessionReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; VerbDisplay$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; VerbEntity$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; VerbEntityReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; XLangMapEntry$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; XLangMapEntryReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; XObjectEntity$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; XObjectEntityReplicate$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; AuditLog$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CustomField$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CustomFieldValue$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; CustomFieldValueOption$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; DateRange$$serializer.prototype.typeParametersSerializers = GeneratedSerializer.prototype.typeParametersSerializers; UmAppDatabaseReplicationMigration91_92 = new DoorMigrationSync(91, 92, UmAppDatabaseReplicationMigration91_92$lambda); MIGRATION_92_93 = new DoorMigrationStatementList(92, 93, MIGRATION_92_93$lambda); MIGRATION_93_94 = new DoorMigrationStatementList(93, 94, MIGRATION_93_94$lambda); MIGRATION_94_95 = new DoorMigrationStatementList(94, 95, MIGRATION_94_95$lambda); MIGRATION_95_96 = new DoorMigrationStatementList(95, 96, MIGRATION_95_96$lambda); MIGRATION_96_97 = new DoorMigrationStatementList(96, 97, MIGRATION_96_97$lambda); MIGRATION_97_98 = new DoorMigrationStatementList(97, 98, MIGRATION_97_98$lambda); MIGRATION_98_99 = new DoorMigrationStatementList(98, 99, MIGRATION_98_99$lambda); MIGRATION_99_100 = new DoorMigrationStatementList(99, 100, MIGRATION_99_100$lambda); MIGRATION_100_101 = new DoorMigrationStatementList(100, 101, MIGRATION_100_101$lambda); MIGRATION_101_102 = new DoorMigrationStatementList(101, 102, MIGRATION_101_102$lambda); MIGRATION_102_103 = new DoorMigrationStatementList(102, 103, MIGRATION_102_103$lambda); MIGRATION_103_104 = new DoorMigrationStatementList(103, 104, MIGRATION_103_104$lambda); MIGRATION_104_105 = new DoorMigrationStatementList(104, 105, MIGRATION_104_105$lambda); MIGRATION_105_106 = new DoorMigrationStatementList(105, 106, MIGRATION_105_106$lambda); MIGRATION_106_107 = new DoorMigrationStatementList(106, 107, MIGRATION_106_107$lambda); return _; })); //# sourceMappingURL=UstadMobile-lib-database.js.map //# sourceMappingURL=UstadMobile-lib-database.js.map